enum_help 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d041b071b80798a39880cc1fa72bbd4dcf329849
4
- data.tar.gz: f0477e5d2c29fa3dcbcf580f78b53cc4c8f7dbc7
3
+ metadata.gz: e8320d3b8657e8e765ed1024aa49bc859fe1ac3f
4
+ data.tar.gz: d97c48fefca4444b4b6cc13ef3ba25a2b1e1439b
5
5
  SHA512:
6
- metadata.gz: fce939611966166b5e82749f53ac2d1386780576d3010c871afcfcad31482403696f717714bd667f3b26055c2951e27bc89ee4ef7d472ded74cdd63fd50876ed
7
- data.tar.gz: 59f664a9598971f560078870073bede73b811c03f1fdadfefe84b7baa50a86a17e40c6fd7988aa53084b3175ab1774062cbc757d79d93dcaeda51bc4beabc584
6
+ metadata.gz: e66621eeb64f4b3fb241952dec31bafa80d8d16df3a767e990d9e4a4c97ebc105bbbb30d72df2d9d0a14a771ced53724e47c81066bf13da759db72f6e38e0ace
7
+ data.tar.gz: f41e5c5ab2976510cbd504538453a40d628a093cdb2d1bebf864a5094d4a5304bfa9e96a747ff563e64b96148feeafbea1227c83e5bce097e63a4f4f638305de
@@ -42,9 +42,10 @@ module EnumHelp
42
42
 
43
43
  klass.instance_eval <<-METHOD, __FILE__, __LINE__
44
44
  def #{collection_i18n_method_name}
45
- #{collection_method_name}.collect do |label, _|
45
+ collection_array = #{collection_method_name}.collect do |label, _|
46
46
  [label, ::EnumHelp::Helper.translate_enum_label(self, :#{attr_name}, label)]
47
- end.to_h.with_indifferent_access
47
+ end
48
+ Hash[collection_array].with_indifferent_access
48
49
  end
49
50
  METHOD
50
51
  end
@@ -1,3 +1,3 @@
1
1
  module EnumHelp
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
metadata CHANGED
@@ -1,51 +1,52 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enum_help
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lester Zhao
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-26 00:00:00.000000000 Z
11
+ date: 2014-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.5'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description: ' Help ActiveRecord::Enum feature to work fine with I18n and simple_form. '
41
+ description: " Help ActiveRecord::Enum feature to work fine with I18n and simple_form.
42
+ \ "
42
43
  email:
43
44
  - zm.backer@gmail.com
44
45
  executables: []
45
46
  extensions: []
46
47
  extra_rdoc_files: []
47
48
  files:
48
- - .gitignore
49
+ - ".gitignore"
49
50
  - Gemfile
50
51
  - LICENSE.txt
51
52
  - README.md
@@ -66,17 +67,17 @@ require_paths:
66
67
  - lib
67
68
  required_ruby_version: !ruby/object:Gem::Requirement
68
69
  requirements:
69
- - - '>='
70
+ - - ">="
70
71
  - !ruby/object:Gem::Version
71
72
  version: '0'
72
73
  required_rubygems_version: !ruby/object:Gem::Requirement
73
74
  requirements:
74
- - - '>='
75
+ - - ">="
75
76
  - !ruby/object:Gem::Version
76
77
  version: '0'
77
78
  requirements: []
78
79
  rubyforge_project:
79
- rubygems_version: 2.0.3
80
+ rubygems_version: 2.2.2
80
81
  signing_key:
81
82
  specification_version: 4
82
83
  summary: Extends of ActiveRecord::Enum, which can used in simple_form and internationalization