motion-phony 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/motion-phony.rb +6 -2
- data/lib/motion-phony/phony-base.rb +10 -1
- data/motion-phony.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 538fad7d358d65ab0fe235b3f0f42d65a2e50c4f
|
4
|
+
data.tar.gz: a830c1cb3cd584b5afe9710839febb34c34e0441
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 361ea306fc960f0330749929ccd313e1c7bdc47181954fb60ff83568a34ee6153d6372dedd0eb684f13dd54c48de74ea0186f60e48d03ef4c970b33f7dc832da
|
7
|
+
data.tar.gz: e5d1f007c1cd8026cf1958338807344b9c083c480341881616d5ac92c9454daa2cddad344fc41baa1c65a3b205a8c8fbd66246cf7a79fb6d405030d2d2b27277
|
data/lib/motion-phony.rb
CHANGED
@@ -2,8 +2,7 @@ unless defined?(Motion::Project::Config)
|
|
2
2
|
raise 'This file must be required within a RubyMotion project Rakefile.'
|
3
3
|
end
|
4
4
|
|
5
|
-
|
6
|
-
require 'motion-require'
|
5
|
+
#require 'motion-require'
|
7
6
|
|
8
7
|
# respect the order!
|
9
8
|
files = [
|
@@ -61,4 +60,9 @@ files = [
|
|
61
60
|
].map { |file| "#{Gem.loaded_specs['phony'].full_gem_path}/lib/phony/#{file}.rb" }
|
62
61
|
|
63
62
|
Motion::Require.all(files)
|
63
|
+
#files.each do |file|
|
64
|
+
# require file
|
65
|
+
#end
|
66
|
+
|
67
|
+
#require "#{Gem.loaded_specs['phony'].full_gem_path}/lib/phony.rb"
|
64
68
|
Motion::Require.all(Dir.glob(File.join(File.expand_path(File.dirname(__FILE__)), 'motion-phony/*.rb')))
|
@@ -5,6 +5,13 @@
|
|
5
5
|
|
6
6
|
module Phony
|
7
7
|
|
8
|
+
class CountryCodes
|
9
|
+
# Strangely the Phony::CountryCodes.format method becomes private
|
10
|
+
def format_substitute number, options = {}
|
11
|
+
format_cc_ndc_local options[:format], options[:spaces] || @default_space, *split(number)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
8
15
|
class NormalizationError < StandardError
|
9
16
|
def initialize
|
10
17
|
super %Q{Phony could not normalize the given number. Is it a phone number?}
|
@@ -60,7 +67,9 @@ module Phony
|
|
60
67
|
format! phone_number.dup, options
|
61
68
|
end
|
62
69
|
def format! phone_number, options = {}
|
63
|
-
|
70
|
+
#@codes.format phone_number, options
|
71
|
+
# Strangely the Phony::CountryCodes.format method becomes private
|
72
|
+
@codes.format_substitute phone_number, options
|
64
73
|
end
|
65
74
|
alias formatted format
|
66
75
|
alias formatted! format!
|
data/motion-phony.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-phony
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Speer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: motion-require
|