vidibus-validate_uri 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/Gemfile.lock +1 -1
- data/README.rdoc +2 -2
- data/VERSION +1 -1
- data/config/locales/de.yml +4 -5
- data/config/locales/en.yml +4 -5
- data/lib/vidibus/validate_uri/core.rb +3 -3
- data/spec/vidibus/validate_uri/core_spec.rb +5 -0
- data/vidibus-validate_uri.gemspec +6 -7
- metadata +24 -26
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/README.rdoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
=
|
1
|
+
= Vidibus::ValidateUri
|
2
2
|
|
3
|
-
This gem is part of the open source SOA framework Vidibus
|
3
|
+
This gem is part of the open source SOA framework {Vidibus}[http://vidibus.org].
|
4
4
|
|
5
5
|
It provides validation of URIs (URLs) to ActiveModel records and ActionControllers in Rails 3.
|
6
6
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.6
|
data/config/locales/de.yml
CHANGED
data/config/locales/en.yml
CHANGED
@@ -6,10 +6,10 @@ module Vidibus
|
|
6
6
|
module Core
|
7
7
|
|
8
8
|
PORT_REGEXP = /(([:]\d+)?)/
|
9
|
-
DOMAIN_REGEXP = /([äüößa-z0-9\-]+\.?)*([äüößa-z0-9]{2,})\.([a-z]{2,}){1,2}/ # TODO: Add real IDN support
|
9
|
+
DOMAIN_REGEXP = /([äüößa-z0-9\-]+\.?)*([äüößa-z0-9]{2,})\.([a-z]{2,}){1,2}/i # TODO: Add real IDN support
|
10
10
|
IP_REGEXP = /(?>(?:1?\d?\d|2[0-4]\d|25[0-5])\.){3}(?:1?\d?\d|2[0-4]\d|25[0-5])(?:\/(?:[12]?\d|3[012])|-(?>(?:1?\d?\d|2[0-4]\d|25[0-5])\.){3}(?:1?\d?\d|2[0-4]\d|25[0-5]))?/
|
11
|
-
PATH_REGEXP = /(\/[a-z0-9\-_\.\,\/]*)?/
|
12
|
-
PARAMS_REGEXP = /\/?(\?[a-z0-9\-_\&=\|]*)?/
|
11
|
+
PATH_REGEXP = /(\/[a-z0-9\-_\.\,\/]*)?/i
|
12
|
+
PARAMS_REGEXP = /\/?(\?[a-z0-9\-_\&=\|]*)?/i
|
13
13
|
FRAGMENT_REGEXP = /(\#.*)?/
|
14
14
|
|
15
15
|
# Returns true if given URI is valid.
|
@@ -184,6 +184,11 @@ describe "Vidibus::ValidateUri::Core" do
|
|
184
184
|
uri = "http://www.ali.baba.döner.de"
|
185
185
|
test.valid_uri?(uri).should be_true
|
186
186
|
end
|
187
|
+
|
188
|
+
it "should validate http://mydomain.local/WhatsUp" do
|
189
|
+
uri = "http://mydomain.local/WhatsUp"
|
190
|
+
test.valid_uri?(uri).should be_true
|
191
|
+
end
|
187
192
|
end
|
188
193
|
|
189
194
|
describe "#accessible_uri?" do
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{vidibus-validate_uri}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Andre Pankratz"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-05-04}
|
13
13
|
s.description = %q{It provides validation of URIs (URLs) to ActiveModel records and ActionControllers in Rails 3.}
|
14
14
|
s.email = %q{andre@vidibus.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -42,7 +42,7 @@ Gem::Specification.new do |s|
|
|
42
42
|
]
|
43
43
|
s.homepage = %q{http://github.com/vidibus/vidibus-validate_uri}
|
44
44
|
s.require_paths = ["lib"]
|
45
|
-
s.rubygems_version = %q{1.
|
45
|
+
s.rubygems_version = %q{1.6.2}
|
46
46
|
s.summary = %q{Provides an URI validator for Rails 3.}
|
47
47
|
s.test_files = [
|
48
48
|
"spec/spec_helper.rb",
|
@@ -52,23 +52,22 @@ Gem::Specification.new do |s|
|
|
52
52
|
]
|
53
53
|
|
54
54
|
if s.respond_to? :specification_version then
|
55
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
56
55
|
s.specification_version = 3
|
57
56
|
|
58
57
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
59
58
|
s.add_runtime_dependency(%q<rails>, ["~> 3.0.0"])
|
60
|
-
s.add_development_dependency(%q<rspec>, ["~> 2.0.0
|
59
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.0.0"])
|
61
60
|
s.add_development_dependency(%q<rr>, [">= 0"])
|
62
61
|
s.add_development_dependency(%q<relevance-rcov>, [">= 0"])
|
63
62
|
else
|
64
63
|
s.add_dependency(%q<rails>, ["~> 3.0.0"])
|
65
|
-
s.add_dependency(%q<rspec>, ["~> 2.0.0
|
64
|
+
s.add_dependency(%q<rspec>, ["~> 2.0.0"])
|
66
65
|
s.add_dependency(%q<rr>, [">= 0"])
|
67
66
|
s.add_dependency(%q<relevance-rcov>, [">= 0"])
|
68
67
|
end
|
69
68
|
else
|
70
69
|
s.add_dependency(%q<rails>, ["~> 3.0.0"])
|
71
|
-
s.add_dependency(%q<rspec>, ["~> 2.0.0
|
70
|
+
s.add_dependency(%q<rspec>, ["~> 2.0.0"])
|
72
71
|
s.add_dependency(%q<rr>, [">= 0"])
|
73
72
|
s.add_dependency(%q<relevance-rcov>, [">= 0"])
|
74
73
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vidibus-validate_uri
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 6
|
10
|
+
version: 0.1.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andre Pankratz
|
@@ -15,14 +15,13 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-05-04 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
type: :runtime
|
23
22
|
prerelease: false
|
24
|
-
|
25
|
-
|
23
|
+
type: :runtime
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
25
|
none: false
|
27
26
|
requirements:
|
28
27
|
- - ~>
|
@@ -33,30 +32,28 @@ dependencies:
|
|
33
32
|
- 0
|
34
33
|
- 0
|
35
34
|
version: 3.0.0
|
36
|
-
|
35
|
+
name: rails
|
36
|
+
version_requirements: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
|
-
type: :development
|
39
38
|
prerelease: false
|
40
|
-
|
41
|
-
|
39
|
+
type: :development
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
42
41
|
none: false
|
43
42
|
requirements:
|
44
43
|
- - ~>
|
45
44
|
- !ruby/object:Gem::Version
|
46
|
-
hash:
|
45
|
+
hash: 15
|
47
46
|
segments:
|
48
47
|
- 2
|
49
48
|
- 0
|
50
49
|
- 0
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
requirement: *id002
|
50
|
+
version: 2.0.0
|
51
|
+
name: rspec
|
52
|
+
version_requirements: *id002
|
55
53
|
- !ruby/object:Gem::Dependency
|
56
|
-
type: :development
|
57
54
|
prerelease: false
|
58
|
-
|
59
|
-
|
55
|
+
type: :development
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
60
57
|
none: false
|
61
58
|
requirements:
|
62
59
|
- - ">="
|
@@ -65,12 +62,12 @@ dependencies:
|
|
65
62
|
segments:
|
66
63
|
- 0
|
67
64
|
version: "0"
|
68
|
-
|
65
|
+
name: rr
|
66
|
+
version_requirements: *id003
|
69
67
|
- !ruby/object:Gem::Dependency
|
70
|
-
type: :development
|
71
68
|
prerelease: false
|
72
|
-
|
73
|
-
|
69
|
+
type: :development
|
70
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
74
71
|
none: false
|
75
72
|
requirements:
|
76
73
|
- - ">="
|
@@ -79,7 +76,8 @@ dependencies:
|
|
79
76
|
segments:
|
80
77
|
- 0
|
81
78
|
version: "0"
|
82
|
-
|
79
|
+
name: relevance-rcov
|
80
|
+
version_requirements: *id004
|
83
81
|
description: It provides validation of URIs (URLs) to ActiveModel records and ActionControllers in Rails 3.
|
84
82
|
email: andre@vidibus.com
|
85
83
|
executables: []
|
@@ -142,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
140
|
requirements: []
|
143
141
|
|
144
142
|
rubyforge_project:
|
145
|
-
rubygems_version: 1.
|
143
|
+
rubygems_version: 1.6.2
|
146
144
|
signing_key:
|
147
145
|
specification_version: 3
|
148
146
|
summary: Provides an URI validator for Rails 3.
|