phonofy 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ab4c944e597b21fd5741b2fe4ae079894b23daef0b1ef5fb02591ea4f9656333
4
+ data.tar.gz: ad2f6ae7a63313ab311570c18dd3205cd9026237704cb95daa7b2d48e1e004d5
5
+ SHA512:
6
+ metadata.gz: 603aadd76e3845d374b472fce743f8bf553605715660a8d7a0926feeca4dd52d1def67bf0254ec433846a55d6722dc13373bd6278308db358d851b3bbb0afec1
7
+ data.tar.gz: 19da8320b25ab52c32c8baa4e1603e984b85ae28d1f56250e12e160f7bf9c9951a1ddf02a9b3876e8dcb1b02ec673a12c16242bfbfb067105e8626f7a3fcb62b
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,13 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.6
3
+
4
+ Style/StringLiterals:
5
+ Enabled: true
6
+ EnforcedStyle: double_quotes
7
+
8
+ Style/StringLiteralsInInterpolation:
9
+ Enabled: true
10
+ EnforcedStyle: double_quotes
11
+
12
+ Layout/LineLength:
13
+ Max: 120
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2023-03-30
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at khaled@goblackiris.com . All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in phonofy.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.0"
11
+
12
+ gem "rubocop", "~> 1.21"
data/Gemfile.lock ADDED
@@ -0,0 +1,77 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ phonofy (0.1.1)
5
+ activerecord
6
+ i18n
7
+ phonelib
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ activemodel (7.0.4)
13
+ activesupport (= 7.0.4)
14
+ activerecord (7.0.4)
15
+ activemodel (= 7.0.4)
16
+ activesupport (= 7.0.4)
17
+ activesupport (7.0.4)
18
+ concurrent-ruby (~> 1.0, >= 1.0.2)
19
+ i18n (>= 1.6, < 2)
20
+ minitest (>= 5.1)
21
+ tzinfo (~> 2.0)
22
+ ast (2.4.2)
23
+ concurrent-ruby (1.2.2)
24
+ diff-lcs (1.5.0)
25
+ i18n (1.12.0)
26
+ concurrent-ruby (~> 1.0)
27
+ json (2.6.3)
28
+ minitest (5.18.0)
29
+ parallel (1.22.1)
30
+ parser (3.2.1.1)
31
+ ast (~> 2.4.1)
32
+ phonelib (0.7.7)
33
+ rainbow (3.1.1)
34
+ rake (13.0.6)
35
+ regexp_parser (2.7.0)
36
+ rexml (3.2.5)
37
+ rspec (3.12.0)
38
+ rspec-core (~> 3.12.0)
39
+ rspec-expectations (~> 3.12.0)
40
+ rspec-mocks (~> 3.12.0)
41
+ rspec-core (3.12.1)
42
+ rspec-support (~> 3.12.0)
43
+ rspec-expectations (3.12.2)
44
+ diff-lcs (>= 1.2.0, < 2.0)
45
+ rspec-support (~> 3.12.0)
46
+ rspec-mocks (3.12.4)
47
+ diff-lcs (>= 1.2.0, < 2.0)
48
+ rspec-support (~> 3.12.0)
49
+ rspec-support (3.12.0)
50
+ rubocop (1.48.1)
51
+ json (~> 2.3)
52
+ parallel (~> 1.10)
53
+ parser (>= 3.2.0.0)
54
+ rainbow (>= 2.2.2, < 4.0)
55
+ regexp_parser (>= 1.8, < 3.0)
56
+ rexml (>= 3.2.5, < 4.0)
57
+ rubocop-ast (>= 1.26.0, < 2.0)
58
+ ruby-progressbar (~> 1.7)
59
+ unicode-display_width (>= 2.4.0, < 3.0)
60
+ rubocop-ast (1.28.0)
61
+ parser (>= 3.2.1.0)
62
+ ruby-progressbar (1.13.0)
63
+ tzinfo (2.0.6)
64
+ concurrent-ruby (~> 1.0)
65
+ unicode-display_width (2.4.2)
66
+
67
+ PLATFORMS
68
+ arm64-darwin-22
69
+
70
+ DEPENDENCIES
71
+ phonofy!
72
+ rake (~> 13.0)
73
+ rspec (~> 3.0)
74
+ rubocop (~> 1.21)
75
+
76
+ BUNDLED WITH
77
+ 2.4.10
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Khaled AbuShqear
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # Phonofy
2
+
3
+ TODO: Delete this and the text below, and describe your gem
4
+
5
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/phonofy`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+
7
+ ## Installation
8
+
9
+ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
+
11
+ Install the gem and add to the application's Gemfile by executing:
12
+
13
+ $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
14
+
15
+ If bundler is not being used to manage dependencies, install the gem by executing:
16
+
17
+ $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ To access configs:
24
+ ```
25
+ User.phonofy_configs
26
+ ```
27
+
28
+ ## Development
29
+
30
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
31
+
32
+ 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`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
33
+
34
+ ## Contributing
35
+
36
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/phonofy. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/phonofy/blob/main/CODE_OF_CONDUCT.md).
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
41
+
42
+ ## Code of Conduct
43
+
44
+ Everyone interacting in the Phonofy project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/phonofy/blob/main/CODE_OF_CONDUCT.md).
data/README.md.erb ADDED
@@ -0,0 +1,81 @@
1
+ # <%= gem_name.capitalize %>
2
+
3
+ <%= gem_description %>
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem '<%= gem_name %>'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ ```shell
16
+ bundle
17
+ ```
18
+
19
+ Or install it yourself as:
20
+
21
+ ```shell
22
+ gem install <%= gem_name %>
23
+ ```
24
+
25
+ ## **Usage**
26
+ To use <%= gem_name %>, simply call the **phonofy** method in your Rails model:
27
+
28
+ ```ruby
29
+ class User < ApplicationRecord
30
+ phonofy
31
+ end
32
+ ```
33
+
34
+ This will add phone number validation and formatting to the **phone_number** attribute of the **Driver** model.
35
+
36
+ You can also specify a custom attribute name for the phone number:
37
+
38
+ ```ruby
39
+ class Contact < ApplicationRecord
40
+ phonofy :mobile_number
41
+ end
42
+ ```
43
+
44
+ This will add phone number validation and formatting to the **mobile_number** attribute of the **Contact** model.
45
+
46
+ You can also pass additional options to <%= gem_name %> to customize its behavior:
47
+
48
+ ```ruby
49
+ class User < ApplicationRecord
50
+ phonofy :phone, phonelib: { countries: [:us, :ca], types: [:mobile] }
51
+ end
52
+ ```
53
+
54
+ This will add phone number validation and formatting to the **phone** attribute of the **User** model, and restrict it to US and Canada mobile phone numbers.
55
+
56
+
57
+ ## **Configuration**
58
+
59
+ You can configure <%= gem_name %> by creating an initializer file in your Rails application and setting the default options:
60
+
61
+ ```ruby
62
+ # config/initializers/<%= gem_name %>.rb
63
+ <%= gem_module %>.configure do |config|
64
+ config.default_phonelib_options = { countries: [:us, :ca], types: [:mobile] }
65
+ config.default_twilio_options = { lookup: { type: :carrier_type } }
66
+ end
67
+ ```
68
+
69
+ This will set the default options for <%= gem_name %> to validate only US and Canada mobile phone numbers using the Phonelib library, and perform a Twilio lookup to get carrier information for the phone number.
70
+
71
+ ## **Contributing**
72
+
73
+ Bug reports and pull requests are welcome on GitHub at <%= github_url %>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org/) code of conduct.
74
+
75
+ ## **License**
76
+
77
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
78
+
79
+ ## **Credits**
80
+
81
+ <%= gem_name %> was created by <%= author_name %> and is maintained by a community of contributors.
data/Rakefile ADDED
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
13
+
14
+ require "erb"
15
+
16
+ desc "Generate README.md from template"
17
+ task :readme do
18
+ template = File.read("README.md.erb")
19
+ readme = ERB.new(template).result(binding)
20
+ File.write("README.md", readme)
21
+ end
22
+
23
+ task default: :test
@@ -0,0 +1,6 @@
1
+ en:
2
+ errors:
3
+ messages:
4
+ invalid_country: "has invalid country code"
5
+ invalid_type: 'type is invalid'
6
+ invalid_extension: 'extension is invalid'
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+ # require_relative "phonofy/fy/version"
3
+
4
+ module Phonofy
5
+ module Model
6
+ module ClassMethods
7
+
8
+ DEFAULTS = { phonelib: { allow_blank: true, validation_options: {} } }.freeze
9
+
10
+ def phonofy(column_name = :phone_number, **options)
11
+ options = DEFAULTS.deep_merge(options)
12
+
13
+ unless respond_to? :phonofy_configs
14
+ class_attribute :phonofy_configs
15
+ self.phonofy_configs = { _counter: {} }
16
+ end
17
+
18
+ counter = (phonofy_configs[:_counter][column_name] ||= 0)
19
+ phonofy_configs[:_counter][column_name] += 1
20
+
21
+ phonofy_configs["#{column_name}_#{counter}"] = options.dup
22
+
23
+ include InstanceDynamicMethods.new(column_name, options)
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,74 @@
1
+ # frozen_string_literal: true
2
+
3
+ # require_relative "phonofy/fy/version"
4
+ require_relative "../validators/extended_phone_validator"
5
+
6
+ module Phonofy
7
+ module Model
8
+ class InstanceDynamicMethods < Module
9
+ DEFAULT_PHONE_FORMAT = :national
10
+
11
+ SUPPORTED_FORMATS = %i[
12
+ international
13
+ national
14
+ local_number
15
+ extension
16
+ full_e164
17
+ e164
18
+ full_international
19
+ ].freeze
20
+
21
+ # @param [String] column_name phone number column name
22
+ # @param [Hash] options
23
+ def initialize(column_name, options)
24
+ super()
25
+ @column_name = column_name
26
+ @options = options
27
+ end
28
+
29
+ def included(base)
30
+ column_name = @column_name
31
+
32
+ phonelib_options = @options[:phonelib] || {}
33
+ phonelib_validate_enabled = phonelib_options != false
34
+ phonelib_validation_options = phonelib_options.delete(:validation_options) || {}
35
+
36
+ base.class_eval do
37
+ if phonelib_validate_enabled
38
+ validate lambda {
39
+ validator = Validators::ExtendedPhoneValidator.new(phonelib_options.merge(attributes: [column_name.to_s]))
40
+ validator.validate_each(self, column_name, send("#{column_name}_before_type_cast"))
41
+ }, **phonelib_validation_options
42
+ end
43
+
44
+ before_save :"#{column_name}_to_e164!", if: :"will_save_change_to_#{column_name}?"
45
+
46
+ define_method(column_name.to_s) do |format = DEFAULT_PHONE_FORMAT|
47
+ phone = read_attribute(column_name)
48
+ phone = Phonelib.parse(phone)
49
+
50
+ raise Phonelib::FormatNotSupported, format unless SUPPORTED_FORMATS.include? format
51
+
52
+ phone.send(format)
53
+ end
54
+
55
+ define_method("#{column_name}_is_valid?") do
56
+ phone = read_attribute(column_name)
57
+ phone = Phonelib.parse(phone)
58
+ phone.valid?
59
+ end
60
+
61
+ define_method("#{column_name}_object") do
62
+ phone = read_attribute(column_name)
63
+ Phonelib.parse(phone)
64
+ end
65
+
66
+ define_method("#{column_name}_to_e164!") do
67
+ phone = read_attribute(column_name)
68
+ write_attribute(column_name, Phonelib.parse(phone).e164)
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
data/lib/model.rb ADDED
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "model/class_methods"
4
+
5
+ module Phonofy
6
+ module Model
7
+ def self.included(base)
8
+ base.extend ClassMethods
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Phonofy
4
+ VERSION = "0.1.1"
5
+ end
data/lib/phonofy.rb ADDED
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "phonofy/version"
4
+
5
+ require "active_record"
6
+ require "model/instance_dynamic_methods"
7
+ require "phonelib"
8
+ require "model"
9
+
10
+ module Phonofy
11
+ class Error < StandardError; end
12
+
13
+ class Engine < ::Rails::Engine
14
+ initializer "phonofy.initialize" do
15
+ ActiveSupport.on_load(:active_record) do
16
+ include Phonofy::Model
17
+ end
18
+
19
+ config.i18n.load_path += Dir[config.root.join("config", "locales", "**", "*.{rb,yml}")]
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../validators"
4
+ require "#{Gem::Specification.find_by_name("phonelib").gem_dir}/lib/validators/phone_validator"
5
+
6
+ module Phonofy
7
+ module Validators
8
+ class ExtendedPhoneValidator < PhoneValidator
9
+ def validate_each(record, attribute, value)
10
+ return if options[:allow_blank] && value.blank?
11
+
12
+ @phone = parse(value, specified_country(record))
13
+ valid = countries.present? ? valid_country? : phone_valid?
14
+ valid = valid && valid_types? && valid_extensions?
15
+
16
+ record.errors.add(attribute, message(error_message), options) unless valid
17
+ end
18
+
19
+ private
20
+
21
+ def message(custom = :invalid)
22
+ options[:message] || custom
23
+ end
24
+
25
+ def error_message
26
+ return :invalid_country if countries.present? && !valid_country?
27
+ return :invalid if !countries.present? && !phone_valid?
28
+ return :invalid_type unless valid_types?
29
+ return :invalid_extension unless valid_extensions?
30
+
31
+ :invalid
32
+ end
33
+
34
+ def valid_country?
35
+ return true unless options[:countries]
36
+
37
+ countries.any? { |country| @phone.valid_for_country?(country) }
38
+ end
39
+ end
40
+ end
41
+ end
data/lib/validators.rb ADDED
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Phonofy
4
+ module Validators
5
+ end
6
+ end
data/sig/phonofy.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Phonofy
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,110 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: phonofy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Khaled AbuShqear
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-04-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: i18n
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: phonelib
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: activerecord
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Phonofy is a Ruby gem that simplifies phone number formatting in Rails
56
+ applications using the Phonelib library. With Phonofy, you can easily parse and
57
+ format phone number data according to international standards, ensuring that your
58
+ phone number data is consistent and valid across your application.
59
+ email:
60
+ - qmax93@gmail.com
61
+ executables: []
62
+ extensions: []
63
+ extra_rdoc_files: []
64
+ files:
65
+ - ".rspec"
66
+ - ".rubocop.yml"
67
+ - CHANGELOG.md
68
+ - CODE_OF_CONDUCT.md
69
+ - Gemfile
70
+ - Gemfile.lock
71
+ - LICENSE.txt
72
+ - README.md
73
+ - README.md.erb
74
+ - Rakefile
75
+ - config/locales/en.yml
76
+ - lib/model.rb
77
+ - lib/model/class_methods.rb
78
+ - lib/model/instance_dynamic_methods.rb
79
+ - lib/phonofy.rb
80
+ - lib/phonofy/version.rb
81
+ - lib/validators.rb
82
+ - lib/validators/extended_phone_validator.rb
83
+ - sig/phonofy.rbs
84
+ homepage: https://github.com/shqear93/phonofy
85
+ licenses:
86
+ - MIT
87
+ metadata:
88
+ homepage_uri: https://github.com/shqear93/phonofy
89
+ source_code_uri: https://github.com/shqear93/phonofy
90
+ changelog_uri: https://github.com/shqear93/phonofy/blob/master/CHANGELOG.md
91
+ post_install_message:
92
+ rdoc_options: []
93
+ require_paths:
94
+ - lib
95
+ required_ruby_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: 2.6.0
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ requirements: []
106
+ rubygems_version: 3.4.10
107
+ signing_key:
108
+ specification_version: 4
109
+ summary: Phonofy integrates with rails ActiveRecord to provide formatting functionalities.
110
+ test_files: []