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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fcfdd7eb8e16a788b9dc74ea13cafee13de7b263
4
- data.tar.gz: 5fc064e8922178d167c091ca28a0de43cb1d1d6c
3
+ metadata.gz: 999a1820dce76bc226c194b24f5e33b4b2e6ebdd
4
+ data.tar.gz: d5c6fea624ec0b72200b4bbdc99da85b52a0d288
5
5
  SHA512:
6
- metadata.gz: 39f105929365d7bb2f2adce070e85c7e0f77a92ecac4cadf4f78b3013e071922f5bd24c857740e7df53782f7462655eb7dbba4bed6ce99bfd5e0f9719953e6fb
7
- data.tar.gz: df0f7c1e3a39cf6ac4e66153b44e7b5d53655b570fc6ada41794ef09278ac2fa7e6837bc411dd9bdd8f18062a0309dafe557fb5d1e3f9e94473b3d91a205a2e3
6
+ metadata.gz: 0bedc902cb5ec1325e300c56b9b387f067c4463d94209c7dfea18da8395268bd7ae90e1c4ba6833fcadaa8d645aedf972c253b11a559b674b47cfae907b88c7e
7
+ data.tar.gz: 3b8b292ce65c7d7ffebc5f04f5089582b376681fd06df333b5f9fdaddc9b1e6efa703637a5be0ef8ba10c9d4f7992784223813fad40bd8955ba503b71003b43e
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- enumerate_it (1.2.6)
4
+ enumerate_it (1.2.7)
5
5
  activesupport (>= 3.0.0)
6
6
 
7
7
  GEM
@@ -117,7 +117,7 @@ module EnumerateIt
117
117
  end
118
118
 
119
119
  def self.define_enumeration_constant(name, value)
120
- const_set name.to_s.upcase, value
120
+ const_set name.to_s.underscore.upcase, value
121
121
  end
122
122
  end
123
123
  end
@@ -1,3 +1,3 @@
1
1
  module EnumerateIt
2
- VERSION = "1.2.6"
2
+ VERSION = "1.2.7"
3
3
  end
@@ -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.6
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-03-11 00:00:00.000000000 Z
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.2.2
150
+ rubygems_version: 2.4.5
151
151
  signing_key:
152
152
  specification_version: 4
153
153
  summary: Ruby Enumerations