incline 0.3.7 → 0.3.8

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: 842e7eff9a44004c8cb445ff80b538f2c08726c7
4
- data.tar.gz: cb560523652fc10d1c0621bca9e8bacc18e0417e
3
+ metadata.gz: 404eac95dd5245f93a10413012dd3757d817232a
4
+ data.tar.gz: 86a88d8d878eb8b2d3922589431483d3d5f1815f
5
5
  SHA512:
6
- metadata.gz: 4f4f49b159ef9ce55da131be8cc0fd7974ff7aa4466a4396ef38a5db82cdb16a3e7cbd9ebcccdfd4e608f553df4aae1c1d567857f92ab5bb73e3eff65d9d2214
7
- data.tar.gz: 816525fa0e434fcff3d045b3d3ce66c3ae7bb5f5c36b0ba5c9c3446000f0b68895e860da43064eb561eb8c436da3f631490dc65042bc293ddbdcac7740d82bee
6
+ metadata.gz: 31f8747e60f9fc1888642b776f6a940e0891cc4d451c18d33454cb84a8b50115e52155ab076c46656e1a3df9f3aab17cc9d85432ceb3d671445b9f4f382983bf
7
+ data.tar.gz: 8839b5f95bbb89da70023da2e7a21c612adb99b904542760359964a963b67c45074370bd2237570ab2b6bb34202309faca9aba70c7fcddc7ce254305667aaa06
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- incline (0.3.7)
4
+ incline (0.3.8)
5
5
  ansi (~> 1.5.0)
6
6
  bcrypt
7
7
  bootstrap-sass
@@ -1,4 +1,5 @@
1
1
  require 'securerandom'
2
+ require 'json'
2
3
  require 'shells'
3
4
  require 'io/console'
4
5
  require 'ansi/code'
@@ -178,13 +178,12 @@ module Incline::Extensions
178
178
  # We want each field to have a width specified.
179
179
  remaining_width = 100.0
180
180
  remaining_fields = fields.count
181
- width_match_1 = /^width:([^;]);/
182
- width_match_2 = /;\s*width:([^;]);/
181
+ width_match = /(?:^|;)\s*width:\s*([^;]+);/
183
182
 
184
183
  # pass 1, compute remaining width.
185
184
  fields.each do |meth, attr|
186
- width = width_match_1.match(attr[:style]) || width_match_2.match(attr[:style])
187
- if width
185
+ if attr[:style] =~ width_match
186
+ width = $1
188
187
  if width[-1] == '%'
189
188
  width = width[0...-1].strip.to_f
190
189
  if width > remaining_width
@@ -205,8 +204,7 @@ module Incline::Extensions
205
204
 
206
205
  # pass 2, fill in missing widths.
207
206
  fields.each do |meth, attr|
208
- width = width_match_1.match(attr[:style]) || width_match_2.match(attr[:style])
209
- unless width
207
+ unless attr[:style] =~ width_match
210
208
  width =
211
209
  if remaining_fields > 1
212
210
  (remaining_width / remaining_fields).to_i
@@ -1,3 +1,3 @@
1
1
  module Incline
2
- VERSION = "0.3.7"
2
+ VERSION = "0.3.8"
3
3
  end
@@ -243,7 +243,7 @@ class ActionViewBaseExtensionsTest < ActiveSupport::TestCase
243
243
  "<li class=\"alert_52444\" style=\"display: none;\">This is error #9.</li>" +
244
244
  "<li class=\"alert_52444\" style=\"display: none;\">This is error #10.</li>" +
245
245
  "</ul></div>" +
246
- "<script type=\"text/javascript\">\n<![CDATA[\nfunction show_alert_52444() { $('.alert_52444_show').hide(); $('.alert_52444').show(); }\n\n]]>\n</script>\n" +
246
+ "<script type=\"text/javascript\">\n//<![CDATA[\nfunction show_alert_52444() { $('.alert_52444_show').hide(); $('.alert_52444').show(); }\n\n//]]>\n</script>\n" +
247
247
  "</div></div>"
248
248
 
249
249
  val = @view.error_summary(TestModel.new)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: incline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Beau Barker