big_decimal_price 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG ADDED
@@ -0,0 +1,3 @@
1
+ Tues, Jan 28, 2011
2
+ - - - - - - - - -
3
+ - added "#in_cents"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{big_decimal_price}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Paul Campbell"]
12
- s.date = %q{2011-01-10}
12
+ s.date = %q{2011-01-18}
13
13
  s.description = %q{In Rails, you can store prices as a decimal with precision 8 and scale 2. This gem ensures that your templates print them like prices.}
14
14
  s.email = %q{paul@rslw.com}
15
15
  s.extra_rdoc_files = [
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
17
17
  "README.md"
18
18
  ]
19
19
  s.files = [
20
+ "CHANGELOG",
20
21
  "Gemfile",
21
22
  "Gemfile.lock",
22
23
  "LICENSE.txt",
data/lib/big_decimal.rb CHANGED
@@ -8,4 +8,8 @@ class BigDecimal
8
8
  end
9
9
  alias_method :to_s_without_format, :to_s
10
10
  alias_method :to_s, :to_s_with_format
11
+
12
+ def in_cents
13
+ self * 100
14
+ end
11
15
  end
@@ -8,4 +8,9 @@ describe BigDecimal do
8
8
  it "should maintain consistency" do
9
9
  BigDecimal.new('1.9').to_s('F').should == '1.9'
10
10
  end
11
+
12
+ describe "#in_cents" do
13
+ subject { BigDecimal.new('9.99') }
14
+ its(:in_cents){ should == 999 }
15
+ end
11
16
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: big_decimal_price
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 25
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 1
8
- - 0
9
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Paul Campbell
@@ -14,67 +15,71 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2011-01-10 00:00:00 +00:00
18
+ date: 2011-01-18 00:00:00 +00:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
22
+ type: :development
23
+ prerelease: false
21
24
  name: rspec
22
- requirement: &id001 !ruby/object:Gem::Requirement
25
+ version_requirements: &id001 !ruby/object:Gem::Requirement
23
26
  none: false
24
27
  requirements:
25
28
  - - ~>
26
29
  - !ruby/object:Gem::Version
30
+ hash: 3
27
31
  segments:
28
32
  - 2
29
33
  - 3
30
34
  - 0
31
35
  version: 2.3.0
36
+ requirement: *id001
37
+ - !ruby/object:Gem::Dependency
32
38
  type: :development
33
39
  prerelease: false
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
40
  name: bundler
37
- requirement: &id002 !ruby/object:Gem::Requirement
41
+ version_requirements: &id002 !ruby/object:Gem::Requirement
38
42
  none: false
39
43
  requirements:
40
44
  - - ~>
41
45
  - !ruby/object:Gem::Version
46
+ hash: 23
42
47
  segments:
43
48
  - 1
44
49
  - 0
45
50
  - 0
46
51
  version: 1.0.0
52
+ requirement: *id002
53
+ - !ruby/object:Gem::Dependency
47
54
  type: :development
48
55
  prerelease: false
49
- version_requirements: *id002
50
- - !ruby/object:Gem::Dependency
51
56
  name: jeweler
52
- requirement: &id003 !ruby/object:Gem::Requirement
57
+ version_requirements: &id003 !ruby/object:Gem::Requirement
53
58
  none: false
54
59
  requirements:
55
60
  - - ~>
56
61
  - !ruby/object:Gem::Version
62
+ hash: 7
57
63
  segments:
58
64
  - 1
59
65
  - 5
60
66
  - 2
61
67
  version: 1.5.2
68
+ requirement: *id003
69
+ - !ruby/object:Gem::Dependency
62
70
  type: :development
63
71
  prerelease: false
64
- version_requirements: *id003
65
- - !ruby/object:Gem::Dependency
66
72
  name: rcov
67
- requirement: &id004 !ruby/object:Gem::Requirement
73
+ version_requirements: &id004 !ruby/object:Gem::Requirement
68
74
  none: false
69
75
  requirements:
70
76
  - - ">="
71
77
  - !ruby/object:Gem::Version
78
+ hash: 3
72
79
  segments:
73
80
  - 0
74
81
  version: "0"
75
- type: :development
76
- prerelease: false
77
- version_requirements: *id004
82
+ requirement: *id004
78
83
  description: In Rails, you can store prices as a decimal with precision 8 and scale 2. This gem ensures that your templates print them like prices.
79
84
  email: paul@rslw.com
80
85
  executables: []
@@ -85,6 +90,7 @@ extra_rdoc_files:
85
90
  - LICENSE.txt
86
91
  - README.md
87
92
  files:
93
+ - CHANGELOG
88
94
  - Gemfile
89
95
  - Gemfile.lock
90
96
  - LICENSE.txt
@@ -110,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
116
  requirements:
111
117
  - - ">="
112
118
  - !ruby/object:Gem::Version
113
- hash: 4103158060298213116
119
+ hash: 3
114
120
  segments:
115
121
  - 0
116
122
  version: "0"
@@ -119,6 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
125
  requirements:
120
126
  - - ">="
121
127
  - !ruby/object:Gem::Version
128
+ hash: 3
122
129
  segments:
123
130
  - 0
124
131
  version: "0"