rubenfonseca-puny 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION.yml +2 -2
  2. data/lib/puny.rb +2 -2
  3. data/test/puny_test.rb +4 -0
  4. metadata +2 -2
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 1
3
- :minor: 0
4
- :patch: 1
3
+ :minor: 1
4
+ :patch: 0
data/lib/puny.rb CHANGED
@@ -36,7 +36,7 @@ class Puny
36
36
  # puts puny.url
37
37
  #
38
38
  def self.shorten(url)
39
- url = TO_PUNY << '?url=' << CGI.escape(url)
39
+ url = TO_PUNY + '?url=' + CGI.escape(url)
40
40
  _process_response(open(url))
41
41
  end
42
42
 
@@ -51,7 +51,7 @@ class Puny
51
51
  # puts Puny.expand('http://b.ot.sl.pt')
52
52
  #
53
53
  def self.expand(url)
54
- url = FROM_PUNY << '?url=' << CGI.escape(url)
54
+ url = FROM_PUNY + '?url=' + CGI.escape(url)
55
55
  p = _process_response(open(url))
56
56
  p.url
57
57
  end
data/test/puny_test.rb CHANGED
@@ -44,4 +44,8 @@ class PunyTest < Test::Unit::TestCase
44
44
  assert_equal Puny.expand('http://漭.sl.pt'), 'http://developers.sapo.pt/'
45
45
  assert_equal Puny.expand('http://b.ot.sl.pt'), 'http://developers.sapo.pt/'
46
46
  end
47
+
48
+ def test_smoke
49
+ assert_equal 100.times { Puny.shorten('http://developers.sapo.pt') }, 100
50
+ end
47
51
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubenfonseca-puny
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruben Fonseca
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-16 00:00:00 -07:00
12
+ date: 2009-06-16 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15