firefly 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- firefly (2.0.0.pre1)
4
+ firefly (1.3.0)
5
5
  dm-aggregates (~> 1.0.2)
6
6
  dm-core (~> 1.0.2)
7
7
  dm-migrations (~> 1.0.2)
data/HISTORY CHANGED
@@ -1,4 +1,8 @@
1
- = HEAD
1
+ = 1.3.1 / 2011-02-20
2
+
3
+ * 2011-02-20 Fixed issue with escaped characters in URL (ticket #21) [ariejan]
4
+
5
+ = 1.3.0 / 2011-02-01
2
6
 
3
7
  * 2011-02-01 Improved GUI [ariejan]
4
8
  * 2011-02-01 Improved error handling / reporting [ariejan]
data/lib/firefly/url.rb CHANGED
@@ -48,7 +48,8 @@ module Firefly
48
48
 
49
49
  # Normalize the URL
50
50
  def self.normalize_url(url)
51
- URI.parse(URI.escape(url)).normalize.to_s
51
+ url = URI.escape(URI.unescape(url))
52
+ URI.parse(url).normalize.to_s
52
53
  end
53
54
 
54
55
  # Validates the URL to be a valid http or https one.
@@ -1,3 +1,3 @@
1
1
  module Firefly
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
3
3
  end
@@ -56,6 +56,16 @@ describe "Url" do
56
56
  url.url.should eql("http://example.com/?a=%09%0D")
57
57
  end
58
58
 
59
+ it "should not unescape invalid URL characters" do
60
+ url = Firefly::Url.shorten("http://example.com/?a=%09")
61
+ url.url.should eql("http://example.com/?a=%09")
62
+ end
63
+
64
+ it "should not escape already escaped URLs" do
65
+ url = Firefly::Url.shorten("http://en.wikipedia.org/wiki/Tarski%27s_circle-squaring_problem")
66
+ url.url.should eql("http://en.wikipedia.org/wiki/Tarski's_circle-squaring_problem")
67
+ end
68
+
59
69
  it "should automatically forward code to prevent duplicates" do
60
70
  url = Firefly::Url.shorten("http://example.com/")
61
71
  the_code = url.code.next
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firefly
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease: false
4
+ hash: 25
5
+ prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 0
10
- version: 1.3.0
9
+ - 1
10
+ version: 1.3.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ariejan de Vroom
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-01 00:00:00 +01:00
18
+ date: 2011-02-20 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
239
  requirements: []
240
240
 
241
241
  rubyforge_project: firefly
242
- rubygems_version: 1.3.7
242
+ rubygems_version: 1.5.0
243
243
  signing_key:
244
244
  specification_version: 3
245
245
  summary: FireFly is a simple URL shortner for personal use