papla 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ ### 0.1.1 (2012-04-23)
2
+
3
+ * Eagerly require backend to ensure translations are loaded
4
+
1
5
  ### 0.1.0 (2012-04-20)
2
6
 
3
7
  * Support Money
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Papla [![Build Status](https://secure.travis-ci.org/exviva/papla.png)](http://travis-ci.org/exviva/papla)
1
+ ## Papla [![Build Status](https://secure.travis-ci.org/exviva/papla.png)](http://travis-ci.org/exviva/papla)
2
2
 
3
3
  Papla is a Ruby gem that allows you to convert numbers into Polish
4
4
  and English words (e.g. `153` into `"Sto pięćdziesiąt trzy"`
@@ -6,7 +6,7 @@ or `44` into `"Forty four"`), including the decimal part as cents
6
6
  and currency symbol. Its primary use case are invoices, where
7
7
  the total amount has to be displayed as words at the bottom line.
8
8
 
9
- ## Installation
9
+ ### Installation
10
10
 
11
11
  To install Papla, run
12
12
 
@@ -20,9 +20,9 @@ gem 'papla'
20
20
 
21
21
  to your `Gemfile`.
22
22
 
23
- ## Usage
23
+ ### Usage
24
24
 
25
- ### Basic examples
25
+ #### Basic examples
26
26
 
27
27
  ```ruby
28
28
  I18n.locale = :pl
@@ -34,8 +34,6 @@ I18n.locale = :en
34
34
  Papla[1_234] # => "One thousand two hundred thirty four"
35
35
  ```
36
36
 
37
- ### Cents and currency
38
-
39
37
  #### Cents
40
38
 
41
39
  When given a `Float`, Papla will assume that the decimal part represents cents.
@@ -50,21 +48,7 @@ Papla[87.654321] # => "Osiemdziesiąt siedem 65/100"
50
48
  Papla[2.999] # => "Trzy 00/100"
51
49
  ```
52
50
 
53
- #### Currency
54
-
55
- This feature is planned for future releases.
56
-
57
- ## Integration with I18n and Money
58
-
59
- ### I18n
60
-
61
- Localization is provided by I18n. See `lib/papla/backend.rb`
62
- for details of keys used. Currently `:pl` and `:en` locales are supported.
63
-
64
- Note: English support is not fully correct, e.g. `123` becomes
65
- `"One hundred twenty three"` and not `"One hundred and twenty three"`.
66
-
67
- ### Money
51
+ #### Money
68
52
 
69
53
  If you're using the `money` gem, you can pass in an instance of `Money` to Papla.
70
54
  The returned string will contain the dollars part as words,
@@ -81,6 +65,14 @@ discounted_price = Money.new(9999, 'PLN')
81
65
  Papla[discounted_price] # => "Ninety nine 99/100 PLN"
82
66
  ```
83
67
 
84
- ## Documentation
68
+ ### I18n
69
+
70
+ Localization is provided by I18n. See `lib/papla/backend.rb`
71
+ for details of keys used. Currently `:pl` and `:en` locales are supported.
72
+
73
+ Note: English support is not fully correct, e.g. `123` becomes
74
+ `"One hundred twenty three"` and not `"One hundred and twenty three"`.
75
+
76
+ ### Documentation
85
77
 
86
78
  Documentation is available at [RubyDoc.info](http://rubydoc.info/github/exviva/papla/master/frames).
@@ -1,5 +1,6 @@
1
+ require 'papla/backend'
2
+
1
3
  module Papla
2
- autoload :Backend, 'papla/backend'
3
4
  autoload :FixnumConverter, 'papla/fixnum_converter'
4
5
  autoload :FloatConverter, 'papla/float_converter'
5
6
  autoload :MoneyConverter, 'papla/money_converter'
@@ -1,3 +1,3 @@
1
1
  module Papla
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -21,6 +21,6 @@ Gem::Specification.new do |s|
21
21
  s.add_dependency 'i18n'
22
22
 
23
23
  s.add_development_dependency 'money'
24
- s.add_development_dependency 'rspec', '>= 2.8.0'
24
+ s.add_development_dependency 'rspec'
25
25
  s.add_development_dependency 'rake'
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: papla
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-20 00:00:00.000000000 Z
12
+ date: 2012-04-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n
16
- requirement: &17749220 !ruby/object:Gem::Requirement
16
+ requirement: &8447560 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *17749220
24
+ version_requirements: *8447560
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: money
27
- requirement: &17748560 !ruby/object:Gem::Requirement
27
+ requirement: &8447080 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,21 +32,21 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *17748560
35
+ version_requirements: *8447080
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &17763960 !ruby/object:Gem::Requirement
38
+ requirement: &8446580 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
42
42
  - !ruby/object:Gem::Version
43
- version: 2.8.0
43
+ version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *17763960
46
+ version_requirements: *8446580
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
- requirement: &17763380 !ruby/object:Gem::Requirement
49
+ requirement: &8445960 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *17763380
57
+ version_requirements: *8445960
58
58
  description: Papla is a Ruby gem that allows you to convert numbers into Polish and
59
59
  English words.
60
60
  email: