issuu 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/issuu.gemspec +3 -1
- data/lib/issuu/parameter_set.rb +1 -1
- data/spec/issuu/parameter_set_spec.rb +38 -0
- metadata +4 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.6
|
data/issuu.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "issuu"
|
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 = ["Bastien Vaucher - MagmaHQ"]
|
@@ -35,6 +35,7 @@ Gem::Specification.new do |s|
|
|
35
35
|
"spec/issuu/bookmark_spec.rb",
|
36
36
|
"spec/issuu/document_spec.rb",
|
37
37
|
"spec/issuu/folder_spec.rb",
|
38
|
+
"spec/issuu/parameter_set_spec.rb",
|
38
39
|
"spec/spec_helper.rb"
|
39
40
|
]
|
40
41
|
s.homepage = "http://github.com/bastien/issuu"
|
@@ -46,6 +47,7 @@ Gem::Specification.new do |s|
|
|
46
47
|
"spec/issuu/bookmark_spec.rb",
|
47
48
|
"spec/issuu/document_spec.rb",
|
48
49
|
"spec/issuu/folder_spec.rb",
|
50
|
+
"spec/issuu/parameter_set_spec.rb",
|
49
51
|
"spec/spec_helper.rb"
|
50
52
|
]
|
51
53
|
|
data/lib/issuu/parameter_set.rb
CHANGED
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Issuu::ParameterSet do
|
4
|
+
describe "with a hash as parameter" do
|
5
|
+
it "should delete the api_key from the options" do
|
6
|
+
input = {"api_key" => 'secret', "secret" => "secret"}
|
7
|
+
Issuu::ParameterSet.new("issuu.document.update", input).output.should eql({
|
8
|
+
"action"=>"issuu.document.update",
|
9
|
+
"apiKey"=>"secret",
|
10
|
+
"format"=>"json",
|
11
|
+
:signature=>"942b5a7f777c638a5e03b9dcc31ea99e"
|
12
|
+
})
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should delete the empty values from the options" do
|
16
|
+
input = {"api_key" => 'secret', "secret" => "secret", :access => nil}
|
17
|
+
Issuu::ParameterSet.new("issuu.document.update", input).output.should eql({
|
18
|
+
"action"=>"issuu.document.update",
|
19
|
+
"apiKey"=>"secret",
|
20
|
+
"format"=>"json",
|
21
|
+
:signature=>"942b5a7f777c638a5e03b9dcc31ea99e"
|
22
|
+
})
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe "with a HashWithIndifferentAccessAsParameter" do
|
27
|
+
it "should delete the api_key from the options" do
|
28
|
+
input = HashWithIndifferentAccess.new({"api_key" => 'secret', "secret" => "secret", "ratingsAllowed" => true})
|
29
|
+
Issuu::ParameterSet.new("issuu.document.update", input).output.should eql({
|
30
|
+
"ratingsAllowed"=>true,
|
31
|
+
"action"=>"issuu.document.update",
|
32
|
+
"apiKey"=>"secret",
|
33
|
+
"format"=>"json",
|
34
|
+
:signature=>"7588956a5aaa963ebc24d94ba7f852e6"
|
35
|
+
})
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: issuu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Bastien Vaucher - MagmaHQ
|
@@ -150,6 +150,7 @@ files:
|
|
150
150
|
- spec/issuu/bookmark_spec.rb
|
151
151
|
- spec/issuu/document_spec.rb
|
152
152
|
- spec/issuu/folder_spec.rb
|
153
|
+
- spec/issuu/parameter_set_spec.rb
|
153
154
|
- spec/spec_helper.rb
|
154
155
|
homepage: http://github.com/bastien/issuu
|
155
156
|
licenses:
|
@@ -164,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
164
165
|
requirements:
|
165
166
|
- - ">="
|
166
167
|
- !ruby/object:Gem::Version
|
167
|
-
hash:
|
168
|
+
hash: 1874120085014228437
|
168
169
|
segments:
|
169
170
|
- 0
|
170
171
|
version: "0"
|
@@ -185,4 +186,5 @@ test_files:
|
|
185
186
|
- spec/issuu/bookmark_spec.rb
|
186
187
|
- spec/issuu/document_spec.rb
|
187
188
|
- spec/issuu/folder_spec.rb
|
189
|
+
- spec/issuu/parameter_set_spec.rb
|
188
190
|
- spec/spec_helper.rb
|