New Upstream Snapshot - ruby-iso
Ready changes
Summary
Merged new upstream version: 0.4.0 (was: 0.2.2).
Resulting package
Built on 2022-11-10T11:21 (took 10m35s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-snapshots ruby-iso
Lintian Result
Diff
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..93993cb
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,12 @@
+before_install:
+ - gem install bundler
+language: ruby
+rvm:
+ - 2.6
+ - 2.5
+ - 2.4
+ - 2.3
+notifications:
+ slack:
+ if: branch = master
+ secure: dPiP4+6xO6L9/RfXyivr2X2UohSD8CDdnnY57BvNgGVvFtQ2LUP9s1mDxj7gbBGhRZJzTMZlM/PU7bT9O9JCJPcpUs4dWg748KZ0ZGOslnv8yfzNbRh9U5OzyEjch2PFkEhpQPnuVCiof+ahjfxQQSkokpsbNa9DLlDmUapXFPY=
diff --git a/Gemfile b/Gemfile
index 688df07..176eae2 100644
--- a/Gemfile
+++ b/Gemfile
@@ -3,10 +3,10 @@ source "http://rubygems.org"
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 "rspec", "~> 3.9"
+ gem "rdoc", "~> 6.2"
+ gem "bundler", "~> 2.0"
+ gem "jeweler", "~> 2.3"
gem "guard-rspec"
gem "localeapp"
end
diff --git a/Gemfile.lock b/Gemfile.lock
index 8c3d541..e03823e 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,62 +1,137 @@
GEM
remote: http://rubygems.org/
specs:
- diff-lcs (1.1.3)
- ffi (1.1.5)
- git (1.2.5)
- gli (2.1.0)
- guard (1.3.2)
- listen (>= 0.4.2)
- thor (>= 0.14.6)
- guard-rspec (1.2.1)
- guard (>= 1.1)
- i18n (0.6.1)
- jeweler (1.8.4)
- bundler (~> 1.0)
+ addressable (2.4.0)
+ builder (3.2.3)
+ coderay (1.1.2)
+ concurrent-ruby (1.1.5)
+ descendants_tracker (0.0.4)
+ thread_safe (~> 0.3, >= 0.3.1)
+ diff-lcs (1.3)
+ domain_name (0.5.20190701)
+ unf (>= 0.0.5, < 1.0.0)
+ faraday (0.9.2)
+ multipart-post (>= 1.2, < 3)
+ ffi (1.11.3)
+ formatador (0.2.5)
+ git (1.5.0)
+ github_api (0.16.0)
+ addressable (~> 2.4.0)
+ descendants_tracker (~> 0.0.4)
+ faraday (~> 0.8, < 0.10)
+ hashie (>= 3.4)
+ mime-types (>= 1.16, < 3.0)
+ oauth2 (~> 1.0)
+ gli (2.19.0)
+ guard (2.16.1)
+ formatador (>= 0.2.4)
+ listen (>= 2.7, < 4.0)
+ lumberjack (>= 1.0.12, < 2.0)
+ nenv (~> 0.1)
+ notiffany (~> 0.0)
+ pry (>= 0.9.12)
+ shellany (~> 0.0)
+ thor (>= 0.18.1)
+ guard-compat (1.2.1)
+ guard-rspec (4.7.3)
+ guard (~> 2.1)
+ guard-compat (~> 1.1)
+ rspec (>= 2.99.0, < 4.0)
+ hashie (4.0.0)
+ highline (2.0.3)
+ http-accept (1.7.0)
+ http-cookie (1.0.3)
+ domain_name (~> 0.5)
+ i18n (1.7.0)
+ concurrent-ruby (~> 1.0)
+ jeweler (2.3.9)
+ builder
+ bundler
git (>= 1.2.5)
+ github_api (~> 0.16.0)
+ highline (>= 1.6.15)
+ nokogiri (>= 1.5.10)
+ psych
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.2)
+ semver2
+ json (2.3.1)
+ jwt (2.2.1)
+ listen (3.2.0)
+ rb-fsevent (~> 0.10, >= 0.10.3)
+ rb-inotify (~> 0.9, >= 0.9.10)
+ localeapp (3.1.2)
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)
- rspec-mocks (~> 2.8.0)
- rspec-core (2.8.0)
- rspec-expectations (2.8.0)
- diff-lcs (~> 1.1.2)
- rspec-mocks (2.8.0)
- thor (0.16.0)
- ya2yaml (0.31)
+ i18n (>= 0.7, < 2)
+ json (>= 1.7.7)
+ rest-client (>= 1.8.0)
+ lumberjack (1.0.13)
+ method_source (0.9.2)
+ mime-types (2.99.3)
+ mini_portile2 (2.4.0)
+ multi_json (1.14.1)
+ multi_xml (0.6.0)
+ multipart-post (2.1.1)
+ nenv (0.3.0)
+ netrc (0.11.0)
+ nokogiri (1.10.10)
+ mini_portile2 (~> 2.4.0)
+ notiffany (0.1.3)
+ nenv (~> 0.1)
+ shellany (~> 0.0)
+ oauth2 (1.4.2)
+ faraday (>= 0.8, < 2.0)
+ jwt (>= 1.0, < 3.0)
+ multi_json (~> 1.3)
+ multi_xml (~> 0.5)
+ rack (>= 1.2, < 3)
+ pry (0.12.2)
+ coderay (~> 1.1.0)
+ method_source (~> 0.9.0)
+ psych (3.1.0)
+ rack (2.2.3)
+ rake (13.0.1)
+ rb-fsevent (0.10.3)
+ rb-inotify (0.10.0)
+ ffi (~> 1.0)
+ rdoc (6.2.0)
+ rest-client (2.1.0)
+ http-accept (>= 1.7.0, < 2.0)
+ http-cookie (>= 1.0.2, < 2.0)
+ mime-types (>= 1.16, < 4.0)
+ netrc (~> 0.8)
+ rspec (3.9.0)
+ rspec-core (~> 3.9.0)
+ rspec-expectations (~> 3.9.0)
+ rspec-mocks (~> 3.9.0)
+ rspec-core (3.9.0)
+ rspec-support (~> 3.9.0)
+ rspec-expectations (3.9.0)
+ diff-lcs (>= 1.2.0, < 2.0)
+ rspec-support (~> 3.9.0)
+ rspec-mocks (3.9.0)
+ diff-lcs (>= 1.2.0, < 2.0)
+ rspec-support (~> 3.9.0)
+ rspec-support (3.9.0)
+ semver2 (3.4.2)
+ shellany (0.0.1)
+ thor (0.20.3)
+ thread_safe (0.3.6)
+ unf (0.1.4)
+ unf_ext
+ unf_ext (0.0.7.6)
PLATFORMS
ruby
DEPENDENCIES
- bundler (~> 1.2.0)
+ bundler (~> 2.0)
guard-rspec
i18n
- jeweler (~> 1.8.4)
+ jeweler (~> 2.3)
localeapp
- rdoc (~> 3.12)
- rspec (~> 2.8.0)
+ rdoc (~> 6.2)
+ rspec (~> 3.9)
+
+BUNDLED WITH
+ 2.0.2
diff --git a/README.md b/README.md
index c49fab5..ca1e3cf 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# iso
-[](http://travis-ci.org/tigrish/iso)
+[](https://travis-ci.org/Locale/iso)
This project is a ruby implementation of ISO 639-1 alpha2 and ISO 3166-1. It includes definitions of all two letter language and region codes.
diff --git a/Rakefile b/Rakefile
index 9b89ab8..07b36ef 100644
--- a/Rakefile
+++ b/Rakefile
@@ -20,7 +20,7 @@ Jeweler::Tasks.new do |gem|
gem.summary = %Q{A ruby implementation of ISO}
gem.description = %Q{A subset of the ISO spec implemented in ruby}
gem.email = "chris@tigrish.com"
- gem.authors = ["Christopher Dell"]
+ gem.authors = ["Christopher Dell", "Thibault Dalban"]
# dependencies defined in Gemfile
end
Jeweler::RubygemsDotOrgTasks.new
diff --git a/VERSION b/VERSION
index f477849..1d0ba9e 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.2.2
\ No newline at end of file
+0.4.0
diff --git a/data/iso-639-1.yml b/data/iso-639-1.yml
index f85a19a..0b532c4 100644
--- a/data/iso-639-1.yml
+++ b/data/iso-639-1.yml
@@ -49,8 +49,10 @@ cu:
cv:
cy:
plural_rule_names:
+ - zero
- one
- two
+ - few
- many
- other
da:
@@ -94,6 +96,7 @@ hr:
ht:
hu:
plural_rule_names:
+ - one
- other
hy:
hz:
@@ -164,7 +167,6 @@ ml:
mn:
mr:
ms:
-ms:
mt:
my:
plural_rule_names:
diff --git a/debian/changelog b/debian/changelog
index 3b04124..0dc63d3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,12 @@
-ruby-iso (0.2.2-3) UNRELEASED; urgency=low
+ruby-iso (0.4.0-1) UNRELEASED; urgency=low
* Update standards version to 4.5.0, no changes needed.
* Update watch file format version to 4.
* Bump debhelper from old 12 to 13.
* Update standards version to 4.5.1, no changes needed.
+ * New upstream release.
- -- Debian Janitor <janitor@jelmer.uk> Sun, 26 Jul 2020 11:30:37 -0000
+ -- Debian Janitor <janitor@jelmer.uk> Thu, 10 Nov 2022 11:14:23 -0000
ruby-iso (0.2.2-2) unstable; urgency=medium
diff --git a/iso.gemspec b/iso.gemspec
index 0da5391..2552379 100644
--- a/iso.gemspec
+++ b/iso.gemspec
@@ -2,18 +2,18 @@
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-
-# stub: iso 0.2.2 ruby lib
+# stub: iso 0.4.0 ruby lib
Gem::Specification.new do |s|
- s.name = "iso"
- s.version = "0.2.2"
+ s.name = "iso".freeze
+ s.version = "0.4.0"
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.require_paths = ["lib"]
- s.authors = ["Christopher Dell"]
- s.date = "2016-07-13"
- s.description = "A subset of the ISO spec implemented in ruby"
- s.email = "chris@tigrish.com"
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
+ s.require_paths = ["lib".freeze]
+ s.authors = ["Christopher Dell".freeze, "Thibault Dalban".freeze]
+ s.date = "2020-11-17"
+ s.description = "A subset of the ISO spec implemented in ruby".freeze
+ s.email = "chris@tigrish.com".freeze
s.extra_rdoc_files = [
"LICENSE.txt",
"README.md"
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
s.files = [
".document",
".rspec",
+ ".travis.yml",
"Gemfile",
"Gemfile.lock",
"Guardfile",
@@ -48,39 +49,39 @@ Gem::Specification.new do |s|
"spec/lib/iso/un/region_spec.rb",
"spec/spec_helper.rb"
]
- s.homepage = "http://github.com/tigrish/iso"
- s.licenses = ["MIT"]
- s.rubygems_version = "2.4.6"
- s.summary = "A ruby implementation of ISO"
+ s.homepage = "http://github.com/tigrish/iso".freeze
+ s.licenses = ["MIT".freeze]
+ s.rubygems_version = "3.0.3".freeze
+ s.summary = "A ruby implementation of ISO".freeze
if s.respond_to? :specification_version then
s.specification_version = 4
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"])
+ s.add_runtime_dependency(%q<i18n>.freeze, [">= 0"])
+ s.add_development_dependency(%q<rspec>.freeze, ["~> 3.9"])
+ s.add_development_dependency(%q<rdoc>.freeze, ["~> 6.2"])
+ s.add_development_dependency(%q<bundler>.freeze, ["~> 2.0"])
+ s.add_development_dependency(%q<jeweler>.freeze, ["~> 2.3"])
+ s.add_development_dependency(%q<guard-rspec>.freeze, [">= 0"])
+ s.add_development_dependency(%q<localeapp>.freeze, [">= 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"])
+ s.add_dependency(%q<i18n>.freeze, [">= 0"])
+ s.add_dependency(%q<rspec>.freeze, ["~> 3.9"])
+ s.add_dependency(%q<rdoc>.freeze, ["~> 6.2"])
+ s.add_dependency(%q<bundler>.freeze, ["~> 2.0"])
+ s.add_dependency(%q<jeweler>.freeze, ["~> 2.3"])
+ s.add_dependency(%q<guard-rspec>.freeze, [">= 0"])
+ s.add_dependency(%q<localeapp>.freeze, [">= 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"])
+ s.add_dependency(%q<i18n>.freeze, [">= 0"])
+ s.add_dependency(%q<rspec>.freeze, ["~> 3.9"])
+ s.add_dependency(%q<rdoc>.freeze, ["~> 6.2"])
+ s.add_dependency(%q<bundler>.freeze, ["~> 2.0"])
+ s.add_dependency(%q<jeweler>.freeze, ["~> 2.3"])
+ s.add_dependency(%q<guard-rspec>.freeze, [">= 0"])
+ s.add_dependency(%q<localeapp>.freeze, [">= 0"])
end
end
diff --git a/lib/iso.rb b/lib/iso.rb
index 6cc879f..b4b412c 100644
--- a/lib/iso.rb
+++ b/lib/iso.rb
@@ -2,8 +2,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'
-require 'iso/un/region'
+require_relative 'iso/tag'
+require_relative 'iso/subtag'
+require_relative 'iso/language'
+require_relative 'iso/region'
+require_relative 'iso/un/region'
diff --git a/spec/lib/iso/language_spec.rb b/spec/lib/iso/language_spec.rb
index a82205f..b60a85c 100644
--- a/spec/lib/iso/language_spec.rb
+++ b/spec/lib/iso/language_spec.rb
@@ -4,50 +4,50 @@ describe ISO::Language do
let(:language) { ISO::Language.new('de', name: 'German') }
it "is a ISO Subtag" do
- language.should be_kind_of(ISO::Subtag)
+ expect(language).to be_kind_of(ISO::Subtag)
end
it "has a code" do
- language.code.should == 'de'
+ expect(language.code).to eq 'de'
end
it "has a name" do
- language.name.should == 'German'
+ expect(language.name).to eq 'German'
end
describe "#plural_rule_names" do
it "defaults to %w(one other)" do
- language.plural_rule_names.should == ISO::Language::DEFAULT_PLURAL_RULE_NAMES
+ expect(language.plural_rule_names).to eq ISO::Language::DEFAULT_PLURAL_RULE_NAMES
end
it "is overwriteable" do
language = ISO::Language.new('ja', plural_rule_names: ['other'])
- language.plural_rule_names.should == ['other']
+ expect(language.plural_rule_names).to eq ['other']
end
end
describe "#direction" do
it "defaults to 'ltr'" do
- language.direction.should == 'ltr'
+ expect(language.direction).to eq 'ltr'
end
it "is overwriteable" do
language = ISO::Language.new('ar', direction: :rtl)
- language.direction.should == :rtl
+ expect(language.direction).to eq :rtl
end
end
describe ".identify(full_code)" do
it "identifies from 'de'" do
- ISO::Language.identify('de').should == ISO::Language.new('de')
+ expect(ISO::Language.identify('de')).to eq ISO::Language.new('de')
end
it "identifies from 'fr-CH'" do
- ISO::Language.identify('fr-CH').should == ISO::Language.new('fr')
+ expect(ISO::Language.identify('fr-CH')).to eq ISO::Language.new('fr')
end
it "returns nil when it can't identify" do
- ISO::Language.identify('csb').should be_nil
+ expect(ISO::Language.identify('csb')).to be_nil
end
end
end
diff --git a/spec/lib/iso/region_spec.rb b/spec/lib/iso/region_spec.rb
index 3b7e331..21db86c 100644
--- a/spec/lib/iso/region_spec.rb
+++ b/spec/lib/iso/region_spec.rb
@@ -4,28 +4,28 @@ describe ISO::Region do
let(:region) { ISO::Region.new('FR', name: 'France') }
it "is a ISO Subtag" do
- region.should be_kind_of(ISO::Subtag)
+ expect(region).to be_kind_of(ISO::Subtag)
end
it "has a code" do
- region.code.should == 'FR'
+ expect(region.code).to eq 'FR'
end
it "has a name" do
- region.name.should == 'France'
+ expect(region.name).to eq 'France'
end
describe ".identify(full_code)" do
it "identifies from 'fr-CH'" do
- ISO::Region.identify('fr-CH').should == ISO::Region.find('CH')
+ expect(ISO::Region.identify('fr-CH')).to eq ISO::Region.find('CH')
end
it "identifies from 'es_MX" do
- ISO::Region.identify('es_MX').should == ISO::Region.find('MX')
+ expect(ISO::Region.identify('es_MX')).to eq ISO::Region.find('MX')
end
it "returns nil when it can't identify" do
- ISO::Region.identify('gsw').should be_nil
+ expect(ISO::Region.identify('gsw')).to be_nil
end
end
end
diff --git a/spec/lib/iso/subtag_spec.rb b/spec/lib/iso/subtag_spec.rb
index a9f4398..6e2992c 100644
--- a/spec/lib/iso/subtag_spec.rb
+++ b/spec/lib/iso/subtag_spec.rb
@@ -12,11 +12,11 @@ end
describe ISO::Subtag do
describe "#==(object)" do
it "returns true when both have the same code" do
- ISO::Region.find('SY').should == ISO::Region.find('SY')
+ expect(ISO::Region.find('SY')).to eq ISO::Region.find('SY')
end
it "returns false when they have different codes" do
- ISO::Region.find('FR').should_not == ISO::Region.find('GB')
+ expect(ISO::Region.find('FR')).to_not eq ISO::Region.find('GB')
end
end
@@ -25,13 +25,13 @@ describe ISO::Subtag do
let(:mars) { ISO::Subtag.new('MRS') }
it 'will accept a name option' do
- I18n.should_not_receive(:t)
- fake_region.name.should == 'This is a lie'
+ expect(I18n).to_not receive(:t)
+ expect(fake_region.name).to eq 'This is a lie'
end
it 'falls back to the translation' do
- I18n.should_receive(:t).with('MRS', scope: 'vendor.iso').and_return('Mars')
- mars.name.should == 'Mars'
+ expect(I18n).to receive(:t).with('MRS', scope: 'vendor.iso').and_return('Mars')
+ expect(mars.name).to eq 'Mars'
end
end
@@ -39,41 +39,41 @@ describe ISO::Subtag do
describe "#full_name" do
it "is composed of the code and the name" do
full_name = Subtag.find('fr').full_name
- full_name.should match(/fr/)
- full_name.should match(/French/)
+ expect(full_name).to match(/fr/)
+ expect(full_name).to match(/French/)
end
end
describe ".all" do
it "gets its definition from the DEFINITIONS_FILE" do
subtags = Subtag.all
- subtags[0].should == Subtag.find('en')
- subtags[1].should == Subtag.find('fr')
- subtags[2].should == Subtag.find('de')
+ expect(subtags[0]).to eq Subtag.find('en')
+ expect(subtags[1]).to eq Subtag.find('fr')
+ expect(subtags[2]).to eq Subtag.find('de')
end
end
describe ".find(code)" do
it "finds a subtag by code" do
subtag = Subtag.find('de')
- subtag.code.should == 'de'
- subtag.name.should == 'German'
+ expect(subtag.code).to eq 'de'
+ expect(subtag.name).to eq 'German'
end
it "returns nil when no language can be found" do
- Subtag.find('xxxx').should be_nil
+ expect(Subtag.find('xxxx')).to be_nil
end
end
describe ".default" do
it "finds from DEFAULT_CODE" do
- Subtag.default.should == Subtag.find('fr')
+ expect(Subtag.default).to eq Subtag.find('fr')
end
end
describe ".codes" do
it "returns an array of all codes" do
- Subtag.codes.should == %w(en fr de)
+ expect(Subtag.codes).to eq %w(en fr de)
end
end
end
diff --git a/spec/lib/iso/tag_spec.rb b/spec/lib/iso/tag_spec.rb
index 36814aa..a7a356c 100644
--- a/spec/lib/iso/tag_spec.rb
+++ b/spec/lib/iso/tag_spec.rb
@@ -4,90 +4,90 @@ describe ISO::Tag do
describe ".new(code)" do
it "returns a tag containing the language and region" do
tag = ISO::Tag.new('en-MX')
- tag.language.code.should == 'en'
- tag.region.code.should == 'MX'
+ expect(tag.language.code).to eq 'en'
+ expect(tag.region.code).to eq 'MX'
end
it "returns a tag containing the language and UN region" do
tag = ISO::Tag.new('en-419')
- tag.language.code.should == 'en'
- tag.region.code.should == '419'
+ expect(tag.language.code).to eq 'en'
+ expect(tag.region.code).to eq '419'
end
it "returns a tag containing the language only" do
tag = ISO::Tag.new('en-XXXXXX')
- tag.language.code.should == 'en'
- tag.region.should be_nil
+ expect(tag.language.code).to eq 'en'
+ expect(tag.region).to be_nil
end
it "returns a tag containing the region only" do
tag = ISO::Tag.new('gsw-CH')
- tag.language.should be_nil
- tag.region.code.should == 'CH'
+ expect(tag.language).to be_nil
+ expect(tag.region.code).to eq 'CH'
end
-
+
it "returns a tag containing the UN region only" do
tag = ISO::Tag.new('gsw-419')
- tag.language.should be_nil
- tag.region.code.should == '419'
+ expect(tag.language).to be_nil
+ expect(tag.region.code).to eq '419'
end
it "returns a tag containing no language or region" do
tag = ISO::Tag.new('csb-XXXXXX')
- tag.language.should be_nil
- tag.region.should be_nil
+ expect(tag.language).to be_nil
+ expect(tag.region).to be_nil
end
end
describe "#codes" do
it "returns an array containing each subtag's code" do
- ISO::Tag.new('en-US').codes.should == %w(en US)
+ expect(ISO::Tag.new('en-US').codes).to eq %w(en US)
end
end
describe "#subtags" do
it "returns an array containing the language" do
tag = ISO::Tag.new('fr')
- tag.subtags.size.should == 1
- tag.subtags.first.should be_kind_of(ISO::Language)
- tag.subtags.first.code.should == 'fr'
+ expect(tag.subtags.size).to eq 1
+ expect(tag.subtags.first).to be_kind_of(ISO::Language)
+ expect(tag.subtags.first.code).to eq 'fr'
end
it "returns an array containing the language and the region" do
tag = ISO::Tag.new('fr-CH')
- tag.subtags.size.should == 2
+ expect(tag.subtags.size).to eq 2
- tag.subtags.first.should be_kind_of(ISO::Language)
- tag.subtags.first.code.should == 'fr'
+ expect(tag.subtags.first).to be_kind_of(ISO::Language)
+ expect(tag.subtags.first.code).to eq 'fr'
- tag.subtags.last.should be_kind_of(ISO::Region)
- tag.subtags.last.code.should == 'CH'
+ expect(tag.subtags.last).to be_kind_of(ISO::Region)
+ expect(tag.subtags.last.code).to eq 'CH'
end
end
describe "#valid?" do
it "returns true when a valid language is supplied" do
- ISO::Tag.new('da').should be_valid
+ expect(ISO::Tag.new('da')).to be_valid
end
it "returns true when a valid language and region are supplied" do
- ISO::Tag.new('da-AT').should be_valid
+ expect(ISO::Tag.new('da-AT')).to be_valid
end
it "returns true when a valid language an UN region are supplied" do
- ISO::Tag.new('es-419').should be_valid
+ expect(ISO::Tag.new('es-419')).to be_valid
end
it "returns false when no code is supplied" do
- ISO::Tag.new('').should_not be_valid
+ expect(ISO::Tag.new('')).to_not be_valid
end
it "returns false when supplied language is invalid" do
- ISO::Tag.new('lol').should_not be_valid
+ expect(ISO::Tag.new('lol')).to_not be_valid
end
it "returns false when supplied region is invalid" do
- ISO::Tag.new('en-lol').should_not be_valid
+ expect(ISO::Tag.new('en-lol')).to_not be_valid
end
end
diff --git a/spec/lib/iso/un/region_spec.rb b/spec/lib/iso/un/region_spec.rb
index 9e135d0..95d1444 100644
--- a/spec/lib/iso/un/region_spec.rb
+++ b/spec/lib/iso/un/region_spec.rb
@@ -6,33 +6,33 @@ describe ISO::UN::Region do
describe "#iso_code" do
it "returns the corresponding iso code" do
- has_iso.iso_code.should == 'AF'
+ expect(has_iso.iso_code).to eq 'AF'
end
it "returns nil when there is no corresponding iso code" do
- no_iso.iso_code.should be_nil
+ expect(no_iso.iso_code).to be_nil
end
end
describe "#name" do
it "uses the correct scope when there is an iso code" do
- has_iso.name.should == 'Afghanistan'
+ expect(has_iso.name).to eq 'Afghanistan'
end
it "uses the correct scope when there is no iso code" do
- no_iso.name.should == 'Africa'
+ expect(no_iso.name).to eq 'Africa'
end
end
describe ".identify(full_code)" do
it "identifies from 'es-419'" do
region = ISO::UN::Region.identify('es-419')
- region.should_not be_nil
- region.should == ISO::UN::Region.find('419')
+ expect(region).to_not be_nil
+ expect(region).to eq ISO::UN::Region.find('419')
end
it "returns nil when it can't identify" do
- ISO::UN::Region.identify('gsw').should be_nil
+ expect(ISO::UN::Region.identify('gsw')).to be_nil
end
end
end
Debdiff
[The following lists of changes regard files as different if they have different names, permissions or owners.]
Files in second set of .debs but not in first
-rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.4.0/VERSION -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.4.0/data/iso-3166-1.yml -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.4.0/data/iso-639-1.yml -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.4.0/data/un-m49.yml -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.4.0/lib/iso.rb -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.4.0/lib/iso/language.rb -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.4.0/lib/iso/region.rb -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.4.0/lib/iso/subtag.rb -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.4.0/lib/iso/tag.rb -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.4.0/lib/iso/un/region.rb -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.4.0/locales/en.yml -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.4.0/locales/fr.yml -rw-r--r-- root/root /usr/share/rubygems-integration/all/specifications/iso-0.4.0.gemspec
Files in first set of .debs but not in second
-rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.2.2/VERSION -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.2.2/data/iso-3166-1.yml -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.2.2/data/iso-639-1.yml -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.2.2/data/un-m49.yml -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.2.2/lib/iso.rb -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.2.2/lib/iso/language.rb -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.2.2/lib/iso/region.rb -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.2.2/lib/iso/subtag.rb -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.2.2/lib/iso/tag.rb -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.2.2/lib/iso/un/region.rb -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.2.2/locales/en.yml -rw-r--r-- root/root /usr/share/rubygems-integration/all/gems/iso-0.2.2/locales/fr.yml -rw-r--r-- root/root /usr/share/rubygems-integration/all/specifications/iso-0.2.2.gemspec
Control files: lines which differ (wdiff format)
Ruby-Versions: all