papla 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3718d52dbf2b2e34996eebe042384eee6f50e482
4
- data.tar.gz: 84e1e63ab9ea2260837b2a27f16affe9379beab5
2
+ SHA256:
3
+ metadata.gz: ad8bc60cfbc7433ddf213f56f8552f8f4ec7c6fe6d16c69defe6a66f2cf89262
4
+ data.tar.gz: 9781f0eeaad5b0574d5d064956925089022d429e8d375806336b3fc0474de6f3
5
5
  SHA512:
6
- metadata.gz: baad611511a89f89ddd8a0b188789608e129dc03525c65a91e3067a235cdde3a990590b3606f1a4b63bac7e2a05f2738c0dc0d361b4fb2b3fb9f08b51fe5e192
7
- data.tar.gz: de2988b86a5c916b58367a0a1102b50ddccbd23681ce8227a696dc974504046521f25b50015cee15fcb636e810893d1f6ad839e3432e29ce0ac32a38ae2aacc6
6
+ metadata.gz: 3585afa7107b81096c31182e2e38d11de1e3069a9a49704b106794cc73c25121ae40e54af72c18b9271a369aea06855c7cd595d41ebab5493ab1cef25fbc9269
7
+ data.tar.gz: 81235bd5e501776861e8531f9d6f5de3d2a1c5bc1b160e5aba83e41605b36084fecfa7b8aa602d27db33608c34f7d41a030121f25da2f566c2ee91c287f8d1fe
@@ -1 +1 @@
1
- 2.1.2
1
+ 2.5.1
@@ -1,4 +1,3 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
3
  - 2.1.2
@@ -1,3 +1,10 @@
1
+ ### Unreleased
2
+
3
+ ### 0.2.0 (2018-08-27)
4
+
5
+ * Fix deprecation warning when using Money
6
+ * Ruby 2.5 compatibility
7
+
1
8
  ### 0.1.2 (2014-09-03)
2
9
 
3
10
  * Support symbol keys in pluralization rules
@@ -1,7 +1,7 @@
1
1
  require 'papla/backend'
2
2
 
3
3
  module Papla
4
- autoload :FixnumConverter, 'papla/fixnum_converter'
4
+ autoload :IntegerConverter, 'papla/integer_converter'
5
5
  autoload :FloatConverter, 'papla/float_converter'
6
6
  autoload :MoneyConverter, 'papla/money_converter'
7
7
 
@@ -68,8 +68,8 @@ module Papla
68
68
  case number
69
69
  when defined?(Money) && Money then MoneyConverter
70
70
  when Float then FloatConverter
71
- when Fixnum then FixnumConverter
72
- else raise ArgumentError, "Unsupported type: #{klass}"
71
+ when Integer then IntegerConverter
72
+ else raise ArgumentError, "Unsupported type: #{number.class}"
73
73
  end
74
74
  end
75
75
  end
@@ -2,7 +2,7 @@ require 'bigdecimal'
2
2
  require 'bigdecimal/util'
3
3
 
4
4
  module Papla
5
- class FloatConverter < FixnumConverter
5
+ class FloatConverter < IntegerConverter
6
6
  def convert(number)
7
7
  number = number.round(2)
8
8
  append_cents(super(number.to_i), number)
@@ -1,5 +1,5 @@
1
1
  module Papla
2
- class FixnumConverter
2
+ class IntegerConverter
3
3
  def convert(number)
4
4
  validate!(number)
5
5
 
@@ -7,7 +7,7 @@ module Papla
7
7
  private
8
8
 
9
9
  def append_currency(phrase, money)
10
- '%s %s' % [phrase, money.currency_as_string]
10
+ '%s %s' % [phrase, money.currency]
11
11
  end
12
12
  end
13
13
  end
@@ -1,3 +1,3 @@
1
1
  module Papla
2
- VERSION = '0.1.2'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: papla
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olek Janiszewski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-03 00:00:00.000000000 Z
11
+ date: 2018-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -85,8 +85,8 @@ files:
85
85
  - Rakefile
86
86
  - lib/papla.rb
87
87
  - lib/papla/backend.rb
88
- - lib/papla/fixnum_converter.rb
89
88
  - lib/papla/float_converter.rb
89
+ - lib/papla/integer_converter.rb
90
90
  - lib/papla/locale/en.rb
91
91
  - lib/papla/locale/en.yml
92
92
  - lib/papla/locale/pl.rb
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  version: '0'
117
117
  requirements: []
118
118
  rubyforge_project: papla
119
- rubygems_version: 2.2.2
119
+ rubygems_version: 2.7.7
120
120
  signing_key:
121
121
  specification_version: 4
122
122
  summary: Use Ruby to convert numbers into Polish and English words