singapore_charitable_donations 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c5161032c52b150484cf662cdb59461e21e33f0a
4
- data.tar.gz: f9b081a583d8afc40e14cc693a37e818d80d355b
3
+ metadata.gz: 5007963d5123d417bfe408fddf372a8322355673
4
+ data.tar.gz: e7ab809df3b4987cfe98b27faa27763240aee021
5
5
  SHA512:
6
- metadata.gz: 6bcf534b092f9abe6e2c6a3ab0913d8c08f8241553f43bdf5614f9891802a2f4a893241e669689d6f5ba826caeaeacbdcadfdafae73cf13a1f12a71bf9d6fcdd
7
- data.tar.gz: 90a1bb86ac796bd9381a4654d58e795a128a3f56166a14cb05618777cd352eb26083be649acf304ec20200ed38a00910b146257bfe6856bccde29be796e280db
6
+ metadata.gz: 9de067d6f6010ed6860aaeaeb4b4a8893ec3c4bd40019a0246208ae0a782fac90fb476185eec45dc3ff56e94976f79e82ccdc2231b63b3bb5152e7c2ff1134d5
7
+ data.tar.gz: 05474badcdf92252053fd6b135d4d2172d88a62ffa3718d2b69482ef47837d90cddc88d92f555b6d9fe294f86fe988a901c0ee28231332bececb43f5fde2562d
data/README.md CHANGED
@@ -33,9 +33,9 @@ Currently supported charitable donation types:
33
33
  * SINDA - Singapore Indian Development Association Fund
34
34
 
35
35
  ```ruby
36
- calculator = SingaporeCharitableDonations::Calculator.get(date: Date.new(2014, 12, 7), type: "CDAC")
37
- cdac_amount = calculator.calculate(2_000.00)
38
- cdac_amount #=> 1.00
36
+ calculator = SingaporeCharitableDonations::Calculators.get date: Date.new(2014, 12, 7),
37
+ type: "CDAC"
38
+ calculator.calculate(2_000.00) #=> 1.00
39
39
  ```
40
40
 
41
41
  ## Contributing
@@ -6,22 +6,21 @@ module SingaporeCharitableDonations
6
6
  module Year2009Calculator
7
7
  class << self
8
8
 
9
- # @param [BigDecimal] total_wage
9
+ # @param [BigDecimal] total_wages
10
10
  # @return [BigDecimal] contribution amount
11
11
  def calculate(total_wages)
12
- rounded_total_wages = total_wages.round
13
12
  case
14
- when rounded_total_wages <= 200.00
13
+ when total_wages <= 200.00
15
14
  BigDecimal "0.00"
16
- when rounded_total_wages <= 1_000.00
15
+ when total_wages < 1_001.00
17
16
  BigDecimal "2.00"
18
- when rounded_total_wages <= 2_000.00
17
+ when total_wages < 2_001.00
19
18
  BigDecimal "3.50"
20
- when rounded_total_wages <= 3_000.00
19
+ when total_wages < 3_001.00
21
20
  BigDecimal "5.00"
22
- when rounded_total_wages <= 4_000.00
21
+ when total_wages < 4_001.00
23
22
  BigDecimal "12.50"
24
- else # total_wages > 4_000.00
23
+ else # total_wages >= 4_001.00
25
24
  BigDecimal "16.00"
26
25
  end
27
26
  end
@@ -37,4 +36,4 @@ module SingaporeCharitableDonations
37
36
  end
38
37
  end
39
38
  end
40
- end
39
+ end
@@ -1,3 +1,3 @@
1
1
  module SingaporeCharitableDonations
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -79,4 +79,4 @@ describe SingaporeCharitableDonations::Calculators::MBMF::Year2009Calculator do
79
79
  end
80
80
 
81
81
  end
82
- end
82
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: singapore_charitable_donations
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Paca
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-06 00:00:00.000000000 Z
12
+ date: 2014-12-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -137,4 +137,3 @@ test_files:
137
137
  - spec/singapore_charitable_donations/calculators/sinda/year_2015_calculator_spec.rb
138
138
  - spec/singapore_charitable_donations/calculators_spec.rb
139
139
  - spec/spec_helper.rb
140
- has_rdoc: