e164 0.1.2 → 0.2.0
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.
- data/Gemfile +6 -0
- data/Gemfile.lock +27 -0
- data/Rakefile +3 -24
- data/VERSION +1 -1
- data/e164.gemspec +11 -7
- data/lib/e164/country_codes.rb +3 -1
- data/lib/e164/national_destination_codes/germany.rb +3 -1
- data/lib/e164/national_destination_codes/nanp.rb +3 -1
- data/spec/spec_helper.rb +5 -4
- metadata +26 -10
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
diff-lcs (1.1.2)
|
5
|
+
git (1.2.5)
|
6
|
+
jeweler (1.5.2)
|
7
|
+
bundler (~> 1.0.0)
|
8
|
+
git (>= 1.2.5)
|
9
|
+
rake
|
10
|
+
rake (0.8.7)
|
11
|
+
rspec (2.0.1)
|
12
|
+
rspec-core (~> 2.0.1)
|
13
|
+
rspec-expectations (~> 2.0.1)
|
14
|
+
rspec-mocks (~> 2.0.1)
|
15
|
+
rspec-core (2.0.1)
|
16
|
+
rspec-expectations (2.0.1)
|
17
|
+
diff-lcs (>= 1.1.2)
|
18
|
+
rspec-mocks (2.0.1)
|
19
|
+
rspec-core (~> 2.0.1)
|
20
|
+
rspec-expectations (~> 2.0.1)
|
21
|
+
|
22
|
+
PLATFORMS
|
23
|
+
ruby
|
24
|
+
|
25
|
+
DEPENDENCIES
|
26
|
+
jeweler
|
27
|
+
rspec
|
data/Rakefile
CHANGED
@@ -13,35 +13,14 @@ begin
|
|
13
13
|
gem.homepage = "http://github.com/hexorx/e164"
|
14
14
|
gem.authors = ["hexorx"]
|
15
15
|
gem.add_development_dependency "rspec"
|
16
|
-
gem.add_development_dependency "yard"
|
17
|
-
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
18
16
|
end
|
19
17
|
Jeweler::GemcutterTasks.new
|
20
18
|
rescue LoadError
|
21
19
|
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
22
20
|
end
|
23
21
|
|
24
|
-
require '
|
25
|
-
Spec::Rake::SpecTask.new(:spec) do |spec|
|
26
|
-
spec.libs << 'lib' << 'spec'
|
27
|
-
spec.spec_files = FileList['spec/**/*_spec.rb']
|
28
|
-
end
|
29
|
-
|
30
|
-
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
31
|
-
spec.libs << 'lib' << 'spec'
|
32
|
-
spec.pattern = 'spec/**/*_spec.rb'
|
33
|
-
spec.rcov = true
|
34
|
-
end
|
35
|
-
|
36
|
-
task :spec => :check_dependencies
|
22
|
+
require 'rspec/core/rake_task'
|
37
23
|
|
38
|
-
|
24
|
+
RSpec::Core::RakeTask.new(:spec)
|
39
25
|
|
40
|
-
|
41
|
-
require 'yard'
|
42
|
-
YARD::Rake::YardocTask.new
|
43
|
-
rescue LoadError
|
44
|
-
task :yardoc do
|
45
|
-
abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
|
46
|
-
end
|
47
|
-
end
|
26
|
+
task :default => :spec
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/e164.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{e164}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["hexorx"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-04-06}
|
13
13
|
s.description = %q{The e164 gem can parse and normalize numbers into the e164 format.
|
14
14
|
It provides extra information on the Country Code and National Destination Codes.
|
15
15
|
It can be used standalone or mixed into a model.}
|
@@ -20,6 +20,8 @@ Gem::Specification.new do |s|
|
|
20
20
|
]
|
21
21
|
s.files = [
|
22
22
|
".document",
|
23
|
+
"Gemfile",
|
24
|
+
"Gemfile.lock",
|
23
25
|
"LICENSE",
|
24
26
|
"README.markdown",
|
25
27
|
"Rakefile",
|
@@ -36,7 +38,7 @@ Gem::Specification.new do |s|
|
|
36
38
|
]
|
37
39
|
s.homepage = %q{http://github.com/hexorx/e164}
|
38
40
|
s.require_paths = ["lib"]
|
39
|
-
s.rubygems_version = %q{1.
|
41
|
+
s.rubygems_version = %q{1.6.2}
|
40
42
|
s.summary = %q{This gem provides e164 parsing and normalization}
|
41
43
|
s.test_files = [
|
42
44
|
"spec/e164_spec.rb",
|
@@ -44,19 +46,21 @@ Gem::Specification.new do |s|
|
|
44
46
|
]
|
45
47
|
|
46
48
|
if s.respond_to? :specification_version then
|
47
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
48
49
|
s.specification_version = 3
|
49
50
|
|
50
51
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
52
|
+
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
53
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
51
54
|
s.add_development_dependency(%q<rspec>, [">= 0"])
|
52
|
-
s.add_development_dependency(%q<yard>, [">= 0"])
|
53
55
|
else
|
56
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
57
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
54
58
|
s.add_dependency(%q<rspec>, [">= 0"])
|
55
|
-
s.add_dependency(%q<yard>, [">= 0"])
|
56
59
|
end
|
57
60
|
else
|
61
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
62
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
58
63
|
s.add_dependency(%q<rspec>, [">= 0"])
|
59
|
-
s.add_dependency(%q<yard>, [">= 0"])
|
60
64
|
end
|
61
65
|
end
|
62
66
|
|
data/lib/e164/country_codes.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
Dir.glob(File.join(File.dirname(__FILE__), 'national_destination_codes/*.rb')).each {|f| require f }
|
2
4
|
|
3
5
|
CountryCodes = {
|
@@ -256,4 +258,4 @@ CountryCodes = {
|
|
256
258
|
'996' => {:national_destination_codes => 2, :abbreviation => '', :description => 'Kyrgyzstan', :info => 'en.wikipedia.com.org/wiki/Kyrgyzstan'},
|
257
259
|
'998' => {:national_destination_codes => 2, :abbreviation => '', :description => 'Uzbekistan', :info => 'en.wikipedia.com.org/wiki/Uzbekistan'},
|
258
260
|
'999' => {:national_destination_codes => 2, :abbreviation => '', :description => 'reserved for future global service', :info => ''}
|
259
|
-
}
|
261
|
+
}
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
NANP = {
|
2
4
|
:range => 3..3,
|
3
5
|
:default => 3,
|
@@ -364,4 +366,4 @@ NANP = {
|
|
364
366
|
'984' => {:abbreviation => 'North Carolina', :description => '[North Carolina] This area code is scheduled to provide overlay relief to code [919] but no date has been assigned for this to g', :info => 'en.wikipedia.com.org/wiki/List_of_future_North_American_area_codes'},
|
365
367
|
'985' => {:abbreviation => 'Louisiana', :description => '[Louisiana] (Houma, Slidell and southeastern Louisiana excluding New Orleans)', :info => 'en.wikipedia.com.org/wiki/Area_code_985'},
|
366
368
|
'989' => {:abbreviation => 'Michigan', :description => '[Michigan] (Alpena, Mt. Pleasant, Bay City, Saginaw, Midland, Owosso and central Michigan)', :info => 'en.wikipedia.com.org/wiki/Area_code_989'}
|
367
|
-
}
|
369
|
+
}
|
data/spec/spec_helper.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2
2
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
3
3
|
|
4
|
+
require 'bundler'
|
4
5
|
require 'e164'
|
5
|
-
require 'spec'
|
6
|
-
require 'spec/autorun'
|
7
6
|
|
8
|
-
|
9
|
-
|
7
|
+
Bundler.require(:default, :test) if defined?(Bundler)
|
8
|
+
|
9
|
+
RSpec.configure do |config|
|
10
|
+
config.mock_with :rspec
|
10
11
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: e164
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
- 1
|
9
8
|
- 2
|
10
|
-
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- hexorx
|
@@ -15,12 +15,12 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-04-06 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
name: rspec
|
23
22
|
prerelease: false
|
23
|
+
type: :development
|
24
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
@@ -30,11 +30,11 @@ dependencies:
|
|
30
30
|
segments:
|
31
31
|
- 0
|
32
32
|
version: "0"
|
33
|
-
|
33
|
+
name: jeweler
|
34
34
|
version_requirements: *id001
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
|
-
name: yard
|
37
36
|
prerelease: false
|
37
|
+
type: :development
|
38
38
|
requirement: &id002 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
@@ -44,8 +44,22 @@ dependencies:
|
|
44
44
|
segments:
|
45
45
|
- 0
|
46
46
|
version: "0"
|
47
|
-
|
47
|
+
name: rspec
|
48
48
|
version_requirements: *id002
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
prerelease: false
|
51
|
+
type: :development
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
hash: 3
|
58
|
+
segments:
|
59
|
+
- 0
|
60
|
+
version: "0"
|
61
|
+
name: rspec
|
62
|
+
version_requirements: *id003
|
49
63
|
description: |-
|
50
64
|
The e164 gem can parse and normalize numbers into the e164 format.
|
51
65
|
It provides extra information on the Country Code and National Destination Codes.
|
@@ -60,6 +74,8 @@ extra_rdoc_files:
|
|
60
74
|
- README.markdown
|
61
75
|
files:
|
62
76
|
- .document
|
77
|
+
- Gemfile
|
78
|
+
- Gemfile.lock
|
63
79
|
- LICENSE
|
64
80
|
- README.markdown
|
65
81
|
- Rakefile
|
@@ -103,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
119
|
requirements: []
|
104
120
|
|
105
121
|
rubyforge_project:
|
106
|
-
rubygems_version: 1.
|
122
|
+
rubygems_version: 1.6.2
|
107
123
|
signing_key:
|
108
124
|
specification_version: 3
|
109
125
|
summary: This gem provides e164 parsing and normalization
|