iso-0.2.2/0000755000175000017500000000000013473244614011651 5ustar samyaksamyakiso-0.2.2/lib/0000755000175000017500000000000013473244614012417 5ustar samyaksamyakiso-0.2.2/lib/iso/0000755000175000017500000000000013473244614013211 5ustar samyaksamyakiso-0.2.2/lib/iso/subtag.rb0000644000175000017500000000157113473244614015027 0ustar samyaksamyakrequire 'yaml' module ISO class Subtag attr_reader :code def initialize(code, options={}) @code = code @options = options end def ==(object) code == object.code end def name @options[:name] || I18n.t(code, :scope => i18n_scope) end def full_name "#{code} - #{name}" end def self.all @all ||= YAML.load_file(self::DEFINITIONS_FILE).map do |code, options| symbolized_options = {} options.keys.each { |key| symbolized_options[key.to_sym] = options[key] } if options new(code, symbolized_options) end end def self.find(code) all.find {|subtag| subtag.code == code } end def self.default find(self::DEFAULT_CODE) end def self.codes all.map(&:code) end private def i18n_scope %w(vendor iso).join('.') end end end iso-0.2.2/lib/iso/un/0000755000175000017500000000000013473244614013633 5ustar samyaksamyakiso-0.2.2/lib/iso/un/region.rb0000644000175000017500000000102113473244614015435 0ustar samyaksamyakmodule ISO module UN class Region < ISO::Region DEFINITIONS_FILE = "#{File.dirname(__FILE__)}/../../../data/un-m49.yml" attr_reader :iso_code def initialize(code, options={}) @iso_code = options[:iso_code] super(code, options) end def name return super if iso_code.nil? @options[:name] || I18n.t(iso_code, :scope => i18n_scope) end def self.identify(full_code) full_code =~ /-(\d{3})$/ ? find($1) : nil end end end end iso-0.2.2/lib/iso/language.rb0000644000175000017500000000136113473244614015322 0ustar samyaksamyakclass ISO::Language < ISO::Subtag DEFINITIONS_FILE = "#{File.dirname(__FILE__)}/../../data/iso-639-1.yml" DEFAULT_PLURAL_RULE_NAMES = %w(one other) DEFAULT_DIRECTION = 'ltr' DEFAULT_CODE = 'en' PLURAL_RULE_NAMES = %w(zero one two few many other) attr_reader :plural_rule_names, :direction def initialize(code, options={}) @plural_rule_names = options[:plural_rule_names] || DEFAULT_PLURAL_RULE_NAMES @direction = options[:direction] || DEFAULT_DIRECTION super(code, options) end def self.identify(full_code) segments = full_code.split('-') segments.first =~ /^([a-z]{2})$/ ? find($1) : nil end private def i18n_scope super << ".languages" end end iso-0.2.2/lib/iso/tag.rb0000644000175000017500000000070213473244614014310 0ustar samyaksamyakmodule ISO class Tag attr_accessor :language, :region def initialize(code) @code = code @language = Language.identify(code) @region = Region.identify(code) || UN::Region.identify(code) end def codes subtags.map(&:code) end def subtags [language, region].compact end def valid? return false if @language.nil? @code.split('-').size == subtags.size end end end iso-0.2.2/lib/iso/region.rb0000644000175000017500000000040413473244614015017 0ustar samyaksamyakclass ISO::Region < ISO::Subtag DEFINITIONS_FILE = "#{File.dirname(__FILE__)}/../../data/iso-3166-1.yml" def self.identify(full_code) full_code =~ /[-_]([A-Z]{2})$/ ? find($1) : nil end private def i18n_scope super << ".regions" end end iso-0.2.2/lib/iso.rb0000644000175000017500000000036713473244614013544 0ustar samyaksamyakrequire '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' iso-0.2.2/VERSION0000644000175000017500000000000513473244614012714 0ustar samyaksamyak0.2.2iso-0.2.2/spec/0000755000175000017500000000000013473244614012603 5ustar samyaksamyakiso-0.2.2/spec/lib/0000755000175000017500000000000013473244614013351 5ustar samyaksamyakiso-0.2.2/spec/lib/iso/0000755000175000017500000000000013473244614014143 5ustar samyaksamyakiso-0.2.2/spec/lib/iso/region_spec.rb0000644000175000017500000000124713473244614016771 0ustar samyaksamyakrequire 'spec_helper' 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) end it "has a code" do region.code.should == 'FR' end it "has a name" do region.name.should == 'France' end describe ".identify(full_code)" do it "identifies from 'fr-CH'" do ISO::Region.identify('fr-CH').should == ISO::Region.find('CH') end it "identifies from 'es_MX" do ISO::Region.identify('es_MX').should == ISO::Region.find('MX') end it "returns nil when it can't identify" do ISO::Region.identify('gsw').should be_nil end end end iso-0.2.2/spec/lib/iso/un/0000755000175000017500000000000013473244614014565 5ustar samyaksamyakiso-0.2.2/spec/lib/iso/un/region_spec.rb0000644000175000017500000000170313473244614017410 0ustar samyaksamyakrequire 'spec_helper' describe ISO::UN::Region do let(:has_iso) { ISO::UN::Region.find('004') } let(:no_iso) { ISO::UN::Region.find('002') } describe "#iso_code" do it "returns the corresponding iso code" do has_iso.iso_code.should == 'AF' end it "returns nil when there is no corresponding iso code" do no_iso.iso_code.should be_nil end end describe "#name" do it "uses the correct scope when there is an iso code" do has_iso.name.should == 'Afghanistan' end it "uses the correct scope when there is no iso code" do no_iso.name.should == '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') end it "returns nil when it can't identify" do ISO::UN::Region.identify('gsw').should be_nil end end end iso-0.2.2/spec/lib/iso/language_spec.rb0000644000175000017500000000237513473244614017274 0ustar samyaksamyakrequire 'spec_helper' 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) end it "has a code" do language.code.should == 'de' end it "has a name" do language.name.should == '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 end it "is overwriteable" do language = ISO::Language.new('ja', plural_rule_names: ['other']) language.plural_rule_names.should == ['other'] end end describe "#direction" do it "defaults to 'ltr'" do language.direction.should == 'ltr' end it "is overwriteable" do language = ISO::Language.new('ar', direction: :rtl) language.direction.should == :rtl end end describe ".identify(full_code)" do it "identifies from 'de'" do ISO::Language.identify('de').should == ISO::Language.new('de') end it "identifies from 'fr-CH'" do ISO::Language.identify('fr-CH').should == ISO::Language.new('fr') end it "returns nil when it can't identify" do ISO::Language.identify('csb').should be_nil end end end iso-0.2.2/spec/lib/iso/tag_spec.rb0000644000175000017500000000507113473244614016260 0ustar samyaksamyakrequire 'spec_helper' 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' 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' 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 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' 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' 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 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) 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' end it "returns an array containing the language and the region" do tag = ISO::Tag.new('fr-CH') tag.subtags.size.should == 2 tag.subtags.first.should be_kind_of(ISO::Language) tag.subtags.first.code.should == 'fr' tag.subtags.last.should be_kind_of(ISO::Region) tag.subtags.last.code.should == 'CH' end end describe "#valid?" do it "returns true when a valid language is supplied" do ISO::Tag.new('da').should be_valid end it "returns true when a valid language and region are supplied" do ISO::Tag.new('da-AT').should be_valid end it "returns true when a valid language an UN region are supplied" do ISO::Tag.new('es-419').should be_valid end it "returns false when no code is supplied" do ISO::Tag.new('').should_not be_valid end it "returns false when supplied language is invalid" do ISO::Tag.new('lol').should_not be_valid end it "returns false when supplied region is invalid" do ISO::Tag.new('en-lol').should_not be_valid end end end iso-0.2.2/spec/lib/iso/subtag_spec.rb0000644000175000017500000000362513473244614016775 0ustar samyaksamyakrequire 'spec_helper' class Subtag < ISO::Subtag DEFINITIONS_FILE = "spec/fixtures/base.yml" DEFAULT_CODE = "fr" private def i18n_scope super << ".languages" end 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') end it "returns false when they have different codes" do ISO::Region.find('FR').should_not == ISO::Region.find('GB') end end describe "#name" do let(:fake_region) { ISO::Subtag.new('FR', name: 'This is a lie') } 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' end it 'falls back to the translation' do I18n.should_receive(:t).with('MRS', scope: 'vendor.iso').and_return('Mars') mars.name.should == 'Mars' end end 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/) 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') 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' end it "returns nil when no language can be found" do Subtag.find('xxxx').should be_nil end end describe ".default" do it "finds from DEFAULT_CODE" do Subtag.default.should == Subtag.find('fr') end end describe ".codes" do it "returns an array of all codes" do Subtag.codes.should == %w(en fr de) end end end iso-0.2.2/spec/fixtures/0000755000175000017500000000000013473244614014454 5ustar samyaksamyakiso-0.2.2/spec/fixtures/base.yml0000644000175000017500000000007213473244614016110 0ustar samyaksamyaken: name: English fr: name: French de: name: German iso-0.2.2/spec/spec_helper.rb0000644000175000017500000000056013473244614015422 0ustar samyaksamyak$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rspec' require 'iso' require 'yaml' # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirectories. Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} RSpec.configure do |config| end iso-0.2.2/Guardfile0000644000175000017500000000222113473244614013473 0ustar samyaksamyak# 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 iso-0.2.2/.document0000644000175000017500000000006713473244614013473 0ustar samyaksamyaklib/**/*.rb bin/* - features/**/*.feature LICENSE.txt iso-0.2.2/data/0000755000175000017500000000000013473244614012562 5ustar samyaksamyakiso-0.2.2/data/iso-639-1.yml0000644000175000017500000000432313473244614014556 0ustar samyaksamyakaa: 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: iso-0.2.2/data/un-m49.yml0000644000175000017500000001242313473244614014340 0ustar samyaksamyak'002': '004': iso_code: AF '005': '008': iso_code: AL '009': '011': '012': iso_code: DZ '013': '014': '015': '016': iso_code: AS '017': '018': '019': '020': iso_code: AD '021': '024': iso_code: AO '028': iso_code: AG '029': '030': '031': iso_code: AZ '032': iso_code: AR '034': '035': '036': iso_code: AU '039': '040': iso_code: AT '044': iso_code: BS '048': iso_code: BH '050': iso_code: BD '051': iso_code: AM '052': iso_code: BB '053': '054': '056': iso_code: BE '057': '060': iso_code: BM '061': '064': iso_code: BT '068': iso_code: BO '070': iso_code: BA '072': iso_code: BW '076': iso_code: BR '084': iso_code: BZ '090': iso_code: SB '092': iso_code: VG '096': iso_code: BN '100': iso_code: BG '104': iso_code: MM '108': iso_code: BI '112': iso_code: BY '116': iso_code: KH '120': iso_code: CM '124': iso_code: CA '132': iso_code: CV '136': iso_code: KY '140': iso_code: CF '142': '143': '144': iso_code: LK '145': '148': iso_code: TD '150': '151': '152': iso_code: CL '154': '155': '156': iso_code: CN '170': iso_code: CO '174': iso_code: KM '175': iso_code: YT '178': iso_code: CG '180': iso_code: CD '184': iso_code: CK '188': iso_code: CR '191': iso_code: HR '192': iso_code: CU '196': iso_code: CY '203': iso_code: CZ '204': iso_code: BJ '208': iso_code: DK '212': iso_code: DM '214': iso_code: DO '218': iso_code: EC '222': iso_code: SV '226': iso_code: GQ '231': iso_code: ET '232': iso_code: ER '233': iso_code: EE '234': iso_code: FO '238': iso_code: FK '242': iso_code: FJ '246': iso_code: FI '248': '250': iso_code: FR '254': iso_code: GF '258': iso_code: PF '262': iso_code: DJ '266': iso_code: GA '268': iso_code: GE '270': iso_code: GM '275': iso_code: PS '276': iso_code: DE '288': iso_code: GH '292': iso_code: GI '296': iso_code: KI '300': iso_code: GR '304': iso_code: GL '308': iso_code: GD '312': iso_code: GP '316': iso_code: GU '320': iso_code: GT '324': iso_code: GN '328': iso_code: GY '332': iso_code: HT '336': iso_code: VE '340': iso_code: HN '344': '348': iso_code: HU '352': iso_code: IS '356': iso_code: IN '360': iso_code: ID '364': iso_code: IR '368': iso_code: IQ '372': iso_code: IE '376': iso_code: IL '380': iso_code: IT '384': iso_code: CI '388': iso_code: JM '392': iso_code: JP '398': iso_code: KZ '400': iso_code: JO '404': iso_code: KE '408': iso_code: KP '410': iso_code: KR '414': iso_code: KW '417': iso_code: KG '418': iso_code: LA '419': '422': iso_code: LB '426': iso_code: LS '428': iso_code: LV '430': iso_code: LR '434': iso_code: LY '438': iso_code: LI '440': iso_code: LT '442': iso_code: LU '446': '450': iso_code: MG '454': iso_code: MW '458': iso_code: MY '462': iso_code: MV '466': iso_code: ML '470': iso_code: MT '474': iso_code: MQ '478': iso_code: MR '480': iso_code: MU '484': iso_code: MX '492': iso_code: MC '496': iso_code: MN '498': iso_code: MD '499': iso_code: ME '500': iso_code: MS '504': iso_code: MA '508': iso_code: MZ '512': iso_code: OM '516': iso_code: NA '520': iso_code: NR '524': iso_code: NP '528': iso_code: NL '531': iso_code: CW '533': iso_code: AW '534': iso_code: SX '535': '540': iso_code: NC '548': iso_code: VU '554': iso_code: NZ '558': iso_code: NI '562': iso_code: NE '566': iso_code: NG '570': iso_code: NU '574': iso_code: NF '578': iso_code: 'NO' '580': iso_code: MP '583': iso_code: FM '584': iso_code: MH '585': iso_code: PW '586': iso_code: PK '591': iso_code: PA '598': iso_code: PG '600': iso_code: PY '604': iso_code: PE '608': iso_code: PH '612': iso_code: PN '616': iso_code: PL '620': iso_code: PT '624': iso_code: GW '626': iso_code: TL '630': iso_code: PR '634': iso_code: QA '638': '642': iso_code: RO '643': iso_code: RU '646': iso_code: RW '652': iso_code: BL '654': iso_code: SH '659': iso_code: KN '660': iso_code: AI '662': iso_code: LC '663': iso_code: MF '666': iso_code: PM '670': iso_code: VC '674': iso_code: SM '678': iso_code: ST '680': '682': iso_code: SA '686': iso_code: SN '688': iso_code: RS '690': iso_code: SC '694': iso_code: SL '702': iso_code: SG '703': iso_code: SK '704': iso_code: VN '705': iso_code: SI '706': iso_code: SO '710': iso_code: ZA '716': iso_code: ZW '724': iso_code: ES '728': iso_code: SS '729': iso_code: SD '732': iso_code: EH '740': iso_code: SR '744': iso_code: SJ '748': iso_code: SZ '752': iso_code: SE '756': iso_code: CH '760': iso_code: SY '762': iso_code: TJ '764': iso_code: TH '768': iso_code: TG '772': iso_code: TK '776': iso_code: TO '780': iso_code: TT '784': iso_code: AE '788': iso_code: TN '792': iso_code: TR '795': iso_code: TM '796': iso_code: TC '798': iso_code: TV '800': iso_code: UG '804': iso_code: UA '807': iso_code: MK '818': iso_code: EG '826': iso_code: GB '830': '831': iso_code: GG '832': iso_code: JE '833': iso_code: IM '834': iso_code: TZ '840': iso_code: US '850': iso_code: VG '854': iso_code: BF '858': iso_code: UY '860': iso_code: UZ '862': iso_code: VE '876': iso_code: WS '882': iso_code: WS '887': iso_code: YE '894': iso_code: ZM iso-0.2.2/data/iso-3166-1.yml0000644000175000017500000000173613473244614014641 0ustar samyaksamyakAD: AE: AF: AG: AI: AL: AM: AN: AO: AQ: AR: AS: AT: AU: AW: AX: AZ: BA: BB: BD: BE: BF: BG: BH: BI: BJ: BL: BM: BN: BO: BR: BS: BT: BV: BW: BY: BZ: CA: CC: CD: CF: CG: CH: CI: CK: CL: CM: CN: CO: CR: CU: CV: CW: CX: CY: CZ: DE: DJ: DK: DM: DO: DZ: EC: EE: EG: EH: ER: ES: ET: FI: FJ: FK: FM: FO: FR: GA: GB: GD: GE: GF: GG: GH: GI: GL: GM: GN: GP: GQ: GR: GS: GT: GU: GW: GY: HK: HM: HN: HR: HT: HU: ID: IE: IL: IM: IN: IO: IQ: IR: IS: IT: JE: JM: JO: JP: KE: KG: KH: KI: KM: KN: KP: KR: KW: KY: KZ: LA: LB: LC: LI: LK: LR: LS: LT: LU: LV: LY: MA: MC: MD: ME: MF: MG: MH: MK: ML: MM: MN: MO: MP: MQ: MR: MS: MT: MU: MV: MW: MX: MY: MZ: NA: NC: NE: NF: NG: NI: NL: 'NO': NP: NR: NU: NZ: OM: PA: PE: PF: PG: PH: PK: PL: PM: PN: PR: PS: PT: PW: PY: QA: RE: RO: RS: RU: RW: SA: SB: 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: iso-0.2.2/.rspec0000644000175000017500000000001013473244614012755 0ustar samyaksamyak--color iso-0.2.2/LICENSE.txt0000644000175000017500000000204413473244614013474 0ustar samyaksamyakCopyright (c) 2012 Christopher Dell Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. iso-0.2.2/Gemfile0000644000175000017500000000032413473244614013143 0ustar samyaksamyaksource "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 "guard-rspec" gem "localeapp" end iso-0.2.2/locales/0000755000175000017500000000000013473244614013273 5ustar samyaksamyakiso-0.2.2/locales/fr.yml0000644000175000017500000002327413473244614014435 0ustar samyaksamyakfr: vendor: iso: languages: aa: afar ab: abkhaze ae: avestique af: afrikaans ak: akan am: amharique an: Aragon ar: arabe as: assamais av: avar ay: aymara az: azerbaïdjanais ba: bashkir be: biélorusse bg: bulgare bh: Bihari bi: bichlamar bm: bambara bn: bengali bo: tibétain br: breton bs: bosniaque ca: catalan ce: tchétchène ch: chamorro co: corse cr: cris cs: tchèque cu: vieux slave cv: tchouvache cy: gallois da: danois de: allemand dv: divehi dz: dzongkha ee: agnelle el: grecque en: anglais eo: espéranto es: espagnol et: estonien eu: basque fa: perse ff: fulah fi: finlandais fj: fidjien fo: féroïen fr: français fy: frison ga: irlandais gd: gaélique gl: galicien gn: guarani gu: gujarati gv: manxois ha: haoussa he: hébreu hi: hindi ho: hiri hr: croate ht: haïtien hu: hongrois hy: arménien hz: herero ia: Interlingua id: indonésien ie: Interlingue ig: igbo ii: sichuan yi ik: inupiak io: ido is: islandais it: italien iu: inuktitut ja: japonais jv: javanais ka: géorgien kg: kongo ki: kikuyu kj: kuanyama kk: kazakh kl: kalaallisut km: khmer kn: Kannada ko: coréen kr: kanuri ks: cachemiri ku: kurde kv: komi kw: cornouaillais ky: kirghiz la: latin lb: luxembourgeois lg: gande li: limburgan ln: lingala lo: lao lt: lituanien lu: louba-katanga lv: letton mg: malgache mh: marshallais mi: maori mk: macédonien ml: malayalam mn: mongol mr: marathi ms: malais mt: maltais my: birman na: nauru nb: norvégien bokmål nd: ndebele du nord ne: népalais ng: ndonga nl: néerlandais nn: norvégien nynorsk 'no': norvégien nr: ndebele du sud nv: navajo ny: chichewa oc: occitan oj: ojibwa om: oromo or: oriya os: ossète pa: penjabi pi: pali pl: polonais ps: pachtou pt: portugais qu: quechua rm: romanche rn: rundi ro: roumain ru: russe rw: kinyarwanda sa: sanskrit sc: sarde sd: sindhi se: sami du nord sg: sango si: cinghalais sk: slovaque sl: slovène sm: samoan sn: shona so: somalien sq: albanais sr: serbe ss: swati st: sotho du sud su: soundanais sv: suédois sw: swahili ta: tamoul te: télougou tg: tadjik th: thaï ti: tigrinya tk: turkmène tl: tagalog tn: tswana to: tonga tr: turc ts: tsonga tt: tatar tw: twi ty: tahitien ug: ouïghoure uk: ukrainien ur: ourdou uz: ouzbek ve: venda vo: volapuk vi: vietnamien wa: wallonne wo: wolof xh: xhosa yi: yiddish yo: yorouba za: zhuang zh: chinois zu: zoulou regions: AF: Afghanistan AX: Aland Islands AL: Albanie DZ: Algérie AS: Samoa américaines AD: Andorre AO: Angola AI: Anguilla AQ: Antarctique AG: Antigua-et-Barbuda AR: Argentine AM: Arménie AW: Aruba AU: Australie AT: Autriche AZ: Azerbaïdjan BS: Bahamas BH: Bahreïn BD: Bangladesh BB: Barbade BY: Belarus BE: Belgique BZ: Belize BJ: Bénin BM: Bermudes BT: Bhoutan BO: Bolivie BA: Bosnie-Herzégovine BW: Botswana BV: Bouvet Island BR: Brésil IO: British Indian Ocean Territory BN: Brunei Darussalam BG: Bulgarie BF: Burkina Faso BI: Burundi KH: Cambodge CM: Cameroun CA: Canada CV: Cap-Vert CW: Curaçao KY: Îles Caïmans CF: République centrafricaine TD: Tchad CL: Chili CN: Chine CX: Christmas Island CC: Cocos (Keeling) CO: Colombie KM: Comores CD: Congo, la République démocratique du CG: Congo CK: Îles Cook CR: Costa Rica CI: Côte d'Ivoire HR: Croatie CU: Cuba CY: Chypre CZ: République tchèque DK: Danemark DJ: Djibouti DM: Dominique DO: République Dominicaine EC: Equateur EG: Egypte SV: El Salvador GQ: Guinée équatoriale ER: L'Erythrée EE: Estonie ET: Ethiopie FK: Îles Falkland (Malvinas) FO: Îles Féroé FJ: Fiji FI: Finlande FR: France GF: Guyane française PF: Polynésie française TF: Terres australes françaises GA: Gabon GM: Gambie GE: Géorgie DE: Allemagne GH: Ghana GI: Gibraltar GR: Grèce GL: Groenland GD: Grenade GP: Guadeloupe GU: Guam GT: Guatemala GG: Guernesey GN: Guinée GW: Guinée-Bissau GY: Guyane HT: Haïti HM: L'île Heard et les îles McDonald HN: Honduras HK: Hong-Kong HU: Hongrie IS: Islande IN: Inde ID: Indonésie IR: Iran (République islamique d ') IQ: Irak IE: Irlande IM: Ile de Man IL: Israël IT: Italie JM: Jamaïque JP: Japon JE: Jersey JO: Jordanie KZ: Kazakhstan KE: Kenya KI: Kiribati KP: Corée, République populaire démocratique de KR: Corée, République de KW: Koweit KG: Kirghizistan LA: République démocratique populaire lao République LV: Lettonie LB: Liban LS: Lesotho LR: Libéria LY: Jamahiriya arabe libyenne LI: Liechtenstein LT: Lituanie LU: Luxembourg MO: Macao MK: Macédoine, ex-République yougoslave de MG: Madagascar MW: Malawi MY: Malaisie MV: Maldives ML: Mali MT: Malte MH: Îles Marshall MQ: Martinique MR: Mauritanie MU: Ile Maurice YT: Mayotte MX: Mexique FM: Micronésie, États fédérés de MD: Moldova, République de MC: Monaco MN: Mongolie ME: Monténégro MS: Montserrat MA: Maroc MZ: Mozambique MM: Myanmar NA: Namibie NR: Nauru NP: Népal NL: Pays-Bas AN: Antilles Néerlandaises NC: Nouvelle-Calédonie NZ: Nouvelle-Zélande NI: Nicaragua NE: Niger NG: Nigeria NU: Niue NF: Norfolk Island MP: Îles Mariannes du Nord 'NO': Norvège OM: Oman PK: Pakistan PW: Palau PS: Territoire Palestinien Occupé, PA: Panama PG: Papouasie-Nouvelle-Guinée PY: Paraguay PE: Pérou PH: Philippines PN: Pitcairn PL: Pologne PT: Portugal PR: Puerto Rico QA: Qatar RE: Réunion RO: Roumanie RU: Fédération de Russie RW: Rwanda BL: Saint-Barthélemy SH: Sainte-Hélène KN: Saint-Kitts-et-Nevis LC: Sainte-Lucie MF: Saint-Martin (partie française) PM: Saint-Pierre-et-Miquelon VC: Saint-Vincent-et-les Grenadines WS: Samoa SM: Saint-Marin ST: Sao Tomé-et-Principe SA: Arabie Saoudite SN: Sénégal RS: Serbie SC: Seychelles SL: Sierra Leone SG: Singapour SK: Slovaquie SI: Slovénie SB: Îles Salomon SO: Somalie ZA: Afrique du Sud GS: Géorgie du Sud et les îles Sandwich du Sud ES: Espagne LK: Sri Lanka SD: Soudan SR: Suriname SJ: Svalbard et Jan Mayen SZ: Swaziland SE: Suède CH: Suisse SY: République arabe syrienne TW: Taiwan TJ: Tadjikistan TZ: Tanzanie, République-Unie de TH: Thaïlande TL: Timor-Leste TG: Togo TK: Tokelau TO: Tonga TT: Trinité-et-Tobago TN: Tunisie TR: Turquie TM: Turkménistan TC: Îles Turques et Caïques TV: Tuvalu UG: Ouganda UA: Ukraine AE: Émirats arabes unis GB: Royaume-Uni US: États-Unis UM: États-Unis Îles Mineures Éloignées UY: Uruguay UZ: Ouzbékistan VU: Vanuatu VA: Cité du Vatican (Saint-Siège) VE: Venezuela VN: Viêt-Nam VG: Virgin Islands (British) VI: Virgin Islands (US) WF: Wallis et Futuna EH: Sahara Occidental YE: Yémen ZM: Zambie ZW: Zimbabwe iso-0.2.2/locales/en.yml0000644000175000017500000002507313473244614014427 0ustar samyaksamyaken: vendor: iso: languages: aa: Afar ab: Abkhazian ae: Avestan af: Afrikaans ak: Akan am: Amharic an: Aragonese ar: Arabic as: Assamese av: Avaric ay: Aymara az: Azerbaijani ba: Bashkir be: Belarusian bg: Bulgarian bh: Bihari bi: Bislama bm: Bambara bn: Bengali bo: Tibetan br: Breton bs: Bosnian ca: Catalan ce: Chechen ch: Chamorro co: Corsican cr: Cree cs: Czech cu: Church Slavic cv: Chuvash cy: Welsh da: Danish de: German dv: Divehi dz: Dzongkha ee: Ewe el: Greek en: English eo: Esperanto es: Spanish et: Estonian eu: Basque fa: Persian ff: Fulah fi: Finnish fj: Fijian fo: Faroese fr: French fy: Western Frisian ga: Irish gd: Gaelic gl: Galician gn: Guarani gu: Gujarati gv: Manx ha: Hausa he: Hebrew hi: Hindi ho: Hiri Motu hr: Croatian ht: Haitian hu: Hungarian hy: Armenian hz: Herero ia: Interlingua id: Indonesian ie: Interlingue ig: Igbo ii: Sichuan Yi ik: Inupiaq io: Ido is: Icelandic it: Italian iu: Inuktitut ja: Japanese jv: Javanese ka: Georgian kg: Kongo ki: Kikuyu kj: Kuanyama kk: Kazakh kl: Kalaallisut km: Central Khmer kn: Kannada ko: Korean kr: Kanuri ks: Kashmiri ku: Kurdish kv: Komi kw: Cornish ky: Kirghiz la: Latin lb: Luxembourgish lg: Ganda li: Limburgan ln: Lingala lo: Lao lt: Lithuanian lu: Luba-Katanga lv: Latvian mg: Malagasy mh: Marshallese mi: Maori mk: Macedonian ml: Malayalam mn: Mongolian mr: Marathi ms: Malay mt: Maltese my: Burmese na: Nauru nb: Norwegian Bokmål nd: North Ndebele ne: Nepali ng: Ndonga nl: Dutch nn: Norwegian Nynorsk 'no': Norwegian nr: South Ndebele nv: Navajo ny: Chichewa oc: Occitan oj: Ojibwa om: Oromo or: Oriya os: Ossetian pa: Panjabi pi: Pali pl: Polish ps: Pushto pt: Portuguese qu: Quechua rm: Romansh rn: Rundi ro: Romanian ru: Russian rw: Kinyarwanda sa: Sanskrit sc: Sardinian sd: Sindhi se: Northern Sami sg: Sango si: Sinhala sk: Slovak sl: Slovenian sm: Samoan sn: Shona so: Somali sq: Albanian sr: Serbian ss: Swati st: Sotho, Southern su: Sundanese sv: Swedish sw: Swahili ta: Tamil te: Telugu tg: Tajik th: Thai ti: Tigrinya tk: Turkmen tl: Tagalog tn: Tswana to: Tonga tr: Turkish ts: Tsonga tt: Tatar tw: Twi ty: Tahitian ug: Uighur uk: Ukrainian ur: Urdu uz: Uzbek ve: Venda vo: Volapuk vi: Vietnamese wa: Walloon wo: Wolof xh: Xhosa yi: Yiddish yo: Yoruba za: Zhuang zh: Chinese zu: Zulu regions: '002': Africa '005': South America '009': Oceania '011': Western Africa '013': Central America '014': Eastern Africa '015': Northern Africa '017': Middle Africa '018': Southern Africa '019': Americas '021': Northern Americab '029': Caribbean '030': Eastern Asia '034': Southern Asia '035': South-Eastern Asia '039': Southern Europe '053': Australia and New Zealand '054': Melanesia '057': Micronesia '061': Polynesia '142': Asia '143': Central Asia '145': Western Asia '150': Europe '151': Eastern Europe '154': Northern Europe '155': Western Europe '248': Land Islands '344': China, Hong Kong Special Administrative Region '419': Latin America and the Caribbean '446': China, Macao Special Administrative Region '531': Curaçao '535': Bonaire, Saint Eustatius and Saba '638': Runion '680': Sark '830': Channel Islands AF: Afghanistan AX: Aland Islands AL: Albania DZ: Algeria AS: American Samoa AD: Andorra AO: Angola AI: Anguilla AQ: Antarctica AG: Antigua and Barbuda AR: Argentina AM: Armenia AW: Aruba AU: Australia AT: Austria AZ: Azerbaijan BS: Bahamas BH: Bahrain BD: Bangladesh BB: Barbados BY: Belarus BE: Belgium BZ: Belize BJ: Benin BM: Bermuda BT: Bhutan BO: Bolivia BA: Bosnia and Herzegovina BW: Botswana BV: Bouvet Island BR: Brazil IO: British Indian Ocean Territory BN: Brunei Darussalam BG: Bulgaria BF: Burkina Faso BI: Burundi KH: Cambodia CM: Cameroon CA: Canada CV: Cape Verde CW: Curaçao KY: Cayman Islands CF: Central African Republic TD: Chad CL: Chile CN: China CX: Christmas Island CC: Cocos (Keeling) Islands CO: Colombia KM: Comoros CD: Congo, the Democratic Republic of the CG: Congo CK: Cook Islands CR: Costa Rica CI: Cote D'Ivoire HR: Croatia CU: Cuba CY: Cyprus CZ: Czech Republic DK: Denmark DJ: Djibouti DM: Dominica DO: Dominican Republic EC: Ecuador EG: Egypt SV: El Salvador GQ: Equatorial Guinea ER: Eritrea EE: Estonia ET: Ethiopia FK: Falkland Islands (Malvinas) FO: Faroe Islands FJ: Fiji FI: Finland FR: France GF: French Guiana PF: French Polynesia TF: French Southern Territories GA: Gabon GM: Gambia GE: Georgia DE: Germany GH: Ghana GI: Gibraltar GR: Greece GL: Greenland GD: Grenada GP: Guadeloupe GU: Guam GT: Guatemala GG: Guernsey GN: Guinea GW: Guinea-Bissau GY: Guyana HT: Haiti HM: Heard Island and Mcdonald Islands HN: Honduras HK: Hong Kong HU: Hungary IS: Iceland IN: India ID: Indonesia IR: Iran (Islamic Republic of) IQ: Iraq IE: Ireland IM: Isle of Man IL: Israel IT: Italy JM: Jamaica JP: Japan JE: Jersey JO: Jordan KZ: Kazakhstan KE: Kenya KI: Kiribati KP: Korea, Democratic People'S Republic of KR: Korea, Republic of KW: Kuwait KG: Kyrgyzstan LA: Lao People'S Democratic Republic LV: Latvia LB: Lebanon LS: Lesotho LR: Liberia LY: Libyan Arab Jamahiriya LI: Liechtenstein LT: Lithuania LU: Luxembourg MO: Macao MK: Macedonia, the Former Yugoslav Republic of MG: Madagascar MW: Malawi MY: Malaysia MV: Maldives ML: Mali MT: Malta MH: Marshall Islands MQ: Martinique MR: Mauritania MU: Mauritius YT: Mayotte MX: Mexico FM: Micronesia, Federated States of MD: Moldova, Republic of MC: Monaco MN: Mongolia ME: Montenegro MS: Montserrat MA: Morocco MZ: Mozambique MM: Myanmar NA: Namibia NR: Nauru NP: Nepal NL: Netherlands AN: Netherlands Antilles NC: New Caledonia NZ: New Zealand NI: Nicaragua NE: Niger NG: Nigeria NU: Niue NF: Norfolk Island MP: Northern Mariana Islands 'NO': Norway OM: Oman PK: Pakistan PW: Palau PS: Palestinian Territory, Occupied PA: Panama PG: Papua New Guinea PY: Paraguay PE: Peru PH: Philippines PN: Pitcairn PL: Poland PT: Portugal PR: Puerto Rico QA: Qatar RE: Reunion RO: Romania RU: Russian Federation RW: Rwanda BL: Saint Barthelemy SH: Saint Helena KN: Saint Kitts and Nevis LC: Saint Lucia MF: Saint Martin (French Part) PM: Saint Pierre and Miquelon VC: Saint Vincent and the Grenadines WS: Samoa SM: San Marino ST: Sao Tome and Principe SA: Saudi Arabia SN: Senegal RS: Serbia SC: Seychelles SL: Sierra Leone SG: Singapore SK: Slovakia SI: Slovenia SB: Solomon Islands SO: Somalia ZA: South Africa GS: South Georgia and the South Sandwich Islands ES: Spain LK: Sri Lanka SD: Sudan SR: Suriname SJ: Svalbard and Jan Mayen SZ: Swaziland SE: Sweden CH: Switzerland SY: Syrian Arab Republic TW: Taiwan TJ: Tajikistan TZ: Tanzania, United Republic of TH: Thailand TL: Timor-Leste TG: Togo TK: Tokelau TO: Tonga TT: Trinidad and Tobago TN: Tunisia TR: Turkey TM: Turkmenistan TC: Turks and Caicos Islands TV: Tuvalu UG: Uganda UA: Ukraine AE: United Arab Emirates GB: United Kingdom US: United States UM: United States Minor Outlying Islands UY: Uruguay UZ: Uzbekistan VU: Vanuatu VA: Vatican City State (Holy See) VE: Venezuela VN: Vietnam VG: Virgin Islands (British) VI: Virgin Islands (U.S.) WF: Wallis and Futuna EH: Western Sahara YE: Yemen ZM: Zambia ZW: Zimbabwe iso-0.2.2/README.md0000644000175000017500000000330213473244614013126 0ustar samyaksamyak# iso [![Build Status](https://secure.travis-ci.org/tigrish/iso.png)](http://travis-ci.org/tigrish/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. ## Languages Languages are defined by **ISO 639-1 alpha-2**; that is the 2 letter lowercase language code. These have been augmented to contain the plural rule names and the language's direction. > ISO::Language.find('ru') => # ## Regions Regions are defined by **ISO 3166-1**; that is the 2 letter uppercase region code. > ISO::Region.find('MX') => # Regions can also be defined by the **UN M49** standard; that is the 3 digit region code. > ISO::UN::Region.find('419') => # ## Tags The combination of a language and a region is called a Tag : > ISO::Tag.new('pt-BR') => #, @region=#> You can check if a Tag is valid like so : > ISO::Tag.new('pt-BR').valid? => true > ISO::Tag.new('lolcat').valid? => false ## I18n Language and region names are internationalized - [contribute to the I18n project directly on Locale](http://www.localeapp.com/projects/1763) for any changes. iso-0.2.2/Rakefile0000644000175000017500000000240713473244614013321 0ustar samyaksamyak# encoding: utf-8 require 'rubygems' require 'bundler' begin Bundler.setup(:default, :development) rescue Bundler::BundlerError => e $stderr.puts e.message $stderr.puts "Run `bundle install` to install missing gems" exit e.status_code end require 'rake' require 'jeweler' Jeweler::Tasks.new do |gem| # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options gem.name = "iso" gem.homepage = "http://github.com/tigrish/iso" gem.license = "MIT" 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"] # dependencies defined in Gemfile end Jeweler::RubygemsDotOrgTasks.new require 'rspec/core' require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) do |spec| spec.pattern = FileList['spec/**/*_spec.rb'] end RSpec::Core::RakeTask.new(:rcov) do |spec| spec.pattern = 'spec/**/*_spec.rb' spec.rcov = true end task :default => :spec require 'rdoc/task' Rake::RDocTask.new do |rdoc| version = File.exist?('VERSION') ? File.read('VERSION') : "" rdoc.rdoc_dir = 'rdoc' rdoc.title = "iso #{version}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') end iso-0.2.2/Gemfile.lock0000644000175000017500000000220313473244614014070 0ustar samyaksamyakGEM 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) 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.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) PLATFORMS ruby DEPENDENCIES bundler (~> 1.2.0) guard-rspec i18n jeweler (~> 1.8.4) localeapp rdoc (~> 3.12) rspec (~> 2.8.0) iso-0.2.2/iso.gemspec0000644000175000017500000000520313473244614014010 0ustar samyaksamyak# Generated by jeweler # 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 Gem::Specification.new do |s| s.name = "iso" s.version = "0.2.2" 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.extra_rdoc_files = [ "LICENSE.txt", "README.md" ] s.files = [ ".document", ".rspec", "Gemfile", "Gemfile.lock", "Guardfile", "LICENSE.txt", "README.md", "Rakefile", "VERSION", "data/iso-3166-1.yml", "data/iso-639-1.yml", "data/un-m49.yml", "iso.gemspec", "lib/iso.rb", "lib/iso/language.rb", "lib/iso/region.rb", "lib/iso/subtag.rb", "lib/iso/tag.rb", "lib/iso/un/region.rb", "locales/en.yml", "locales/fr.yml", "spec/fixtures/base.yml", "spec/lib/iso/language_spec.rb", "spec/lib/iso/region_spec.rb", "spec/lib/iso/subtag_spec.rb", "spec/lib/iso/tag_spec.rb", "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" 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, [">= 0"]) s.add_development_dependency(%q, ["~> 2.8.0"]) s.add_development_dependency(%q, ["~> 3.12"]) s.add_development_dependency(%q, ["~> 1.2.0"]) s.add_development_dependency(%q, ["~> 1.8.4"]) s.add_development_dependency(%q, [">= 0"]) s.add_development_dependency(%q, [">= 0"]) else s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, ["~> 2.8.0"]) s.add_dependency(%q, ["~> 3.12"]) s.add_dependency(%q, ["~> 1.2.0"]) s.add_dependency(%q, ["~> 1.8.4"]) s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, [">= 0"]) end else s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, ["~> 2.8.0"]) s.add_dependency(%q, ["~> 3.12"]) s.add_dependency(%q, ["~> 1.2.0"]) s.add_dependency(%q, ["~> 1.8.4"]) s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, [">= 0"]) end end