selectable_attr 0.3.15 → 0.3.16
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/VERSION +1 -1
- data/lib/selectable_attr/enum.rb +6 -0
- data/selectable_attr.gemspec +6 -6
- data/spec/selectable_attr_enum_spec.rb +22 -0
- metadata +21 -21
data/Gemfile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.16
|
data/lib/selectable_attr/enum.rb
CHANGED
data/selectable_attr.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "selectable_attr"
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.16"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Takeshi Akima"]
|
12
|
-
s.date = "
|
12
|
+
s.date = "2012-05-14"
|
13
13
|
s.description = "selectable_attr generates extra methods dynamically for attribute which has options"
|
14
14
|
s.email = "akm2000@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -40,7 +40,7 @@ Gem::Specification.new do |s|
|
|
40
40
|
s.homepage = "http://github.com/akm/selectable_attr/"
|
41
41
|
s.licenses = ["MIT"]
|
42
42
|
s.require_paths = ["lib"]
|
43
|
-
s.rubygems_version = "1.8.
|
43
|
+
s.rubygems_version = "1.8.12"
|
44
44
|
s.summary = "selectable_attr generates extra methods dynamically"
|
45
45
|
|
46
46
|
if s.respond_to? :specification_version then
|
@@ -50,7 +50,7 @@ Gem::Specification.new do |s|
|
|
50
50
|
s.add_runtime_dependency(%q<i18n>, [">= 0"])
|
51
51
|
s.add_development_dependency(%q<rspec>, ["~> 2.6.0"])
|
52
52
|
s.add_development_dependency(%q<yard>, ["~> 0.7.2"])
|
53
|
-
s.add_development_dependency(%q<bundler>, ["~> 1.
|
53
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.1.3"])
|
54
54
|
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
55
55
|
s.add_development_dependency(%q<simplecov>, ["~> 0.5.3"])
|
56
56
|
s.add_development_dependency(%q<autotest>, [">= 0"])
|
@@ -59,7 +59,7 @@ Gem::Specification.new do |s|
|
|
59
59
|
s.add_dependency(%q<i18n>, [">= 0"])
|
60
60
|
s.add_dependency(%q<rspec>, ["~> 2.6.0"])
|
61
61
|
s.add_dependency(%q<yard>, ["~> 0.7.2"])
|
62
|
-
s.add_dependency(%q<bundler>, ["~> 1.
|
62
|
+
s.add_dependency(%q<bundler>, ["~> 1.1.3"])
|
63
63
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
64
64
|
s.add_dependency(%q<simplecov>, ["~> 0.5.3"])
|
65
65
|
s.add_dependency(%q<autotest>, [">= 0"])
|
@@ -69,7 +69,7 @@ Gem::Specification.new do |s|
|
|
69
69
|
s.add_dependency(%q<i18n>, [">= 0"])
|
70
70
|
s.add_dependency(%q<rspec>, ["~> 2.6.0"])
|
71
71
|
s.add_dependency(%q<yard>, ["~> 0.7.2"])
|
72
|
-
s.add_dependency(%q<bundler>, ["~> 1.
|
72
|
+
s.add_dependency(%q<bundler>, ["~> 1.1.3"])
|
73
73
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
74
74
|
s.add_dependency(%q<simplecov>, ["~> 0.5.3"])
|
75
75
|
s.add_dependency(%q<autotest>, [">= 0"])
|
@@ -136,4 +136,26 @@ describe SelectableAttr::Enum do
|
|
136
136
|
end
|
137
137
|
end
|
138
138
|
|
139
|
+
|
140
|
+
describe "SelectableAttr::Enum#name" do
|
141
|
+
context "unspecified" do
|
142
|
+
subject { SelectableAttr::Enum.new }
|
143
|
+
its(:name){ should == nil}
|
144
|
+
end
|
145
|
+
|
146
|
+
context "unspecified" do
|
147
|
+
subject { r = SelectableAttr::Enum.new; r.name = "foo"; r }
|
148
|
+
its(:name){ should == "foo"}
|
149
|
+
end
|
150
|
+
|
151
|
+
context "unspecified" do
|
152
|
+
subject do
|
153
|
+
SelectableAttr::Enum.new do
|
154
|
+
name "bar"
|
155
|
+
end
|
156
|
+
end
|
157
|
+
its(:name){ should == "bar"}
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
139
161
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: selectable_attr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.16
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-05-14 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: i18n
|
16
|
-
requirement: &
|
16
|
+
requirement: &2154121020 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2154121020
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rspec
|
27
|
-
requirement: &
|
27
|
+
requirement: &2154120540 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 2.6.0
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2154120540
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: yard
|
38
|
-
requirement: &
|
38
|
+
requirement: &2154120060 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,21 +43,21 @@ dependencies:
|
|
43
43
|
version: 0.7.2
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2154120060
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bundler
|
49
|
-
requirement: &
|
49
|
+
requirement: &2154119580 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.1.3
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2154119580
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: jeweler
|
60
|
-
requirement: &
|
60
|
+
requirement: &2154119100 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 1.6.4
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2154119100
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: simplecov
|
71
|
-
requirement: &
|
71
|
+
requirement: &2154118620 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 0.5.3
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *2154118620
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: autotest
|
82
|
-
requirement: &
|
82
|
+
requirement: &2154118140 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *2154118140
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rdiscount
|
93
|
-
requirement: &
|
93
|
+
requirement: &2154117660 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *2154117660
|
102
102
|
description: selectable_attr generates extra methods dynamically for attribute which
|
103
103
|
has options
|
104
104
|
email: akm2000@gmail.com
|
@@ -142,7 +142,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
142
142
|
version: '0'
|
143
143
|
segments:
|
144
144
|
- 0
|
145
|
-
hash:
|
145
|
+
hash: -3113713205006860534
|
146
146
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
147
|
none: false
|
148
148
|
requirements:
|
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
version: '0'
|
152
152
|
requirements: []
|
153
153
|
rubyforge_project:
|
154
|
-
rubygems_version: 1.8.
|
154
|
+
rubygems_version: 1.8.12
|
155
155
|
signing_key:
|
156
156
|
specification_version: 3
|
157
157
|
summary: selectable_attr generates extra methods dynamically
|