fieldable_form 0.0.2 → 0.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.
Files changed (76) hide show
  1. data/README.md +4 -3
  2. data/Rakefile +4 -7
  3. data/{app/models → lib}/fieldable_form/check_box.rb +0 -0
  4. data/{app/models → lib}/fieldable_form/drop_down.rb +1 -1
  5. data/lib/fieldable_form/engine.rb +1 -3
  6. data/{app/models/concerns → lib}/fieldable_form/entry_validations.rb +0 -0
  7. data/{app/exceptions/fieldable_form/cannot_initialize_abstract_class.rb → lib/fieldable_form/exceptions.rb} +0 -0
  8. data/{app/models → lib}/fieldable_form/field.rb +0 -0
  9. data/{app/models → lib}/fieldable_form/text_field.rb +0 -0
  10. data/{app/models → lib}/fieldable_form/validatable.rb +6 -0
  11. data/lib/fieldable_form/version.rb +1 -1
  12. data/lib/fieldable_form.rb +14 -2
  13. data/lib/generators/fieldable_form/bootstrap/bootstrap_generator.rb +3 -3
  14. data/spec/factories.rb +0 -3
  15. data/spec/spec_helper.rb +15 -37
  16. metadata +39 -142
  17. data/app/models/fieldable_form/base_form.rb +0 -12
  18. data/spec/dummy/Rakefile +0 -7
  19. data/spec/dummy/app/assets/javascripts/application.js +0 -14
  20. data/spec/dummy/app/assets/stylesheets/application.css +0 -13
  21. data/spec/dummy/app/controllers/application_controller.rb +0 -3
  22. data/spec/dummy/app/views/layouts/application.html.erb +0 -14
  23. data/spec/dummy/config/application.rb +0 -65
  24. data/spec/dummy/config/boot.rb +0 -10
  25. data/spec/dummy/config/database.yml +0 -31
  26. data/spec/dummy/config/environment.rb +0 -5
  27. data/spec/dummy/config/environments/development.rb +0 -37
  28. data/spec/dummy/config/environments/production.rb +0 -67
  29. data/spec/dummy/config/environments/test.rb +0 -37
  30. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  31. data/spec/dummy/config/initializers/inflections.rb +0 -15
  32. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  33. data/spec/dummy/config/initializers/secret_token.rb +0 -7
  34. data/spec/dummy/config/initializers/session_store.rb +0 -8
  35. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  36. data/spec/dummy/config/locales/en.yml +0 -10
  37. data/spec/dummy/config/routes.rb +0 -58
  38. data/spec/dummy/config.ru +0 -4
  39. data/spec/dummy/db/schema.rb +0 -37
  40. data/spec/dummy/log/development.log +0 -17287
  41. data/spec/dummy/log/test.log +0 -2468
  42. data/spec/dummy/public/404.html +0 -26
  43. data/spec/dummy/public/422.html +0 -26
  44. data/spec/dummy/public/500.html +0 -25
  45. data/spec/dummy/public/favicon.ico +0 -0
  46. data/spec/dummy/script/rails +0 -6
  47. data/spec/dummy/tmp/cache/assets/C89/C50/sprockets%2F0128245f453fc07495ce96d03ce83828 +0 -0
  48. data/spec/dummy/tmp/cache/assets/C8C/B80/sprockets%2F371bf96e99717688ed7313a0c53f4212 +0 -0
  49. data/spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  50. data/spec/dummy/tmp/cache/assets/CE9/3B0/sprockets%2F4d76f2472a6585a82f20e528f66db37a +0 -0
  51. data/spec/dummy/tmp/cache/assets/CF0/1D0/sprockets%2F6fc757c2c8329244ca95d6909865bbc2 +0 -0
  52. data/spec/dummy/tmp/cache/assets/CF2/0B0/sprockets%2Fe7792e92129f4163b674c8eaa1869ea5 +0 -0
  53. data/spec/dummy/tmp/cache/assets/CFD/D40/sprockets%2Fbc10d0bbc521453356f2dc93fe962214 +0 -0
  54. data/spec/dummy/tmp/cache/assets/D04/AC0/sprockets%2F2cfb8bc0234d8d34a40b22e3160975f9 +0 -0
  55. data/spec/dummy/tmp/cache/assets/D0B/680/sprockets%2F15f117f5457e916bf0ed4373d0d54b1d +0 -0
  56. data/spec/dummy/tmp/cache/assets/D1A/6F0/sprockets%2Ff80b49ee1524c6a5e2039099e8e4a7e4 +0 -0
  57. data/spec/dummy/tmp/cache/assets/D2D/AE0/sprockets%2F7b63d98f6f2a590f8a7d3644e73fe567 +0 -0
  58. data/spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  59. data/spec/dummy/tmp/cache/assets/D3A/1A0/sprockets%2F375b9bfd0d0c32cc5477bc1f858270c2 +0 -0
  60. data/spec/dummy/tmp/cache/assets/D3B/7E0/sprockets%2F7dbe843db5a21c088def466f440d4700 +0 -0
  61. data/spec/dummy/tmp/cache/assets/D3D/CB0/sprockets%2Fdb4457a2344779c33afec132add7d934 +0 -0
  62. data/spec/dummy/tmp/cache/assets/D46/370/sprockets%2F9648dab31120c94bcc5f568faef56707 +0 -0
  63. data/spec/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  64. data/spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  65. data/spec/dummy/tmp/cache/assets/D5B/5E0/sprockets%2Fe29a1c35ce4b4650b9a8d1ec621e02b2 +0 -0
  66. data/spec/dummy/tmp/cache/assets/D60/550/sprockets%2F92d9a323823d13dde272b03caab918dd +0 -0
  67. data/spec/dummy/tmp/cache/assets/D61/E30/sprockets%2F83ced38963c1bc695c9ec9d8b33999c5 +0 -0
  68. data/spec/dummy/tmp/cache/assets/D66/AC0/sprockets%2F51e7a5daeb434a9ab4b396ca2537058d +0 -0
  69. data/spec/dummy/tmp/cache/assets/D99/390/sprockets%2Fbd60ec7ece6de65ae139641d53d1d611 +0 -0
  70. data/spec/dummy/tmp/cache/assets/D9D/700/sprockets%2F985cf14f35b20f92ba443cfe14d2c6fd +0 -0
  71. data/spec/dummy/tmp/cache/assets/DA5/DF0/sprockets%2Fc8f2f1b1c1662cb81da8ec752d378ee9 +0 -0
  72. data/spec/dummy/tmp/cache/assets/DAE/D60/sprockets%2F5ec78a1fb6d4ba97329bb8fca6e79516 +0 -0
  73. data/spec/dummy/tmp/cache/assets/DC2/830/sprockets%2F269b3baa48e630e7dac3a7c3bb65e1a7 +0 -0
  74. data/spec/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  75. data/spec/dummy/tmp/cache/assets/DEF/0A0/sprockets%2F2c4fe731be11cc181af12efe0ed8d4e3 +0 -0
  76. data/spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  FieldableForm [![Build Status](https://travis-ci.org/rbao/fieldable_form.png)](https://travis-ci.org/rbao/fieldable_form) [![Code Climate](https://codeclimate.com/github/rbao/fieldable_form.png)](https://codeclimate.com/github/rbao/fieldable_form)
2
2
  ==============
3
- FieldableForm is intended to make building an end user facing form builder easier. It provides all the field models necessary for building such functionality and also some erb and js templates for bootstraping the views.
3
+ FieldableForm is intended to make building an end user facing form builder easier. It provides all the field models necessary for building such functionality and also some erb and js templates for bootstraping the views. Checkout the [Example App](https://github.com/rbao/fieldable_form_example_app "Example App") to see how it work in action.
4
4
 
5
5
  Installation
6
6
  -------------
@@ -10,8 +10,7 @@ FieldableForm is only compatiable with Rails 3+.
10
10
 
11
11
  Getting Started
12
12
  ----------
13
- The best way get started with FieldableForm is by looking into the [Example App](https://github.com/rbao/fieldable_form_example_app "Example App").
14
- To use FieldableForm, you will need to implement the following two types of models.
13
+ To use FieldableForm, you will need to implement the following two types of models.
15
14
 
16
15
  ### Form Model
17
16
  FieldableForm provide an easy way for you to build form models that can have different type of fields.
@@ -47,6 +46,8 @@ Then in the views you can use `OpenStruct` to render the fields from the `produc
47
46
  <% end %>
48
47
  <% end %>
49
48
 
49
+ For more detailed implementation please take a look at the [Example App](https://github.com/rbao/fieldable_form_example_app "Example App")
50
+
50
51
  Bootstrap Views
51
52
  ----------------
52
53
  FieldableForm does not provide any views by default, However you could get a default views and some useful helpers as a starting point.
data/Rakefile CHANGED
@@ -14,17 +14,12 @@ end
14
14
 
15
15
  RDoc::Task.new(:rdoc) do |rdoc|
16
16
  rdoc.rdoc_dir = 'rdoc'
17
- rdoc.title = 'RealDynamicForm'
17
+ rdoc.title = 'FieldableForm'
18
18
  rdoc.options << '--line-numbers'
19
19
  rdoc.rdoc_files.include('README.rdoc')
20
20
  rdoc.rdoc_files.include('lib/**/*.rb')
21
21
  end
22
22
 
23
- APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
24
- load 'rails/tasks/engine.rake'
25
-
26
-
27
-
28
23
  Bundler::GemHelper.install_tasks
29
24
 
30
25
  require 'rake/testtask'
@@ -36,5 +31,7 @@ Rake::TestTask.new(:test) do |t|
36
31
  t.verbose = false
37
32
  end
38
33
 
34
+ require 'rspec/core/rake_task'
39
35
 
40
- task :default => :test
36
+ RSpec::Core::RakeTask.new(:spec)
37
+ task :default => :spec
File without changes
@@ -10,7 +10,7 @@ module FieldableForm
10
10
 
11
11
  # Overrides
12
12
  def render_options
13
- items_array = items.squish.delete(' ').split(',')
13
+ items_array = items.split(',').map(&:strip)
14
14
  if include_blank == '1'
15
15
  items_array.map! { |i| [i, i] }
16
16
  items_array.first[1] = nil
@@ -1,9 +1,7 @@
1
1
  module FieldableForm
2
2
  class Engine < ::Rails::Engine
3
- config.autoload_paths << root.join('app', 'models', 'concerns')
4
-
5
3
  initializer 'fieldable_form.add_migration_paths' do |app|
6
4
  app.config.paths['db/migrate'] += FieldableForm::Engine.paths['db/migrate'].existent
7
5
  end
8
6
  end
9
- end
7
+ end
File without changes
File without changes
@@ -1,3 +1,5 @@
1
+ require 'ostruct'
2
+
1
3
  module FieldableForm
2
4
  class Validatable < OpenStruct
3
5
  include ActiveModel::Validations
@@ -7,6 +9,10 @@ module FieldableForm
7
9
  @errors = ActiveModel::Errors.new(self)
8
10
  super(*args)
9
11
  end
12
+
13
+ def self.i18n_scope
14
+ :activerecord
15
+ end
10
16
 
11
17
  end
12
18
  end
@@ -1,3 +1,3 @@
1
1
  module FieldableForm
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -1,9 +1,21 @@
1
- require "fieldable_form/engine"
1
+ require 'rails'
2
+ require 'active_support'
3
+ require 'active_record'
4
+ require 'fieldable_form/engine'
5
+
6
+ require 'fieldable_form/exceptions'
7
+ require 'fieldable_form/validatable'
8
+ require 'fieldable_form/entry_validations'
9
+
10
+ require 'fieldable_form/field'
11
+ require 'fieldable_form/text_field'
12
+ require 'fieldable_form/check_box'
13
+ require 'fieldable_form/drop_down'
2
14
 
3
15
  module FieldableForm
4
16
 
5
17
  def self.table_name_prefix
6
- "fieldable_form_"
18
+ 'fieldable_form_'
7
19
  end
8
20
 
9
21
  end
@@ -1,6 +1,6 @@
1
1
  class FieldableForm::BootstrapGenerator < Rails::Generators::Base
2
2
  source_root File.expand_path('../templates', __FILE__)
3
- argument :form_name, :type => :string
3
+ argument :form_model, :type => :string
4
4
 
5
5
  def generate_assets
6
6
  template 'fieldable_form.js.coffee', "app/assets/javascripts/#{uname}.js.coffee"
@@ -24,7 +24,7 @@ class FieldableForm::BootstrapGenerator < Rails::Generators::Base
24
24
  end
25
25
 
26
26
  def uname
27
- form_name.underscore
27
+ form_model.underscore
28
28
  end
29
29
 
30
30
  def dname
@@ -32,6 +32,6 @@ class FieldableForm::BootstrapGenerator < Rails::Generators::Base
32
32
  end
33
33
 
34
34
  def cname
35
- form_name.camelize
35
+ form_model.camelize
36
36
  end
37
37
  end
data/spec/factories.rb CHANGED
@@ -5,9 +5,6 @@ def random_options
5
5
  end
6
6
 
7
7
  FactoryGirl.define do
8
- factory :base_form, :class => FieldableForm::BaseForm do
9
- end
10
-
11
8
  factory :field, :class => FieldableForm::Field do
12
9
  sequence(:name) { |n| "abstract_field_#{n}" }
13
10
 
data/spec/spec_helper.rb CHANGED
@@ -1,52 +1,30 @@
1
- ENV["RAILS_ENV"] ||= 'test'
2
-
1
+ # Start recording test coverage
3
2
  require 'simplecov'
4
-
5
- SimpleCov.start 'rails' do
6
- add_group 'Models', 'app/models'
7
- add_group 'Validators', 'app/validators'
3
+ SimpleCov.start do
4
+ add_filter "spec"
8
5
  end
9
6
 
10
- # Load rails
11
- require File.expand_path("../dummy/config/environment", __FILE__)
7
+ require 'fieldable_form'
12
8
 
13
9
  # Load test related gem
14
- require 'rspec/rails'
15
10
  require 'rspec/autorun'
16
- require 'factory_girl_rails'
11
+ require 'factory_girl'
17
12
  require 'faker'
13
+ require 'support/matchers/include_validator'
18
14
 
15
+ FactoryGirl.find_definitions
19
16
 
20
- # Requires supporting ruby files with custom matchers and macros, etc,
21
- # in spec/support/ and its subdirectories.
22
- Dir[Rails.root.join("#{File.dirname(__FILE__)}/support/**/*.rb")].each { |f| require f }
23
-
24
- RSpec.configure do |config|
25
- # ## Mock Framework
26
- #
27
- # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
28
- #
29
- # config.mock_with :mocha
30
- # config.mock_with :flexmock
31
- # config.mock_with :rr
32
-
33
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
34
- # config.fixture_path = "#{::Rails.root}/spec/fixtures"
17
+ # Load migration
18
+ ROOT = Pathname(File.expand_path(File.join(File.dirname(__FILE__), '..')))
19
+ Dir[File.join(ROOT, 'db', 'migrate', '*.rb')].each { |f| require f }
35
20
 
36
- # If you're not using ActiveRecord, or you'd prefer not to run each of your
37
- # examples within a transaction, remove the following line or assign false
38
- # instead of true.
39
- config.use_transactional_fixtures = true
21
+ ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
40
22
 
41
- # If true, the base class of anonymous controllers will be inferred
42
- # automatically. This will be the default behavior in future versions of
43
- # rspec-rails.
44
- config.infer_base_class_for_anonymous_controllers = false
23
+ # Migrate without showing message
24
+ CreateFieldableFormFields.verbose = false
25
+ CreateFieldableFormFields.new.change
45
26
 
46
- # Run specs in random order to surface order dependencies. If you find an
47
- # order dependency and want to debug it, you can fix the order by providing
48
- # the seed, which is printed after each run.
49
- # --seed 1234
27
+ RSpec.configure do |config|
50
28
  config.order = "random"
51
29
  config.include FactoryGirl::Syntax::Methods
52
30
  end
metadata CHANGED
@@ -2,47 +2,63 @@
2
2
  name: fieldable_form
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.2
5
+ version: 0.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Roy Y. Bao
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-22 00:00:00.000000000 Z
12
+ date: 2013-04-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  type: :runtime
16
16
  version_requirements: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ~>
19
+ - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: 3.2.9
22
- name: rails
21
+ version: '0'
22
+ name: railties
23
23
  prerelease: false
24
24
  requirement: !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ~>
27
+ - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
- version: 3.2.9
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ type: :runtime
32
+ version_requirements: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ name: activerecord
39
+ prerelease: false
40
+ requirement: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
30
46
  - !ruby/object:Gem::Dependency
31
47
  type: :development
32
48
  version_requirements: !ruby/object:Gem::Requirement
33
49
  none: false
34
50
  requirements:
35
- - - ~>
51
+ - - ! '>='
36
52
  - !ruby/object:Gem::Version
37
- version: 0.3.11
38
- name: mysql2
53
+ version: '0'
54
+ name: sqlite3
39
55
  prerelease: false
40
56
  requirement: !ruby/object:Gem::Requirement
41
57
  none: false
42
58
  requirements:
43
- - - ~>
59
+ - - ! '>='
44
60
  - !ruby/object:Gem::Version
45
- version: 0.3.11
61
+ version: '0'
46
62
  - !ruby/object:Gem::Dependency
47
63
  type: :development
48
64
  version_requirements: !ruby/object:Gem::Requirement
@@ -51,7 +67,7 @@ dependencies:
51
67
  - - ! '>='
52
68
  - !ruby/object:Gem::Version
53
69
  version: '0'
54
- name: rspec-rails
70
+ name: rspec
55
71
  prerelease: false
56
72
  requirement: !ruby/object:Gem::Requirement
57
73
  none: false
@@ -83,7 +99,7 @@ dependencies:
83
99
  - - ! '>='
84
100
  - !ruby/object:Gem::Version
85
101
  version: '0'
86
- name: factory_girl_rails
102
+ name: factory_girl
87
103
  prerelease: false
88
104
  requirement: !ruby/object:Gem::Requirement
89
105
  none: false
@@ -114,16 +130,15 @@ executables: []
114
130
  extensions: []
115
131
  extra_rdoc_files: []
116
132
  files:
117
- - app/exceptions/fieldable_form/cannot_initialize_abstract_class.rb
118
- - app/models/concerns/fieldable_form/entry_validations.rb
119
- - app/models/fieldable_form/base_form.rb
120
- - app/models/fieldable_form/check_box.rb
121
- - app/models/fieldable_form/drop_down.rb
122
- - app/models/fieldable_form/field.rb
123
- - app/models/fieldable_form/text_field.rb
124
- - app/models/fieldable_form/validatable.rb
125
133
  - db/migrate/20130302192001_create_fieldable_form_fields.rb
134
+ - lib/fieldable_form/check_box.rb
135
+ - lib/fieldable_form/drop_down.rb
126
136
  - lib/fieldable_form/engine.rb
137
+ - lib/fieldable_form/entry_validations.rb
138
+ - lib/fieldable_form/exceptions.rb
139
+ - lib/fieldable_form/field.rb
140
+ - lib/fieldable_form/text_field.rb
141
+ - lib/fieldable_form/validatable.rb
127
142
  - lib/fieldable_form/version.rb
128
143
  - lib/fieldable_form.rb
129
144
  - lib/generators/fieldable_form/bootstrap/bootstrap_generator.rb
@@ -139,65 +154,6 @@ files:
139
154
  - MIT-LICENSE
140
155
  - Rakefile
141
156
  - README.md
142
- - spec/dummy/app/assets/javascripts/application.js
143
- - spec/dummy/app/assets/stylesheets/application.css
144
- - spec/dummy/app/controllers/application_controller.rb
145
- - spec/dummy/app/views/layouts/application.html.erb
146
- - spec/dummy/config/application.rb
147
- - spec/dummy/config/boot.rb
148
- - spec/dummy/config/database.yml
149
- - spec/dummy/config/environment.rb
150
- - spec/dummy/config/environments/development.rb
151
- - spec/dummy/config/environments/production.rb
152
- - spec/dummy/config/environments/test.rb
153
- - spec/dummy/config/initializers/backtrace_silencers.rb
154
- - spec/dummy/config/initializers/inflections.rb
155
- - spec/dummy/config/initializers/mime_types.rb
156
- - spec/dummy/config/initializers/secret_token.rb
157
- - spec/dummy/config/initializers/session_store.rb
158
- - spec/dummy/config/initializers/wrap_parameters.rb
159
- - spec/dummy/config/locales/en.yml
160
- - spec/dummy/config/routes.rb
161
- - spec/dummy/config.ru
162
- - spec/dummy/db/schema.rb
163
- - spec/dummy/log/development.log
164
- - spec/dummy/log/test.log
165
- - spec/dummy/public/404.html
166
- - spec/dummy/public/422.html
167
- - spec/dummy/public/500.html
168
- - spec/dummy/public/favicon.ico
169
- - spec/dummy/Rakefile
170
- - spec/dummy/script/rails
171
- - spec/dummy/tmp/cache/assets/C89/C50/sprockets%2F0128245f453fc07495ce96d03ce83828
172
- - spec/dummy/tmp/cache/assets/C8C/B80/sprockets%2F371bf96e99717688ed7313a0c53f4212
173
- - spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
174
- - spec/dummy/tmp/cache/assets/CE9/3B0/sprockets%2F4d76f2472a6585a82f20e528f66db37a
175
- - spec/dummy/tmp/cache/assets/CF0/1D0/sprockets%2F6fc757c2c8329244ca95d6909865bbc2
176
- - spec/dummy/tmp/cache/assets/CF2/0B0/sprockets%2Fe7792e92129f4163b674c8eaa1869ea5
177
- - spec/dummy/tmp/cache/assets/CFD/D40/sprockets%2Fbc10d0bbc521453356f2dc93fe962214
178
- - spec/dummy/tmp/cache/assets/D04/AC0/sprockets%2F2cfb8bc0234d8d34a40b22e3160975f9
179
- - spec/dummy/tmp/cache/assets/D0B/680/sprockets%2F15f117f5457e916bf0ed4373d0d54b1d
180
- - spec/dummy/tmp/cache/assets/D1A/6F0/sprockets%2Ff80b49ee1524c6a5e2039099e8e4a7e4
181
- - spec/dummy/tmp/cache/assets/D2D/AE0/sprockets%2F7b63d98f6f2a590f8a7d3644e73fe567
182
- - spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
183
- - spec/dummy/tmp/cache/assets/D3A/1A0/sprockets%2F375b9bfd0d0c32cc5477bc1f858270c2
184
- - spec/dummy/tmp/cache/assets/D3B/7E0/sprockets%2F7dbe843db5a21c088def466f440d4700
185
- - spec/dummy/tmp/cache/assets/D3D/CB0/sprockets%2Fdb4457a2344779c33afec132add7d934
186
- - spec/dummy/tmp/cache/assets/D46/370/sprockets%2F9648dab31120c94bcc5f568faef56707
187
- - spec/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655
188
- - spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
189
- - spec/dummy/tmp/cache/assets/D5B/5E0/sprockets%2Fe29a1c35ce4b4650b9a8d1ec621e02b2
190
- - spec/dummy/tmp/cache/assets/D60/550/sprockets%2F92d9a323823d13dde272b03caab918dd
191
- - spec/dummy/tmp/cache/assets/D61/E30/sprockets%2F83ced38963c1bc695c9ec9d8b33999c5
192
- - spec/dummy/tmp/cache/assets/D66/AC0/sprockets%2F51e7a5daeb434a9ab4b396ca2537058d
193
- - spec/dummy/tmp/cache/assets/D99/390/sprockets%2Fbd60ec7ece6de65ae139641d53d1d611
194
- - spec/dummy/tmp/cache/assets/D9D/700/sprockets%2F985cf14f35b20f92ba443cfe14d2c6fd
195
- - spec/dummy/tmp/cache/assets/DA5/DF0/sprockets%2Fc8f2f1b1c1662cb81da8ec752d378ee9
196
- - spec/dummy/tmp/cache/assets/DAE/D60/sprockets%2F5ec78a1fb6d4ba97329bb8fca6e79516
197
- - spec/dummy/tmp/cache/assets/DC2/830/sprockets%2F269b3baa48e630e7dac3a7c3bb65e1a7
198
- - spec/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994
199
- - spec/dummy/tmp/cache/assets/DEF/0A0/sprockets%2F2c4fe731be11cc181af12efe0ed8d4e3
200
- - spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af
201
157
  - spec/factories.rb
202
158
  - spec/spec_helper.rb
203
159
  - spec/support/matchers/include_validator.rb
@@ -218,7 +174,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
218
174
  - !ruby/object:Gem::Version
219
175
  segments:
220
176
  - 0
221
- hash: -3533861356981804529
177
+ hash: -3302435722466470251
222
178
  version: '0'
223
179
  required_rubygems_version: !ruby/object:Gem::Requirement
224
180
  none: false
@@ -227,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
227
183
  - !ruby/object:Gem::Version
228
184
  segments:
229
185
  - 0
230
- hash: -3533861356981804529
186
+ hash: -3302435722466470251
231
187
  version: '0'
232
188
  requirements: []
233
189
  rubyforge_project:
@@ -236,65 +192,6 @@ signing_key:
236
192
  specification_version: 3
237
193
  summary: FieldableForm allows you to easily build an end user facing form builder.
238
194
  test_files:
239
- - spec/dummy/app/assets/javascripts/application.js
240
- - spec/dummy/app/assets/stylesheets/application.css
241
- - spec/dummy/app/controllers/application_controller.rb
242
- - spec/dummy/app/views/layouts/application.html.erb
243
- - spec/dummy/config/application.rb
244
- - spec/dummy/config/boot.rb
245
- - spec/dummy/config/database.yml
246
- - spec/dummy/config/environment.rb
247
- - spec/dummy/config/environments/development.rb
248
- - spec/dummy/config/environments/production.rb
249
- - spec/dummy/config/environments/test.rb
250
- - spec/dummy/config/initializers/backtrace_silencers.rb
251
- - spec/dummy/config/initializers/inflections.rb
252
- - spec/dummy/config/initializers/mime_types.rb
253
- - spec/dummy/config/initializers/secret_token.rb
254
- - spec/dummy/config/initializers/session_store.rb
255
- - spec/dummy/config/initializers/wrap_parameters.rb
256
- - spec/dummy/config/locales/en.yml
257
- - spec/dummy/config/routes.rb
258
- - spec/dummy/config.ru
259
- - spec/dummy/db/schema.rb
260
- - spec/dummy/log/development.log
261
- - spec/dummy/log/test.log
262
- - spec/dummy/public/404.html
263
- - spec/dummy/public/422.html
264
- - spec/dummy/public/500.html
265
- - spec/dummy/public/favicon.ico
266
- - spec/dummy/Rakefile
267
- - spec/dummy/script/rails
268
- - spec/dummy/tmp/cache/assets/C89/C50/sprockets%2F0128245f453fc07495ce96d03ce83828
269
- - spec/dummy/tmp/cache/assets/C8C/B80/sprockets%2F371bf96e99717688ed7313a0c53f4212
270
- - spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
271
- - spec/dummy/tmp/cache/assets/CE9/3B0/sprockets%2F4d76f2472a6585a82f20e528f66db37a
272
- - spec/dummy/tmp/cache/assets/CF0/1D0/sprockets%2F6fc757c2c8329244ca95d6909865bbc2
273
- - spec/dummy/tmp/cache/assets/CF2/0B0/sprockets%2Fe7792e92129f4163b674c8eaa1869ea5
274
- - spec/dummy/tmp/cache/assets/CFD/D40/sprockets%2Fbc10d0bbc521453356f2dc93fe962214
275
- - spec/dummy/tmp/cache/assets/D04/AC0/sprockets%2F2cfb8bc0234d8d34a40b22e3160975f9
276
- - spec/dummy/tmp/cache/assets/D0B/680/sprockets%2F15f117f5457e916bf0ed4373d0d54b1d
277
- - spec/dummy/tmp/cache/assets/D1A/6F0/sprockets%2Ff80b49ee1524c6a5e2039099e8e4a7e4
278
- - spec/dummy/tmp/cache/assets/D2D/AE0/sprockets%2F7b63d98f6f2a590f8a7d3644e73fe567
279
- - spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
280
- - spec/dummy/tmp/cache/assets/D3A/1A0/sprockets%2F375b9bfd0d0c32cc5477bc1f858270c2
281
- - spec/dummy/tmp/cache/assets/D3B/7E0/sprockets%2F7dbe843db5a21c088def466f440d4700
282
- - spec/dummy/tmp/cache/assets/D3D/CB0/sprockets%2Fdb4457a2344779c33afec132add7d934
283
- - spec/dummy/tmp/cache/assets/D46/370/sprockets%2F9648dab31120c94bcc5f568faef56707
284
- - spec/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655
285
- - spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
286
- - spec/dummy/tmp/cache/assets/D5B/5E0/sprockets%2Fe29a1c35ce4b4650b9a8d1ec621e02b2
287
- - spec/dummy/tmp/cache/assets/D60/550/sprockets%2F92d9a323823d13dde272b03caab918dd
288
- - spec/dummy/tmp/cache/assets/D61/E30/sprockets%2F83ced38963c1bc695c9ec9d8b33999c5
289
- - spec/dummy/tmp/cache/assets/D66/AC0/sprockets%2F51e7a5daeb434a9ab4b396ca2537058d
290
- - spec/dummy/tmp/cache/assets/D99/390/sprockets%2Fbd60ec7ece6de65ae139641d53d1d611
291
- - spec/dummy/tmp/cache/assets/D9D/700/sprockets%2F985cf14f35b20f92ba443cfe14d2c6fd
292
- - spec/dummy/tmp/cache/assets/DA5/DF0/sprockets%2Fc8f2f1b1c1662cb81da8ec752d378ee9
293
- - spec/dummy/tmp/cache/assets/DAE/D60/sprockets%2F5ec78a1fb6d4ba97329bb8fca6e79516
294
- - spec/dummy/tmp/cache/assets/DC2/830/sprockets%2F269b3baa48e630e7dac3a7c3bb65e1a7
295
- - spec/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994
296
- - spec/dummy/tmp/cache/assets/DEF/0A0/sprockets%2F2c4fe731be11cc181af12efe0ed8d4e3
297
- - spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af
298
195
  - spec/factories.rb
299
196
  - spec/spec_helper.rb
300
197
  - spec/support/matchers/include_validator.rb
@@ -1,12 +0,0 @@
1
- module FieldableForm
2
- class BaseForm < ActiveRecord::Base
3
- self.table_name = :fieldable_forms
4
-
5
- belongs_to :owner, :polymorphic => true
6
-
7
- attr_accessible :fields_attributes
8
-
9
- has_many :fields, :class_name => Field, :as => :fieldable, :dependent => :destroy
10
- accepts_nested_attributes_for :fields, :allow_destroy => true
11
- end
12
- end
data/spec/dummy/Rakefile DELETED
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env rake
2
- # Add your own tasks in files placed in lib/tasks ending in .rake,
3
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
-
5
- require File.expand_path('../config/application', __FILE__)
6
-
7
- Dummy::Application.load_tasks
@@ -1,14 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // the compiled file.
9
- //
10
- // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
- // GO AFTER THE REQUIRES BELOW.
12
- //
13
- //= require jquery
14
- //= require jquery_ujs
@@ -1,13 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the top of the
9
- * compiled file, but it's generally better to create a new file per style scope.
10
- *
11
- *= require_self
12
- *= require_tree .
13
- */
@@ -1,3 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- protect_from_forgery
3
- end
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Dummy</title>
5
- <%= stylesheet_link_tag "application", :media => "all" %>
6
- <%= javascript_include_tag "application" %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%= yield %>
12
-
13
- </body>
14
- </html>
@@ -1,65 +0,0 @@
1
- require File.expand_path('../boot', __FILE__)
2
-
3
- require 'rails/all'
4
-
5
- Bundler.require
6
- require "fieldable_form"
7
-
8
- module Dummy
9
- class Application < Rails::Application
10
- # Settings in config/environments/* take precedence over those specified here.
11
- # Application configuration should go into files in config/initializers
12
- # -- all .rb files in that directory are automatically loaded.
13
-
14
- # Custom directories with classes and modules you want to be autoloadable.
15
- # config.autoload_paths += %W(#{config.root}/extras)
16
-
17
- # Only load the plugins named here, in the order given (default is alphabetical).
18
- # :all can be used as a placeholder for all plugins not explicitly named.
19
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
20
-
21
- # Activate observers that should always be running.
22
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
23
-
24
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
25
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
26
- # config.time_zone = 'Central Time (US & Canada)'
27
-
28
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
29
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
30
- # config.i18n.default_locale = :de
31
-
32
- # Configure the default encoding used in templates for Ruby 1.9.
33
- config.encoding = "utf-8"
34
-
35
- # Configure sensitive parameters which will be filtered from the log file.
36
- config.filter_parameters += [:password]
37
-
38
- # Enable escaping HTML in JSON.
39
- config.active_support.escape_html_entities_in_json = true
40
-
41
- # Use SQL instead of Active Record's schema dumper when creating the database.
42
- # This is necessary if your schema can't be completely dumped by the schema dumper,
43
- # like if you have constraints or database-specific column types
44
- # config.active_record.schema_format = :sql
45
-
46
- # Enforce whitelist mode for mass assignment.
47
- # This will create an empty whitelist of attributes available for mass-assignment for all models
48
- # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
49
- # parameters by using an attr_accessible or attr_protected declaration.
50
- config.active_record.whitelist_attributes = true
51
-
52
- # Enable the asset pipeline
53
- config.assets.enabled = true
54
-
55
- # Version of your assets, change this if you want to expire all your assets
56
- config.assets.version = '1.0'
57
-
58
- config.generators do |g|
59
- g.assets false
60
- g.test_framework false
61
- g.helper false
62
- end
63
- end
64
- end
65
-
@@ -1,10 +0,0 @@
1
- require 'rubygems'
2
- gemfile = File.expand_path('../../../../Gemfile', __FILE__)
3
-
4
- if File.exist?(gemfile)
5
- ENV['BUNDLE_GEMFILE'] = gemfile
6
- require 'bundler'
7
- Bundler.setup
8
- end
9
-
10
- $:.unshift File.expand_path('../../../../lib', __FILE__)