enumerated_attribute 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +16 -0
- data/CHANGELOG.rdoc +49 -0
- data/LICENSE +20 -0
- data/README.rdoc +555 -0
- data/Rakefile +104 -0
- data/init.rb +1 -0
- data/lib/enumerated_attribute.rb +24 -0
- data/lib/enumerated_attribute/attribute.rb +78 -0
- data/lib/enumerated_attribute/attribute/arguments.rb +48 -0
- data/lib/enumerated_attribute/attribute/attribute_descriptor.rb +51 -0
- data/lib/enumerated_attribute/attribute/class_methods.rb +42 -0
- data/lib/enumerated_attribute/attribute/instance_methods.rb +96 -0
- data/lib/enumerated_attribute/integrations.rb +33 -0
- data/lib/enumerated_attribute/integrations/active_record.rb +109 -0
- data/lib/enumerated_attribute/integrations/datamapper.rb +6 -0
- data/lib/enumerated_attribute/integrations/default.rb +25 -0
- data/lib/enumerated_attribute/integrations/object.rb +47 -0
- data/lib/enumerated_attribute/method_definition_dsl.rb +142 -0
- data/lib/enumerated_attribute/rails_helpers.rb +97 -0
- data/lib/jeffp-enumerated_attribute.rb +1 -0
- data/spec/active_record/active_record_spec.rb +363 -0
- data/spec/active_record/association_test_classes.rb +40 -0
- data/spec/active_record/associations_spec.rb +130 -0
- data/spec/active_record/cfg.rb +6 -0
- data/spec/active_record/inheritance_classes.rb +19 -0
- data/spec/active_record/inheritance_spec.rb +60 -0
- data/spec/active_record/race_car.rb +15 -0
- data/spec/active_record/single_table_inheritance_spec.rb +0 -0
- data/spec/active_record/sti_classes.rb +10 -0
- data/spec/active_record/sti_spec.rb +41 -0
- data/spec/active_record/test_in_memory.rb +71 -0
- data/spec/car.rb +67 -0
- data/spec/cfg.rb +8 -0
- data/spec/inheritance_classes.rb +16 -0
- data/spec/inheritance_spec.rb +80 -0
- data/spec/new_and_method_missing_spec.rb +73 -0
- data/spec/plural.rb +8 -0
- data/spec/poro_spec.rb +397 -0
- data/spec/rails/README +243 -0
- data/spec/rails/Rakefile +10 -0
- data/spec/rails/app/controllers/application_controller.rb +10 -0
- data/spec/rails/app/controllers/form_test_controller.rb +38 -0
- data/spec/rails/app/helpers/application_helper.rb +3 -0
- data/spec/rails/app/helpers/form_test_helper.rb +2 -0
- data/spec/rails/app/models/user.rb +9 -0
- data/spec/rails/app/views/form_test/form.html.erb +1 -0
- data/spec/rails/app/views/form_test/form_for.html.erb +10 -0
- data/spec/rails/app/views/form_test/form_tag.html.erb +9 -0
- data/spec/rails/app/views/form_test/index.html.erb +6 -0
- data/spec/rails/app/views/layouts/application.html.erb +11 -0
- data/spec/rails/config/boot.rb +110 -0
- data/spec/rails/config/database.yml +22 -0
- data/spec/rails/config/environment.rb +45 -0
- data/spec/rails/config/environments/development.rb +17 -0
- data/spec/rails/config/environments/production.rb +28 -0
- data/spec/rails/config/environments/test.rb +28 -0
- data/spec/rails/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/rails/config/initializers/inflections.rb +10 -0
- data/spec/rails/config/initializers/mime_types.rb +5 -0
- data/spec/rails/config/initializers/new_rails_defaults.rb +19 -0
- data/spec/rails/config/initializers/session_store.rb +15 -0
- data/spec/rails/config/locales/en.yml +5 -0
- data/spec/rails/config/routes.rb +43 -0
- data/spec/rails/db/development.sqlite3 +0 -0
- data/spec/rails/db/migrate/20090804230221_create_sessions.rb +16 -0
- data/spec/rails/db/migrate/20090804230546_create_users.rb +21 -0
- data/spec/rails/db/schema.rb +35 -0
- data/spec/rails/db/test.sqlite3 +0 -0
- data/spec/rails/public/404.html +30 -0
- data/spec/rails/public/422.html +30 -0
- data/spec/rails/public/500.html +30 -0
- data/spec/rails/public/favicon.ico +0 -0
- data/spec/rails/public/images/rails.png +0 -0
- data/spec/rails/public/index.html +275 -0
- data/spec/rails/public/javascripts/application.js +2 -0
- data/spec/rails/public/javascripts/controls.js +963 -0
- data/spec/rails/public/javascripts/dragdrop.js +973 -0
- data/spec/rails/public/javascripts/effects.js +1128 -0
- data/spec/rails/public/javascripts/prototype.js +4320 -0
- data/spec/rails/public/robots.txt +5 -0
- data/spec/rails/public/stylesheets/scaffold.css +54 -0
- data/spec/rails/script/about +4 -0
- data/spec/rails/script/autospec +6 -0
- data/spec/rails/script/console +3 -0
- data/spec/rails/script/dbconsole +3 -0
- data/spec/rails/script/destroy +3 -0
- data/spec/rails/script/generate +3 -0
- data/spec/rails/script/performance/benchmarker +3 -0
- data/spec/rails/script/performance/profiler +3 -0
- data/spec/rails/script/plugin +3 -0
- data/spec/rails/script/runner +3 -0
- data/spec/rails/script/server +3 -0
- data/spec/rails/script/spec +10 -0
- data/spec/rails/script/spec_server +9 -0
- data/spec/rails/spec/controllers/form_test_controller_spec.rb +41 -0
- data/spec/rails/spec/integrations/enum_select_spec.rb +75 -0
- data/spec/rails/spec/matchers.rb +12 -0
- data/spec/rails/spec/rcov.opts +2 -0
- data/spec/rails/spec/spec.opts +4 -0
- data/spec/rails/spec/spec_helper.rb +40 -0
- data/spec/rails/spec/views/form_test/form.html.erb_spec.rb +12 -0
- data/spec/rails/spec/views/form_test/form_for.html.erb_spec.rb +12 -0
- data/spec/rails/spec/views/form_test/form_tag.html.erb_spec.rb +12 -0
- data/spec/rcov.opts +2 -0
- data/spec/spec.opts +4 -0
- data/spec/tractor.rb +48 -0
- metadata +182 -0
@@ -0,0 +1,54 @@
|
|
1
|
+
body { background-color: #fff; color: #333; }
|
2
|
+
|
3
|
+
body, p, ol, ul, td {
|
4
|
+
font-family: verdana, arial, helvetica, sans-serif;
|
5
|
+
font-size: 13px;
|
6
|
+
line-height: 18px;
|
7
|
+
}
|
8
|
+
|
9
|
+
pre {
|
10
|
+
background-color: #eee;
|
11
|
+
padding: 10px;
|
12
|
+
font-size: 11px;
|
13
|
+
}
|
14
|
+
|
15
|
+
a { color: #000; }
|
16
|
+
a:visited { color: #666; }
|
17
|
+
a:hover { color: #fff; background-color:#000; }
|
18
|
+
|
19
|
+
.fieldWithErrors {
|
20
|
+
padding: 2px;
|
21
|
+
background-color: red;
|
22
|
+
display: table;
|
23
|
+
}
|
24
|
+
|
25
|
+
#errorExplanation {
|
26
|
+
width: 400px;
|
27
|
+
border: 2px solid red;
|
28
|
+
padding: 7px;
|
29
|
+
padding-bottom: 12px;
|
30
|
+
margin-bottom: 20px;
|
31
|
+
background-color: #f0f0f0;
|
32
|
+
}
|
33
|
+
|
34
|
+
#errorExplanation h2 {
|
35
|
+
text-align: left;
|
36
|
+
font-weight: bold;
|
37
|
+
padding: 5px 5px 5px 15px;
|
38
|
+
font-size: 12px;
|
39
|
+
margin: -7px;
|
40
|
+
background-color: #c00;
|
41
|
+
color: #fff;
|
42
|
+
}
|
43
|
+
|
44
|
+
#errorExplanation p {
|
45
|
+
color: #333;
|
46
|
+
margin-bottom: 0;
|
47
|
+
padding: 5px;
|
48
|
+
}
|
49
|
+
|
50
|
+
#errorExplanation ul li {
|
51
|
+
font-size: 12px;
|
52
|
+
list-style: square;
|
53
|
+
}
|
54
|
+
|
@@ -0,0 +1,6 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9
|
3
|
+
ENV['RSPEC'] = 'true' # allows autotest to discover rspec
|
4
|
+
ENV['AUTOTEST'] = 'true' # allows autotest to run w/ color on linux
|
5
|
+
system((RUBY_PLATFORM =~ /mswin|mingw/ ? 'autotest.bat' : 'autotest'), *ARGV) ||
|
6
|
+
$stderr.puts("Unable to find autotest. Please install ZenTest or fix your PATH")
|
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
if ARGV.any? {|arg| %w[--drb -X --generate-options -G --help -h --version -v].include?(arg)}
|
3
|
+
require 'rubygems' unless ENV['NO_RUBYGEMS']
|
4
|
+
else
|
5
|
+
gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9
|
6
|
+
ENV["RAILS_ENV"] ||= 'test'
|
7
|
+
require File.expand_path(File.dirname(__FILE__) + "/../config/environment") unless defined?(RAILS_ROOT)
|
8
|
+
end
|
9
|
+
require 'spec/autorun'
|
10
|
+
exit ::Spec::Runner::CommandLine.run
|
@@ -0,0 +1,9 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9
|
3
|
+
|
4
|
+
puts "Loading Rails environment"
|
5
|
+
ENV["RAILS_ENV"] ||= 'test'
|
6
|
+
require File.expand_path(File.dirname(__FILE__) + "/../config/environment") unless defined?(RAILS_ROOT)
|
7
|
+
|
8
|
+
require 'optparse'
|
9
|
+
require 'spec/rails/spec_server'
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
+
|
3
|
+
describe FormTestController do
|
4
|
+
|
5
|
+
#Delete these examples and add some real ones
|
6
|
+
it "should use FormTestController" do
|
7
|
+
controller.should be_an_instance_of(FormTestController)
|
8
|
+
end
|
9
|
+
|
10
|
+
describe "GET 'form'" do
|
11
|
+
it "should return gender with male and female choices" do
|
12
|
+
get 'form'
|
13
|
+
response.should be_success
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
describe "POST 'form'" do
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "GET 'form_for'" do
|
22
|
+
it "should be successful" do
|
23
|
+
get 'form_for'
|
24
|
+
response.should be_success
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "POST 'form_for'" do
|
29
|
+
end
|
30
|
+
|
31
|
+
describe "GET 'form_tag'" do
|
32
|
+
it "should be successful" do
|
33
|
+
get 'form_tag'
|
34
|
+
response.should be_success
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe "POST 'form_tag'" do
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../spec_helper.rb'
|
2
|
+
|
3
|
+
shared_examples_for "enum_select form" do
|
4
|
+
it "should have select boxes for gender, status and degree initially set blank" do
|
5
|
+
visit form_page
|
6
|
+
select_option('', /gender/)
|
7
|
+
select_option('', /status/)
|
8
|
+
select_option('None', /degree/)
|
9
|
+
end
|
10
|
+
it "should verify all options for each enumeration" do
|
11
|
+
visit form_page
|
12
|
+
%w(Male Female).each {|e| select e, :from=>/gender/}
|
13
|
+
%w(Single Married Widowed Divorced).each {|e| select e, :from=>/status/}
|
14
|
+
["None", "High school", "College", "Graduate"].each {|e| select e, :from=>/degree/}
|
15
|
+
end
|
16
|
+
it "should submit and keep values when form is invalid" do
|
17
|
+
visit form_page
|
18
|
+
select 'Male', :from=>/gender/
|
19
|
+
select 'Single', :from=>/status/
|
20
|
+
select 'College', :from=>/degree/
|
21
|
+
click_button 'Save'
|
22
|
+
select_option('Male', /gender/)
|
23
|
+
select_option('Single', /status/)
|
24
|
+
select_option('College', /degree/)
|
25
|
+
end
|
26
|
+
it "should select values and submit without validation errors and create an object with those values" do
|
27
|
+
User.delete_all
|
28
|
+
visit form_page
|
29
|
+
select 'Male', :from=>/gender/
|
30
|
+
select 'Single', :from=>/status/
|
31
|
+
select 'College', :from=>/degree/
|
32
|
+
fill_in(/first_name/, :with=>'john')
|
33
|
+
fill_in(/age/, :with=>'30')
|
34
|
+
click_button 'Save'
|
35
|
+
#response.code.should be_success
|
36
|
+
u = User.find(:first)
|
37
|
+
u.first_name.should == 'john'
|
38
|
+
u.age.should == 30
|
39
|
+
u.gender.should == :male
|
40
|
+
u.status.should == :single
|
41
|
+
u.degree.should == :college
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe "Form using form_for and FormBuilder" do
|
46
|
+
def form_page; '/form_test/form_for'; end
|
47
|
+
|
48
|
+
it_should_behave_like "enum_select form"
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
describe "Form using option_helper_tags" do
|
53
|
+
def form_page; '/form_test/form_tag'; end
|
54
|
+
|
55
|
+
it_should_behave_like "enum_select form"
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
=begin
|
60
|
+
describe "Form using ActiveRecord helpers" do
|
61
|
+
def form_page; '/form_test/form'; end
|
62
|
+
puts
|
63
|
+
puts "*****************************************************"
|
64
|
+
puts "warning: there's a bug in ActionView::Helpers::ActiveRecord 'form' method"
|
65
|
+
puts "must change in active_record_helper.rb 'form' method"
|
66
|
+
puts "contents = form_tag(:action=>action, :method =>(options[:method] || 'post'), :enctype => options[:multipart] ? 'multipart/form-data': nil)"
|
67
|
+
puts "to"
|
68
|
+
puts "contents = form_tag(action, :method =>(options[:method] || 'post'), :enctype => options[:multipart] ? 'multipart/form-data': nil)"
|
69
|
+
puts "*****************************************************"
|
70
|
+
puts
|
71
|
+
|
72
|
+
it_should_behave_like "enum_select form"
|
73
|
+
|
74
|
+
end
|
75
|
+
=end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# This file is copied to ~/spec when you run 'ruby script/generate rspec'
|
2
|
+
# from the project root directory.
|
3
|
+
ENV["RAILS_ENV"] ||= 'test'
|
4
|
+
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
|
5
|
+
#require 'enumerated_attribute'
|
6
|
+
require 'spec/autorun'
|
7
|
+
gem 'rspec-rails', '>= 1.3.2'
|
8
|
+
require 'spec/rails'
|
9
|
+
gem 'webrat', '>= 0.7.1'
|
10
|
+
require 'webrat'
|
11
|
+
require 'matchers'
|
12
|
+
|
13
|
+
# Requires supporting files with custom matchers and macros, etc,
|
14
|
+
# in ./support/ and its subdirectories.
|
15
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
16
|
+
|
17
|
+
Webrat.configure do |config|
|
18
|
+
config.mode = :rails
|
19
|
+
end
|
20
|
+
|
21
|
+
Spec::Runner.configure do |config|
|
22
|
+
end
|
23
|
+
|
24
|
+
#setup for integrating webrat with rspec
|
25
|
+
module Spec::Rails::Example
|
26
|
+
class IntegrationExampleGroup < ActionController::IntegrationTest
|
27
|
+
|
28
|
+
def initialize(defined_description, options={}, &implementation)
|
29
|
+
defined_description.instance_eval do
|
30
|
+
def to_s
|
31
|
+
self
|
32
|
+
end
|
33
|
+
end
|
34
|
+
super(defined_description)
|
35
|
+
end
|
36
|
+
|
37
|
+
Spec::Example::ExampleGroupFactory.register(:integration, self)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
|
2
|
+
|
3
|
+
describe "/dog/bark" do
|
4
|
+
before(:each) do
|
5
|
+
render 'dog/bark'
|
6
|
+
end
|
7
|
+
|
8
|
+
#Delete this example and add some real ones or delete this file
|
9
|
+
it "should tell you where to find the file" do
|
10
|
+
response.should have_tag('p', %r[Find me in app/views/dog/bark])
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
|
2
|
+
|
3
|
+
describe "/dog/bark" do
|
4
|
+
before(:each) do
|
5
|
+
render 'dog/bark'
|
6
|
+
end
|
7
|
+
|
8
|
+
#Delete this example and add some real ones or delete this file
|
9
|
+
it "should tell you where to find the file" do
|
10
|
+
response.should have_tag('p', %r[Find me in app/views/dog/bark])
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
|
2
|
+
|
3
|
+
describe "/dog/bark" do
|
4
|
+
before(:each) do
|
5
|
+
render 'dog/bark'
|
6
|
+
end
|
7
|
+
|
8
|
+
#Delete this example and add some real ones or delete this file
|
9
|
+
it "should tell you where to find the file" do
|
10
|
+
response.should have_tag('p', %r[Find me in app/views/dog/bark])
|
11
|
+
end
|
12
|
+
end
|
data/spec/rcov.opts
ADDED
data/spec/spec.opts
ADDED
data/spec/tractor.rb
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'enumerated_attribute'
|
2
|
+
|
3
|
+
class Tractor
|
4
|
+
|
5
|
+
GEAR_ENUM_VALUES = %w(reverse neutral first second over_drive).map{|v| v.to_sym}
|
6
|
+
LIGHTS_ENUM_VALUES = %w(off low high).map{|v| v.to_sym}
|
7
|
+
SIDE_LIGHT_ENUM_VALUES = [:off,:low,:high,:super_high]
|
8
|
+
|
9
|
+
attr_accessor :name
|
10
|
+
|
11
|
+
def initialize
|
12
|
+
@name = 'old faithful'
|
13
|
+
end
|
14
|
+
|
15
|
+
enumerated_attribute :gear, %w(reverse ^neutral first second over_drive), :nil=>false do
|
16
|
+
parked? is :neutral
|
17
|
+
driving? is [:first, :second, :over_drive]
|
18
|
+
not_parked? is_not :neutral
|
19
|
+
not_driving? is_not [:first, :second, :over_drive]
|
20
|
+
upshift { self.gear_is_in_over_drive? ? self.gear : self.gear_next }
|
21
|
+
downshift { self.driving? ? self.gear_previous : self.gear }
|
22
|
+
end
|
23
|
+
|
24
|
+
enum_attr :pto, %w(reverse ^off forward)
|
25
|
+
|
26
|
+
enum_attr :plow, %w(^up down), :nil=>true do
|
27
|
+
plowing? { self.gear_is_in_first? && self.plow == :down }
|
28
|
+
end
|
29
|
+
|
30
|
+
enum_attr :lights, LIGHTS_ENUM_VALUES, :plural=>:lights_enums, :init=>:off, :decrementor=>:turn_lights_down, :incrementor=>:turn_lights_up do
|
31
|
+
lights_are_on? [:low, :high]
|
32
|
+
lights_are_not_on? :off
|
33
|
+
end
|
34
|
+
|
35
|
+
enum_attr :side_light, %w(off low high super_high) do
|
36
|
+
init :off
|
37
|
+
enums_accessor :side_light_enums
|
38
|
+
incrementor :side_light_up
|
39
|
+
decrementor :side_light_down
|
40
|
+
label :off=>'OFF'
|
41
|
+
labels :low => 'LOW DIM', :high => 'HIGH BEAM'
|
42
|
+
labels :super_high => 'SUPER BEAM'
|
43
|
+
end
|
44
|
+
|
45
|
+
#enum_attr_reader :temperature, %w(low med high)
|
46
|
+
#enum_attr_writer :ignition, %w(^off activate)
|
47
|
+
|
48
|
+
end
|
metadata
ADDED
@@ -0,0 +1,182 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: enumerated_attribute
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 2
|
8
|
+
- 7
|
9
|
+
version: 0.2.7
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Jeff Patmon
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-05-22 00:00:00 -07:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: meta_programming
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
- 2
|
30
|
+
- 1
|
31
|
+
version: 0.2.1
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
description: Enumerated model attributes and view helpers
|
35
|
+
email: jpatmon@gmail.com
|
36
|
+
executables: []
|
37
|
+
|
38
|
+
extensions: []
|
39
|
+
|
40
|
+
extra_rdoc_files: []
|
41
|
+
|
42
|
+
files:
|
43
|
+
- lib/jeffp-enumerated_attribute.rb
|
44
|
+
- lib/enumerated_attribute/rails_helpers.rb
|
45
|
+
- lib/enumerated_attribute/integrations/datamapper.rb
|
46
|
+
- lib/enumerated_attribute/integrations/default.rb
|
47
|
+
- lib/enumerated_attribute/integrations/object.rb
|
48
|
+
- lib/enumerated_attribute/integrations/active_record.rb
|
49
|
+
- lib/enumerated_attribute/integrations.rb
|
50
|
+
- lib/enumerated_attribute/attribute.rb
|
51
|
+
- lib/enumerated_attribute/attribute/attribute_descriptor.rb
|
52
|
+
- lib/enumerated_attribute/attribute/class_methods.rb
|
53
|
+
- lib/enumerated_attribute/attribute/arguments.rb
|
54
|
+
- lib/enumerated_attribute/attribute/instance_methods.rb
|
55
|
+
- lib/enumerated_attribute/method_definition_dsl.rb
|
56
|
+
- lib/enumerated_attribute.rb
|
57
|
+
- spec/rcov.opts
|
58
|
+
- spec/cfg.rb
|
59
|
+
- spec/active_record/cfg.rb
|
60
|
+
- spec/active_record/associations_spec.rb
|
61
|
+
- spec/active_record/sti_classes.rb
|
62
|
+
- spec/active_record/active_record_spec.rb
|
63
|
+
- spec/active_record/single_table_inheritance_spec.rb
|
64
|
+
- spec/active_record/association_test_classes.rb
|
65
|
+
- spec/active_record/inheritance_classes.rb
|
66
|
+
- spec/active_record/sti_spec.rb
|
67
|
+
- spec/active_record/race_car.rb
|
68
|
+
- spec/active_record/test_in_memory.rb
|
69
|
+
- spec/active_record/inheritance_spec.rb
|
70
|
+
- spec/inheritance_classes.rb
|
71
|
+
- spec/poro_spec.rb
|
72
|
+
- spec/spec.opts
|
73
|
+
- spec/tractor.rb
|
74
|
+
- spec/plural.rb
|
75
|
+
- spec/car.rb
|
76
|
+
- spec/rails/db/migrate/20090804230221_create_sessions.rb
|
77
|
+
- spec/rails/db/migrate/20090804230546_create_users.rb
|
78
|
+
- spec/rails/db/development.sqlite3
|
79
|
+
- spec/rails/db/schema.rb
|
80
|
+
- spec/rails/db/test.sqlite3
|
81
|
+
- spec/rails/app/helpers/application_helper.rb
|
82
|
+
- spec/rails/app/helpers/form_test_helper.rb
|
83
|
+
- spec/rails/app/views/form_test/form.html.erb
|
84
|
+
- spec/rails/app/views/form_test/form_tag.html.erb
|
85
|
+
- spec/rails/app/views/form_test/index.html.erb
|
86
|
+
- spec/rails/app/views/form_test/form_for.html.erb
|
87
|
+
- spec/rails/app/views/layouts/application.html.erb
|
88
|
+
- spec/rails/app/controllers/form_test_controller.rb
|
89
|
+
- spec/rails/app/controllers/application_controller.rb
|
90
|
+
- spec/rails/app/models/user.rb
|
91
|
+
- spec/rails/config/initializers/new_rails_defaults.rb
|
92
|
+
- spec/rails/config/initializers/mime_types.rb
|
93
|
+
- spec/rails/config/initializers/backtrace_silencers.rb
|
94
|
+
- spec/rails/config/initializers/inflections.rb
|
95
|
+
- spec/rails/config/initializers/session_store.rb
|
96
|
+
- spec/rails/config/locales/en.yml
|
97
|
+
- spec/rails/config/boot.rb
|
98
|
+
- spec/rails/config/environments/production.rb
|
99
|
+
- spec/rails/config/environments/development.rb
|
100
|
+
- spec/rails/config/environments/test.rb
|
101
|
+
- spec/rails/config/database.yml
|
102
|
+
- spec/rails/config/environment.rb
|
103
|
+
- spec/rails/config/routes.rb
|
104
|
+
- spec/rails/public/images/rails.png
|
105
|
+
- spec/rails/public/stylesheets/scaffold.css
|
106
|
+
- spec/rails/public/500.html
|
107
|
+
- spec/rails/public/javascripts/controls.js
|
108
|
+
- spec/rails/public/javascripts/application.js
|
109
|
+
- spec/rails/public/javascripts/dragdrop.js
|
110
|
+
- spec/rails/public/javascripts/effects.js
|
111
|
+
- spec/rails/public/javascripts/prototype.js
|
112
|
+
- spec/rails/public/404.html
|
113
|
+
- spec/rails/public/422.html
|
114
|
+
- spec/rails/public/favicon.ico
|
115
|
+
- spec/rails/public/robots.txt
|
116
|
+
- spec/rails/public/index.html
|
117
|
+
- spec/rails/README
|
118
|
+
- spec/rails/Rakefile
|
119
|
+
- spec/rails/script/console
|
120
|
+
- spec/rails/script/autospec
|
121
|
+
- spec/rails/script/plugin
|
122
|
+
- spec/rails/script/runner
|
123
|
+
- spec/rails/script/server
|
124
|
+
- spec/rails/script/performance/benchmarker
|
125
|
+
- spec/rails/script/performance/profiler
|
126
|
+
- spec/rails/script/dbconsole
|
127
|
+
- spec/rails/script/about
|
128
|
+
- spec/rails/script/destroy
|
129
|
+
- spec/rails/script/spec
|
130
|
+
- spec/rails/script/generate
|
131
|
+
- spec/rails/script/spec_server
|
132
|
+
- spec/rails/spec/rcov.opts
|
133
|
+
- spec/rails/spec/integrations/enum_select_spec.rb
|
134
|
+
- spec/rails/spec/spec_helper.rb
|
135
|
+
- spec/rails/spec/views/form_test/form_for.html.erb_spec.rb
|
136
|
+
- spec/rails/spec/views/form_test/form.html.erb_spec.rb
|
137
|
+
- spec/rails/spec/views/form_test/form_tag.html.erb_spec.rb
|
138
|
+
- spec/rails/spec/controllers/form_test_controller_spec.rb
|
139
|
+
- spec/rails/spec/matchers.rb
|
140
|
+
- spec/rails/spec/spec.opts
|
141
|
+
- spec/new_and_method_missing_spec.rb
|
142
|
+
- spec/inheritance_spec.rb
|
143
|
+
- CHANGELOG.rdoc
|
144
|
+
- init.rb
|
145
|
+
- LICENSE
|
146
|
+
- Rakefile
|
147
|
+
- README.rdoc
|
148
|
+
- .gitignore
|
149
|
+
has_rdoc: true
|
150
|
+
homepage: http://github.com/jeffp/enumerated_attribute/tree/master
|
151
|
+
licenses: []
|
152
|
+
|
153
|
+
post_install_message:
|
154
|
+
rdoc_options: []
|
155
|
+
|
156
|
+
require_paths:
|
157
|
+
- lib
|
158
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
159
|
+
requirements:
|
160
|
+
- - ">="
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
segments:
|
163
|
+
- 0
|
164
|
+
version: "0"
|
165
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
|
+
requirements:
|
167
|
+
- - ">="
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
segments:
|
170
|
+
- 0
|
171
|
+
version: "0"
|
172
|
+
requirements: []
|
173
|
+
|
174
|
+
rubyforge_project:
|
175
|
+
rubygems_version: 1.3.6
|
176
|
+
signing_key:
|
177
|
+
specification_version: 3
|
178
|
+
summary: Add enumerated attributes to your models and expose them in drop-down lists in your views
|
179
|
+
test_files:
|
180
|
+
- spec/poro_spec.rb
|
181
|
+
- spec/new_and_method_missing_spec.rb
|
182
|
+
- spec/inheritance_spec.rb
|