djatoka 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/djatoka.gemspec +1 -1
- data/lib/djatoka/region.rb +11 -1
- data/test/test_region.rb +9 -0
- metadata +26 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9ab22b1d831e09f304d0107cb1e91e7a4adc318
|
4
|
+
data.tar.gz: a81c7f50b8e90af06355602b39c83b3321719bf6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c46148e3303900dda666fee79a5ee70a70a768cb5aee434c56f9394223e4699ece98395eca560aa07f8313788c1b115e3c21a27b507fd8ceb5bb342a944e7320
|
7
|
+
data.tar.gz: 6bcf63ac0f1b09cacc30eb72b6f651f4c64b1fcb10844ff37f0f855c15803ce711aa606767793499d338c972baaa94cffa16629263f574d0c8ca8ec5e3428865
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
djatoka (0.2.
|
4
|
+
djatoka (0.2.3)
|
5
5
|
addressable
|
6
6
|
hashie
|
7
7
|
json
|
@@ -14,7 +14,7 @@ GEM
|
|
14
14
|
activesupport (3.2.13)
|
15
15
|
i18n (= 0.6.1)
|
16
16
|
multi_json (~> 1.0)
|
17
|
-
addressable (2.3.
|
17
|
+
addressable (2.3.6)
|
18
18
|
bourne (1.4.0)
|
19
19
|
mocha (~> 0.13.2)
|
20
20
|
coderay (1.0.9)
|
@@ -22,13 +22,13 @@ GEM
|
|
22
22
|
nokogiri (>= 1.4.3)
|
23
23
|
fakeweb (1.3.0)
|
24
24
|
ffi (1.6.0-java)
|
25
|
-
hashie (2.
|
25
|
+
hashie (2.1.1)
|
26
26
|
i18n (0.6.1)
|
27
27
|
json (1.7.7)
|
28
28
|
json (1.7.7-java)
|
29
29
|
metaclass (0.0.1)
|
30
30
|
method_source (0.8.1)
|
31
|
-
mime-types (
|
31
|
+
mime-types (2.2)
|
32
32
|
mocha (0.13.3)
|
33
33
|
metaclass (~> 0.0.1)
|
34
34
|
multi_json (1.7.2)
|
data/djatoka.gemspec
CHANGED
data/lib/djatoka/region.rb
CHANGED
@@ -28,6 +28,12 @@ class Djatoka::Region
|
|
28
28
|
end
|
29
29
|
@rft_id = rft_id
|
30
30
|
@query = Hashie::Mash.new
|
31
|
+
|
32
|
+
if params[:protocol_relative]
|
33
|
+
@protocol_relative = true
|
34
|
+
end
|
35
|
+
params.delete(:protocol_relative)
|
36
|
+
|
31
37
|
unless params.empty?
|
32
38
|
map_params(params)
|
33
39
|
end
|
@@ -40,7 +46,11 @@ class Djatoka::Region
|
|
40
46
|
|
41
47
|
# Addressable::URI for the Region
|
42
48
|
def uri
|
43
|
-
|
49
|
+
resolver_params = resolver.base_uri_params
|
50
|
+
if @protocol_relative
|
51
|
+
resolver_params[:scheme] = nil
|
52
|
+
end
|
53
|
+
uri = Addressable::URI.new(resolver_params)
|
44
54
|
uri.query_values = region_params
|
45
55
|
uri
|
46
56
|
end
|
data/test/test_region.rb
CHANGED
@@ -143,6 +143,15 @@ class TestDjatokaMetadata < Test::Unit::TestCase
|
|
143
143
|
end
|
144
144
|
end
|
145
145
|
|
146
|
+
context 'protocol relative urls' do
|
147
|
+
should 'return a protocol relative url' do
|
148
|
+
region = Djatoka::Region.new(@resolver, @identifier, {protocol_relative: true})
|
149
|
+
assert_equal nil, region.uri.scheme
|
150
|
+
assert !region.url.include?('http:')
|
151
|
+
assert !region.url.include?('https:')
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
146
155
|
end #context
|
147
156
|
|
148
157
|
end #with_a_resolver
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: djatoka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Ronallo
|
@@ -9,132 +9,132 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-04-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: addressable
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: hashie
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: json
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: mime-types
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: trollop
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- -
|
81
|
+
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: mocha
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- -
|
88
|
+
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- -
|
95
|
+
- - ">="
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: fakeweb
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- -
|
102
|
+
- - ">="
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- -
|
109
|
+
- - ">="
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: shoulda
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- -
|
116
|
+
- - ">="
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '0'
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
|
-
- -
|
123
|
+
- - ">="
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '0'
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: equivalent-xml
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
|
-
- -
|
130
|
+
- - ">="
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '0'
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- -
|
137
|
+
- - ">="
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '0'
|
140
140
|
description: The djatoka library provides some simple methods for creation of the
|
@@ -145,9 +145,9 @@ executables:
|
|
145
145
|
extensions: []
|
146
146
|
extra_rdoc_files: []
|
147
147
|
files:
|
148
|
-
- .document
|
149
|
-
- .gitignore
|
150
|
-
- .travis.yml
|
148
|
+
- ".document"
|
149
|
+
- ".gitignore"
|
150
|
+
- ".travis.yml"
|
151
151
|
- Gemfile
|
152
152
|
- Gemfile.lock
|
153
153
|
- LICENSE
|
@@ -203,17 +203,17 @@ require_paths:
|
|
203
203
|
- lib
|
204
204
|
required_ruby_version: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
|
-
- -
|
206
|
+
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
209
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
210
210
|
requirements:
|
211
|
-
- -
|
211
|
+
- - ">="
|
212
212
|
- !ruby/object:Gem::Version
|
213
213
|
version: '0'
|
214
214
|
requirements: []
|
215
215
|
rubyforge_project: djatoka
|
216
|
-
rubygems_version: 2.
|
216
|
+
rubygems_version: 2.2.2
|
217
217
|
signing_key:
|
218
218
|
specification_version: 4
|
219
219
|
summary: Djatoka image server helpers for Ruby and Rails.
|