simpleidn 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3615b258493fcee8e713034665e394f297ad481d
4
+ data.tar.gz: 6dfae265394af03eef4b87fe2eabba1c751d6192
5
+ SHA512:
6
+ metadata.gz: 4fbb98432795f655e850c43fe3001171bda768901e134fb2eb3f17538f4eb00898c18565d83c46b9f6a619039aa89ac1bc02a86824de30ba65d1de2b280436c6
7
+ data.tar.gz: 9ec44eb275d66b009f9af1a394d5d6d6531bad824073fbb70544f67d6c5b76ae5b6e3cdbf861bccd008c8a4154f3187ac1f8d031a53499613a0d98da3543033c
Binary file
data.tar.gz.sig CHANGED
Binary file
data/LICENCE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2011 Morten Møller Riis
3
+ Copyright (c) 2011-2013 Morten Møller Riis
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -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, 1.9.2 and 1.9.3.
7
+ This gem works with both Ruby 1.8.7, 1.9.2, 1.9.3 and 2.0.
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.4') do |p|
6
+ Echoe.new('simpleidn', '0.0.5') 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"
@@ -222,9 +222,9 @@ module SimpleIDN
222
222
  # == Example
223
223
  # SimpleIDN.to_ascii("møllerriis.com")
224
224
  # => "xn--mllerriis-l8a.com"
225
- def to_ascii(domain)
226
- return if domain.nil?
227
- domain_array = domain.split(".")
225
+ def to_ascii(domain)
226
+ domain_array = domain.split(".") rescue []
227
+ return domain if domain_array.length == 0
228
228
  out = []
229
229
  i = 0
230
230
  while i < domain_array.length
@@ -240,8 +240,8 @@ module SimpleIDN
240
240
  # SimpleIDN.to_unicode("xn--mllerriis-l8a.com")
241
241
  # => "møllerriis.com"
242
242
  def to_unicode(domain)
243
- return if domain.nil?
244
- domain_array = domain.split(".")
243
+ domain_array = domain.split(".") rescue []
244
+ return domain if domain_array.length == 0
245
245
  out = []
246
246
  i = 0
247
247
  while i < domain_array.length
@@ -2,30 +2,21 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "simpleidn"
5
- s.version = "0.0.4"
5
+ s.version = "0.0.5"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["Morten M\303\270ller Riis"]
8
+ s.authors = ["Morten M\u{f8}ller Riis"]
9
9
  s.cert_chain = ["/Users/mmr/gem-public_cert.pem"]
10
- s.date = "2012-03-15"
10
+ s.date = "2013-11-22"
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"]
14
14
  s.files = ["LICENCE", "Manifest", "README.rdoc", "Rakefile", "lib/simpleidn.rb", "simpleidn.gemspec", "spec/idn.rb", "spec/test_vectors.rb"]
15
15
  s.homepage = "http://github.com/mmriis/simpleidn"
16
- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Simpleidn", "--main", "README.rdoc"]
16
+ s.rdoc_options = ["--line-numbers", "--title", "Simpleidn", "--main", "README.rdoc"]
17
17
  s.require_paths = ["lib"]
18
18
  s.rubyforge_project = "simpleidn"
19
- s.rubygems_version = "1.8.11"
19
+ s.rubygems_version = "2.0.3"
20
20
  s.signing_key = "/Users/mmr/gem-private_key.pem"
21
21
  s.summary = "This gem allows easy conversion from punycode ACE strings to unicode UTF-8 strings and visa versa."
22
-
23
- if s.respond_to? :specification_version then
24
- s.specification_version = 3
25
-
26
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
27
- else
28
- end
29
- else
30
- end
31
22
  end
@@ -22,6 +22,11 @@ describe "SimpleIDN" do
22
22
  it "should return nil for nil" do
23
23
  SimpleIDN.to_unicode(nil).should be_nil
24
24
  end
25
+
26
+ it "should return . if only . given" do
27
+ # https://github.com/mmriis/simpleidn/issues/3
28
+ SimpleIDN.to_unicode('.').should == '.'
29
+ end
25
30
 
26
31
  end
27
32
 
@@ -43,5 +48,10 @@ describe "SimpleIDN" do
43
48
  it "should return nil for nil" do
44
49
  SimpleIDN.to_ascii(nil).should be_nil
45
50
  end
51
+
52
+ it "should return . if only . given" do
53
+ # https://github.com/mmriis/simpleidn/issues/3
54
+ SimpleIDN.to_ascii('.').should == '.'
55
+ end
46
56
  end
47
57
  end
metadata CHANGED
@@ -1,24 +1,18 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: simpleidn
3
- version: !ruby/object:Gem::Version
4
- hash: 23
5
- prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 4
10
- version: 0.0.4
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.5
11
5
  platform: ruby
12
- authors:
13
- - "Morten M\xC3\xB8ller Riis"
6
+ authors:
7
+ - Morten Møller Riis
14
8
  autorequire:
15
9
  bindir: bin
16
- cert_chain:
10
+ cert_chain:
17
11
  - |
18
12
  -----BEGIN CERTIFICATE-----
19
- MIIDRDCCAiygAwIBAgIBADANBgkqhkiG9w0BAQUFADBIMRowGAYDVQQDDBFtb3J0
13
+ MIIDRDCCAiygAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRowGAYDVQQDDBFtb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/FE/AibLwf0nuX9V7pJoCkOucxAyMilWn2XaG
26
+ almQX9JlmoyHAcdQmRRd3O5QCPHu7wEwttlDlwYnNVu1QEGsF6qjCwtNQUkDKUjo
27
+ kMsFfnKSBd9EmbGhivRVcgeiz835tol6Z5I8xI6ABvwdHEa/C2QFf8Pz+ZQC+pZF
28
+ aKWJmlgFtTUWmXA2aYT802RYu2jikOyqaJze+sjolJ+nFpIud98txsKCDcV+idux
29
+ 8FNpJsGlpnCc0gEItcONQYdrwnWmvfPIOMCnErdfQUo06P5qhoN32NrOZm+mZ3B9
30
+ /yzabYiM9yPtlNlOoPX8Mgekm3mxAsI2
37
31
  -----END CERTIFICATE-----
38
-
39
- date: 2012-03-15 00:00:00 Z
32
+ date: 2013-11-22 00:00:00.000000000 Z
40
33
  dependencies: []
41
-
42
- description: This gem allows easy conversion from punycode ACE strings to unicode UTF-8 strings and visa versa.
34
+ description: This gem allows easy conversion from punycode ACE strings to unicode
35
+ UTF-8 strings and visa versa.
43
36
  email: mortenmoellerriis _AT_ gmail.com
44
37
  executables: []
45
-
46
38
  extensions: []
47
-
48
- extra_rdoc_files:
39
+ extra_rdoc_files:
49
40
  - README.rdoc
50
41
  - lib/simpleidn.rb
51
- files:
42
+ files:
52
43
  - LICENCE
53
44
  - Manifest
54
45
  - README.rdoc
@@ -59,42 +50,31 @@ files:
59
50
  - spec/test_vectors.rb
60
51
  homepage: http://github.com/mmriis/simpleidn
61
52
  licenses: []
62
-
53
+ metadata: {}
63
54
  post_install_message:
64
- rdoc_options:
55
+ rdoc_options:
65
56
  - --line-numbers
66
- - --inline-source
67
57
  - --title
68
58
  - Simpleidn
69
59
  - --main
70
60
  - README.rdoc
71
- require_paths:
61
+ require_paths:
72
62
  - lib
73
- required_ruby_version: !ruby/object:Gem::Requirement
74
- none: false
75
- requirements:
76
- - - ">="
77
- - !ruby/object:Gem::Version
78
- hash: 3
79
- segments:
80
- - 0
81
- version: "0"
82
- required_rubygems_version: !ruby/object:Gem::Requirement
83
- none: false
84
- requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- hash: 11
88
- segments:
89
- - 1
90
- - 2
91
- version: "1.2"
63
+ required_ruby_version: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - '>='
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ required_rubygems_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - '>='
71
+ - !ruby/object:Gem::Version
72
+ version: '1.2'
92
73
  requirements: []
93
-
94
74
  rubyforge_project: simpleidn
95
- rubygems_version: 1.8.11
75
+ rubygems_version: 2.0.3
96
76
  signing_key:
97
- specification_version: 3
98
- summary: This gem allows easy conversion from punycode ACE strings to unicode UTF-8 strings and visa versa.
77
+ specification_version: 4
78
+ summary: This gem allows easy conversion from punycode ACE strings to unicode UTF-8
79
+ strings and visa versa.
99
80
  test_files: []
100
-
metadata.gz.sig CHANGED
Binary file