effective_resources 0.7.4 → 0.7.5

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: 93a12b8c4e3ed0c19944e519a9744e2147df4dfd
4
- data.tar.gz: ab6a80d74be88e195c5b456ec60d02637de9ddad
3
+ metadata.gz: 2b7ea13c4da05e3fbac7d0b7d86865529af893cd
4
+ data.tar.gz: dccdd1e341a27700e93dcbf4f951c1207d514990
5
5
  SHA512:
6
- metadata.gz: 95a9c3623d279ac5901cab849f8c67f8e980f70eba46f48d0259eb3fa7e8a80120f5c37b293ed64b75662f95601e70a30c341118b7746577444b7d3a98260d8a
7
- data.tar.gz: 9b9a58a7686fab92936570e9add5116fcb45357ebfe829cbe0b306c5209aa64cff2c9e8e1f435a89dd8eccbdae1f2ec03da7412eeb2ede69aaa931f03051bd69
6
+ metadata.gz: 0b6adb87dafcdb775a71850fe8015a6b110b9c52157db64e7e65fac12cfa1f7fd6a908d1b87094b1967329bbdb1235f0a0f2561f85d0ce3bd8d9e49a1ddb158f
7
+ data.tar.gz: e25c5f12ed3d2ca3bbef12ea2e4c7292f1df0f7c18de31072532ed6f7b376eccf286bd1fd64548087823fce471cfcf3405332b4ec40d9d41eff4e8cf8aa17e75
@@ -109,7 +109,9 @@ module Effective
109
109
  raise 'expected a label or block' unless (label || block_given?)
110
110
 
111
111
  instance_exec do
112
- before_action(opts) { @page_title ||= (block_given? ? instance_exec(&block) : label) }
112
+ before_action(opts) do
113
+ @page_title ||= (block_given? ? instance_exec(&block) : label)
114
+ end
113
115
  end
114
116
  end
115
117
 
@@ -112,7 +112,8 @@ module Effective
112
112
  when :phone
113
113
  digits = value.to_s.gsub(/\D/, '').chars
114
114
  digits = (digits.first == '1' ? digits[1..10] : digits[0..9]) # Throw away a leading 1
115
- digits += ('0' * (10 - digits.length)).chars
115
+
116
+ return nil unless digits.length == 10
116
117
 
117
118
  "(#{digits[0..2].join}) #{digits[3..5].join}-#{digits[6..10].join}"
118
119
  when :integer
@@ -1,3 +1,3 @@
1
1
  module EffectiveResources
2
- VERSION = '0.7.4'.freeze
2
+ VERSION = '0.7.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-12 00:00:00.000000000 Z
11
+ date: 2017-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails