File tree Expand file tree Collapse file tree 8 files changed +75
-6
lines changed
spec/faithteams/api/v2/entity Expand file tree Collapse file tree 8 files changed +75
-6
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,8 @@ Layout/EmptyLinesAroundModuleBody:
65
65
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
66
66
Style/HashSyntax :
67
67
Enabled : true
68
+ EnforcedStyle : ruby19
69
+ EnforcedShorthandSyntax : never # Ruby 3.1 allows omission of value name, but we want to support prior Ruby versions
68
70
69
71
Layout/FirstArgumentIndentation :
70
72
Enabled : true
Original file line number Diff line number Diff line change 1
- ruby 3.0.6
1
+ ruby 3.3.5
2
+
Original file line number Diff line number Diff line change @@ -7,6 +7,27 @@ All notable changes to this project will be documented in this file.
7
7
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
8
8
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
9
9
10
+ ## [ Unreleased]
11
+
12
+ ### Added
13
+
14
+ 1 . Adds ` Entity::Fund ` ` active? ` and ` default? ` interrogatives
15
+
16
+ ## [ 4.0.1] - 2024-09-13
17
+
18
+ This version adds support for Ruby 3.3.5. No real changes were required. We just needed to add some gems to the gemspec
19
+ to silence deprecation warnings.
20
+
21
+ ### Added
22
+
23
+ 1 . Add dependencies which will be removed from a future version of Ruby. (IN-2512)
24
+
25
+ ## [ 4.0.0] - 2024-09-11
26
+
27
+ ### Changed
28
+
29
+ 1 . Update ActiveSupport Version to support Rails 7. (IN-2109)
30
+
10
31
## [ 3.0.1] - 2024-09-09
11
32
12
33
### Changed
Original file line number Diff line number Diff line change 1
1
PATH
2
2
remote: .
3
3
specs:
4
- faithteams-api (3.0 .1 )
5
- activesupport (>= 6.1.7 )
4
+ faithteams-api (4.1 .1 )
5
+ activesupport (>= 7.0.8 , <= 7.1.5.1 )
6
6
http (~> 5.1 )
7
+ logger (~> 1.6.1 )
8
+ ostruct (~> 0.6.0 )
7
9
rexml (~> 3.3.6 )
8
10
9
11
GEM
87
89
notiffany (0.1.3 )
88
90
nenv (~> 0.1 )
89
91
shellany (~> 0.0 )
92
+ ostruct (0.6.1 )
90
93
parallel (1.26.3 )
91
94
parser (3.3.6.0 )
92
95
ast (~> 2.4.1 )
136
139
rubocop-rspec (1.42.0 )
137
140
rubocop (>= 0.87.0 )
138
141
ruby-progressbar (1.13.0 )
139
- securerandom (0.3.2 )
142
+ securerandom (0.4.1 )
140
143
shellany (0.0.1 )
141
144
simplecov (0.22.0 )
142
145
docile (~> 1.1 )
Original file line number Diff line number Diff line change @@ -32,8 +32,10 @@ Gem::Specification.new do |spec|
32
32
spec . executables = spec . files . grep ( %r{^exe/} ) { |f | File . basename ( f ) }
33
33
spec . require_paths = [ "lib" ]
34
34
35
- spec . add_dependency "activesupport" , ">= 6.1.7 "
35
+ spec . add_dependency "activesupport" , ">= 7.0.8" , "<= 7.1.5.1 "
36
36
spec . add_dependency "http" , "~> 5.1"
37
+ spec . add_dependency "logger" , "~> 1.6.1"
38
+ spec . add_dependency "ostruct" , "~> 0.6.0"
37
39
spec . add_dependency "rexml" , "~> 3.3.6" # only needs to be specified to address security warning
38
40
39
41
spec . add_development_dependency "byebug" , "~> 11.1"
Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ def default
11
11
read_attribute ( :isDefault ) . presence
12
12
end
13
13
14
+ # @return [Boolean]
15
+ def default?
16
+ default == "Y"
17
+ end
18
+
14
19
# @return [String, nil]
15
20
def description
16
21
read_attribute ( :description ) . presence
@@ -41,6 +46,11 @@ def status
41
46
read_attribute ( :status ) . presence
42
47
end
43
48
49
+ # @return [Boolean]
50
+ def active?
51
+ status == "A"
52
+ end
53
+
44
54
# @return [String, nil] "T" for true?, "Y" for yes?
45
55
def tax_deductible
46
56
read_attribute ( :taxDeductible ) . presence
Original file line number Diff line number Diff line change 2
2
3
3
module FaithTeams
4
4
# Current version number.
5
- VERSION = "3.0 .1"
5
+ VERSION = "4.1 .1"
6
6
end
Original file line number Diff line number Diff line change 22
22
end
23
23
end
24
24
25
+ describe "#default?" do
26
+ context "when default is 'Y'" do
27
+ it "returns true" do
28
+ fund = described_class . new ( attributes : { "isDefault" => "Y" } )
29
+ expect ( fund ) . to be_default
30
+ end
31
+ end
32
+
33
+ context "when default isn't 'Y'" do
34
+ it "returns false" do
35
+ expect ( fund ) . not_to be_default
36
+ end
37
+ end
38
+ end
39
+
25
40
describe "description" do
26
41
it "is a String" do
27
42
expect ( fund . description ) . to be_instance_of ( String )
64
79
end
65
80
end
66
81
82
+ describe "#active?" do
83
+ context "when status is 'A'" do
84
+ it "returns true" do
85
+ expect ( fund ) . to be_active
86
+ end
87
+ end
88
+
89
+ context "when status isn't 'A'" do
90
+ it "returns false" do
91
+ fund = described_class . new ( attributes : { "status" => "I" } )
92
+ expect ( fund ) . not_to be_active
93
+ end
94
+ end
95
+ end
96
+
67
97
describe "tax_deductible" do
68
98
it "is a String" do
69
99
expect ( fund . tax_deductible ) . to be_instance_of ( String )
You can’t perform that action at this time.
0 commit comments