enumerate_it 1.2.6 → 1.2.7
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/enumerate_it/base.rb +1 -1
- data/lib/enumerate_it/version.rb +1 -1
- data/spec/enumerate_it/base_spec.rb +4 -0
- data/spec/support/test_classes.rb +6 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 999a1820dce76bc226c194b24f5e33b4b2e6ebdd
|
|
4
|
+
data.tar.gz: d5c6fea624ec0b72200b4bbdc99da85b52a0d288
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0bedc902cb5ec1325e300c56b9b387f067c4463d94209c7dfea18da8395268bd7ae90e1c4ba6833fcadaa8d645aedf972c253b11a559b674b47cfae907b88c7e
|
|
7
|
+
data.tar.gz: 3b8b292ce65c7d7ffebc5f04f5089582b376681fd06df333b5f9fdaddc9b1e6efa703637a5be0ef8ba10c9d4f7992784223813fad40bd8955ba503b71003b43e
|
data/Gemfile.lock
CHANGED
data/lib/enumerate_it/base.rb
CHANGED
data/lib/enumerate_it/version.rb
CHANGED
|
@@ -8,6 +8,10 @@ describe EnumerateIt::Base do
|
|
|
8
8
|
end
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
+
it "creates constants replacing its dashes with underscores" do
|
|
12
|
+
TestEnumerationWithDash::PT_BR.should == 'pt-BR'
|
|
13
|
+
end
|
|
14
|
+
|
|
11
15
|
it "creates a method that returns the allowed values in the enumeration's class" do
|
|
12
16
|
TestEnumeration.list.should == ['1', '2', '3']
|
|
13
17
|
end
|
|
@@ -31,6 +31,12 @@ class TestEnumerationWithReservedWords < EnumerateIt::Base
|
|
|
31
31
|
associate_values :new => 1, :no_schedule => 2, :with_schedule => 3, :suspended => 4
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
+
class TestEnumerationWithDash < EnumerateIt::Base
|
|
35
|
+
associate_values(
|
|
36
|
+
'pt-BR'
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
|
|
34
40
|
class Foobar < EnumerateIt::Base
|
|
35
41
|
associate_values(
|
|
36
42
|
:bar => 'foo'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: enumerate_it
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Cássio Marques
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-05-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
147
147
|
version: '0'
|
|
148
148
|
requirements: []
|
|
149
149
|
rubyforge_project:
|
|
150
|
-
rubygems_version: 2.
|
|
150
|
+
rubygems_version: 2.4.5
|
|
151
151
|
signing_key:
|
|
152
152
|
specification_version: 4
|
|
153
153
|
summary: Ruby Enumerations
|