reform-rails 0.1.5 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8eaf0b3254319ddae478464746d47c6d329b2e5c
4
- data.tar.gz: 95b65e9d55d640e61117f3485b7280df563e4f5f
3
+ metadata.gz: ef8e06973cbbd53737de0a7d0afe1250bdba0814
4
+ data.tar.gz: 986c4d29338ecdc03fb3dea2ab7c75f6c9253ce6
5
5
  SHA512:
6
- metadata.gz: dcbc5c89277bdab000c8900ed5199c3e879a2652fd78ada2c4136b10eddeb6437fe53ba8a28d54cf75634dc8285ed06813bf67989cb7b998d11e679e5218245b
7
- data.tar.gz: 19d864caaf261d850c58d913c3d02456ad57d3a12fcc6765333872c49d462c00cb207e3778e1f9cbb848f4eadd7fa1f776055352b7ab26ffa4e76b4ce0fe2868
6
+ metadata.gz: 314925db393628f4f0d7a2dc32808217c7b2d17d0e27d86d69299b14df875917a1598857c291ea3eec8605bbcfb4e31e1d908c12df66ad3c4dd25a8fae6bc3ce
7
+ data.tar.gz: 9f8f292731ef5b34f8abe6a046d738d18bd98b9192564ba592e8d922bfef02e0f61ba3feddee77d69cc2e590b4e91310bc925ec749fedbfcbee1b0ba458c0869
@@ -1,5 +1,8 @@
1
1
  language: ruby
2
+ cache: bundler
3
+
2
4
  rvm:
5
+ - 2.3.1
3
6
  - 2.2.3
4
7
  - 2.0.0
5
8
  services:
@@ -9,9 +12,7 @@ gemfile:
9
12
  - gemfiles/Gemfile.rails-4.1
10
13
  - gemfiles/Gemfile.rails-4.0
11
14
  - gemfiles/Gemfile.rails-3.2
12
- - gemfiles/Gemfile.rails-3.1
15
+ # - gemfiles/Gemfile.rails-3.1
13
16
  # - gemfiles/Gemfile.rails-3.0
14
17
  matrix:
15
18
  fast_finish: true
16
- before_install:
17
- - gem install bundler
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.1.7 (0.1.6 Yanked)
2
+
3
+ * Fix a bug where requiring `form/active_model/validations` in a non-Rails environment wouldn't load all necessary files.
4
+
1
5
  # 0.1.5
2
6
 
3
7
  * Allow using Reform-Rails without Rails (it used to crash when not loading `rails.rb`).
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Gitter Chat](https://badges.gitter.im/trailblazer/chat.svg)](https://gitter.im/trailblazer/chat)
4
4
  [![TRB Newsletter](https://img.shields.io/badge/TRB-newsletter-lightgrey.svg)](http://trailblazer.to/newsletter/)
5
5
  [![Build
6
- Status](https://travis-ci.org/apotonick/reform-rails.svg)](https://travis-ci.org/apotonick/reform-rails)
6
+ Status](https://travis-ci.org/trailblazer/reform-rails.svg)](https://travis-ci.org/trailblazer/reform-rails)
7
7
  [![Gem Version](https://badge.fury.io/rb/reform-rails.svg)](http://badge.fury.io/rb/reform-rails)
8
8
 
9
9
  _Rails-support for Reform_.
Binary file
@@ -5,4 +5,3 @@ gemspec :path => '../'
5
5
 
6
6
  gem 'railties', '~> 4.0.0'
7
7
  gem 'activerecord', '~> 4.0.0'
8
- gem 'minitest', '~> 4.2'
@@ -5,4 +5,3 @@ gemspec :path => '../'
5
5
 
6
6
  gem 'railties', '~> 4.1.0'
7
7
  gem 'activerecord', '~> 4.1.0'
8
- gem 'minitest'
@@ -3,5 +3,5 @@ source "http://rubygems.org"
3
3
  # Specify your gem's dependencies in reform.gemspec
4
4
  gemspec :path => '../'
5
5
 
6
- gem 'railties', '~> 3.1.0'
7
- gem 'activerecord', '~> 3.1.0'
6
+ gem 'railties', '~> 4.2.0'
7
+ gem 'activerecord', '~> 4.2.0'
@@ -40,6 +40,18 @@ module Reform::Form::ActiveModel
40
40
  end
41
41
  end
42
42
 
43
+ # moved from reform as not applicable to dry
44
+ def validates(*args, &block)
45
+ validation(:default, inherit: true) { validates *args, &block }
46
+ end
47
+
48
+ def validate(*args, &block)
49
+ validation(:default, inherit: true) { validate *args, &block }
50
+ end
51
+
52
+ def validates_with(*args, &block)
53
+ validation(:default, inherit: true) { validates_with *args, &block }
54
+ end
43
55
 
44
56
  # Set a model name for this form if the infered is wrong.
45
57
  #
@@ -1,4 +1,5 @@
1
1
  require "active_model"
2
+ require "reform/form/active_model"
2
3
  require "uber/delegates"
3
4
 
4
5
  module Reform::Form::ActiveModel
@@ -44,7 +45,7 @@ module Reform::Form::ActiveModel
44
45
  end
45
46
 
46
47
  class Group
47
- def initialize
48
+ def initialize(*)
48
49
  @validations = Class.new(Reform::Form::ActiveModel::Validations::Validator)
49
50
  end
50
51
 
@@ -61,7 +62,6 @@ module Reform::Form::ActiveModel
61
62
  end
62
63
  end
63
64
 
64
-
65
65
  # Validator is the validatable object. On the class level, we define validations,
66
66
  # on instance, it exposes #valid?.
67
67
  require "delegate"
@@ -95,6 +95,14 @@ module Reform::Form::ActiveModel
95
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.
96
96
  end
97
97
 
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
100
+
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
105
+
98
106
  def method_missing(m, *args, &block)
99
107
  __getobj__.send(m, *args, &block) # send all methods to the form, even privates.
100
108
  end
@@ -1,5 +1,5 @@
1
1
  module Reform
2
2
  module Rails
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.7"
4
4
  end
5
5
  end
File without changes
@@ -18,12 +18,12 @@ 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.rc1"
21
+ spec.add_dependency "reform", ">= 2.2.0"
22
22
  spec.add_dependency "activemodel", ">= 3.2"
23
23
 
24
24
  spec.add_development_dependency "rails"
25
- spec.add_development_dependency "bundler", "~> 1.10"
26
- spec.add_development_dependency "rake", "~> 10.0"
25
+ spec.add_development_dependency "bundler"
26
+ spec.add_development_dependency "rake"
27
27
  spec.add_development_dependency "minitest"
28
28
  spec.add_development_dependency "actionpack"
29
29
  spec.add_development_dependency "activerecord"
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.5
4
+ version: 0.1.7
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-08-04 00:00:00.000000000 Z
11
+ date: 2016-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: reform
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 2.2.0.rc1
19
+ version: 2.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 2.2.0.rc1
26
+ version: 2.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activemodel
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -56,30 +56,30 @@ dependencies:
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '1.10'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '1.10'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '10.0'
75
+ version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '10.0'
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: minitest
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -166,11 +166,10 @@ files:
166
166
  - README.md
167
167
  - Rakefile
168
168
  - database.sqlite3
169
- - gemfiles/Gemfile.rails-3.1
170
- - gemfiles/Gemfile.rails-3.1.lock
171
169
  - gemfiles/Gemfile.rails-3.2
172
170
  - gemfiles/Gemfile.rails-4.0
173
171
  - gemfiles/Gemfile.rails-4.1
172
+ - gemfiles/Gemfile.rails-4.2
174
173
  - lib/reform/active_record.rb
175
174
  - lib/reform/form/active_model.rb
176
175
  - lib/reform/form/active_model/form_builder_methods.rb
@@ -184,6 +183,7 @@ files:
184
183
  - lib/reform/rails.rb
185
184
  - lib/reform/rails/railtie.rb
186
185
  - lib/reform/rails/version.rb
186
+ - log/development.log
187
187
  - reform-rails.gemspec
188
188
  homepage: https://github.com/trailblazer/reform-rails
189
189
  licenses:
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  version: '0'
206
206
  requirements: []
207
207
  rubyforge_project:
208
- rubygems_version: 2.4.8
208
+ rubygems_version: 2.5.1
209
209
  signing_key:
210
210
  specification_version: 4
211
211
  summary: Automatically load and include all common Rails form features.
@@ -1,153 +0,0 @@
1
- PATH
2
- remote: ../
3
- specs:
4
- reform (2.1.0.rc1)
5
- disposable (>= 0.2.0.rc1, < 0.3.0)
6
- representable (>= 2.4.0.rc1, < 2.5.0)
7
- uber (~> 0.0.11)
8
-
9
- PATH
10
- remote: ../../declarative
11
- specs:
12
- declarative (0.0.4)
13
- uber (>= 0.0.15)
14
-
15
- GEM
16
- remote: http://rubygems.org/
17
- specs:
18
- actionmailer (3.1.12)
19
- actionpack (= 3.1.12)
20
- mail (~> 2.4.4)
21
- actionpack (3.1.12)
22
- activemodel (= 3.1.12)
23
- activesupport (= 3.1.12)
24
- builder (~> 3.0.0)
25
- erubis (~> 2.7.0)
26
- i18n (~> 0.6)
27
- rack (~> 1.3.6)
28
- rack-cache (~> 1.2)
29
- rack-mount (~> 0.8.2)
30
- rack-test (~> 0.6.1)
31
- sprockets (~> 2.0.4)
32
- activemodel (3.1.12)
33
- activesupport (= 3.1.12)
34
- builder (~> 3.0.0)
35
- i18n (~> 0.6)
36
- activerecord (3.1.12)
37
- activemodel (= 3.1.12)
38
- activesupport (= 3.1.12)
39
- arel (~> 2.2.3)
40
- tzinfo (~> 0.3.29)
41
- activeresource (3.1.12)
42
- activemodel (= 3.1.12)
43
- activesupport (= 3.1.12)
44
- activesupport (3.1.12)
45
- multi_json (~> 1.0)
46
- arel (2.2.3)
47
- axiom-types (0.1.1)
48
- descendants_tracker (~> 0.0.4)
49
- ice_nine (~> 0.11.0)
50
- thread_safe (~> 0.3, >= 0.3.1)
51
- builder (3.0.4)
52
- coercible (1.0.0)
53
- descendants_tracker (~> 0.0.1)
54
- descendants_tracker (0.0.4)
55
- thread_safe (~> 0.3, >= 0.3.1)
56
- disposable (0.2.0.rc1)
57
- declarative (~> 0.0.4)
58
- representable (>= 2.4.0.rc1, < 2.5.0)
59
- uber
60
- equalizer (0.0.11)
61
- erubis (2.7.0)
62
- hike (1.2.3)
63
- i18n (0.7.0)
64
- ice_nine (0.11.1)
65
- json (1.8.3)
66
- lotus-utils (0.5.2)
67
- lotus-validations (0.3.3)
68
- lotus-utils (~> 0.5)
69
- mail (2.4.4)
70
- i18n (>= 0.4.0)
71
- mime-types (~> 1.16)
72
- treetop (~> 1.4.8)
73
- mime-types (1.25.1)
74
- minitest (5.8.2)
75
- mongoid (3.0.23)
76
- activemodel (~> 3.1)
77
- moped (~> 1.2)
78
- origin (~> 1.0)
79
- tzinfo (~> 0.3.22)
80
- moped (1.5.3)
81
- multi_json (1.11.2)
82
- origin (1.1.0)
83
- polyglot (0.3.5)
84
- rack (1.3.10)
85
- rack-cache (1.5.1)
86
- rack (>= 0.4)
87
- rack-mount (0.8.3)
88
- rack (>= 1.0.0)
89
- rack-ssl (1.3.4)
90
- rack
91
- rack-test (0.6.3)
92
- rack (>= 1.0)
93
- rails (3.1.12)
94
- actionmailer (= 3.1.12)
95
- actionpack (= 3.1.12)
96
- activerecord (= 3.1.12)
97
- activeresource (= 3.1.12)
98
- activesupport (= 3.1.12)
99
- bundler (~> 1.0)
100
- railties (= 3.1.12)
101
- railties (3.1.12)
102
- actionpack (= 3.1.12)
103
- activesupport (= 3.1.12)
104
- rack-ssl (~> 1.3.2)
105
- rake (>= 0.8.7)
106
- rdoc (~> 3.4)
107
- thor (~> 0.14.6)
108
- rake (10.4.2)
109
- rdoc (3.12.2)
110
- json (~> 1.4)
111
- representable (2.4.0.rc1)
112
- declarative (~> 0.0.4)
113
- uber (~> 0.0.15)
114
- sprockets (2.0.5)
115
- hike (~> 1.2)
116
- rack (~> 1.0)
117
- tilt (~> 1.1, != 1.3.0)
118
- sqlite3 (1.3.11)
119
- thor (0.14.6)
120
- thread_safe (0.3.5)
121
- tilt (1.4.1)
122
- treetop (1.4.15)
123
- polyglot
124
- polyglot (>= 0.3.1)
125
- tzinfo (0.3.45)
126
- uber (0.0.15)
127
- virtus (1.0.5)
128
- axiom-types (~> 0.1)
129
- coercible (~> 1.0)
130
- descendants_tracker (~> 0.0, >= 0.0.3)
131
- equalizer (~> 0.0, >= 0.0.9)
132
-
133
- PLATFORMS
134
- ruby
135
-
136
- DEPENDENCIES
137
- actionpack
138
- activerecord (~> 3.1.0)
139
- bundler
140
- declarative!
141
- lotus-validations
142
- minitest
143
- mongoid
144
- multi_json
145
- rails
146
- railties (~> 3.1.0)
147
- rake
148
- reform!
149
- sqlite3
150
- virtus
151
-
152
- BUNDLED WITH
153
- 1.10.6