classy_enum 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +3 -0
- data/Gemfile +0 -2
- data/Gemfile.lock +4 -20
- data/README.textile +36 -1
- data/Rakefile +0 -5
- data/VERSION +1 -1
- data/classy_enum.gemspec +5 -10
- data/lib/classy_enum/attributes.rb +1 -1
- data/lib/classy_enum/class_methods.rb +16 -6
- data/spec/classy_enum_attributes_spec.rb +30 -60
- data/spec/classy_enum_owner_reference_spec.rb +27 -0
- data/spec/spec_helper.rb +4 -0
- metadata +16 -37
- data/spec/classy_enum_migration_spec.rb +0 -0
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -28,10 +28,8 @@ GEM
|
|
28
28
|
activemodel (= 3.0.5)
|
29
29
|
activesupport (= 3.0.5)
|
30
30
|
activesupport (3.0.5)
|
31
|
-
archive-tar-minitar (0.5.2)
|
32
31
|
arel (2.0.10)
|
33
32
|
builder (2.1.2)
|
34
|
-
columnize (0.3.4)
|
35
33
|
diff-lcs (1.1.2)
|
36
34
|
erubis (2.6.6)
|
37
35
|
abstract (>= 1.0.0)
|
@@ -41,19 +39,17 @@ GEM
|
|
41
39
|
i18n (~> 0.4)
|
42
40
|
git (1.2.5)
|
43
41
|
i18n (0.6.0)
|
44
|
-
jeweler (1.6.
|
42
|
+
jeweler (1.6.4)
|
45
43
|
bundler (~> 1.0)
|
46
44
|
git (>= 1.2.5)
|
47
45
|
rake
|
48
|
-
linecache19 (0.5.12)
|
49
|
-
ruby_core_source (>= 0.1.4)
|
50
46
|
mail (2.2.19)
|
51
47
|
activesupport (>= 2.3.6)
|
52
48
|
i18n (>= 0.4.0)
|
53
49
|
mime-types (~> 1.16)
|
54
50
|
treetop (~> 1.4.8)
|
55
51
|
mime-types (1.16)
|
56
|
-
polyglot (0.3.
|
52
|
+
polyglot (0.3.2)
|
57
53
|
rack (1.2.3)
|
58
54
|
rack-mount (0.6.14)
|
59
55
|
rack (>= 1.0.0)
|
@@ -73,7 +69,6 @@ GEM
|
|
73
69
|
rake (>= 0.8.7)
|
74
70
|
thor (~> 0.14.4)
|
75
71
|
rake (0.9.2)
|
76
|
-
rcov (0.9.9)
|
77
72
|
rspec (2.6.0)
|
78
73
|
rspec-core (~> 2.6.0)
|
79
74
|
rspec-expectations (~> 2.6.0)
|
@@ -87,19 +82,10 @@ GEM
|
|
87
82
|
activesupport (~> 3.0)
|
88
83
|
railties (~> 3.0)
|
89
84
|
rspec (~> 2.6.0)
|
90
|
-
ruby-debug-base19 (0.11.25)
|
91
|
-
columnize (>= 0.3.1)
|
92
|
-
linecache19 (>= 0.5.11)
|
93
|
-
ruby_core_source (>= 0.1.4)
|
94
|
-
ruby-debug19 (0.11.6)
|
95
|
-
columnize (>= 0.3.1)
|
96
|
-
linecache19 (>= 0.5.11)
|
97
|
-
ruby-debug-base19 (>= 0.11.19)
|
98
|
-
ruby_core_source (0.1.5)
|
99
|
-
archive-tar-minitar (>= 0.5.2)
|
100
85
|
sqlite3-ruby (1.3.1)
|
101
86
|
thor (0.14.6)
|
102
|
-
treetop (1.4.
|
87
|
+
treetop (1.4.10)
|
88
|
+
polyglot
|
103
89
|
polyglot (>= 0.3.1)
|
104
90
|
tzinfo (0.3.29)
|
105
91
|
|
@@ -110,7 +96,5 @@ DEPENDENCIES
|
|
110
96
|
formtastic (~> 1.2.4)
|
111
97
|
jeweler (~> 1.6.2)
|
112
98
|
rails (~> 3.0.0)
|
113
|
-
rcov
|
114
99
|
rspec-rails (~> 2.6.1)
|
115
|
-
ruby-debug19
|
116
100
|
sqlite3-ruby
|
data/README.textile
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
-
h1. classy_enum
|
1
|
+
h1. classy_enum "!https://secure.travis-ci.org/beerlington/classy_enum.png?branch=master!":http://travis-ci.org/beerlington/classy_enum
|
2
2
|
|
3
3
|
ClassyEnum is a Ruby on Rails gem that adds class-based enumerator functionality to ActiveRecord attributes.
|
4
4
|
|
5
|
+
!http://dl.dropbox.com/u/1934677/classy.jpg!
|
6
|
+
|
5
7
|
h2. Rails & Ruby Versions Supported
|
6
8
|
|
7
9
|
*Rails:*
|
@@ -82,6 +84,7 @@ My ActiveRecord Alarm model needs a text field that will store a string represen
|
|
82
84
|
<pre>
|
83
85
|
create_table "alarms", :force => true do |t|
|
84
86
|
t.string "priority"
|
87
|
+
t.boolean "enabled"
|
85
88
|
end
|
86
89
|
</pre>
|
87
90
|
|
@@ -113,6 +116,38 @@ With this setup, I can now do the following:
|
|
113
116
|
|
114
117
|
The enum field works like any other model attribute. It can be mass-assigned using @update_attribute(s)@.
|
115
118
|
|
119
|
+
h2. Back reference to owning object
|
120
|
+
|
121
|
+
In some cases you may want an enum class to be able to reference the owning object (an instance of the active record model). Think of it as a @belongs_to@ relationship, where the enum can reference its owning object.
|
122
|
+
|
123
|
+
In order to create the back reference, you must declare how you wish to refer to the owner using the @owner@ class method.
|
124
|
+
|
125
|
+
For example:
|
126
|
+
|
127
|
+
<pre>
|
128
|
+
class Priority < ClassyEnum::Base
|
129
|
+
enum_classes :low, :medium, :high
|
130
|
+
owner :alarm
|
131
|
+
end
|
132
|
+
|
133
|
+
class PriorityHigh < Priority
|
134
|
+
def send_email?
|
135
|
+
alarm.enabled?
|
136
|
+
end
|
137
|
+
end
|
138
|
+
</pre>
|
139
|
+
|
140
|
+
In the above example, high priority alarms are only emailed if the owning alarm is enabled.
|
141
|
+
|
142
|
+
<pre>
|
143
|
+
@alarm = Alarm.create(:priority => :high, :enabled => true)
|
144
|
+
|
145
|
+
# Should this alarm send an email?
|
146
|
+
@alarm.send_email? # => true
|
147
|
+
@alarm.enabled = false
|
148
|
+
@alarm.send_email? # => false
|
149
|
+
</pre>
|
150
|
+
|
116
151
|
h2. Special Cases
|
117
152
|
|
118
153
|
What if your enum class name is not the same as your model's attribute name? No problem! Just use a second arugment in @classy_enum_attr@ to declare the attribute name. In this case, the model's attribute is called *alarm_priority*.
|
data/Rakefile
CHANGED
@@ -31,11 +31,6 @@ RSpec::Core::RakeTask.new(:spec) do |spec|
|
|
31
31
|
spec.pattern = FileList['spec/**/*_spec.rb']
|
32
32
|
end
|
33
33
|
|
34
|
-
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
35
|
-
spec.pattern = 'spec/**/*_spec.rb'
|
36
|
-
spec.rcov = true
|
37
|
-
end
|
38
|
-
|
39
34
|
task :default => :spec
|
40
35
|
|
41
36
|
require 'rake/rdoctask'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
data/classy_enum.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{classy_enum}
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = [%q{Peter Brown}]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-08-14}
|
13
13
|
s.description = %q{A utility that adds class based enum functionality to ActiveRecord attributes}
|
14
14
|
s.email = %q{github@lette.us}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.files = [
|
20
20
|
".document",
|
21
21
|
".rvmrc",
|
22
|
+
".travis.yml",
|
22
23
|
"Gemfile",
|
23
24
|
"Gemfile.lock",
|
24
25
|
"LICENSE",
|
@@ -37,7 +38,7 @@ Gem::Specification.new do |s|
|
|
37
38
|
"lib/generators/classy_enum/templates/enum.rb",
|
38
39
|
"spec/active_record_spec.rb",
|
39
40
|
"spec/classy_enum_attributes_spec.rb",
|
40
|
-
"spec/
|
41
|
+
"spec/classy_enum_owner_reference_spec.rb",
|
41
42
|
"spec/classy_enum_semantic_form_builder_spec.rb",
|
42
43
|
"spec/classy_enum_spec.rb",
|
43
44
|
"spec/spec_helper.rb"
|
@@ -45,7 +46,7 @@ Gem::Specification.new do |s|
|
|
45
46
|
s.homepage = %q{http://github.com/beerlington/classy_enum}
|
46
47
|
s.licenses = [%q{MIT}]
|
47
48
|
s.require_paths = [%q{lib}]
|
48
|
-
s.rubygems_version = %q{1.8.
|
49
|
+
s.rubygems_version = %q{1.8.6}
|
49
50
|
s.summary = %q{A class based enumerator utility for Ruby on Rails}
|
50
51
|
|
51
52
|
if s.respond_to? :specification_version then
|
@@ -54,28 +55,22 @@ Gem::Specification.new do |s|
|
|
54
55
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
55
56
|
s.add_runtime_dependency(%q<rails>, ["~> 3.0.0"])
|
56
57
|
s.add_development_dependency(%q<jeweler>, ["~> 1.6.2"])
|
57
|
-
s.add_development_dependency(%q<rcov>, [">= 0"])
|
58
58
|
s.add_development_dependency(%q<rspec-rails>, ["~> 2.6.1"])
|
59
59
|
s.add_development_dependency(%q<formtastic>, ["~> 1.2.4"])
|
60
60
|
s.add_development_dependency(%q<sqlite3-ruby>, [">= 0"])
|
61
|
-
s.add_development_dependency(%q<ruby-debug19>, [">= 0"])
|
62
61
|
else
|
63
62
|
s.add_dependency(%q<rails>, ["~> 3.0.0"])
|
64
63
|
s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
|
65
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
66
64
|
s.add_dependency(%q<rspec-rails>, ["~> 2.6.1"])
|
67
65
|
s.add_dependency(%q<formtastic>, ["~> 1.2.4"])
|
68
66
|
s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
|
69
|
-
s.add_dependency(%q<ruby-debug19>, [">= 0"])
|
70
67
|
end
|
71
68
|
else
|
72
69
|
s.add_dependency(%q<rails>, ["~> 3.0.0"])
|
73
70
|
s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
|
74
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
75
71
|
s.add_dependency(%q<rspec-rails>, ["~> 2.6.1"])
|
76
72
|
s.add_dependency(%q<formtastic>, ["~> 1.2.4"])
|
77
73
|
s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
|
78
|
-
s.add_dependency(%q<ruby-debug19>, [">= 0"])
|
79
74
|
end
|
80
75
|
end
|
81
76
|
|
@@ -17,10 +17,10 @@ module ClassyEnum
|
|
17
17
|
# These child classes can be instantiated with either:
|
18
18
|
# Priority.build(:low) or PriorityLow.new
|
19
19
|
#
|
20
|
-
def enum_classes(*
|
21
|
-
self.const_set("OPTIONS",
|
20
|
+
def enum_classes(*enums)
|
21
|
+
self.const_set("OPTIONS", enums) unless self.const_defined? "OPTIONS"
|
22
22
|
|
23
|
-
|
23
|
+
enums.each_with_index do |option, index|
|
24
24
|
|
25
25
|
klass = Class.new(self) do
|
26
26
|
@index = index + 1
|
@@ -28,7 +28,7 @@ module ClassyEnum
|
|
28
28
|
|
29
29
|
# Use ActiveModel::AttributeMethods to define attribute? methods
|
30
30
|
attribute_method_suffix '?'
|
31
|
-
define_attribute_methods
|
31
|
+
define_attribute_methods enums
|
32
32
|
|
33
33
|
def initialize
|
34
34
|
@to_s = self.class.instance_variable_get('@option').to_s
|
@@ -51,10 +51,13 @@ module ClassyEnum
|
|
51
51
|
# end
|
52
52
|
#
|
53
53
|
# Priority.build(:low) # => PriorityLow.new
|
54
|
-
def build(option)
|
54
|
+
def build(option, owner = nil)
|
55
55
|
return option if option.blank?
|
56
56
|
return TypeError.new("Valid #{self} options are #{self.valid_options}") unless self::OPTIONS.include? option.to_sym
|
57
|
-
|
57
|
+
|
58
|
+
object = Object.const_get("#{self}#{option.to_s.camelize}").new
|
59
|
+
object.instance_variable_set(:@owner,owner) unless owner.nil?
|
60
|
+
object
|
58
61
|
end
|
59
62
|
|
60
63
|
alias :find :build
|
@@ -100,5 +103,12 @@ module ClassyEnum
|
|
100
103
|
self::OPTIONS.map(&:to_s).join(', ')
|
101
104
|
end
|
102
105
|
|
106
|
+
private
|
107
|
+
|
108
|
+
# DSL setter method for reference to enum owner
|
109
|
+
def owner(owner)
|
110
|
+
define_method owner, lambda { @owner }
|
111
|
+
end
|
112
|
+
|
103
113
|
end
|
104
114
|
end
|
@@ -3,20 +3,11 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
|
3
3
|
describe "A Dog" do
|
4
4
|
|
5
5
|
context "with valid breed options" do
|
6
|
-
|
6
|
+
subject { Dog.new(:breed => :golden_retriever) }
|
7
7
|
|
8
|
-
it
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
it "should be valid with a valid option" do
|
13
|
-
@dog.should be_valid
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should have the right classy options for breed" do
|
17
|
-
options = {:enum => :breed, :allow_blank => false}
|
18
|
-
@dog.breed_options.should == options
|
19
|
-
end
|
8
|
+
it { should be_valid }
|
9
|
+
its(:breed) { should be_a(BreedGoldenRetriever) }
|
10
|
+
its(:breed_options) { should eql({:enum => :breed, :allow_blank => false}) }
|
20
11
|
end
|
21
12
|
|
22
13
|
it "should not be valid with a nil breed" do
|
@@ -28,15 +19,13 @@ describe "A Dog" do
|
|
28
19
|
end
|
29
20
|
|
30
21
|
context "with invalid breed options" do
|
31
|
-
|
22
|
+
let(:dog) { Dog.new(:breed => :fake_breed) }
|
23
|
+
subject { dog }
|
24
|
+
it { should_not be_valid }
|
32
25
|
|
33
|
-
it
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
it "should have an error message containing the right options" do
|
38
|
-
@dog.valid?
|
39
|
-
@dog.errors[:breed].should include("must be one of #{Breed.all.map(&:to_sym).join(', ')}")
|
26
|
+
it 'should have an error message containing the right options' do
|
27
|
+
dog.valid?
|
28
|
+
dog.errors[:breed].should include("must be one of #{Breed.all.map(&:to_sym).join(', ')}")
|
40
29
|
end
|
41
30
|
end
|
42
31
|
|
@@ -45,16 +34,10 @@ end
|
|
45
34
|
describe "A ClassyEnum that allows blanks" do
|
46
35
|
|
47
36
|
context "with valid breed options" do
|
48
|
-
|
37
|
+
subject { AllowBlankBreedDog.new(:breed => :golden_retriever) }
|
49
38
|
|
50
|
-
it
|
51
|
-
|
52
|
-
end
|
53
|
-
|
54
|
-
it "should have the right classy options for breed" do
|
55
|
-
options = {:enum => :breed, :allow_blank => true}
|
56
|
-
@dog.breed_options.should == options
|
57
|
-
end
|
39
|
+
it { should be_valid }
|
40
|
+
its(:breed_options) { should eql({:enum => :breed, :allow_blank => true}) }
|
58
41
|
end
|
59
42
|
|
60
43
|
it "should be valid with a nil breed" do
|
@@ -66,15 +49,13 @@ describe "A ClassyEnum that allows blanks" do
|
|
66
49
|
end
|
67
50
|
|
68
51
|
context "with invalid breed options" do
|
69
|
-
|
52
|
+
let(:dog) { AllowBlankBreedDog.new(:breed => :fake_breed) }
|
53
|
+
subject { dog }
|
54
|
+
it { should_not be_valid }
|
70
55
|
|
71
|
-
it
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
it "should have an error message containing the right options" do
|
76
|
-
@dog.valid?
|
77
|
-
@dog.errors[:breed].should include("must be one of #{Breed.all.map(&:to_sym).join(', ')}")
|
56
|
+
it 'should have an error message containing the right options' do
|
57
|
+
dog.valid?
|
58
|
+
dog.errors[:breed].should include("must be one of #{Breed.all.map(&:to_sym).join(', ')}")
|
78
59
|
end
|
79
60
|
end
|
80
61
|
|
@@ -83,16 +64,10 @@ end
|
|
83
64
|
describe "A ClassyEnum that allows nils" do
|
84
65
|
|
85
66
|
context "with valid breed options" do
|
86
|
-
|
67
|
+
subject { AllowNilBreedDog.new(:breed => :golden_retriever) }
|
87
68
|
|
88
|
-
it
|
89
|
-
|
90
|
-
end
|
91
|
-
|
92
|
-
it "should have the right classy options for breed" do
|
93
|
-
options = {:enum => :breed, :allow_blank => false}
|
94
|
-
@dog.breed_options.should == options
|
95
|
-
end
|
69
|
+
it { should be_valid }
|
70
|
+
its(:breed_options) { should eql({:enum => :breed, :allow_blank => false}) }
|
96
71
|
end
|
97
72
|
|
98
73
|
it "should be valid with a nil breed" do
|
@@ -104,24 +79,19 @@ describe "A ClassyEnum that allows nils" do
|
|
104
79
|
end
|
105
80
|
|
106
81
|
context "with invalid breed options" do
|
107
|
-
|
82
|
+
let(:dog) { AllowNilBreedDog.new(:breed => :fake_breed) }
|
83
|
+
subject { dog }
|
84
|
+
it { should_not be_valid }
|
108
85
|
|
109
|
-
it
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
it "should have an error message containing the right options" do
|
114
|
-
@dog.valid?
|
115
|
-
@dog.errors[:breed].should include("must be one of #{Breed.all.map(&:to_sym).join(', ')}")
|
86
|
+
it 'should have an error message containing the right options' do
|
87
|
+
dog.valid?
|
88
|
+
dog.errors[:breed].should include("must be one of #{Breed.all.map(&:to_sym).join(', ')}")
|
116
89
|
end
|
117
90
|
end
|
118
91
|
|
119
92
|
end
|
120
93
|
|
121
94
|
describe "A ClassyEnum that has a different field name than the enum" do
|
122
|
-
|
123
|
-
|
124
|
-
it "should have a classy enum breed" do
|
125
|
-
@dog.other_breed.should be_a(BreedSnoop)
|
126
|
-
end
|
95
|
+
subject { OtherDog.new(:other_breed => :snoop) }
|
96
|
+
its(:other_breed) { should be_a(BreedSnoop) }
|
127
97
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
class CatBreed < ClassyEnum::Base
|
4
|
+
enum_classes :abyssian, :bengal, :birman, :persian
|
5
|
+
owner :cat
|
6
|
+
|
7
|
+
def breed_color
|
8
|
+
"#{cat.color} #{name}"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class Cat < ActiveRecord::Base
|
13
|
+
classy_enum_attr :breed, :enum => :cat_breed
|
14
|
+
attr_accessor :color
|
15
|
+
delegate :breed_color, :to => :breed
|
16
|
+
end
|
17
|
+
|
18
|
+
describe Cat do
|
19
|
+
let(:abyssian) { Cat.new(:breed => :abyssian, :color => 'black') }
|
20
|
+
let(:persian) { Cat.new(:breed => :persian, :color => 'white') }
|
21
|
+
|
22
|
+
it 'should delegate breed color to breed with an ownership reference' do
|
23
|
+
abyssian.breed_color { should eql('black Abyssian') }
|
24
|
+
persian.breed_color { should eql('white Persian') }
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: classy_enum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
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: 2011-
|
12
|
+
date: 2011-08-14 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &70096296990640 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 3.0.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70096296990640
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: jeweler
|
27
|
-
requirement: &
|
27
|
+
requirement: &70096296990120 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,21 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.6.2
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: rcov
|
38
|
-
requirement: &2155093860 !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
|
-
requirements:
|
41
|
-
- - ! '>='
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: '0'
|
44
|
-
type: :development
|
45
|
-
prerelease: false
|
46
|
-
version_requirements: *2155093860
|
35
|
+
version_requirements: *70096296990120
|
47
36
|
- !ruby/object:Gem::Dependency
|
48
37
|
name: rspec-rails
|
49
|
-
requirement: &
|
38
|
+
requirement: &70096296989520 !ruby/object:Gem::Requirement
|
50
39
|
none: false
|
51
40
|
requirements:
|
52
41
|
- - ~>
|
@@ -54,10 +43,10 @@ dependencies:
|
|
54
43
|
version: 2.6.1
|
55
44
|
type: :development
|
56
45
|
prerelease: false
|
57
|
-
version_requirements: *
|
46
|
+
version_requirements: *70096296989520
|
58
47
|
- !ruby/object:Gem::Dependency
|
59
48
|
name: formtastic
|
60
|
-
requirement: &
|
49
|
+
requirement: &70096296988940 !ruby/object:Gem::Requirement
|
61
50
|
none: false
|
62
51
|
requirements:
|
63
52
|
- - ~>
|
@@ -65,21 +54,10 @@ dependencies:
|
|
65
54
|
version: 1.2.4
|
66
55
|
type: :development
|
67
56
|
prerelease: false
|
68
|
-
version_requirements: *
|
57
|
+
version_requirements: *70096296988940
|
69
58
|
- !ruby/object:Gem::Dependency
|
70
59
|
name: sqlite3-ruby
|
71
|
-
requirement: &
|
72
|
-
none: false
|
73
|
-
requirements:
|
74
|
-
- - ! '>='
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '0'
|
77
|
-
type: :development
|
78
|
-
prerelease: false
|
79
|
-
version_requirements: *2155092060
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: ruby-debug19
|
82
|
-
requirement: &2155091460 !ruby/object:Gem::Requirement
|
60
|
+
requirement: &70096296988260 !ruby/object:Gem::Requirement
|
83
61
|
none: false
|
84
62
|
requirements:
|
85
63
|
- - ! '>='
|
@@ -87,7 +65,7 @@ dependencies:
|
|
87
65
|
version: '0'
|
88
66
|
type: :development
|
89
67
|
prerelease: false
|
90
|
-
version_requirements: *
|
68
|
+
version_requirements: *70096296988260
|
91
69
|
description: A utility that adds class based enum functionality to ActiveRecord attributes
|
92
70
|
email: github@lette.us
|
93
71
|
executables: []
|
@@ -98,6 +76,7 @@ extra_rdoc_files:
|
|
98
76
|
files:
|
99
77
|
- .document
|
100
78
|
- .rvmrc
|
79
|
+
- .travis.yml
|
101
80
|
- Gemfile
|
102
81
|
- Gemfile.lock
|
103
82
|
- LICENSE
|
@@ -116,7 +95,7 @@ files:
|
|
116
95
|
- lib/generators/classy_enum/templates/enum.rb
|
117
96
|
- spec/active_record_spec.rb
|
118
97
|
- spec/classy_enum_attributes_spec.rb
|
119
|
-
- spec/
|
98
|
+
- spec/classy_enum_owner_reference_spec.rb
|
120
99
|
- spec/classy_enum_semantic_form_builder_spec.rb
|
121
100
|
- spec/classy_enum_spec.rb
|
122
101
|
- spec/spec_helper.rb
|
@@ -135,7 +114,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
135
114
|
version: '0'
|
136
115
|
segments:
|
137
116
|
- 0
|
138
|
-
hash: -
|
117
|
+
hash: -109022732353583855
|
139
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
119
|
none: false
|
141
120
|
requirements:
|
@@ -144,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
123
|
version: '0'
|
145
124
|
requirements: []
|
146
125
|
rubyforge_project:
|
147
|
-
rubygems_version: 1.8.
|
126
|
+
rubygems_version: 1.8.6
|
148
127
|
signing_key:
|
149
128
|
specification_version: 3
|
150
129
|
summary: A class based enumerator utility for Ruby on Rails
|
File without changes
|