alexrabarts-tld 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/History.txt +4 -0
  2. data/lib/tld/tld.rb +4 -4
  3. data/tld.gemspec +2 -2
  4. metadata +4 -2
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.2.1 / 2009-02-27
2
+
3
+ * Bugfix: original strings left intact
4
+
1
5
  === 0.2.0 / 2008-11-25
2
6
 
3
7
  * ISO 3166-1 alpha-3 country codes made available
data/lib/tld/tld.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'singleton'
2
2
 
3
3
  class TLD
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
 
6
6
  MAP = {
7
7
  :ac => 'sh',
@@ -71,8 +71,8 @@ class TLD
71
71
 
72
72
  alias_method :currency, :main_currency
73
73
 
74
- def find(str)
75
- str.downcase!
74
+ def find(orig)
75
+ str = orig.downcase
76
76
  str.sub!(/^\w+:\/\//, '') # Strip protocol
77
77
  str = str.split('/').first if str.match(/\//) # Throw away anything after a slash
78
78
  str = str.split('.').last if str.match(/\./) # Take the last one of foo.bar.baz
@@ -83,4 +83,4 @@ class TLD
83
83
  instance
84
84
  end
85
85
  end
86
- end
86
+ end
data/tld.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{tld}
5
- s.version = "0.2.0"
5
+ s.version = "0.2.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Alex Rabarts"]
9
- s.date = %q{2008-11-28}
9
+ s.date = %q{2009-02-27}
10
10
  s.description = %q{Provides meta information for Internet Top Level Domains (TLDs) such as a descriptive name, associated currency code and the TLD category.}
11
11
  s.email = ["alexrabarts@gmail.com"]
12
12
  s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alexrabarts-tld
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Rabarts
@@ -9,11 +9,12 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-11-28 00:00:00 -08:00
12
+ date: 2009-02-27 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: alexrabarts-iso_country_codes
17
+ type: :runtime
17
18
  version_requirement:
18
19
  version_requirements: !ruby/object:Gem::Requirement
19
20
  requirements:
@@ -23,6 +24,7 @@ dependencies:
23
24
  version:
24
25
  - !ruby/object:Gem::Dependency
25
26
  name: hoe
27
+ type: :development
26
28
  version_requirement:
27
29
  version_requirements: !ruby/object:Gem::Requirement
28
30
  requirements: