Skip to content
Browse files

Pick up from bcp47 gem

  • Loading branch information...
1 parent 6919a7b commit c0d4842b11dba62584280f73972638e4fe02d128 @tigrish committed
View
9 Gemfile
@@ -1,13 +1,12 @@
source "http://rubygems.org"
-# Add dependencies required to use your gem here.
-# Example:
-# gem "activesupport", ">= 2.3.5"
-# Add dependencies to develop your gem here.
-# Include everything needed to run rake, tests, features, etc.
+gem "i18n"
+
group :development do
gem "rspec", "~> 2.8.0"
gem "rdoc", "~> 3.12"
gem "bundler", "~> 1.2.0"
gem "jeweler", "~> 1.8.4"
+ gem "guard-rspec"
+ gem "localeapp"
end
View
31 Gemfile.lock
@@ -2,16 +2,42 @@ GEM
remote: http://rubygems.org/
specs:
diff-lcs (1.1.3)
+ ffi (1.1.5)
git (1.2.5)
+ gli (2.0.0)
+ guard (1.3.2)
+ listen (>= 0.4.2)
+ thor (>= 0.14.6)
+ guard-rspec (1.2.1)
+ guard (>= 1.1)
+ i18n (0.6.0)
jeweler (1.8.4)
bundler (~> 1.0)
git (>= 1.2.5)
rake
rdoc
json (1.7.5)
+ listen (0.4.7)
+ rb-fchange (~> 0.0.5)
+ rb-fsevent (~> 0.9.1)
+ rb-inotify (~> 0.8.8)
+ localeapp (0.5.1)
+ gli
+ i18n
+ json
+ rest-client
+ ya2yaml
+ mime-types (1.19)
rake (0.9.2.2)
+ rb-fchange (0.0.5)
+ ffi
+ rb-fsevent (0.9.1)
+ rb-inotify (0.8.8)
+ ffi (>= 0.5.0)
rdoc (3.12)
json (~> 1.4)
+ rest-client (1.6.7)
+ mime-types (>= 1.16)
rspec (2.8.0)
rspec-core (~> 2.8.0)
rspec-expectations (~> 2.8.0)
@@ -20,12 +46,17 @@ GEM
rspec-expectations (2.8.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.8.0)
+ thor (0.16.0)
+ ya2yaml (0.31)
PLATFORMS
ruby
DEPENDENCIES
bundler (~> 1.2.0)
+ guard-rspec
+ i18n
jeweler (~> 1.8.4)
+ localeapp
rdoc (~> 3.12)
rspec (~> 2.8.0)
View
24 Guardfile
@@ -0,0 +1,24 @@
+# A sample Guardfile
+# More info at https://github.com/guard/guard#readme
+
+guard 'rspec', :version => 2 do
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch('spec/spec_helper.rb') { "spec" }
+
+ # Rails example
+ watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
+ watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
+ watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
+ watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
+ watch('config/routes.rb') { "spec/routing" }
+ watch('app/controllers/application_controller.rb') { "spec/controllers" }
+
+ # Capybara request specs
+ watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
+
+ # Turnip features and steps
+ watch(%r{^spec/acceptance/(.+)\.feature$})
+ watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
+end
+
View
19 README.rdoc
@@ -1,19 +0,0 @@
-= iso
-
-Description goes here.
-
-== Contributing to iso
-
-* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
-* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
-* Fork the project.
-* Start a feature/bugfix branch.
-* Commit and push until you are happy with your contribution.
-* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
-* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
-
-== Copyright
-
-Copyright (c) 2012 Christopher Dell. See LICENSE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
+SC:
+SD:
+SE:
+SG:
+SH:
+SI:
+SJ:
+SK:
+SL:
+SM:
+SN:
+SO:
+SR:
+ST:
+SV:
+SY:
+SZ:
+TC:
+TD:
+TF:
+TG:
+TH:
+TJ:
+TK:
+TL:
+TM:
+TN:
+TO:
+TR:
+TT:
+TV:
+TW:
+TZ:
+UA:
+UG:
+UM:
+US:
+UY:
+UZ:
+VA:
+VC:
+VE:
+VG:
+VI:
+VN:
+VU:
+WF:
+WS:
+YE:
+YT:
+ZA:
+ZM:
+ZW:
View
296 data/iso-639-1.yml
@@ -0,0 +1,296 @@
+aa:
+ab:
+ae:
+af:
+ak:
+am:
+an:
+ar:
+ direction: rtl
+ plural_rule_names:
+ - zero
+ - one
+ - two
+ - few
+ - many
+ - other
+as:
+av:
+ay:
+az:
+ plural_rule_names:
+ - other
+ba:
+be:
+bg:
+bh:
+bi:
+bm:
+bn:
+bo:
+br:
+bs:
+ plural_rule_names:
+ - one
+ - few
+ - many
+ - other
+ca:
+ce:
+ch:
+co:
+cr:
+cs:
+ plural_rule_names:
+ - one
+ - few
+ - other
+cu:
+cv:
+cy:
+ plural_rule_names:
+ - one
+ - two
+ - many
+ - other
+da:
+de:
+dv:
+dz:
+ee:
+el:
+en:
+eo:
+es:
+et:
+eu:
+fa:
+ direction: rtl
+ plural_rule_names:
+ - other
+ff:
+fi:
+fj:
+fo:
+fr:
+fy:
+ga:
+gd:
+gl:
+gn:
+gu:
+gv:
+ha:
+he:
+ direction: rtl
+hi:
+ho:
+hr:
+ plural_rule_names:
+ - one
+ - few
+ - many
+ - other
+ht:
+hu:
+ plural_rule_names:
+ - other
+hy:
+hz:
+ia:
+id:
+ plural_rule_names:
+ - other
+ie:
+ig:
+ii:
+ik:
+io:
+is:
+it:
+iu:
+ja:
+ plural_rule_names:
+ - other
+jv:
+ka:
+kg:
+ki:
+kj:
+kk:
+kl:
+km:
+kn:
+ plural_rule_names:
+ - other
+ko:
+ plural_rule_names:
+ - other
+kr:
+ks:
+ku:
+kv:
+kw:
+ky:
+la:
+lb:
+lg:
+li:
+ln:
+lo:
+ plural_rule_names:
+ - zero
+ - one
+ - two
+ - few
+ - many
+ - other
+lt:
+ plural_rule_names:
+ - one
+ - few
+ - other
+lu:
+lv:
+ plural_rule_names:
+ - zero
+ - one
+ - other
+mg:
+mh:
+mi:
+mk:
+ml:
+mn:
+mr:
+ms:
+ms:
+mt:
+my:
+ plural_rule_names:
+ - one
+ - few
+ - other
+ - other
+na:
+nb:
+nd:
+ne:
+ng:
+nl:
+nn:
+no:
+nr:
+nv:
+ny:
+oc:
+oj:
+om:
+or:
+os:
+pa:
+pi:
+pl:
+ plural_rule_names:
+ - one
+ - few
+ - other
+ps:
+pt:
+qu:
+rm:
+ plural_rule_names:
+ - zero
+ - one
+ - two
+ - few
+ - many
+ - other
+rn:
+ro:
+ plural_rule_names:
+ - one
+ - few
+ - other
+ru:
+ plural_rule_names:
+ - one
+ - few
+ - many
+ - other
+rw:
+sa:
+sc:
+sd:
+se:
+sg:
+si:
+sk:
+ plural_rule_names:
+ - one
+ - few
+ - other
+sl:
+ plural_rule_names:
+ - one
+ - two
+ - few
+ - other
+sm:
+sn:
+so:
+sq:
+sr:
+ plural_rule_names:
+ - one
+ - few
+ - many
+ - other
+ss:
+st:
+su:
+sv:
+sw:
+ta:
+te:
+tg:
+th:
+ plural_rule_names:
+ - other
+ti:
+tk:
+tl:
+tn:
+to:
+tr:
+ plural_rule_names:
+ - other
+ts:
+tt:
+tw:
+ty:
+ug:
+uk:
+ plural_rule_names:
+ - one
+ - few
+ - many
+ - other
+ur:
+ direction: rtl
+uz:
+ve:
+vo:
+vi:
+ plural_rule_names:
+ - other
+wa:
+wo:
+xh:
+yi:
+yo:
+za:
+zh:
+ plural_rule_names:
+ - other
+zu:
View
14 iso.gemspec
@@ -14,15 +14,16 @@ Gem::Specification.new do |s|
s.email = %q{chris@tigrish.com}
s.extra_rdoc_files = [
"LICENSE.txt",
- "README.rdoc"
+ "README.md"
]
s.files = [
".document",
".rspec",
"Gemfile",
"Gemfile.lock",
+ "Guardfile",
"LICENSE.txt",
- "README.rdoc",
+ "README.md",
"Rakefile",
"VERSION",
"iso.gemspec",
@@ -51,21 +52,30 @@ Gem::Specification.new do |s|
s.specification_version = 3
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+ s.add_runtime_dependency(%q<i18n>, [">= 0"])
s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
s.add_development_dependency(%q<bundler>, ["~> 1.2.0"])
s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
+ s.add_development_dependency(%q<guard-rspec>, [">= 0"])
+ s.add_development_dependency(%q<localeapp>, [">= 0"])
else
+ s.add_dependency(%q<i18n>, [">= 0"])
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
s.add_dependency(%q<rdoc>, ["~> 3.12"])
s.add_dependency(%q<bundler>, ["~> 1.2.0"])
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
+ s.add_dependency(%q<guard-rspec>, [">= 0"])
+ s.add_dependency(%q<localeapp>, [">= 0"])
end
else
+ s.add_dependency(%q<i18n>, [">= 0"])
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
s.add_dependency(%q<rdoc>, ["~> 3.12"])
s.add_dependency(%q<bundler>, ["~> 1.2.0"])
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
+ s.add_dependency(%q<guard-rspec>, [">= 0"])
+ s.add_dependency(%q<localeapp>, [">= 0"])
end
end
View
8 lib/iso.rb
@@ -0,0 +1,8 @@
+require 'i18n'
+I18n.load_path << Dir[File.join(File.expand_path(File.dirname(__FILE__) + '/../locales'), '*.yml')]
+I18n.load_path.flatten!
+
+require 'iso/tag'
+require 'iso/subtag'
+require 'iso/language'
+require 'iso/region'
View
6 spec/fixtures/base.yml
@@ -0,0 +1,6 @@
+en:
+ name: English
+fr:
+ name: French
+de:
+ name: German
View
7 spec/iso_spec.rb
@@ -1,7 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
-
-describe "Iso" do
- it "fails" do
- fail "hey buddy, you should probably rename this file and start specing for real"
- end
-end
View
0 spec/lib/bcp47/language_spec.rb → spec/lib/iso/language_spec.rb
File renamed without changes.
View
0 spec/lib/bcp47/region_spec.rb → spec/lib/iso/region_spec.rb
File renamed without changes.
View
0 spec/lib/bcp47/subtag_spec.rb → spec/lib/iso/subtag_spec.rb
File renamed without changes.
View
0 spec/lib/bcp47/tag_spec.rb → spec/lib/iso/tag_spec.rb
File renamed without changes.

0 comments on commit c0d4842

Please sign in to comment.
Something went wrong with that request. Please try again.