intl_phone_picker 0.0.7.1 → 0.0.7.2

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: 7410495d36dd2b4c0adbb86b640c7df06fe28742
4
- data.tar.gz: f87dde11118bd421f20d82394b5529ad879b517f
3
+ metadata.gz: 01525381a3912c9b1f02d3d246e5cf3b18145c39
4
+ data.tar.gz: 8967ca271bff095b67a3446d3416762c202f41ee
5
5
  SHA512:
6
- metadata.gz: d8d9b59090e691eddd27d99b6e28718bcdefa6a97da206895efe880e1e85d7b723870ab36798ef37117333406c770ca80bf4804b6c0cbc22a767cade9d783988
7
- data.tar.gz: 24c49d49baa18012c5d0c7657f497743bfede8964da93b4f45711c7948905f2a788a6092933ddd0718eedf4091dd3331459389172340cb8d4ff45e722f99b22d
6
+ metadata.gz: 4606ff53b34c662e6c42cb7de97ff359453d6e4b15711e2c28c11ee2bd0ff175414fdd350bde7b3f84fc1fef5d3e42e301f609e6a92b289a10641705a8b2dde0
7
+ data.tar.gz: e979e6e0816d9d5e6105f484fa764ae9813721085c7741f8996d1273da866741a989057afbcf5e00368b8ddbcafa154d2a22ed6140ab1cb099f7ba79a85030f2
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ before_install: gem install bundler --pre
3
+ rvm:
4
+ - 2.0.0
5
+ - 2.1.6
6
+ - 2.2.2
7
+ - ruby-head
data/CHANGELOG.md ADDED
@@ -0,0 +1,45 @@
1
+ # Version 0.0.1
2
+
3
+ - Import javascript and css libraries.
4
+
5
+ # Version 0.0.2
6
+
7
+ - Change specifications
8
+ - Automatically import 'utils.js' and 'intl_phone_picker' when include javascript
9
+ - Add France (fr) to supported countries. Credits to Harold Simpson : https://github.com/harold-s/harold-s
10
+ - Include '//= require intlTelInput_fr' to use it.
11
+ - Include '//= require intlTelInput_us' to use default english number picker.
12
+ - Phone number picker is automatically added to all 'tel' fields.
13
+
14
+ # Version 0.0.3
15
+
16
+ - Fix US and FR translations .yml files (Can bug when integrating to existing rails project)
17
+
18
+ # Version 0.0.4
19
+
20
+ - Call only one stylesheet file and one javascript file
21
+ - Helpers 'intl_phone_fr_tag' and 'intl_phone_us_tag' were created
22
+ - Only one javascript file which contains all traductions.
23
+ - Can swith switch between languages inside the same project (calling corresponding helper)
24
+ - Helpers overrides 'telephone_field_tag' (can use same attributes)
25
+
26
+ # Version 0.0.5
27
+
28
+ - Add Activerecord Helpers : 'intl_phone_input_fr' and 'intl_phone_input_us'
29
+ - Change name of view methods to 'intl_phone_tag_fr' and 'intl_phone_tag_us'
30
+
31
+ # Version 0.0.6
32
+
33
+ - Select number picker country by locale of main application
34
+ - Only 2 helpers : 'intl_phone_tag' and 'intl_phone_input'
35
+
36
+ # Version 0.0.7
37
+
38
+ - Update to International Telephone Input v6.0.4
39
+ - Split Javascript manifest files with 'intlTelInput' and 'intlTelInputLang' (optionnal, for default phone pickers integrations)
40
+ - An argument named 'hidden_intl_field' can be passed into 'intl_phone_tag' options which add an hidden_field storing international phone (on submit of closest form)
41
+ - This argument can either be named 'hidden_intl_field' or :hidden_intl_field (string or symbol)
42
+ - Its name can be choose (ex: hidden_intl_field: 'test_hidden') and return when form will be submit if 'intlTelInputLang' is required in Javascript manifest file
43
+ - Hidden filed option is also available for Activerecord helper 'intl_phone_input'. You will need to create an 'attr_accessor' with the name you choose, like 'full_phone'. Exemple : 'f.intl_phone_input :Phone, { hidden_intl_field: :full_phone }'
44
+ - Fix Travis builds by adding default test
45
+ - Code Refacto
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in intl_phone_picker.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,23 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Fabien Dobat
4
+
5
+
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in
15
+ all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,101 @@
1
+ # IntlPhonePicker
2
+ [![Build Status](https://travis-ci.org/SeniorMedia/intl_phone_picker.svg?branch=master)](https://travis-ci.org/SeniorMedia/intl_phone_picker)
3
+
4
+ https://rubygems.org/gems/intl_phone_picker
5
+
6
+ IntlPhonePicker is a ruby gem which allow you to change your html5 "tel" fields into jQuery international phone number pickers.
7
+
8
+ Feel free to contribute and add your own config translation files through pull requests !
9
+ If you want to add a tranlation file, just put it into config/locales ! Or if you can't just send us by email, we will do it for you.
10
+
11
+ Currently supported languages : US (default), FR. The gem takes the language of the locale from your project.
12
+
13
+ ## Sources
14
+
15
+ - Javascript based library : https://github.com/Bluefieldscom/intl-tel-input
16
+ - Ruby based gem : https://github.com/ispyropoulos/intl-tel-input-rails
17
+ - French language generator : https://github.com/harold-s/harold-s/tree/master/intl-tel-input-french-translation
18
+
19
+ ## Installation
20
+
21
+ Add this line to your application's Gemfile:
22
+
23
+ ```ruby
24
+ gem 'intl_phone_picker'
25
+ ```
26
+
27
+ And then execute:
28
+
29
+ $ bundle
30
+
31
+ Or install it yourself as:
32
+
33
+ $ gem install intl_phone_picker
34
+
35
+ To use javascript and stylesheet libraries you need to add :
36
+
37
+ - In application default stylesheet file :
38
+
39
+ ```ruby
40
+ *= require intlTelInput
41
+ ```
42
+
43
+ - In application default javascript file :
44
+
45
+ ```ruby
46
+ //= require intlTelInput
47
+ ```
48
+
49
+ - Coffeescript version :
50
+ ```ruby
51
+ #= require intlTelInput
52
+ ```
53
+
54
+ - If you want to auto convert your tel inputs into phone pickers fields :
55
+
56
+ ```ruby
57
+ //= require intlTelInputLang
58
+ ```
59
+
60
+ ## Usage
61
+
62
+ - To call intlTelInput input :
63
+ ```ruby
64
+ <%= intl_phone_tag([your_specific_name]) %>
65
+ ```
66
+
67
+ - Example :
68
+ ```ruby
69
+ <%= intl_phone_tag('test') %>
70
+ ```
71
+
72
+ - To use with a model (Activerecord) :
73
+ ```ruby
74
+ <%= f.intl_phone_input(:phone) %>
75
+ ```
76
+
77
+ ## Options
78
+
79
+ - If you want to enable an hidden field which store the international number of your field :
80
+ ```ruby
81
+ <%= intl_phone_tag('test', hidden_intl_field: :full_phone) %>
82
+ ```
83
+
84
+ - Activerecord way (Don't forget to create the named accessor in your model, full_phone in this example) :
85
+ ```ruby
86
+ <%= f.intl_phone_input :Phone, { hidden_intl_field: :full_phone } %>
87
+ ```
88
+
89
+ ## Development
90
+
91
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
92
+
93
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
94
+
95
+ ## Contributing
96
+
97
+ 1. Fork it ( https://github.com/[my-github-username]/intl_phone_picker/fork )
98
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
99
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
100
+ 4. Push to the branch (`git push origin my-new-feature`)
101
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,9 @@
1
+ require 'rake/testtask'
2
+
3
+ Rake::TestTask.new do |t|
4
+ t.libs << "test"
5
+ t.test_files = FileList['test/test*.rb']
6
+ t.verbose = true
7
+ end
8
+
9
+ task :default => :test
data/TODO.md ADDED
@@ -0,0 +1,2 @@
1
+ - Add a configuration file for countries personalisation in yml or xml which could be call depending of the Helper options. Example : French prefered countries (Monaco, Canada ...)
2
+
Binary file
Binary file