guillotine 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/guillotine.gemspec +2 -2
- data/lib/guillotine.rb +2 -1
- data/test/app_test.rb +2 -2
- metadata +8 -8
data/guillotine.gemspec
CHANGED
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'guillotine'
|
16
|
-
s.version = '1.0.
|
17
|
-
s.date = '2011-11-
|
16
|
+
s.version = '1.0.7'
|
17
|
+
s.date = '2011-11-11'
|
18
18
|
s.rubyforge_project = 'guillotine'
|
19
19
|
|
20
20
|
## Make sure your summary is short. The description may be as long
|
data/lib/guillotine.rb
CHANGED
@@ -3,7 +3,7 @@ require 'digest/md5'
|
|
3
3
|
require 'addressable/uri'
|
4
4
|
|
5
5
|
module Guillotine
|
6
|
-
VERSION = "1.0.
|
6
|
+
VERSION = "1.0.7"
|
7
7
|
|
8
8
|
dir = File.expand_path '../guillotine', __FILE__
|
9
9
|
autoload :App, "#{dir}/app"
|
@@ -51,6 +51,7 @@ module Guillotine
|
|
51
51
|
# Returns an Addressable::URI.
|
52
52
|
def parse_url(url)
|
53
53
|
url.gsub! /\s/, ''
|
54
|
+
url.gsub! /(\#|\?).*/, ''
|
54
55
|
Addressable::URI.parse url
|
55
56
|
end
|
56
57
|
end
|
data/test/app_test.rb
CHANGED
@@ -8,7 +8,7 @@ class AppTest < Guillotine::TestCase
|
|
8
8
|
|
9
9
|
def test_adding_a_link_returns_code
|
10
10
|
url = 'http://github.com'
|
11
|
-
post '/', :url => url
|
11
|
+
post '/', :url => url + '?a=1'
|
12
12
|
assert_equal 201, last_response.status
|
13
13
|
assert code_url = last_response.headers['Location']
|
14
14
|
code = code_url.gsub(/.*\//, '')
|
@@ -22,7 +22,7 @@ class AppTest < Guillotine::TestCase
|
|
22
22
|
url = 'http://github.com'
|
23
23
|
code = ADAPTER.add url
|
24
24
|
|
25
|
-
post '/', :url => url
|
25
|
+
post '/', :url => url + '#a=1'
|
26
26
|
assert code_url = last_response.headers['Location']
|
27
27
|
assert_equal code, code_url.gsub(/.*\//, '')
|
28
28
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guillotine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-11-
|
12
|
+
date: 2011-11-11 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|
16
|
-
requirement: &
|
16
|
+
requirement: &70284745825400 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.2.6
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70284745825400
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: addressable
|
27
|
-
requirement: &
|
27
|
+
requirement: &70284745824840 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 2.2.6
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70284745824840
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rack-test
|
38
|
-
requirement: &
|
38
|
+
requirement: &70284745824400 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70284745824400
|
47
47
|
description: Adaptable private URL shortener
|
48
48
|
email: technoweenie@gmail.com
|
49
49
|
executables: []
|