foundation_rails_helper 3.0.0.rc2 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +32 -11
- data/README.md +2 -2
- data/foundation_rails_helper.gemspec +1 -2
- data/lib/foundation_rails_helper/version.rb +1 -1
- data/spec/foundation_rails_helper/form_builder_spec.rb +16 -2
- data/spec/support/mock_rails.rb +9 -1
- metadata +28 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e745df6a27aef8282e4d944f1d78cac023bb73ea99c0ffd2b5ce09f2c7a6a53e
|
4
|
+
data.tar.gz: b66580e4d1d50c821a1bdd6236caabe8f1adf960e2a472d1db25f43866a7f5f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f19fc08ba4997f99ef5365ca9eee2fc4e8cee79058a8b7c1824b1de9255a3bf4b42abb88c45ebbdce9d0404ffd1427d4acba73c271c6619fff31bae79de6852
|
7
|
+
data.tar.gz: fc7f5683caa0301c11301c4f09427c4d5901d037dda99babd58793dce4d818f5522a33c97d1a8ecbd894e6e47c3b8247896af7e83b818c21ded218385a8e06c2
|
data/.travis.yml
CHANGED
@@ -1,22 +1,43 @@
|
|
1
1
|
language: ruby
|
2
|
+
|
3
|
+
cache: bundler
|
4
|
+
|
2
5
|
branches:
|
3
6
|
only:
|
4
7
|
- master
|
5
8
|
rvm:
|
6
|
-
- 2.
|
7
|
-
- 2.
|
8
|
-
- 2.
|
9
|
-
- 2.
|
9
|
+
- 2.3.8
|
10
|
+
- 2.4.10
|
11
|
+
- 2.5.8
|
12
|
+
- 2.6.6
|
13
|
+
- 2.7.2
|
10
14
|
env:
|
11
|
-
- "RAILS_VERSION=4.1.0"
|
12
15
|
- "RAILS_VERSION=4.2.0"
|
13
16
|
- "RAILS_VERSION=5.0.0"
|
14
|
-
|
17
|
+
- "RAILS_VERSION=5.2.0"
|
18
|
+
- "RAILS_VERSION=6.0.0"
|
19
|
+
- "RAILS_VERSION=6.1.0"
|
20
|
+
jobs:
|
15
21
|
exclude:
|
16
|
-
- rvm: 2.
|
22
|
+
- rvm: 2.4.10
|
23
|
+
env: "RAILS_VERSION=6.1.0"
|
24
|
+
- rvm: 2.3.8
|
25
|
+
env: "RAILS_VERSION=6.1.0"
|
26
|
+
- rvm: 2.7.2
|
27
|
+
env: "RAILS_VERSION=6.0.0"
|
28
|
+
- rvm: 2.4.10
|
29
|
+
env: "RAILS_VERSION=6.0.0"
|
30
|
+
- rvm: 2.3.8
|
31
|
+
env: "RAILS_VERSION=6.0.0"
|
32
|
+
- rvm: 2.7.2
|
33
|
+
env: "RAILS_VERSION=5.2.0"
|
34
|
+
- rvm: 2.7.2
|
17
35
|
env: "RAILS_VERSION=5.0.0"
|
18
|
-
- rvm: 2.
|
19
|
-
env: "RAILS_VERSION=4.
|
20
|
-
- rvm: 2.
|
36
|
+
- rvm: 2.7.2
|
37
|
+
env: "RAILS_VERSION=4.2.0"
|
38
|
+
- rvm: 2.6.6
|
39
|
+
env: "RAILS_VERSION=4.2.0"
|
40
|
+
- rvm: 2.5.8
|
41
|
+
env: "RAILS_VERSION=4.2.0"
|
42
|
+
- rvm: 2.4.10
|
21
43
|
env: "RAILS_VERSION=4.2.0"
|
22
|
-
sudo: false
|
data/README.md
CHANGED
@@ -14,7 +14,7 @@ Add this line to your application's Gemfile:
|
|
14
14
|
|
15
15
|
```ruby
|
16
16
|
gem 'foundation-rails', '~> 6.0' # required
|
17
|
-
gem 'foundation_rails_helper', '
|
17
|
+
gem 'foundation_rails_helper', '~> 3.0'
|
18
18
|
```
|
19
19
|
|
20
20
|
And then execute:
|
@@ -25,7 +25,7 @@ $ bundle
|
|
25
25
|
|
26
26
|
## Compatibility
|
27
27
|
|
28
|
-
* Only Rails 4.1/4.2/5, and Foundation 6 are fully supported
|
28
|
+
* Only Rails 4.1/4.2/5/6, and Foundation 6 are fully supported
|
29
29
|
* Some features may work with Foundation 5 and older, but results may vary, and markup which exists only for those versions will be gradually removed
|
30
30
|
* Legacy branches exist for Rails 3, 4.0, and Foundation 5 (see the rails3, rails4.0, and foundation-5 branches). These are not actively supported, and fixes are not retroactively applied, but pull requests are welcome.
|
31
31
|
* We test against ruby versions 2.1 and up. This gem may still work fine on 1.9.3, but your mileage may vary
|
@@ -5,7 +5,7 @@ class Gem::Specification # rubocop:disable ClassAndModuleChildren
|
|
5
5
|
def self.rails_gem_version
|
6
6
|
# Allow different versions of the rails gems to be specified, for testing
|
7
7
|
@rails_gem_version ||=
|
8
|
-
ENV['RAILS_VERSION'] ? "~> #{ENV['RAILS_VERSION']}" : '>= 4.1'
|
8
|
+
ENV['RAILS_VERSION'] ? "~> #{ENV['RAILS_VERSION']}" : ['>= 4.1', '< 7.1']
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
@@ -30,7 +30,6 @@ Gem::Specification.new do |gem|
|
|
30
30
|
gem.add_dependency 'actionpack', Gem::Specification.rails_gem_version
|
31
31
|
gem.add_dependency 'activemodel', Gem::Specification.rails_gem_version
|
32
32
|
gem.add_dependency 'activesupport', Gem::Specification.rails_gem_version
|
33
|
-
gem.add_dependency 'tzinfo', '~> 1.2', '>= 1.2.2'
|
34
33
|
|
35
34
|
gem.add_development_dependency 'rspec-rails', '~> 3.1'
|
36
35
|
gem.add_development_dependency 'mime-types', '~> 2'
|
@@ -763,8 +763,7 @@ describe "FoundationRailsHelper::FormHelper" do
|
|
763
763
|
end
|
764
764
|
|
765
765
|
%w(file_field email_field text_field telephone_field phone_field
|
766
|
-
url_field number_field
|
767
|
-
month_field week_field time_field range_field search_field color_field
|
766
|
+
url_field number_field range_field search_field color_field
|
768
767
|
password_field).each do |field|
|
769
768
|
it "should display errors on #{field} inputs" do
|
770
769
|
form_for(@author) do |builder|
|
@@ -779,6 +778,21 @@ describe "FoundationRailsHelper::FormHelper" do
|
|
779
778
|
end
|
780
779
|
end
|
781
780
|
|
781
|
+
%w(date_field datetime_field datetime_local_field month_field
|
782
|
+
week_field time_field).each do |field|
|
783
|
+
it "should display errors on #{field} inputs" do
|
784
|
+
form_for(@author) do |builder|
|
785
|
+
allow(@author)
|
786
|
+
.to receive(:errors).and_return(birthdate: ["required"])
|
787
|
+
node = Capybara.string builder.public_send(field, :birthdate)
|
788
|
+
expect(node)
|
789
|
+
.to have_css('label.is-invalid-label[for="author_birthdate"]')
|
790
|
+
expect(node)
|
791
|
+
.to have_css('input.is-invalid-input[name="author[birthdate]"]')
|
792
|
+
end
|
793
|
+
end
|
794
|
+
end
|
795
|
+
|
782
796
|
it "should display errors on text_area inputs" do
|
783
797
|
form_for(@author) do |builder|
|
784
798
|
allow(@author).to receive(:errors).and_return(description: ["required"])
|
data/spec/support/mock_rails.rb
CHANGED
@@ -10,7 +10,11 @@ module FoundationRailsSpecHelper
|
|
10
10
|
include ActionView::Helpers::FormHelper
|
11
11
|
include ActionView::Helpers::FormOptionsHelper
|
12
12
|
include ActionView::Helpers::DateHelper
|
13
|
-
|
13
|
+
if defined?(ActionController::PolymorphicRoutes)
|
14
|
+
include ActionController::PolymorphicRoutes
|
15
|
+
end
|
16
|
+
include ActionDispatch::Routing::PolymorphicRoutes
|
17
|
+
include AbstractController::UrlFor if defined?(AbstractController::UrlFor)
|
14
18
|
# to use dom_class in Rails 4 tests
|
15
19
|
# in Rails 5, RecordIdentifier is already required by FormHelper module
|
16
20
|
include ActionView::RecordIdentifier
|
@@ -54,6 +58,10 @@ module FoundationRailsSpecHelper
|
|
54
58
|
'/authors'
|
55
59
|
end
|
56
60
|
|
61
|
+
def _routes
|
62
|
+
double('_routes', polymorphic_mappings: {})
|
63
|
+
end
|
64
|
+
|
57
65
|
def self.included(base)
|
58
66
|
base.class_eval do
|
59
67
|
attr_accessor :output_buffer
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foundation_rails_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastien Gruhier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -17,6 +17,9 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4.1'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '7.1'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -24,6 +27,9 @@ dependencies:
|
|
24
27
|
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '4.1'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '7.1'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: actionpack
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -31,6 +37,9 @@ dependencies:
|
|
31
37
|
- - ">="
|
32
38
|
- !ruby/object:Gem::Version
|
33
39
|
version: '4.1'
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '7.1'
|
34
43
|
type: :runtime
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -38,6 +47,9 @@ dependencies:
|
|
38
47
|
- - ">="
|
39
48
|
- !ruby/object:Gem::Version
|
40
49
|
version: '4.1'
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '7.1'
|
41
53
|
- !ruby/object:Gem::Dependency
|
42
54
|
name: activemodel
|
43
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -45,6 +57,9 @@ dependencies:
|
|
45
57
|
- - ">="
|
46
58
|
- !ruby/object:Gem::Version
|
47
59
|
version: '4.1'
|
60
|
+
- - "<"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '7.1'
|
48
63
|
type: :runtime
|
49
64
|
prerelease: false
|
50
65
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -52,6 +67,9 @@ dependencies:
|
|
52
67
|
- - ">="
|
53
68
|
- !ruby/object:Gem::Version
|
54
69
|
version: '4.1'
|
70
|
+
- - "<"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '7.1'
|
55
73
|
- !ruby/object:Gem::Dependency
|
56
74
|
name: activesupport
|
57
75
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,6 +77,9 @@ dependencies:
|
|
59
77
|
- - ">="
|
60
78
|
- !ruby/object:Gem::Version
|
61
79
|
version: '4.1'
|
80
|
+
- - "<"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '7.1'
|
62
83
|
type: :runtime
|
63
84
|
prerelease: false
|
64
85
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -66,26 +87,9 @@ dependencies:
|
|
66
87
|
- - ">="
|
67
88
|
- !ruby/object:Gem::Version
|
68
89
|
version: '4.1'
|
69
|
-
-
|
70
|
-
name: tzinfo
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
90
|
+
- - "<"
|
74
91
|
- !ruby/object:Gem::Version
|
75
|
-
version: '1
|
76
|
-
- - ">="
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: 1.2.2
|
79
|
-
type: :runtime
|
80
|
-
prerelease: false
|
81
|
-
version_requirements: !ruby/object:Gem::Requirement
|
82
|
-
requirements:
|
83
|
-
- - "~>"
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: '1.2'
|
86
|
-
- - ">="
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: 1.2.2
|
92
|
+
version: '7.1'
|
89
93
|
- !ruby/object:Gem::Dependency
|
90
94
|
name: rspec-rails
|
91
95
|
requirement: !ruby/object:Gem::Requirement
|
@@ -195,12 +199,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
195
199
|
version: '0'
|
196
200
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
197
201
|
requirements:
|
198
|
-
- - "
|
202
|
+
- - ">="
|
199
203
|
- !ruby/object:Gem::Version
|
200
|
-
version:
|
204
|
+
version: '0'
|
201
205
|
requirements: []
|
202
|
-
|
203
|
-
rubygems_version: 2.5.1
|
206
|
+
rubygems_version: 3.0.1
|
204
207
|
signing_key:
|
205
208
|
specification_version: 4
|
206
209
|
summary: Rails helpers for zurb foundation CSS framework
|