reform-rails 0.1.7 → 0.2.0.rc1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef8e06973cbbd53737de0a7d0afe1250bdba0814
4
- data.tar.gz: 986c4d29338ecdc03fb3dea2ab7c75f6c9253ce6
3
+ metadata.gz: 7c305a6d82ff671f19e202c55d4e6ecdbb65b0d7
4
+ data.tar.gz: 50fbfe33f1cdc8ec9816fbaaba231900b028bdd8
5
5
  SHA512:
6
- metadata.gz: 314925db393628f4f0d7a2dc32808217c7b2d17d0e27d86d69299b14df875917a1598857c291ea3eec8605bbcfb4e31e1d908c12df66ad3c4dd25a8fae6bc3ce
7
- data.tar.gz: 9f8f292731ef5b34f8abe6a046d738d18bd98b9192564ba592e8d922bfef02e0f61ba3feddee77d69cc2e590b4e91310bc925ec749fedbfcbee1b0ba458c0869
6
+ metadata.gz: 97c4240b05d195f6005aeab035fab28577057fd0a654a78fd2ed7b212c850ed55073e72366b2fec112dba561a8e73fafc5e3d23231e3bf7eed9fa6da5551c2d4
7
+ data.tar.gz: 7121028adddb1ac1e96dc433f7887e9cfdb690fb1914b5e4b89726d29cfb68f1f9b833eaa00149bd880325601c8dd99565da1a41d4539fafbd9f68386198817b
data/.gitignore CHANGED
@@ -8,4 +8,5 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  *.gem
11
- test/dummy/log/*.log
11
+
12
+ *.log
@@ -2,17 +2,26 @@ language: ruby
2
2
  cache: bundler
3
3
 
4
4
  rvm:
5
+ - 2.1.10
6
+ - 2.2.5
5
7
  - 2.3.1
6
- - 2.2.3
7
- - 2.0.0
8
+ - 2.4.0
8
9
  services:
9
10
  - mongodb
10
- gemfile:
11
- - gemfiles/Gemfile.rails-4.2
12
- - gemfiles/Gemfile.rails-4.1
13
- - gemfiles/Gemfile.rails-4.0
14
- - gemfiles/Gemfile.rails-3.2
15
- # - gemfiles/Gemfile.rails-3.1
16
- # - gemfiles/Gemfile.rails-3.0
11
+ env:
12
+ - "RAILS_VERSION=3.2.0"
13
+ - "RAILS_VERSION=4.0.0"
14
+ - "RAILS_VERSION=4.1.0"
15
+ - "RAILS_VERSION=4.2.0"
16
+ - "RAILS_VERSION=5.0.0"
17
17
  matrix:
18
18
  fast_finish: true
19
+ exclude:
20
+ - rvm: 2.1.10
21
+ env: "RAILS_VERSION=5.0.0"
22
+ - rvm: 2.4.0
23
+ env: "RAILS_VERSION=3.2.0"
24
+ - rvm: 2.4.0
25
+ env: "RAILS_VERSION=4.0.0"
26
+ - rvm: 2.4.0
27
+ env: "RAILS_VERSION=4.1.0"
data/CHANGES.md CHANGED
@@ -1,3 +1,14 @@
1
+ # 0.2.0
2
+
3
+ * Needs Reform >= 2.3.0.
4
+ * make the inclusion of ActiveModel form builder modules optional when using dry-validation. This can be controlled via `config.reform.enable_active_model_builder_methods = true`.
5
+ * delegate `validates_each` method and allow it to be called outside a validation block.
6
+ * add `case_sensitive` option to Reform Uniqueness validation. Defaults to true.
7
+ * fix bug in uniqueness validation where form has different attribute name to column
8
+ * improve handling of persisted records in uniqueness validator
9
+ * remove params.merge! as it's deprecated in rails 5
10
+ * update to support reform 2.3, the new API means that `errors.add` is delegated to ActiveModel::Errors so we have support for rails 5 :descriptions without having to do anything !Yey!
11
+
1
12
  # 0.1.7 (0.1.6 Yanked)
2
13
 
3
14
  * Fix a bug where requiring `form/active_model/validations` in a non-Rails environment wouldn't load all necessary files.
@@ -12,7 +23,7 @@
12
23
 
13
24
  # 0.1.3
14
25
 
15
- * Introduce a railtie to load either `ActiveModel::Validations` *or* `Dry::Validations`. This can be controller via `config.reform.validations = :dry`.
26
+ * Introduce a railtie to load either `ActiveModel::Validations` *or* `Dry::Validations`. This can be controlled via `config.reform.validations = :dry`.
16
27
 
17
28
  # 0.1.2
18
29
 
data/Gemfile CHANGED
@@ -3,4 +3,15 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in reform-rails.gemspec
4
4
  gemspec
5
5
 
6
- gem "reform", path: "../reform"
6
+ # gem "reform", github: "trailblazer/reform"
7
+ # gem "reform", path: "../reform"
8
+
9
+ rails_version = ENV['RAILS_VERSION'] || '4.2'
10
+
11
+ # bored of wrestling with rails...
12
+ if rails_version == '4.0'
13
+ gem 'mongoid', '~> 4'
14
+ end
15
+
16
+ gem "railties", "~> #{rails_version}"
17
+ gem "activerecord", "~> #{rails_version}"
data/README.md CHANGED
@@ -14,7 +14,7 @@ Simply don't include this gem if you don't want to use the conventional Reform/R
14
14
 
15
15
  ## Documentation
16
16
 
17
- The [full documentation](http://trailblazer.to/gems/reform/#reform-rails) can be found on the Trailblazer page.
17
+ The [full documentation](http://trailblazer.to/gems/reform/rails.html) can be found on the Trailblazer page.
18
18
 
19
19
  ## Installation
20
20
 
@@ -26,6 +26,15 @@ gem 'reform-rails'
26
26
 
27
27
  Reform-rails needs Reform >= 2.2.
28
28
 
29
+ ## Contributing
30
+
31
+ By default your tests will run against rails 4.2.0.
32
+ Please ensure that you test your changes against all supported ruby and rails versions (see .travis.yml)
33
+
34
+ You can run tests for a specific version of rails by running the following:
35
+
36
+ `export RAILS_VERSION=4.2.0; bundle update; bundle exec rake test`
37
+
29
38
  ## License
30
39
 
31
40
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile CHANGED
@@ -4,7 +4,9 @@ require "rake/testtask"
4
4
  Rake::TestTask.new(:test) do |t|
5
5
  t.libs << "test"
6
6
  t.libs << "lib"
7
- t.test_files = FileList['test/**/*_test.rb']
7
+ t.test_files = FileList['test/*_test.rb']
8
+ t.warning = false
9
+ t.verbose = true
8
10
  end
9
11
 
10
12
  task :default => :test
Binary file
@@ -42,15 +42,19 @@ module Reform::Form::ActiveModel
42
42
 
43
43
  # moved from reform as not applicable to dry
44
44
  def validates(*args, &block)
45
- validation(:default, inherit: true) { validates *args, &block }
45
+ validation(name: :default, inherit: true) { validates *args, &block }
46
46
  end
47
47
 
48
48
  def validate(*args, &block)
49
- validation(:default, inherit: true) { validate *args, &block }
49
+ validation(name: :default, inherit: true) { validate *args, &block }
50
50
  end
51
51
 
52
52
  def validates_with(*args, &block)
53
- validation(:default, inherit: true) { validates_with *args, &block }
53
+ validation(name: :default, inherit: true) { validates_with *args, &block }
54
+ end
55
+
56
+ def validates_each(*args, &block)
57
+ validation(name: :default, inherit: true) { validates_each *args, &block }
54
58
  end
55
59
 
56
60
  # Set a model name for this form if the infered is wrong.
@@ -85,7 +89,6 @@ module Reform::Form::ActiveModel
85
89
 
86
90
  private
87
91
  def active_model_name_for(string, namespace=nil)
88
- return ::ActiveModel::Name.new(OpenStruct.new(:name => string)) if ::ActiveModel::VERSION::MAJOR == 3 and ::ActiveModel::VERSION::MINOR == 0 # TODO: remove when we drop rails 3.x.
89
92
  ::ActiveModel::Name.new(self, namespace, string)
90
93
  end
91
94
  end # ClassMethods
@@ -2,114 +2,172 @@ require "active_model"
2
2
  require "reform/form/active_model"
3
3
  require "uber/delegates"
4
4
 
5
- module Reform::Form::ActiveModel
5
+ module Reform
6
+ module Form::ActiveModel
6
7
  # AM::Validations for your form.
7
8
  # Provides ::validates, ::validate, #validate, and #valid?.
8
9
  #
9
10
  # Most of this file contains unnecessary wiring to make ActiveModel's error message magic work.
10
11
  # Since Rails still thinks it's a good idea to do things like object.class.human_attribute_name,
11
12
  # we have some hacks in here to provide that. If it doesn't work for you, don't blame us.
12
- module Validations
13
- def self.included(includer)
14
- includer.instance_eval do
15
- include Reform::Form::ActiveModel
16
-
17
- class << self
18
- extend Uber::Delegates
19
- # # Hooray! Delegate translation back to Reform's Validator class which contains AM::Validations.
20
- delegates :active_model_really_sucks, :human_attribute_name, :lookup_ancestors, :i18n_scope # Rails 3.1.
21
-
22
- def validation_group_class
23
- Group
24
- end
13
+ module Validations
14
+ def self.included(includer)
15
+ includer.instance_eval do
16
+ include Reform::Form::ActiveModel
17
+
18
+ class << self
19
+ extend Uber::Delegates
20
+ # # Hooray! Delegate translation back to Reform's Validator class which contains AM::Validations.
21
+ delegates :active_model_really_sucks, :human_attribute_name, :lookup_ancestors, :i18n_scope # Rails 3.1.
22
+
23
+ def validation_group_class
24
+ Group
25
+ end
25
26
 
26
- # this is to allow calls like Form::human_attribute_name (note that this is on the CLASS level) to be resolved.
27
- # those calls happen when adding errors in a custom validation method, which is defined on the form (as an instance method).
28
- def active_model_really_sucks
29
- Class.new(Validator).tap do |v|
30
- v.model_name = model_name
27
+ # this is to allow calls like Form::human_attribute_name (note that this is on the CLASS level) to be resolved.
28
+ # those calls happen when adding errors in a custom validation method, which is defined on the form (as an instance method).
29
+ def active_model_really_sucks
30
+ Class.new(Validator).tap do |v|
31
+ v.model_name = model_name
32
+ end
31
33
  end
32
34
  end
33
- end
34
- end # ::included
35
- end
36
-
37
- def build_errors
38
- Errors.new(self)
39
- end
35
+ end # ::included
36
+ end
40
37
 
41
- # The concept of "composition" has still not arrived in Rails core and they rely on 400 methods being
42
- # available in one object. This is why we need to provide parts of the I18N API in the form.
43
- def read_attribute_for_validation(name)
44
- send(name)
45
- end
38
+ # The concept of "composition" has still not arrived in Rails core and they rely on 400 methods being
39
+ # available in one object. This is why we need to provide parts of the I18N API in the form.
40
+ def read_attribute_for_validation(name)
41
+ send(name)
42
+ end
46
43
 
47
- class Group
48
44
  def initialize(*)
49
- @validations = Class.new(Reform::Form::ActiveModel::Validations::Validator)
45
+ super
46
+ @amv_errors = ActiveModel::Errors.new(self)
50
47
  end
51
48
 
52
- extend Uber::Delegates
53
- delegates :@validations, :validates, :validate, :validates_with, :validate_with
49
+ # Problem with this method is, it's being used in two completely different contexts: Once to add errors in validations,
50
+ # and second to expose errors for presentation.
51
+ def errors(*args)
52
+ @amv_errors
53
+ end
54
+
55
+ def validate!(params, pointers=[])
56
+ @amv_errors = ActiveModel::Errors.new(self)
57
+
58
+ super.tap do
59
+ # @fran: super ugly hack thanks to the shit architecture of AMV. let's drop it in 3.0 and move on!
60
+ all_errors = @result.instance_variable_get(:@results)
54
61
 
55
- def call(fields, errors, form) # FIXME.
56
- validator = @validations.new(form)
57
- validator.valid?
62
+ @result = Reform::Contract::Result.new(all_errors)
58
63
 
59
- validator.errors.each do |name, error| # TODO: handle with proper merge, or something. validator.errors is ALWAYS AM::Errors.
60
- errors.add(name, error)
64
+ @amv_errors = Result::ResultErrors.new(@result, self, @result.success?)
61
65
  end
66
+ @result
62
67
  end
63
- end
64
68
 
65
- # Validator is the validatable object. On the class level, we define validations,
66
- # on instance, it exposes #valid?.
67
- require "delegate"
68
- class Validator < SimpleDelegator
69
- # current i18n scope: :activemodel.
70
- include ActiveModel::Validations
69
+ class Group
70
+ def initialize(*)
71
+ @validations = Class.new(Reform::Form::ActiveModel::Validations::Validator)
72
+ end
73
+
74
+ extend Uber::Delegates
75
+ delegates :@validations, :validates, :validate, :validates_with, :validate_with, :validates_each
71
76
 
72
- class << self
73
- def model_name
74
- @_active_model_sucks ||= ActiveModel::Name.new(Reform::Form, nil, "Reform::Form")
77
+ def call(form)
78
+ validator = @validations.new(form)
79
+ validator.instance_variable_set(:@errors, form.errors)
80
+ success = validator.valid? # run the validations.
81
+
82
+ Result.new(success, validator.errors.messages)
75
83
  end
84
+ end
76
85
 
77
- def model_name=(name)
78
- @_active_model_sucks = name
86
+ # The idea here to mimic Dry.RB's Result API.
87
+ class Result < Hash # FIXME; should this be AMV::Errors?
88
+ def initialize(success, hash)
89
+ super()
90
+ @success = success
91
+ hash.each { |k,v| self[k] = v }
79
92
  end
80
93
 
81
- def validates(*args, &block)
82
- super(*Declarative::DeepDup.(args), &block)
94
+ def success?
95
+ @success
83
96
  end
84
97
 
85
- # Prevent AM:V from mutating the validator class
86
- def attr_reader(*)
98
+ def failure?
99
+ ! success?
87
100
  end
88
101
 
89
- def attr_writer(*)
102
+ def messages
103
+ self
90
104
  end
91
- end
92
105
 
93
- def initialize(form)
94
- super(form)
95
- self.class.model_name = form.model_name # one of the many reasons why i will drop support for AM::V in 2.1. or maybe a bit later.
106
+ # DISCUSS @FRAN: not sure this is 100% compatible with AMV::Errors?
107
+ def errors
108
+ self
109
+ end
110
+
111
+ class ResultErrors < ::Reform::Contract::Result::Errors # to expose via #errors. i hate it.
112
+ def initialize(a, b, success)
113
+ super(a, b)
114
+ @success = success
115
+ end
116
+
117
+ def empty?
118
+ @success
119
+ end
120
+
121
+ def [](k)
122
+ super || []
123
+ end
124
+
125
+ # rails expects this to return a stringified hash of the messages
126
+ def to_s
127
+ messages.to_s
128
+ end
129
+ end
96
130
  end
97
131
 
98
- # FIXME: for some weird reason, Object#format is reserved and form.send(:format) crashes with ArgumentError: too few arguments.
99
- # method_missing fix doesn't work with ruby 2.0 or 2.3
132
+ # Validator is the validatable object. On the class level, we define validations,
133
+ # on instance, it exposes #valid?.
134
+ require "delegate"
135
+ class Validator < SimpleDelegator
136
+ # current i18n scope: :activemodel.
137
+ include ActiveModel::Validations
138
+
139
+ class << self
140
+ def model_name
141
+ @_active_model_sucks ||= ActiveModel::Name.new(Reform::Form, nil, "Reform::Form")
142
+ end
100
143
 
101
- # this fixes 2.0 but I'm guessing that their are more methods than just format to consider
102
- # def format
103
- # __getobj__.format
104
- # end
144
+ def model_name=(name)
145
+ @_active_model_sucks = name
146
+ end
105
147
 
106
- def method_missing(m, *args, &block)
107
- __getobj__.send(m, *args, &block) # send all methods to the form, even privates.
148
+ def validates(*args, &block)
149
+ super(*Declarative::DeepDup.(args), &block)
150
+ end
151
+
152
+ # Prevent AM:V from mutating the validator class
153
+ def attr_reader(*)
154
+ end
155
+
156
+ def attr_writer(*)
157
+ end
158
+ end
159
+
160
+ def initialize(form)
161
+ super(form)
162
+ self.class.model_name = form.model_name
163
+ end
164
+
165
+ def method_missing(m, *args, &block)
166
+ __getobj__.send(m, *args, &block) # send all methods to the form, even privates.
167
+ end
108
168
  end
109
169
  end
110
- end
111
170
 
112
- class Errors < ActiveModel::Errors
113
- include Reform::Form::Errors::Merge
171
+
114
172
  end
115
173
  end
@@ -0,0 +1,37 @@
1
+ module Reform::Form::Mongoid
2
+ def self.included(base)
3
+ base.class_eval do
4
+ register_feature Reform::Form::Mongoid
5
+ include Reform::Form::ActiveModel
6
+ include Reform::Form::ORM
7
+ extend ClassMethods
8
+ end
9
+ end
10
+
11
+ module ClassMethods
12
+ def validates_uniqueness_of(attribute, options={})
13
+ options = options.merge(:attributes => [attribute])
14
+ validates_with(UniquenessValidator, options)
15
+ end
16
+ def i18n_scope
17
+ :mongoid
18
+ end
19
+ end
20
+
21
+
22
+ def self.mongoid_namespace
23
+ if mongoid_is_4_or_more?
24
+ 'Validatable'
25
+ else
26
+ 'Validations'
27
+ end
28
+ end
29
+
30
+ def self.mongoid_is_4_or_more?
31
+ Mongoid::VERSION.split('.').first.to_i >= 4
32
+ end
33
+
34
+ UniquenessValidator = Class.new("::Mongoid::#{mongoid_namespace}::UniquenessValidator".constantize) do
35
+ include Reform::Form::ORM::UniquenessValidator
36
+ end
37
+ end
@@ -19,7 +19,11 @@ module Reform::Form::MultiParameterAttributes
19
19
  )
20
20
  end
21
21
  end
22
- params.merge!(date_attributes)
22
+
23
+ date_attributes.each do |attribute, date|
24
+ params[attribute] = date
25
+ end
26
+ params
23
27
  end
24
28
 
25
29
  private
@@ -7,6 +7,12 @@
7
7
  # validates :title, unique: true
8
8
  #
9
9
  # == Options
10
+ #
11
+ # = Case Sensitivity
12
+ # Case sensitivity is true by default, but can be set to false:
13
+ #
14
+ # validates :title, unique: { case_sensitive: false }
15
+ #
10
16
  # = Scope
11
17
  # A scope can be use to filter the records that need to be compare with the
12
18
  # current value to validate. A scope array can have one to many fields define.
@@ -31,9 +37,19 @@
31
37
  class Reform::Form::UniqueValidator < ActiveModel::EachValidator
32
38
  def validate_each(form, attribute, value)
33
39
  model = form.model_for_property(attribute)
40
+ original_attribute = form.options_for(attribute)[:private_name]
34
41
 
35
42
  # search for models with attribute equals to form field value
36
- query = model.class.where(attribute => value)
43
+ query = if options[:case_sensitive] == false && value
44
+ model.class.where("lower(#{original_attribute}) = ?", value.downcase)
45
+ else
46
+ model.class.where(original_attribute => value)
47
+ end
48
+
49
+ # if model persisted, query should bypass model
50
+ if model.persisted?
51
+ query = query.where("#{model.class.primary_key} != ?", model.id)
52
+ end
37
53
 
38
54
  # apply scope if options has been declared
39
55
  Array(options[:scope]).each do |field|
@@ -41,9 +57,7 @@ class Reform::Form::UniqueValidator < ActiveModel::EachValidator
41
57
  query = query.where(field => form.send(field))
42
58
  end
43
59
 
44
- # if model persisted, query may return 0 or 1 rows, else 0
45
- allow_count = model.persisted? ? 1 : 0
46
- form.errors.add(attribute, :taken) if query.count > allow_count
60
+ form.errors.add(attribute, :taken) if query.count > 0
47
61
  end
48
62
  end
49
63
 
@@ -0,0 +1,4 @@
1
+ require 'reform/form/active_model'
2
+ require 'reform/form/orm'
3
+ require 'reform/form/mongoid'
4
+ require 'reform/form/active_model/model_reflections' # only load this in AR context as simple_form currently is bound to AR.
@@ -6,22 +6,26 @@ module Reform
6
6
  initializer "reform.form_extensions", after: :load_config_initializers do
7
7
  validations = config.reform.validations || :active_model
8
8
 
9
+ require "reform"
10
+ require "reform/form/multi_parameter_attributes"
11
+
9
12
  if validations == :active_model
10
13
  active_model!
11
14
  elsif validations == :dry
12
- dry!
15
+ enable_form_builder_methods = config.reform.enable_active_model_builder_methods || false
16
+
17
+ dry!(enable_form_builder_methods)
13
18
  else
14
19
  warn "[Reform::Rails] No validation backend set. Please do so via `config.reform.validations = :active_model`."
15
20
  end
16
21
  end
17
22
 
18
23
  def active_model!
19
- require "reform"
20
- require "reform/form/active_model/model_validations"
21
24
  require "reform/form/active_model/form_builder_methods"
22
25
  require "reform/form/active_model"
26
+
27
+ require "reform/form/active_model/model_validations"
23
28
  require "reform/form/active_model/validations"
24
- require "reform/form/multi_parameter_attributes"
25
29
 
26
30
  require "reform/active_record" if defined?(ActiveRecord)
27
31
  require "reform/mongoid" if defined?(Mongoid)
@@ -35,19 +39,21 @@ module Reform
35
39
  end
36
40
  end
37
41
 
38
- def dry!
39
- require "reform"
40
- require "reform/form/dry"
42
+ def dry!(enable_am = true)
43
+ if enable_am
44
+ require "reform/form/active_model/form_builder_methods" # this is for simple_form, etc.
41
45
 
42
- require "reform/form/multi_parameter_attributes"
43
- require "reform/form/active_model/form_builder_methods" # this is for simple_form, etc.
46
+ # This adds Form#persisted? and all the other crap #form_for depends on. Grrrr.
47
+ require "reform/form/active_model" # DISCUSS: only when using simple_form.
48
+ end
44
49
 
45
- # This adds Form#persisted? and all the other crap #form_for depends on. Grrrr.
46
- require "reform/form/active_model" # DISCUSS: only when using simple_form.
50
+ require "reform/form/dry"
47
51
 
48
52
  Reform::Form.class_eval do
49
- include Reform::Form::ActiveModel # DISCUSS: only when using simple_form.
50
- include Reform::Form::ActiveModel::FormBuilderMethods
53
+ if enable_am
54
+ include Reform::Form::ActiveModel
55
+ include Reform::Form::ActiveModel::FormBuilderMethods
56
+ end
51
57
 
52
58
  include Reform::Form::Dry
53
59
  end
@@ -1,5 +1,5 @@
1
1
  module Reform
2
2
  module Rails
3
- VERSION = "0.1.7"
3
+ VERSION = "0.2.0.rc1"
4
4
  end
5
5
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "reform", ">= 2.2.0"
21
+ spec.add_dependency "reform", ">= 2.3.0.rc1", "< 3.0.0"
22
22
  spec.add_dependency "activemodel", ">= 3.2"
23
23
 
24
24
  spec.add_development_dependency "rails"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reform-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.2.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-26 00:00:00.000000000 Z
11
+ date: 2017-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: reform
@@ -16,14 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 2.2.0
19
+ version: 2.3.0.rc1
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 3.0.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - ">="
25
28
  - !ruby/object:Gem::Version
26
- version: 2.2.0
29
+ version: 2.3.0.rc1
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 3.0.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: activemodel
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -166,10 +172,6 @@ files:
166
172
  - README.md
167
173
  - Rakefile
168
174
  - database.sqlite3
169
- - gemfiles/Gemfile.rails-3.2
170
- - gemfiles/Gemfile.rails-4.0
171
- - gemfiles/Gemfile.rails-4.1
172
- - gemfiles/Gemfile.rails-4.2
173
175
  - lib/reform/active_record.rb
174
176
  - lib/reform/form/active_model.rb
175
177
  - lib/reform/form/active_model/form_builder_methods.rb
@@ -177,13 +179,14 @@ files:
177
179
  - lib/reform/form/active_model/model_validations.rb
178
180
  - lib/reform/form/active_model/validations.rb
179
181
  - lib/reform/form/active_record.rb
182
+ - lib/reform/form/mongoid.rb
180
183
  - lib/reform/form/multi_parameter_attributes.rb
181
184
  - lib/reform/form/orm.rb
182
185
  - lib/reform/form/validation/unique_validator.rb
186
+ - lib/reform/mongoid.rb
183
187
  - lib/reform/rails.rb
184
188
  - lib/reform/rails/railtie.rb
185
189
  - lib/reform/rails/version.rb
186
- - log/development.log
187
190
  - reform-rails.gemspec
188
191
  homepage: https://github.com/trailblazer/reform-rails
189
192
  licenses:
@@ -200,12 +203,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
200
203
  version: '0'
201
204
  required_rubygems_version: !ruby/object:Gem::Requirement
202
205
  requirements:
203
- - - ">="
206
+ - - ">"
204
207
  - !ruby/object:Gem::Version
205
- version: '0'
208
+ version: 1.3.1
206
209
  requirements: []
207
210
  rubyforge_project:
208
- rubygems_version: 2.5.1
211
+ rubygems_version: 2.6.3
209
212
  signing_key:
210
213
  specification_version: 4
211
214
  summary: Automatically load and include all common Rails form features.
@@ -1,7 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in reform.gemspec
4
- gemspec :path => '../'
5
-
6
- gem 'railties', '~> 3.2.0'
7
- gem 'activerecord', '~> 3.2.0'
@@ -1,7 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in reform.gemspec
4
- gemspec :path => '../'
5
-
6
- gem 'railties', '~> 4.0.0'
7
- gem 'activerecord', '~> 4.0.0'
@@ -1,7 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in reform.gemspec
4
- gemspec :path => '../'
5
-
6
- gem 'railties', '~> 4.1.0'
7
- gem 'activerecord', '~> 4.1.0'
@@ -1,7 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in reform.gemspec
4
- gemspec :path => '../'
5
-
6
- gem 'railties', '~> 4.2.0'
7
- gem 'activerecord', '~> 4.2.0'
File without changes