enumerated_type 0.2.0 → 0.2.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.
@@ -22,7 +22,11 @@ module EnumeratedType
22
22
  name.to_s
23
23
  end
24
24
 
25
- def to_json
25
+ def to_json(*)
26
+ name.to_s
27
+ end
28
+
29
+ def as_json(*)
26
30
  name.to_s
27
31
  end
28
32
 
@@ -1,3 +1,3 @@
1
1
  module EnumeratedType
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -168,5 +168,19 @@ describe EnumeratedType do
168
168
  it "is the name (as a string)" do
169
169
  Gender::MALE.to_json.must_equal "male"
170
170
  end
171
+
172
+ it "doesn't raise an exception when given options" do
173
+ Gender::MALE.to_json(:stuff => "here")
174
+ end
175
+ end
176
+
177
+ describe "#as_json" do
178
+ it "is the name (as a string)" do
179
+ Gender::MALE.as_json.must_equal "male"
180
+ end
181
+
182
+ it "doesn't raise an exception when given options" do
183
+ Gender::MALE.as_json(:stuff => "here")
184
+ end
171
185
  end
172
186
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enumerated_type
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
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: 2014-01-08 00:00:00.000000000 Z
12
+ date: 2014-02-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -90,7 +90,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
90
90
  version: '0'
91
91
  segments:
92
92
  - 0
93
- hash: -1874679306341587618
93
+ hash: 3532502107879021321
94
94
  required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
@@ -99,10 +99,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  version: '0'
100
100
  segments:
101
101
  - 0
102
- hash: -1874679306341587618
102
+ hash: 3532502107879021321
103
103
  requirements: []
104
104
  rubyforge_project:
105
- rubygems_version: 1.8.26
105
+ rubygems_version: 1.8.23
106
106
  signing_key:
107
107
  specification_version: 3
108
108
  summary: Simple enumerated types