simpleidn 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/README.rdoc CHANGED
@@ -4,7 +4,7 @@ This gem allows easy conversion from punycode ACE strings to unicode UTF-8 strin
4
4
 
5
5
  The implementation is heavily based on the RFC3492 C example implementation but simplified since it does not preserve case.
6
6
 
7
- This gem works with both Ruby 1.8.7 and 1.9.2.
7
+ This gem works with both Ruby 1.8.7, 1.9.2 and 1.9.3.
8
8
 
9
9
  * http://www.whatastruggle.com
10
10
 
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rubygems'
3
3
  require 'rake'
4
4
  require 'echoe'
5
5
 
6
- Echoe.new('simpleidn', '0.0.3') do |p|
6
+ Echoe.new('simpleidn', '0.0.4') do |p|
7
7
  p.description = "This gem allows easy conversion from punycode ACE strings to unicode UTF-8 strings and visa versa."
8
8
  p.url = "http://github.com/mmriis/simpleidn"
9
9
  p.author = "Morten Møller Riis"
data/lib/simpleidn.rb CHANGED
@@ -229,7 +229,7 @@ module SimpleIDN
229
229
  i = 0
230
230
  while i < domain_array.length
231
231
  s = domain_array[i]
232
- out << (s =~ /[^A-Z0-9\-*]/i ? "xn--" + Punycode.encode(s) : s)
232
+ out << (s =~ /[^A-Z0-9\-*_]/i ? "xn--" + Punycode.encode(s) : s)
233
233
  i += 1
234
234
  end
235
235
  return out.join(".")
data/simpleidn.gemspec CHANGED
@@ -2,12 +2,12 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "simpleidn"
5
- s.version = "0.0.3"
5
+ s.version = "0.0.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Morten M\303\270ller Riis"]
9
9
  s.cert_chain = ["/Users/mmr/gem-public_cert.pem"]
10
- s.date = "2011-10-24"
10
+ s.date = "2012-03-15"
11
11
  s.description = "This gem allows easy conversion from punycode ACE strings to unicode UTF-8 strings and visa versa."
12
12
  s.email = "mortenmoellerriis _AT_ gmail.com"
13
13
  s.extra_rdoc_files = ["README.rdoc", "lib/simpleidn.rb"]
data/spec/idn.rb CHANGED
@@ -14,6 +14,10 @@ describe "SimpleIDN" do
14
14
  it "should respect * and not try to decode it" do
15
15
  SimpleIDN.to_unicode("*.xn--mllerriis-l8a.com").should == "*.møllerriis.com"
16
16
  end
17
+
18
+ it "should respect leading _ and not try to encode it" do
19
+ SimpleIDN.to_unicode("_something.xn--mllerriis-l8a.com").should == "_something.møllerriis.com"
20
+ end
17
21
 
18
22
  it "should return nil for nil" do
19
23
  SimpleIDN.to_unicode(nil).should be_nil
@@ -32,6 +36,9 @@ describe "SimpleIDN" do
32
36
  SimpleIDN.to_ascii("*.hello.com").should == "*.hello.com"
33
37
  end
34
38
 
39
+ it "should respect leading _ and not try to encode it" do
40
+ SimpleIDN.to_ascii("_something.example.org").should == "_something.example.org"
41
+ end
35
42
 
36
43
  it "should return nil for nil" do
37
44
  SimpleIDN.to_ascii(nil).should be_nil
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simpleidn
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Morten M\xC3\xB8ller Riis"
@@ -36,7 +36,7 @@ cert_chain:
36
36
  Pv5fihHPGcYA3voHCFu2/KGlBiF8TBQ6
37
37
  -----END CERTIFICATE-----
38
38
 
39
- date: 2011-10-24 00:00:00 Z
39
+ date: 2012-03-15 00:00:00 Z
40
40
  dependencies: []
41
41
 
42
42
  description: This gem allows easy conversion from punycode ACE strings to unicode UTF-8 strings and visa versa.
metadata.gz.sig CHANGED
Binary file