attributes_for 0.4.2 → 0.4.3

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: 0df8d175cc3ec8856f90ac1b31aeaa570d1af17e
4
- data.tar.gz: cd47f8a1e9da4a4c2bdd12d8df6aae2647449420
3
+ metadata.gz: 5a77bbbefc4bed89673fc3d5f86ee4e1419bca50
4
+ data.tar.gz: b3efa478e7a0b1bc2c7d8aaa8d7b3036a1941f0d
5
5
  SHA512:
6
- metadata.gz: 5a78a9a45ef9bb1ebd38df8e37758e471141f6fcb86316d98e65e5b6507af151503d1d8f515fc28d1dbf7690182964d58d0b342caaa00a22062225cac6db9f4a
7
- data.tar.gz: b662c1a626998a68ba7c908c6092e1512d4ef8a538040436c30e14eac89d5c77b8b84c01d4d4e996bd501edd9347f58d4ff65c4d0484a69edc789c5116953fdc
6
+ metadata.gz: 8f663a360778b1214d9c83c5f3a4ff3cfc807bbc53f8bbf6f293b1ede88bba7610d9798a181f1331f32b125f9b629380cadfb19777350e5d507a6464590dd588
7
+ data.tar.gz: f59a6c21b57f4723c955e4a936568b0967ef39b3eaf868a52703716c16bb7a6b7c9077fd772f766a32a400dd9d71c41d663edf1fd4ef03a362e3d4edd53923d4
data/CHANGELOG.md CHANGED
@@ -1,8 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.3] - 2015-09-08
4
+ ### Fixed
5
+ - Made `phone` more rubust, now normalizes phone number before
6
+ formatting, thus handling plus and other characters.
3
7
 
4
8
  ## [0.4.2] - 2015-09-05
5
- ## Changed
9
+ ### Changed
6
10
  - Use minitest instead of rspec
7
11
  - Replaced `phony_rails` with `phony`.
8
12
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- attributes_for (0.4.2)
4
+ attributes_for (0.4.3)
5
5
  chronic_duration (~> 0.10)
6
6
  font-awesome-rails (~> 4.0)
7
7
  phony (~> 2.0)
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
  [codeclimate]: https://codeclimate.com/github/blacktangent/attributes_for
3
3
  [coveralls]: https://coveralls.io/r/blacktangent/attributes_for
4
4
  [rubygems]: https://rubygems.org/gems/attributes_for
5
+ [fontawesome]: https://fortawesome.github.io/Font-Awesome
6
+ [fontawesomerails]: https://github.com/bokmann/font-awesome-rails
5
7
 
6
8
 
7
9
  # AttributesFor
@@ -34,6 +36,10 @@ Run generator to add I18n locales:
34
36
 
35
37
  $ rails generate attributes_for:install
36
38
 
39
+ Preferred icon and CSS framework is [Font Awesome][fontawesome] Bring
40
+ [Font Awesome][fontawesome] into your project by using
41
+ [font-awesome-rails][fontawesomerails] or your preferred method.
42
+
37
43
  ## Screenshot
38
44
  ![Screenshot](https://cloud.githubusercontent.com/assets/1222916/9355402/295b6324-46a3-11e5-9f8c-ff864b837cdd.png)
39
45
 
@@ -43,7 +43,8 @@ module AttributesFor
43
43
  when :email
44
44
  mail_to(value, value, title: human_name(attribute_name))
45
45
  when :phone
46
- link_to(Phony.format(value.to_s), "tel:+#{value}", title: human_name(attribute_name))
46
+ phone_number = Phony.format(Phony.normalize(value.to_s), format: :international)
47
+ link_to(phone_number, "tel:#{phone_number}", title: human_name(attribute_name))
47
48
  when :url
48
49
  link_to(value, value, title: human_name(attribute_name))
49
50
  else
@@ -1,3 +1,3 @@
1
1
  module AttributesFor
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attributes_for
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ole J. Rosendahl
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-07 00:00:00.000000000 Z
11
+ date: 2015-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties