bcp47 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -8,4 +8,5 @@ group :development do
8
8
  gem "bundler", "~> 1.1.0"
9
9
  gem "jeweler", "~> 1.8.4"
10
10
  gem "guard-rspec"
11
+ gem "localeapp"
11
12
  end
@@ -4,6 +4,7 @@ GEM
4
4
  diff-lcs (1.1.3)
5
5
  ffi (1.1.5)
6
6
  git (1.2.5)
7
+ gli (2.0.0)
7
8
  guard (1.3.2)
8
9
  listen (>= 0.4.2)
9
10
  thor (>= 0.14.6)
@@ -20,6 +21,13 @@ GEM
20
21
  rb-fchange (~> 0.0.5)
21
22
  rb-fsevent (~> 0.9.1)
22
23
  rb-inotify (~> 0.8.8)
24
+ localeapp (0.5.1)
25
+ gli
26
+ i18n
27
+ json
28
+ rest-client
29
+ ya2yaml
30
+ mime-types (1.19)
23
31
  rake (0.9.2.2)
24
32
  rb-fchange (0.0.5)
25
33
  ffi
@@ -28,6 +36,8 @@ GEM
28
36
  ffi (>= 0.5.0)
29
37
  rdoc (3.12)
30
38
  json (~> 1.4)
39
+ rest-client (1.6.7)
40
+ mime-types (>= 1.16)
31
41
  rspec (2.8.0)
32
42
  rspec-core (~> 2.8.0)
33
43
  rspec-expectations (~> 2.8.0)
@@ -37,6 +47,7 @@ GEM
37
47
  diff-lcs (~> 1.1.2)
38
48
  rspec-mocks (2.8.0)
39
49
  thor (0.16.0)
50
+ ya2yaml (0.31)
40
51
 
41
52
  PLATFORMS
42
53
  ruby
@@ -46,5 +57,6 @@ DEPENDENCIES
46
57
  guard-rspec
47
58
  i18n
48
59
  jeweler (~> 1.8.4)
60
+ localeapp
49
61
  rdoc (~> 3.12)
50
62
  rspec (~> 2.8.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{bcp47}
8
- s.version = "0.3.2"
8
+ s.version = "0.3.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Christopher Dell}]
12
- s.date = %q{2012-08-28}
12
+ s.date = %q{2012-08-30}
13
13
  s.description = %q{A subset of the BCP47 spec implemented in ruby}
14
14
  s.email = %q{chris@tigrish.com}
15
15
  s.extra_rdoc_files = [
@@ -58,6 +58,7 @@ Gem::Specification.new do |s|
58
58
  s.add_development_dependency(%q<bundler>, ["~> 1.1.0"])
59
59
  s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
60
60
  s.add_development_dependency(%q<guard-rspec>, [">= 0"])
61
+ s.add_development_dependency(%q<localeapp>, [">= 0"])
61
62
  else
62
63
  s.add_dependency(%q<i18n>, [">= 0"])
63
64
  s.add_dependency(%q<rspec>, ["~> 2.8.0"])
@@ -65,6 +66,7 @@ Gem::Specification.new do |s|
65
66
  s.add_dependency(%q<bundler>, ["~> 1.1.0"])
66
67
  s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
67
68
  s.add_dependency(%q<guard-rspec>, [">= 0"])
69
+ s.add_dependency(%q<localeapp>, [">= 0"])
68
70
  end
69
71
  else
70
72
  s.add_dependency(%q<i18n>, [">= 0"])
@@ -73,6 +75,7 @@ Gem::Specification.new do |s|
73
75
  s.add_dependency(%q<bundler>, ["~> 1.1.0"])
74
76
  s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
75
77
  s.add_dependency(%q<guard-rspec>, [">= 0"])
78
+ s.add_dependency(%q<localeapp>, [">= 0"])
76
79
  end
77
80
  end
78
81
 
@@ -8,6 +8,10 @@ module BCP47
8
8
  @region = Region.identify(code)
9
9
  end
10
10
 
11
+ def codes
12
+ subtags.map(&:code)
13
+ end
14
+
11
15
  def subtags
12
16
  [language, region].compact
13
17
  end
@@ -400,7 +400,7 @@ en:
400
400
  SE: Sweden
401
401
  CH: Switzerland
402
402
  SY: Syrian Arab Republic
403
- TW: Taiwan, Province of China
403
+ TW: Taiwan
404
404
  TJ: Tajikistan
405
405
  TZ: Tanzania, United Republic of
406
406
  TH: Thailand
@@ -425,7 +425,7 @@ en:
425
425
  VU: Vanuatu
426
426
  VA: Vatican City State (Holy See)
427
427
  VE: Venezuela
428
- VN: Viet Nam
428
+ VN: Vietnam
429
429
  VG: Virgin Islands (British)
430
430
  VI: Virgin Islands (U.S.)
431
431
  WF: Wallis and Futuna
@@ -27,6 +27,12 @@ describe BCP47::Tag do
27
27
  end
28
28
  end
29
29
 
30
+ describe "#codes" do
31
+ it "returns an array containing each subtag's code" do
32
+ BCP47::Tag.new('en-US').codes.should == %w(en US)
33
+ end
34
+ end
35
+
30
36
  describe "#subtags" do
31
37
  it "returns an array containing the language" do
32
38
  tag = BCP47::Tag.new('fr')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bcp47
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-28 00:00:00.000000000 Z
12
+ date: 2012-08-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n
16
- requirement: &70141283025720 !ruby/object:Gem::Requirement
16
+ requirement: &70196979548360 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70141283025720
24
+ version_requirements: *70196979548360
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &70141283024900 !ruby/object:Gem::Requirement
27
+ requirement: &70196979546960 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.8.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70141283024900
35
+ version_requirements: *70196979546960
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rdoc
38
- requirement: &70141283157500 !ruby/object:Gem::Requirement
38
+ requirement: &70196979545360 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '3.12'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70141283157500
46
+ version_requirements: *70196979545360
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
- requirement: &70141283156640 !ruby/object:Gem::Requirement
49
+ requirement: &70196979758780 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.1.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70141283156640
57
+ version_requirements: *70196979758780
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: jeweler
60
- requirement: &70141283155740 !ruby/object:Gem::Requirement
60
+ requirement: &70196979757060 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 1.8.4
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70141283155740
68
+ version_requirements: *70196979757060
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: guard-rspec
71
- requirement: &70141283154920 !ruby/object:Gem::Requirement
71
+ requirement: &70196979755040 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,7 +76,18 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70141283154920
79
+ version_requirements: *70196979755040
80
+ - !ruby/object:Gem::Dependency
81
+ name: localeapp
82
+ requirement: &70196979753680 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: *70196979753680
80
91
  description: A subset of the BCP47 spec implemented in ruby
81
92
  email: chris@tigrish.com
82
93
  executables: []
@@ -124,7 +135,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
124
135
  version: '0'
125
136
  segments:
126
137
  - 0
127
- hash: -4611036960582085300
138
+ hash: 3736790576662409487
128
139
  required_rubygems_version: !ruby/object:Gem::Requirement
129
140
  none: false
130
141
  requirements: