simpleidn 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +3 -1
  3. data/lib/simpleidn.rb +3 -3
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6282e8801d789394c2e062b0bcab6f1e83807b23
4
- data.tar.gz: 98036f912ff1374c176827c36a316295e6c852c3
3
+ metadata.gz: bbff0e8f2c02135040f6ce79aa7400f1fb4e4329
4
+ data.tar.gz: 755dfe2f0c621b57080bea4c5793816e92ced4c9
5
5
  SHA512:
6
- metadata.gz: fcd5128a0e2d19f485f78aa44b29c9901e63fb14671d1b20cea62412bf374d0820bda175537a9127233e07ec5bc931eaa7b6b4049bac627456c728db0ba4eab7
7
- data.tar.gz: 702f08322b85fabcd5210d10b021f42946003a00cb787843f32f8c820dc92bf6183c48f345c88d5f6d8741048c95d330f5fe2f0a2411ab714b50a1936b9bcce6
6
+ metadata.gz: 670cbaa7ada6f97efcfa5170e64cde78d5d43ae054ab32fec1bd77c669f32888c69f4af54d8109ae6ce29afc1282b2e325174f2d14aee6960991c13498416696
7
+ data.tar.gz: 023b37009fe2128e99da467cb9771a195dcb8523430b7008c4417450e8dc1a9cef53caa1e2d37441e54ab4c6a2c4f71f28746e86cef24c059030b7e9f241efc6
@@ -34,4 +34,6 @@ http://www.gnu.org/software/libidn/draft-josefsson-idn-test-vectors.html
34
34
 
35
35
  == Known issues
36
36
 
37
- None at the moment, but please report any issues!
37
+ Does not preserve uppercase. So if, for some reason, you use uppercase characters (eg. Ø instead of ø), please take note of that.
38
+
39
+ Please report any issues!
@@ -18,7 +18,7 @@ end
18
18
 
19
19
  module SimpleIDN
20
20
 
21
- VERSION = "0.0.6"
21
+ VERSION = "0.0.7"
22
22
 
23
23
  # The ConversionError is raised when an error occurs during a
24
24
  # Punycode <-> Unicode conversion.
@@ -151,7 +151,7 @@ module SimpleIDN
151
151
 
152
152
  # Main encode function
153
153
  def encode(input)
154
- input = input.downcase.unpack("U*")
154
+ input = input.unpack("U*")
155
155
  output = []
156
156
 
157
157
  # Initialize the state:
@@ -235,7 +235,7 @@ module SimpleIDN
235
235
  i = 0
236
236
  while i < domain_array.length
237
237
  s = domain_array[i]
238
- out << (s =~ /[^A-Z0-9\-*_]/i ? "xn--" + Punycode.encode(s) : s)
238
+ out << (s =~ /[^A-Z0-9@\-*_]/i ? "xn--" + Punycode.encode(s) : s)
239
239
  i += 1
240
240
  end
241
241
  return out.join(".")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simpleidn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Morten Møller Riis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-15 00:00:00.000000000 Z
11
+ date: 2016-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler