amount_inflector 3.0.2 → 3.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,77 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ actionpack (3.2.9)
5
+ activemodel (= 3.2.9)
6
+ activesupport (= 3.2.9)
7
+ builder (~> 3.0.0)
8
+ erubis (~> 2.7.0)
9
+ journey (~> 1.0.4)
10
+ rack (~> 1.4.0)
11
+ rack-cache (~> 1.2)
12
+ rack-test (~> 0.6.1)
13
+ sprockets (~> 2.2.1)
14
+ activemodel (3.2.9)
15
+ activesupport (= 3.2.9)
16
+ builder (~> 3.0.0)
17
+ activesupport (3.2.9)
18
+ i18n (~> 0.6)
19
+ multi_json (~> 1.0)
20
+ builder (3.0.4)
21
+ diff-lcs (1.1.3)
22
+ erubis (2.7.0)
23
+ git (1.2.5)
24
+ hike (1.2.1)
25
+ i18n (0.6.1)
26
+ jeweler (1.6.4)
27
+ bundler (~> 1.0)
28
+ git (>= 1.2.5)
29
+ rake
30
+ journey (1.0.4)
31
+ json (1.7.5)
32
+ multi_json (1.3.7)
33
+ rack (1.4.1)
34
+ rack-cache (1.2)
35
+ rack (>= 0.4)
36
+ rack-ssl (1.3.2)
37
+ rack
38
+ rack-test (0.6.2)
39
+ rack (>= 1.0)
40
+ railties (3.2.9)
41
+ actionpack (= 3.2.9)
42
+ activesupport (= 3.2.9)
43
+ rack-ssl (~> 1.3.2)
44
+ rake (>= 0.8.7)
45
+ rdoc (~> 3.4)
46
+ thor (>= 0.14.6, < 2.0)
47
+ rake (10.0.2)
48
+ rdoc (3.12)
49
+ json (~> 1.4)
50
+ rspec (2.4.0)
51
+ rspec-core (~> 2.4.0)
52
+ rspec-expectations (~> 2.4.0)
53
+ rspec-mocks (~> 2.4.0)
54
+ rspec-core (2.4.0)
55
+ rspec-expectations (2.4.0)
56
+ diff-lcs (~> 1.1.2)
57
+ rspec-mocks (2.4.0)
58
+ rspec-rails (2.4.1)
59
+ actionpack (~> 3.0)
60
+ activesupport (~> 3.0)
61
+ railties (~> 3.0)
62
+ rspec (~> 2.4.0)
63
+ sprockets (2.2.2)
64
+ hike (~> 1.2)
65
+ multi_json (~> 1.0)
66
+ rack (~> 1.0)
67
+ tilt (~> 1.1, != 1.3.0)
68
+ thor (0.16.0)
69
+ tilt (1.3.3)
70
+
71
+ PLATFORMS
72
+ ruby
73
+
74
+ DEPENDENCIES
75
+ bundler
76
+ jeweler (~> 1.6.4)
77
+ rspec-rails (~> 2.4.0)
data/README.md CHANGED
@@ -31,6 +31,8 @@ Release notes
31
31
  -------------
32
32
  v.3.0.2
33
33
  - added support for inflection :promet
34
+ v.3.0.3
35
+ - Fixed strange bug, but lost fine tuning for 101_000 amount
34
36
 
35
37
  Contributing to amount_inflector
36
38
  ---------------------------------
data/Rakefile CHANGED
@@ -38,12 +38,3 @@ end
38
38
 
39
39
  task :default => :spec
40
40
 
41
- require 'rake/rdoctask'
42
- Rake::RDocTask.new do |rdoc|
43
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
44
-
45
- rdoc.rdoc_dir = 'rdoc'
46
- rdoc.title = "emenu #{version}"
47
- rdoc.rdoc_files.include('README*')
48
- rdoc.rdoc_files.include('lib/**/*.rb')
49
- end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.2
1
+ 3.0.3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "amount_inflector"
8
- s.version = "3.0.2"
8
+ s.version = "3.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kresimir Bojcic"]
12
- s.date = "2012-11-13"
12
+ s.date = "2013-07-30"
13
13
  s.description = "Amount Inflector for year/month/week/day (Croatian)"
14
14
  s.email = "kresimir.bojcic@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
21
21
  ".rspec",
22
22
  ".travis.yml",
23
23
  "Gemfile",
24
+ "Gemfile.lock",
24
25
  "LICENSE.txt",
25
26
  "README.md",
26
27
  "Rakefile",
@@ -35,7 +36,7 @@ Gem::Specification.new do |s|
35
36
  s.homepage = "http://github.com/drKreso/amount_inflector"
36
37
  s.licenses = ["MIT"]
37
38
  s.require_paths = ["lib"]
38
- s.rubygems_version = "1.8.24"
39
+ s.rubygems_version = "1.8.23"
39
40
  s.summary = "Amount Inflector"
40
41
 
41
42
  if s.respond_to? :specification_version then
@@ -70,6 +70,9 @@ class NumberToKune
70
70
  return '' if amount == "1" && !unit.nil?
71
71
  raise "Nisu podrzani iznosi preko bilijun, a poslan je iznos #{amount}" if amount.to_i >= 1_000_000_000_000
72
72
 
73
+ #degrade thousand
74
+ unit = nil if unit == :tisuca and amount.to_i < 1000
75
+
73
76
  amount = amount.to_i.to_s
74
77
  if amount.to_i >= 1000
75
78
  decompose(amount, in_words)
@@ -42,6 +42,10 @@ describe NumberToKune do
42
42
  NumberToKune.convert(97_543.21).should == "devedesetsedamtisućapetstočetrdesettri kune i dvadesetjedna lipa"
43
43
  end
44
44
 
45
+ it 'converts this amount correctly' do
46
+ NumberToKune.convert(34_551.25).should == "tridesetčetiritisućepetstopedesetjedna kuna i dvadesetpet lipa"
47
+ end
48
+
45
49
  it 'reports on a too big number of a number' do
46
50
  lambda do
47
51
  NumberToKune.convert(10000000000000)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amount_inflector
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-13 00:00:00.000000000 Z
12
+ date: 2013-07-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec-rails
@@ -71,6 +71,7 @@ files:
71
71
  - .rspec
72
72
  - .travis.yml
73
73
  - Gemfile
74
+ - Gemfile.lock
74
75
  - LICENSE.txt
75
76
  - README.md
76
77
  - Rakefile
@@ -96,7 +97,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
97
  version: '0'
97
98
  segments:
98
99
  - 0
99
- hash: 3817959003824385715
100
+ hash: 1433781764821209501
100
101
  required_rubygems_version: !ruby/object:Gem::Requirement
101
102
  none: false
102
103
  requirements:
@@ -105,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
106
  version: '0'
106
107
  requirements: []
107
108
  rubyforge_project:
108
- rubygems_version: 1.8.24
109
+ rubygems_version: 1.8.23
109
110
  signing_key:
110
111
  specification_version: 3
111
112
  summary: Amount Inflector