foundation_rails_helper 3.0.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +29 -11
- data/README.md +1 -1
- 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 +11 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c5962c4414ac022cb6a63fb5434372336432cf09de65ab351cd70e9c14c58aba
|
4
|
+
data.tar.gz: f50f71a68f51ce4bb94ba4ed11a826460b4fc6de56555cfb9c8bbe8806798fd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 856f10ab7f85bb7890215c1904458aa929d560f7fea557e9a18fb0d0ec7aa9564beae795f4e443cbec7746923db2687df16b270b1dcb6a8b4fac92fd0385dfb6
|
7
|
+
data.tar.gz: 9df3bef01064d042534444257f31723367742fec84d41265bd7a40bf7d5a974475fb1a7475b7e45e859b2840d3c360aa3cd69d8d5c8f4d29d471f0daed3fda29
|
data/.travis.yml
CHANGED
@@ -3,20 +3,38 @@ branches:
|
|
3
3
|
only:
|
4
4
|
- master
|
5
5
|
rvm:
|
6
|
-
- 2.
|
7
|
-
- 2.
|
8
|
-
- 2.
|
9
|
-
- 2.
|
6
|
+
- 2.3.8
|
7
|
+
- 2.4.10
|
8
|
+
- 2.5.8
|
9
|
+
- 2.6.6
|
10
|
+
- 2.7.2
|
10
11
|
env:
|
11
|
-
- "RAILS_VERSION=4.1.0"
|
12
12
|
- "RAILS_VERSION=4.2.0"
|
13
13
|
- "RAILS_VERSION=5.0.0"
|
14
|
-
|
14
|
+
- "RAILS_VERSION=5.2.0"
|
15
|
+
- "RAILS_VERSION=6.0.0"
|
16
|
+
- "RAILS_VERSION=6.1.0"
|
17
|
+
jobs:
|
15
18
|
exclude:
|
16
|
-
- rvm: 2.
|
19
|
+
- rvm: 2.4.10
|
20
|
+
env: "RAILS_VERSION=6.1.0"
|
21
|
+
- rvm: 2.3.8
|
22
|
+
env: "RAILS_VERSION=6.1.0"
|
23
|
+
- rvm: 2.7.2
|
24
|
+
env: "RAILS_VERSION=6.0.0"
|
25
|
+
- rvm: 2.4.10
|
26
|
+
env: "RAILS_VERSION=6.0.0"
|
27
|
+
- rvm: 2.3.8
|
28
|
+
env: "RAILS_VERSION=6.0.0"
|
29
|
+
- rvm: 2.7.2
|
30
|
+
env: "RAILS_VERSION=5.2.0"
|
31
|
+
- rvm: 2.7.2
|
17
32
|
env: "RAILS_VERSION=5.0.0"
|
18
|
-
- rvm: 2.
|
19
|
-
env: "RAILS_VERSION=4.
|
20
|
-
- rvm: 2.
|
33
|
+
- rvm: 2.7.2
|
34
|
+
env: "RAILS_VERSION=4.2.0"
|
35
|
+
- rvm: 2.6.6
|
36
|
+
env: "RAILS_VERSION=4.2.0"
|
37
|
+
- rvm: 2.5.8
|
38
|
+
env: "RAILS_VERSION=4.2.0"
|
39
|
+
- rvm: 2.4.10
|
21
40
|
env: "RAILS_VERSION=4.2.0"
|
22
|
-
sudo: false
|
data/README.md
CHANGED
@@ -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.0']
|
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.0
|
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: 2021-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '4.1'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '7.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '4.1'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '7.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: actionpack
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: '4.1'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '7.0'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '4.1'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
52
|
+
version: '7.0'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: activemodel
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,7 +59,7 @@ dependencies:
|
|
59
59
|
version: '4.1'
|
60
60
|
- - "<"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
62
|
+
version: '7.0'
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -69,7 +69,7 @@ dependencies:
|
|
69
69
|
version: '4.1'
|
70
70
|
- - "<"
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: '
|
72
|
+
version: '7.0'
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: activesupport
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,7 +79,7 @@ dependencies:
|
|
79
79
|
version: '4.1'
|
80
80
|
- - "<"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '7.0'
|
83
83
|
type: :runtime
|
84
84
|
prerelease: false
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -89,27 +89,7 @@ dependencies:
|
|
89
89
|
version: '4.1'
|
90
90
|
- - "<"
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version: '
|
93
|
-
- !ruby/object:Gem::Dependency
|
94
|
-
name: tzinfo
|
95
|
-
requirement: !ruby/object:Gem::Requirement
|
96
|
-
requirements:
|
97
|
-
- - "~>"
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version: '1.2'
|
100
|
-
- - ">="
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: 1.2.2
|
103
|
-
type: :runtime
|
104
|
-
prerelease: false
|
105
|
-
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - "~>"
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '1.2'
|
110
|
-
- - ">="
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
version: 1.2.2
|
92
|
+
version: '7.0'
|
113
93
|
- !ruby/object:Gem::Dependency
|
114
94
|
name: rspec-rails
|
115
95
|
requirement: !ruby/object:Gem::Requirement
|
@@ -223,8 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
223
203
|
- !ruby/object:Gem::Version
|
224
204
|
version: '0'
|
225
205
|
requirements: []
|
226
|
-
|
227
|
-
rubygems_version: 2.6.11
|
206
|
+
rubygems_version: 3.0.1
|
228
207
|
signing_key:
|
229
208
|
specification_version: 4
|
230
209
|
summary: Rails helpers for zurb foundation CSS framework
|