guillotine 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -1
- data/guillotine.gemspec +1 -1
- data/lib/guillotine.rb +1 -1
- data/lib/guillotine/host_checkers.rb +7 -3
- data/test/host_checker_test.rb +1 -1
- metadata +7 -7
data/CHANGELOG.md
CHANGED
data/guillotine.gemspec
CHANGED
@@ -13,7 +13,7 @@ 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.2.
|
16
|
+
s.version = '1.2.1'
|
17
17
|
s.date = '2012-06-04'
|
18
18
|
s.rubyforge_project = 'guillotine'
|
19
19
|
|
data/lib/guillotine.rb
CHANGED
@@ -11,10 +11,10 @@ module Guillotine
|
|
11
11
|
@all ||= []
|
12
12
|
end
|
13
13
|
|
14
|
-
attr_reader :error
|
14
|
+
attr_reader :error
|
15
15
|
|
16
16
|
def initialize(arg = nil)
|
17
|
-
@error_response =
|
17
|
+
@error_response = nil
|
18
18
|
end
|
19
19
|
|
20
20
|
def valid?(url)
|
@@ -22,7 +22,11 @@ module Guillotine
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def call(url)
|
25
|
-
|
25
|
+
error_response unless valid?(url)
|
26
|
+
end
|
27
|
+
|
28
|
+
def error_response
|
29
|
+
@error_response ||= [422, {}, @error]
|
26
30
|
end
|
27
31
|
end
|
28
32
|
|
data/test/host_checker_test.rb
CHANGED
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.2.
|
4
|
+
version: 1.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-06-04 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|
16
|
-
requirement: &
|
16
|
+
requirement: &70118903831360 !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: *70118903831360
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: addressable
|
27
|
-
requirement: &
|
27
|
+
requirement: &70118903830900 !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: *70118903830900
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rack-test
|
38
|
-
requirement: &
|
38
|
+
requirement: &70118903830520 !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: *70118903830520
|
47
47
|
description: Adaptable private URL shortener
|
48
48
|
email: technoweenie@gmail.com
|
49
49
|
executables: []
|