symbolize 3.0.2 → 3.0.3
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.
- data/VERSION +1 -1
- data/lib/symbolize.rb +3 -6
- data/symbolize.gemspec +20 -23
- metadata +6 -19
- data/.gitignore +0 -5
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.3
|
data/lib/symbolize.rb
CHANGED
@@ -59,11 +59,7 @@ module Symbolize
|
|
59
59
|
|
60
60
|
unless enum.nil?
|
61
61
|
# Little monkeypatching, <1.8 Hashes aren't ordered.
|
62
|
-
hsh =
|
63
|
-
Hash
|
64
|
-
elsif defined?('ActiveSupport')
|
65
|
-
ActiveSupport::OrderedHash
|
66
|
-
end
|
62
|
+
hsh = RUBY_VERSION > '1.9' || !defined?("ActiveSupport") ? Hash : ActiveSupport::OrderedHash
|
67
63
|
|
68
64
|
attr_names.each do |attr_name|
|
69
65
|
attr_name = attr_name.to_s
|
@@ -71,7 +67,8 @@ module Symbolize
|
|
71
67
|
if enum.is_a?(Hash)
|
72
68
|
values = enum
|
73
69
|
else
|
74
|
-
values = hsh
|
70
|
+
values = hsh.new
|
71
|
+
enum.map { |v| [v, (configuration[:capitalize] ? v.to_s.capitalize : v.to_s)] }.each { |k, v| values[k] = v }
|
75
72
|
end
|
76
73
|
|
77
74
|
# Get the values of :in
|
data/symbolize.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{symbolize}
|
8
|
-
s.version = "3.0.
|
8
|
+
s.version = "3.0.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Marcos Piccinini"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2011-03-18}
|
13
13
|
s.description = %q{ActiveRecord enums with i18n}
|
14
14
|
s.email = %q{x@nofxx.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -17,35 +17,32 @@ Gem::Specification.new do |s|
|
|
17
17
|
]
|
18
18
|
s.files = [
|
19
19
|
".document",
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
"symbolize.gemspec"
|
20
|
+
"MIT-LICENSE",
|
21
|
+
"README.rdoc",
|
22
|
+
"Rakefile",
|
23
|
+
"VERSION",
|
24
|
+
"init.rb",
|
25
|
+
"lib/symbolize.rb",
|
26
|
+
"lib/symbolize_helper.rb",
|
27
|
+
"rails/init.rb",
|
28
|
+
"spec/db/create_testing_structure.rb",
|
29
|
+
"spec/locales/en.yml",
|
30
|
+
"spec/locales/pt.yml",
|
31
|
+
"spec/spec_helper.rb",
|
32
|
+
"spec/symbolize_spec.rb",
|
33
|
+
"symbolize.gemspec"
|
35
34
|
]
|
36
35
|
s.homepage = %q{http://github.com/nofxx/symbolize}
|
37
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
38
36
|
s.require_paths = ["lib"]
|
39
|
-
s.rubygems_version = %q{1.
|
37
|
+
s.rubygems_version = %q{1.5.2}
|
40
38
|
s.summary = %q{ActiveRecord enums with i18n}
|
41
39
|
s.test_files = [
|
42
40
|
"spec/db/create_testing_structure.rb",
|
43
|
-
|
44
|
-
|
41
|
+
"spec/spec_helper.rb",
|
42
|
+
"spec/symbolize_spec.rb"
|
45
43
|
]
|
46
44
|
|
47
45
|
if s.respond_to? :specification_version then
|
48
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
49
46
|
s.specification_version = 3
|
50
47
|
|
51
48
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: symbolize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 3
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
version: 3.0.2
|
4
|
+
prerelease:
|
5
|
+
version: 3.0.3
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Marcos Piccinini
|
@@ -14,7 +10,7 @@ autorequire:
|
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
12
|
|
17
|
-
date:
|
13
|
+
date: 2011-03-18 00:00:00 -03:00
|
18
14
|
default_executable:
|
19
15
|
dependencies:
|
20
16
|
- !ruby/object:Gem::Dependency
|
@@ -25,8 +21,6 @@ dependencies:
|
|
25
21
|
requirements:
|
26
22
|
- - ">="
|
27
23
|
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 0
|
30
24
|
version: "0"
|
31
25
|
type: :development
|
32
26
|
version_requirements: *id001
|
@@ -38,8 +32,6 @@ dependencies:
|
|
38
32
|
requirements:
|
39
33
|
- - ">="
|
40
34
|
- !ruby/object:Gem::Version
|
41
|
-
segments:
|
42
|
-
- 0
|
43
35
|
version: "0"
|
44
36
|
type: :development
|
45
37
|
version_requirements: *id002
|
@@ -53,7 +45,6 @@ extra_rdoc_files:
|
|
53
45
|
- README.rdoc
|
54
46
|
files:
|
55
47
|
- .document
|
56
|
-
- .gitignore
|
57
48
|
- MIT-LICENSE
|
58
49
|
- README.rdoc
|
59
50
|
- Rakefile
|
@@ -73,8 +64,8 @@ homepage: http://github.com/nofxx/symbolize
|
|
73
64
|
licenses: []
|
74
65
|
|
75
66
|
post_install_message:
|
76
|
-
rdoc_options:
|
77
|
-
|
67
|
+
rdoc_options: []
|
68
|
+
|
78
69
|
require_paths:
|
79
70
|
- lib
|
80
71
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -82,21 +73,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
82
73
|
requirements:
|
83
74
|
- - ">="
|
84
75
|
- !ruby/object:Gem::Version
|
85
|
-
segments:
|
86
|
-
- 0
|
87
76
|
version: "0"
|
88
77
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
78
|
none: false
|
90
79
|
requirements:
|
91
80
|
- - ">="
|
92
81
|
- !ruby/object:Gem::Version
|
93
|
-
segments:
|
94
|
-
- 0
|
95
82
|
version: "0"
|
96
83
|
requirements: []
|
97
84
|
|
98
85
|
rubyforge_project:
|
99
|
-
rubygems_version: 1.
|
86
|
+
rubygems_version: 1.5.2
|
100
87
|
signing_key:
|
101
88
|
specification_version: 3
|
102
89
|
summary: ActiveRecord enums with i18n
|