input_css 0.1.2 → 0.2.0

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
- SHA1:
3
- metadata.gz: a909d7c29971c180313b62f06634385d5e1152af
4
- data.tar.gz: ac555296f644e2eba5293b9070de7a317c7b154b
2
+ SHA256:
3
+ metadata.gz: 96311911e15d4e43b1ba057f6e4354f74916f649e59c2bae1f69c5d67ea4d636
4
+ data.tar.gz: b5bc9fcd597b7fc30a6592a9985f9d46845815af1f07ad23cb59c657a73e057e
5
5
  SHA512:
6
- metadata.gz: 7c0b71c9249581e5bb6253ae3b53830be8ace7abaff170701da159d653564228f564600b9eef24b238d97e751c261c063b139260c68b57809ed3dfa4985da00d
7
- data.tar.gz: 915d650fb1d021739232056f6b4d56d547691c5ec013c9e68e51141a6b8799a2e4f399e7f10cb6753e74af05517b879060e731d31eec35279db1a569ff20e647
6
+ metadata.gz: 3b4263ad645f1833f1e5d6ca1619056e8d6063a1a7ad577a83a181589e661474348add12c94db2a6284fc7864b942f86068eb4005e44ec6aa9e2e54676db3b0c
7
+ data.tar.gz: d3574f0d75471d7ecd8acd8da93b89f2cee092ceaab6d112cc4e41c3eaa135c32ba2b1a7039b9ab688584c4469144e98f4a332dfc9361cfc885f008420208b78
data/Appraisals ADDED
@@ -0,0 +1,12 @@
1
+ appraise "rails-6.0" do
2
+ gem "rails", "~>6.0.0"
3
+ end
4
+
5
+ appraise "rails-6.1" do
6
+ gem "rails", "~>6.1.0"
7
+ end
8
+
9
+ appraise "rails-7.0" do
10
+ gem "rails", "~>7.0.0"
11
+ end
12
+
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source "http://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in input_css.gemspec
4
4
  gemspec
5
+
6
+ gem "rails", "~>6.1.0"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "rails", "~>6.0.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,165 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ input_css (0.2.0)
5
+ rails
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ actioncable (6.0.5)
11
+ actionpack (= 6.0.5)
12
+ nio4r (~> 2.0)
13
+ websocket-driver (>= 0.6.1)
14
+ actionmailbox (6.0.5)
15
+ actionpack (= 6.0.5)
16
+ activejob (= 6.0.5)
17
+ activerecord (= 6.0.5)
18
+ activestorage (= 6.0.5)
19
+ activesupport (= 6.0.5)
20
+ mail (>= 2.7.1)
21
+ actionmailer (6.0.5)
22
+ actionpack (= 6.0.5)
23
+ actionview (= 6.0.5)
24
+ activejob (= 6.0.5)
25
+ mail (~> 2.5, >= 2.5.4)
26
+ rails-dom-testing (~> 2.0)
27
+ actionpack (6.0.5)
28
+ actionview (= 6.0.5)
29
+ activesupport (= 6.0.5)
30
+ rack (~> 2.0, >= 2.0.8)
31
+ rack-test (>= 0.6.3)
32
+ rails-dom-testing (~> 2.0)
33
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
34
+ actiontext (6.0.5)
35
+ actionpack (= 6.0.5)
36
+ activerecord (= 6.0.5)
37
+ activestorage (= 6.0.5)
38
+ activesupport (= 6.0.5)
39
+ nokogiri (>= 1.8.5)
40
+ actionview (6.0.5)
41
+ activesupport (= 6.0.5)
42
+ builder (~> 3.1)
43
+ erubi (~> 1.4)
44
+ rails-dom-testing (~> 2.0)
45
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
46
+ activejob (6.0.5)
47
+ activesupport (= 6.0.5)
48
+ globalid (>= 0.3.6)
49
+ activemodel (6.0.5)
50
+ activesupport (= 6.0.5)
51
+ activerecord (6.0.5)
52
+ activemodel (= 6.0.5)
53
+ activesupport (= 6.0.5)
54
+ activestorage (6.0.5)
55
+ actionpack (= 6.0.5)
56
+ activejob (= 6.0.5)
57
+ activerecord (= 6.0.5)
58
+ marcel (~> 1.0)
59
+ activesupport (6.0.5)
60
+ concurrent-ruby (~> 1.0, >= 1.0.2)
61
+ i18n (>= 0.7, < 2)
62
+ minitest (~> 5.1)
63
+ tzinfo (~> 1.1)
64
+ zeitwerk (~> 2.2, >= 2.2.2)
65
+ appraisal (2.4.1)
66
+ bundler
67
+ rake
68
+ thor (>= 0.14.0)
69
+ builder (3.2.4)
70
+ concurrent-ruby (1.1.10)
71
+ crass (1.0.6)
72
+ diff-lcs (1.5.0)
73
+ equivalent-xml (0.6.0)
74
+ nokogiri (>= 1.4.3)
75
+ erubi (1.10.0)
76
+ globalid (1.0.0)
77
+ activesupport (>= 5.0)
78
+ i18n (1.10.0)
79
+ concurrent-ruby (~> 1.0)
80
+ loofah (2.18.0)
81
+ crass (~> 1.0.2)
82
+ nokogiri (>= 1.5.9)
83
+ mail (2.7.1)
84
+ mini_mime (>= 0.1.1)
85
+ marcel (1.0.2)
86
+ method_source (1.0.0)
87
+ mini_mime (1.1.2)
88
+ mini_portile2 (2.8.0)
89
+ minitest (5.15.0)
90
+ nio4r (2.5.8)
91
+ nokogiri (1.13.6)
92
+ mini_portile2 (~> 2.8.0)
93
+ racc (~> 1.4)
94
+ racc (1.6.0)
95
+ rack (2.2.3.1)
96
+ rack-test (1.1.0)
97
+ rack (>= 1.0, < 3)
98
+ rails (6.0.5)
99
+ actioncable (= 6.0.5)
100
+ actionmailbox (= 6.0.5)
101
+ actionmailer (= 6.0.5)
102
+ actionpack (= 6.0.5)
103
+ actiontext (= 6.0.5)
104
+ actionview (= 6.0.5)
105
+ activejob (= 6.0.5)
106
+ activemodel (= 6.0.5)
107
+ activerecord (= 6.0.5)
108
+ activestorage (= 6.0.5)
109
+ activesupport (= 6.0.5)
110
+ bundler (>= 1.3.0)
111
+ railties (= 6.0.5)
112
+ sprockets-rails (>= 2.0.0)
113
+ rails-dom-testing (2.0.3)
114
+ activesupport (>= 4.2.0)
115
+ nokogiri (>= 1.6)
116
+ rails-html-sanitizer (1.4.3)
117
+ loofah (~> 2.3)
118
+ railties (6.0.5)
119
+ actionpack (= 6.0.5)
120
+ activesupport (= 6.0.5)
121
+ method_source
122
+ rake (>= 0.8.7)
123
+ thor (>= 0.20.3, < 2.0)
124
+ rake (13.0.6)
125
+ rspec (3.11.0)
126
+ rspec-core (~> 3.11.0)
127
+ rspec-expectations (~> 3.11.0)
128
+ rspec-mocks (~> 3.11.0)
129
+ rspec-core (3.11.0)
130
+ rspec-support (~> 3.11.0)
131
+ rspec-expectations (3.11.0)
132
+ diff-lcs (>= 1.2.0, < 2.0)
133
+ rspec-support (~> 3.11.0)
134
+ rspec-mocks (3.11.1)
135
+ diff-lcs (>= 1.2.0, < 2.0)
136
+ rspec-support (~> 3.11.0)
137
+ rspec-support (3.11.0)
138
+ sprockets (4.0.3)
139
+ concurrent-ruby (~> 1.0)
140
+ rack (> 1, < 3)
141
+ sprockets-rails (3.4.2)
142
+ actionpack (>= 5.2)
143
+ activesupport (>= 5.2)
144
+ sprockets (>= 3.0.0)
145
+ thor (1.2.1)
146
+ thread_safe (0.3.6)
147
+ tzinfo (1.2.9)
148
+ thread_safe (~> 0.1)
149
+ websocket-driver (0.7.5)
150
+ websocket-extensions (>= 0.1.0)
151
+ websocket-extensions (0.1.5)
152
+ zeitwerk (2.5.4)
153
+
154
+ PLATFORMS
155
+ ruby
156
+
157
+ DEPENDENCIES
158
+ appraisal
159
+ equivalent-xml
160
+ input_css!
161
+ rails (~> 6.0.0)
162
+ rspec
163
+
164
+ BUNDLED WITH
165
+ 2.1.4
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "rails", "~>6.1.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,168 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ input_css (0.2.0)
5
+ rails
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ actioncable (6.1.6)
11
+ actionpack (= 6.1.6)
12
+ activesupport (= 6.1.6)
13
+ nio4r (~> 2.0)
14
+ websocket-driver (>= 0.6.1)
15
+ actionmailbox (6.1.6)
16
+ actionpack (= 6.1.6)
17
+ activejob (= 6.1.6)
18
+ activerecord (= 6.1.6)
19
+ activestorage (= 6.1.6)
20
+ activesupport (= 6.1.6)
21
+ mail (>= 2.7.1)
22
+ actionmailer (6.1.6)
23
+ actionpack (= 6.1.6)
24
+ actionview (= 6.1.6)
25
+ activejob (= 6.1.6)
26
+ activesupport (= 6.1.6)
27
+ mail (~> 2.5, >= 2.5.4)
28
+ rails-dom-testing (~> 2.0)
29
+ actionpack (6.1.6)
30
+ actionview (= 6.1.6)
31
+ activesupport (= 6.1.6)
32
+ rack (~> 2.0, >= 2.0.9)
33
+ rack-test (>= 0.6.3)
34
+ rails-dom-testing (~> 2.0)
35
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
36
+ actiontext (6.1.6)
37
+ actionpack (= 6.1.6)
38
+ activerecord (= 6.1.6)
39
+ activestorage (= 6.1.6)
40
+ activesupport (= 6.1.6)
41
+ nokogiri (>= 1.8.5)
42
+ actionview (6.1.6)
43
+ activesupport (= 6.1.6)
44
+ builder (~> 3.1)
45
+ erubi (~> 1.4)
46
+ rails-dom-testing (~> 2.0)
47
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
48
+ activejob (6.1.6)
49
+ activesupport (= 6.1.6)
50
+ globalid (>= 0.3.6)
51
+ activemodel (6.1.6)
52
+ activesupport (= 6.1.6)
53
+ activerecord (6.1.6)
54
+ activemodel (= 6.1.6)
55
+ activesupport (= 6.1.6)
56
+ activestorage (6.1.6)
57
+ actionpack (= 6.1.6)
58
+ activejob (= 6.1.6)
59
+ activerecord (= 6.1.6)
60
+ activesupport (= 6.1.6)
61
+ marcel (~> 1.0)
62
+ mini_mime (>= 1.1.0)
63
+ activesupport (6.1.6)
64
+ concurrent-ruby (~> 1.0, >= 1.0.2)
65
+ i18n (>= 1.6, < 2)
66
+ minitest (>= 5.1)
67
+ tzinfo (~> 2.0)
68
+ zeitwerk (~> 2.3)
69
+ appraisal (2.4.1)
70
+ bundler
71
+ rake
72
+ thor (>= 0.14.0)
73
+ builder (3.2.4)
74
+ concurrent-ruby (1.1.10)
75
+ crass (1.0.6)
76
+ diff-lcs (1.5.0)
77
+ equivalent-xml (0.6.0)
78
+ nokogiri (>= 1.4.3)
79
+ erubi (1.10.0)
80
+ globalid (1.0.0)
81
+ activesupport (>= 5.0)
82
+ i18n (1.10.0)
83
+ concurrent-ruby (~> 1.0)
84
+ loofah (2.18.0)
85
+ crass (~> 1.0.2)
86
+ nokogiri (>= 1.5.9)
87
+ mail (2.7.1)
88
+ mini_mime (>= 0.1.1)
89
+ marcel (1.0.2)
90
+ method_source (1.0.0)
91
+ mini_mime (1.1.2)
92
+ mini_portile2 (2.8.0)
93
+ minitest (5.15.0)
94
+ nio4r (2.5.8)
95
+ nokogiri (1.13.6)
96
+ mini_portile2 (~> 2.8.0)
97
+ racc (~> 1.4)
98
+ racc (1.6.0)
99
+ rack (2.2.3.1)
100
+ rack-test (1.1.0)
101
+ rack (>= 1.0, < 3)
102
+ rails (6.1.6)
103
+ actioncable (= 6.1.6)
104
+ actionmailbox (= 6.1.6)
105
+ actionmailer (= 6.1.6)
106
+ actionpack (= 6.1.6)
107
+ actiontext (= 6.1.6)
108
+ actionview (= 6.1.6)
109
+ activejob (= 6.1.6)
110
+ activemodel (= 6.1.6)
111
+ activerecord (= 6.1.6)
112
+ activestorage (= 6.1.6)
113
+ activesupport (= 6.1.6)
114
+ bundler (>= 1.15.0)
115
+ railties (= 6.1.6)
116
+ sprockets-rails (>= 2.0.0)
117
+ rails-dom-testing (2.0.3)
118
+ activesupport (>= 4.2.0)
119
+ nokogiri (>= 1.6)
120
+ rails-html-sanitizer (1.4.3)
121
+ loofah (~> 2.3)
122
+ railties (6.1.6)
123
+ actionpack (= 6.1.6)
124
+ activesupport (= 6.1.6)
125
+ method_source
126
+ rake (>= 12.2)
127
+ thor (~> 1.0)
128
+ rake (13.0.6)
129
+ rspec (3.11.0)
130
+ rspec-core (~> 3.11.0)
131
+ rspec-expectations (~> 3.11.0)
132
+ rspec-mocks (~> 3.11.0)
133
+ rspec-core (3.11.0)
134
+ rspec-support (~> 3.11.0)
135
+ rspec-expectations (3.11.0)
136
+ diff-lcs (>= 1.2.0, < 2.0)
137
+ rspec-support (~> 3.11.0)
138
+ rspec-mocks (3.11.1)
139
+ diff-lcs (>= 1.2.0, < 2.0)
140
+ rspec-support (~> 3.11.0)
141
+ rspec-support (3.11.0)
142
+ sprockets (4.0.3)
143
+ concurrent-ruby (~> 1.0)
144
+ rack (> 1, < 3)
145
+ sprockets-rails (3.4.2)
146
+ actionpack (>= 5.2)
147
+ activesupport (>= 5.2)
148
+ sprockets (>= 3.0.0)
149
+ thor (1.2.1)
150
+ tzinfo (2.0.4)
151
+ concurrent-ruby (~> 1.0)
152
+ websocket-driver (0.7.5)
153
+ websocket-extensions (>= 0.1.0)
154
+ websocket-extensions (0.1.5)
155
+ zeitwerk (2.5.4)
156
+
157
+ PLATFORMS
158
+ ruby
159
+
160
+ DEPENDENCIES
161
+ appraisal
162
+ equivalent-xml
163
+ input_css!
164
+ rails (~> 6.1.0)
165
+ rspec
166
+
167
+ BUNDLED WITH
168
+ 2.1.4
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "rails", "~>7.0.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,182 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ input_css (0.2.0)
5
+ rails
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ actioncable (7.0.3)
11
+ actionpack (= 7.0.3)
12
+ activesupport (= 7.0.3)
13
+ nio4r (~> 2.0)
14
+ websocket-driver (>= 0.6.1)
15
+ actionmailbox (7.0.3)
16
+ actionpack (= 7.0.3)
17
+ activejob (= 7.0.3)
18
+ activerecord (= 7.0.3)
19
+ activestorage (= 7.0.3)
20
+ activesupport (= 7.0.3)
21
+ mail (>= 2.7.1)
22
+ net-imap
23
+ net-pop
24
+ net-smtp
25
+ actionmailer (7.0.3)
26
+ actionpack (= 7.0.3)
27
+ actionview (= 7.0.3)
28
+ activejob (= 7.0.3)
29
+ activesupport (= 7.0.3)
30
+ mail (~> 2.5, >= 2.5.4)
31
+ net-imap
32
+ net-pop
33
+ net-smtp
34
+ rails-dom-testing (~> 2.0)
35
+ actionpack (7.0.3)
36
+ actionview (= 7.0.3)
37
+ activesupport (= 7.0.3)
38
+ rack (~> 2.0, >= 2.2.0)
39
+ rack-test (>= 0.6.3)
40
+ rails-dom-testing (~> 2.0)
41
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
42
+ actiontext (7.0.3)
43
+ actionpack (= 7.0.3)
44
+ activerecord (= 7.0.3)
45
+ activestorage (= 7.0.3)
46
+ activesupport (= 7.0.3)
47
+ globalid (>= 0.6.0)
48
+ nokogiri (>= 1.8.5)
49
+ actionview (7.0.3)
50
+ activesupport (= 7.0.3)
51
+ builder (~> 3.1)
52
+ erubi (~> 1.4)
53
+ rails-dom-testing (~> 2.0)
54
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
55
+ activejob (7.0.3)
56
+ activesupport (= 7.0.3)
57
+ globalid (>= 0.3.6)
58
+ activemodel (7.0.3)
59
+ activesupport (= 7.0.3)
60
+ activerecord (7.0.3)
61
+ activemodel (= 7.0.3)
62
+ activesupport (= 7.0.3)
63
+ activestorage (7.0.3)
64
+ actionpack (= 7.0.3)
65
+ activejob (= 7.0.3)
66
+ activerecord (= 7.0.3)
67
+ activesupport (= 7.0.3)
68
+ marcel (~> 1.0)
69
+ mini_mime (>= 1.1.0)
70
+ activesupport (7.0.3)
71
+ concurrent-ruby (~> 1.0, >= 1.0.2)
72
+ i18n (>= 1.6, < 2)
73
+ minitest (>= 5.1)
74
+ tzinfo (~> 2.0)
75
+ appraisal (2.4.1)
76
+ bundler
77
+ rake
78
+ thor (>= 0.14.0)
79
+ builder (3.2.4)
80
+ concurrent-ruby (1.1.10)
81
+ crass (1.0.6)
82
+ diff-lcs (1.5.0)
83
+ digest (3.1.0)
84
+ equivalent-xml (0.6.0)
85
+ nokogiri (>= 1.4.3)
86
+ erubi (1.10.0)
87
+ globalid (1.0.0)
88
+ activesupport (>= 5.0)
89
+ i18n (1.10.0)
90
+ concurrent-ruby (~> 1.0)
91
+ loofah (2.18.0)
92
+ crass (~> 1.0.2)
93
+ nokogiri (>= 1.5.9)
94
+ mail (2.7.1)
95
+ mini_mime (>= 0.1.1)
96
+ marcel (1.0.2)
97
+ method_source (1.0.0)
98
+ mini_mime (1.1.2)
99
+ minitest (5.15.0)
100
+ net-imap (0.2.3)
101
+ digest
102
+ net-protocol
103
+ strscan
104
+ net-pop (0.1.1)
105
+ digest
106
+ net-protocol
107
+ timeout
108
+ net-protocol (0.1.3)
109
+ timeout
110
+ net-smtp (0.3.1)
111
+ digest
112
+ net-protocol
113
+ timeout
114
+ nio4r (2.5.8)
115
+ nokogiri (1.13.6-x86_64-linux)
116
+ racc (~> 1.4)
117
+ racc (1.6.0)
118
+ rack (2.2.3.1)
119
+ rack-test (1.1.0)
120
+ rack (>= 1.0, < 3)
121
+ rails (7.0.3)
122
+ actioncable (= 7.0.3)
123
+ actionmailbox (= 7.0.3)
124
+ actionmailer (= 7.0.3)
125
+ actionpack (= 7.0.3)
126
+ actiontext (= 7.0.3)
127
+ actionview (= 7.0.3)
128
+ activejob (= 7.0.3)
129
+ activemodel (= 7.0.3)
130
+ activerecord (= 7.0.3)
131
+ activestorage (= 7.0.3)
132
+ activesupport (= 7.0.3)
133
+ bundler (>= 1.15.0)
134
+ railties (= 7.0.3)
135
+ rails-dom-testing (2.0.3)
136
+ activesupport (>= 4.2.0)
137
+ nokogiri (>= 1.6)
138
+ rails-html-sanitizer (1.4.3)
139
+ loofah (~> 2.3)
140
+ railties (7.0.3)
141
+ actionpack (= 7.0.3)
142
+ activesupport (= 7.0.3)
143
+ method_source
144
+ rake (>= 12.2)
145
+ thor (~> 1.0)
146
+ zeitwerk (~> 2.5)
147
+ rake (13.0.6)
148
+ rspec (3.11.0)
149
+ rspec-core (~> 3.11.0)
150
+ rspec-expectations (~> 3.11.0)
151
+ rspec-mocks (~> 3.11.0)
152
+ rspec-core (3.11.0)
153
+ rspec-support (~> 3.11.0)
154
+ rspec-expectations (3.11.0)
155
+ diff-lcs (>= 1.2.0, < 2.0)
156
+ rspec-support (~> 3.11.0)
157
+ rspec-mocks (3.11.1)
158
+ diff-lcs (>= 1.2.0, < 2.0)
159
+ rspec-support (~> 3.11.0)
160
+ rspec-support (3.11.0)
161
+ strscan (3.0.3)
162
+ thor (1.2.1)
163
+ timeout (0.3.0)
164
+ tzinfo (2.0.4)
165
+ concurrent-ruby (~> 1.0)
166
+ websocket-driver (0.7.5)
167
+ websocket-extensions (>= 0.1.0)
168
+ websocket-extensions (0.1.5)
169
+ zeitwerk (2.5.4)
170
+
171
+ PLATFORMS
172
+ ruby
173
+
174
+ DEPENDENCIES
175
+ appraisal
176
+ equivalent-xml
177
+ input_css!
178
+ rails (~> 7.0.0)
179
+ rspec
180
+
181
+ BUNDLED WITH
182
+ 2.1.4
data/input_css.gemspec CHANGED
@@ -22,4 +22,5 @@ Gem::Specification.new do |s|
22
22
 
23
23
  s.add_development_dependency "rspec"
24
24
  s.add_development_dependency "equivalent-xml"
25
+ s.add_development_dependency "appraisal"
25
26
  end
@@ -1,3 +1,3 @@
1
1
  module InputCSS
2
- VERSION = "0.1.2"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/input_css.rb CHANGED
@@ -4,8 +4,10 @@ require "input_css/version"
4
4
  # there's a CSS class attribute based on the type attribute
5
5
  # (Note: only applies to input fields)
6
6
  module InputCSS
7
- def tag(name, options=nil, open=false, escape=true)
8
- options = css_options_for_tag(name, options)
7
+ def tag(name=nil, options=nil, open=false, escape=true)
8
+ if name.present?
9
+ options = css_options_for_tag(name, options)
10
+ end
9
11
  super
10
12
  end
11
13
 
@@ -33,11 +33,14 @@ describe "InputCSS" do
33
33
  describe "use examples shown in TagHelper#tag documentation" do
34
34
  it "should not add a default class attribute to non-INPUT tags" do
35
35
  tag('br').should be_equivalent_to("<br />")
36
- tag('br', nil, true).should be_equivalent_to("<br>")
36
+ tag.br.should be_equivalent_to("<br />")
37
+
37
38
  tag('img', {:src => 'open & shut.png'}).
38
39
  should be_equivalent_to("<img src=\"open &amp; shut.png\" />")
39
40
  tag('img', {:src => 'open &amp; shut.png'}, false, false).
40
41
  should be_equivalent_to("<img src=\"open &amp; shut.png\" />")
42
+ tag.img(src: 'open & shut.png').
43
+ should be_equivalent_to("<img src=\"open &amp; shut.png\" />")
41
44
  end
42
45
  end
43
46
 
@@ -91,7 +94,7 @@ describe "InputCSS" do
91
94
  # FormHelper#hidden_field
92
95
  it "should not add css to hidden_field" do
93
96
  hidden_field(:project, :title, :object => @project).
94
- should be_equivalent_to("<input id=\"project_title\" name=\"project[title]\" type=\"hidden\" value=\"RPH\" />")
97
+ should be_equivalent_to("<input id=\"project_title\" name=\"project[title]\" type=\"hidden\" value=\"RPH\" #{autocomplete}/>")
95
98
  end
96
99
 
97
100
  # FormHelper#password_field
@@ -109,7 +112,7 @@ describe "InputCSS" do
109
112
  it "should add default css to check_box" do
110
113
  check_box(:project, :is_complete, :object => @project).
111
114
  should be_equivalent_to(
112
- "<input name=\"project[is_complete]\" type=\"hidden\" value=\"0\" />" +
115
+ "<input name=\"project[is_complete]\" type=\"hidden\" value=\"0\" #{autocomplete}/>" +
113
116
  "<input checked=\"checked\" class=\"checkbox\" id=\"project_is_complete\" name=\"project[is_complete]\" type=\"checkbox\" value=\"1\" />"
114
117
  )
115
118
  end
@@ -118,7 +121,7 @@ describe "InputCSS" do
118
121
  check_box(:project, :is_complete, :object => @project, :class => 'project').
119
122
  should be_equivalent_to(
120
123
  "<input checked=\"checked\" class=\"project checkbox\" id=\"project_is_complete\" name=\"project[is_complete]\" type=\"checkbox\" value=\"1\" />" +
121
- "<input name=\"project[is_complete]\" type=\"hidden\" value=\"0\" />"
124
+ "<input name=\"project[is_complete]\" type=\"hidden\" value=\"0\" #{autocomplete}/>"
122
125
  )
123
126
  end
124
127
 
data/spec/spec_helper.rb CHANGED
@@ -68,3 +68,9 @@ RSpec.configure do |config|
68
68
  end
69
69
  end
70
70
 
71
+ def autocomplete
72
+ if Gem.loaded_specs["rails"].version.to_s >= "6.1"
73
+ 'autocomplete="off"'
74
+ end
75
+ end
76
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: input_css
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Heath
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-07-19 00:00:00.000000000 Z
12
+ date: 2022-06-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -53,6 +53,20 @@ dependencies:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: appraisal
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
56
70
  description: This plugin taps into Rails tag helpers and adds a CSS class equal to
57
71
  the type attribute for all ‘input’ fields.
58
72
  email:
@@ -64,10 +78,17 @@ extra_rdoc_files: []
64
78
  files:
65
79
  - ".gitignore"
66
80
  - ".rspec"
81
+ - Appraisals
67
82
  - Gemfile
68
83
  - MIT-LICENSE
69
84
  - README.textile
70
85
  - Rakefile
86
+ - gemfiles/rails_6.0.gemfile
87
+ - gemfiles/rails_6.0.gemfile.lock
88
+ - gemfiles/rails_6.1.gemfile
89
+ - gemfiles/rails_6.1.gemfile.lock
90
+ - gemfiles/rails_7.0.gemfile
91
+ - gemfiles/rails_7.0.gemfile.lock
71
92
  - input_css.gemspec
72
93
  - lib/input_css.rb
73
94
  - lib/input_css/version.rb
@@ -92,8 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
113
  - !ruby/object:Gem::Version
93
114
  version: '0'
94
115
  requirements: []
95
- rubyforge_project: input_css
96
- rubygems_version: 2.4.8
116
+ rubygems_version: 3.1.6
97
117
  signing_key:
98
118
  specification_version: 4
99
119
  summary: Adds CSS classes for Rails input tags