issuu 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -18,7 +18,7 @@ Jeweler::Tasks.new do |gem|
18
18
  gem.summary = "Issuu API"
19
19
  gem.description = "Provides basic methods to access the Issuu API"
20
20
  gem.email = "bastien.vaucher@gmail.com"
21
- gem.authors = ["Bastien Vaucher"]
21
+ gem.authors = ["Bastien Vaucher - MagmaHQ"]
22
22
  # Include your dependencies below. Runtime dependencies are required when using your gem,
23
23
  # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
24
24
  # gem.add_runtime_dependency 'jabber4r', '> 0.1'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/issuu.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{issuu}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Bastien Vaucher"]
12
- s.date = %q{2011-01-07}
11
+ s.authors = ["Bastien Vaucher - MagmaHQ"]
12
+ s.date = %q{2011-01-28}
13
13
  s.description = %q{Provides basic methods to access the Issuu API}
14
14
  s.email = %q{bastien.vaucher@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -11,7 +11,7 @@ module Issuu
11
11
  end
12
12
 
13
13
  def generate_signature
14
- string_to_sign = "#{@secret}#{@params.sort_by {|k| k.to_s }.to_s}"
14
+ string_to_sign = "#{@secret}#{@params.sort_by {|k| k.to_s }.flatten.join}"
15
15
  Digest::MD5.hexdigest(string_to_sign)
16
16
  end
17
17
 
@@ -176,4 +176,18 @@ describe Issuu::Document do
176
176
  subject.title.should == "Race cars"
177
177
  end
178
178
  end
179
+
180
+ describe "signing a request" do
181
+
182
+ subject { Issuu::ParameterSet.new 'issuu.documents.list',
183
+ :api_key => 'qyy6ls1qv15uh9xwwlvk853u2uvpfka7',
184
+ :secret => '13e3an36eaxjy8nenuepab05yc7j7w5g',
185
+ :access => 'public',
186
+ :responseParams => 'title,description' }
187
+
188
+ it "should generate a correct signature" do
189
+ subject.generate_signature.should == '7431d31140cf412ab5caa73586d6324a'
190
+ end
191
+ end
192
+
179
193
  end
metadata CHANGED
@@ -1,21 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: issuu
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
- - Bastien Vaucher
13
+ - Bastien Vaucher - MagmaHQ
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-07 00:00:00 +01:00
18
+ date: 2011-01-28 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency