signature 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 45dfb9bf73deb5b9c3961cad306a604054c86f8e
4
+ data.tar.gz: f04bbaf672ca9f8e283639f42c909d0646e435fd
5
+ SHA512:
6
+ metadata.gz: a04b5b87253ae99c85bc67867f3114f5f6477a0089ea7ac0790da6f20b12f303c85a97c5c5211b82e01482820f96c021654d09b87f879793349b6bc700f49a1f
7
+ data.tar.gz: 1f657808c67898b40c9dcb476a23bab3787c3f237db4e888968c577064a7fe544ec140c89cd3f70daad94fd9b9a3e9c060a3d43502a490bdfbc7cbfc4647545e
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
@@ -1,33 +1,33 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- signature (0.1.6)
4
+ signature (0.1.7)
5
5
 
6
6
  GEM
7
- remote: http://rubygems.org/
7
+ remote: https://rubygems.org/
8
8
  specs:
9
- bacon (1.1.0)
10
- diff-lcs (1.1.3)
9
+ bacon (1.2.0)
10
+ diff-lcs (1.2.4)
11
11
  em-spec (0.2.6)
12
12
  bacon
13
13
  eventmachine
14
14
  rspec (> 2.6.0)
15
15
  test-unit
16
- eventmachine (0.12.10)
17
- rspec (2.9.0)
18
- rspec-core (~> 2.9.0)
19
- rspec-expectations (~> 2.9.0)
20
- rspec-mocks (~> 2.9.0)
21
- rspec-core (2.9.0)
22
- rspec-expectations (2.9.1)
23
- diff-lcs (~> 1.1.3)
24
- rspec-mocks (2.9.0)
25
- test-unit (2.4.4)
16
+ eventmachine (1.0.3)
17
+ rspec (2.13.0)
18
+ rspec-core (~> 2.13.0)
19
+ rspec-expectations (~> 2.13.0)
20
+ rspec-mocks (~> 2.13.0)
21
+ rspec-core (2.13.1)
22
+ rspec-expectations (2.13.0)
23
+ diff-lcs (>= 1.1.3, < 2.0)
24
+ rspec-mocks (2.13.1)
25
+ test-unit (2.5.4)
26
26
 
27
27
  PLATFORMS
28
28
  ruby
29
29
 
30
30
  DEPENDENCIES
31
31
  em-spec
32
- rspec (~> 2.9.0)
32
+ rspec
33
33
  signature!
@@ -17,7 +17,7 @@ module Signature
17
17
  if v.is_a?(Array)
18
18
  v.map { |e| k + "[]=" + e }.join("&")
19
19
  else
20
- k + "=" + v
20
+ "#{k}=#{v}"
21
21
  end
22
22
  end
23
23
 
@@ -1,3 +1,3 @@
1
1
  module Signature
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
@@ -18,6 +18,6 @@ Gem::Specification.new do |s|
18
18
  s.require_paths = ["lib"]
19
19
 
20
20
  s.add_dependency "jruby-openssl" if defined?(JRUBY_VERSION)
21
- s.add_development_dependency "rspec", "~> 2.9.0"
21
+ s.add_development_dependency "rspec"
22
22
  s.add_development_dependency "em-spec"
23
23
  end
@@ -75,6 +75,13 @@ describe Signature do
75
75
  @request.send(:string_to_sign).should == "POST\n/some/path\nkey;=value@"
76
76
  end
77
77
 
78
+ it "should cope with requests where the value is nil (antiregression)" do
79
+ @request.query_hash = {
80
+ "key" => nil
81
+ }
82
+ @request.send(:string_to_sign).should == "POST\n/some/path\nkey="
83
+ end
84
+
78
85
  it "should use the path to generate signature" do
79
86
  @request.path = '/some/other/path'
80
87
  @request.sign(@token)[:auth_signature].should_not == @signature
metadata CHANGED
@@ -1,46 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: signature
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
5
- prerelease:
4
+ version: 0.1.7
6
5
  platform: ruby
7
6
  authors:
8
7
  - Martyn Loughran
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-11-19 00:00:00.000000000 Z
11
+ date: 2013-04-22 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rspec
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
- version: 2.9.0
19
+ version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
- version: 2.9.0
26
+ version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: em-spec
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  description: Simple key/secret based authentication for apis
@@ -65,27 +60,26 @@ files:
65
60
  - spec/spec_helper.rb
66
61
  homepage: http://github.com/mloughran/signature
67
62
  licenses: []
63
+ metadata: {}
68
64
  post_install_message:
69
65
  rdoc_options: []
70
66
  require_paths:
71
67
  - lib
72
68
  required_ruby_version: !ruby/object:Gem::Requirement
73
- none: false
74
69
  requirements:
75
- - - ! '>='
70
+ - - '>='
76
71
  - !ruby/object:Gem::Version
77
72
  version: '0'
78
73
  required_rubygems_version: !ruby/object:Gem::Requirement
79
- none: false
80
74
  requirements:
81
- - - ! '>='
75
+ - - '>='
82
76
  - !ruby/object:Gem::Version
83
77
  version: '0'
84
78
  requirements: []
85
79
  rubyforge_project:
86
- rubygems_version: 1.8.24
80
+ rubygems_version: 2.0.0
87
81
  signing_key:
88
- specification_version: 3
82
+ specification_version: 4
89
83
  summary: Simple key/secret based authentication for apis
90
84
  test_files:
91
85
  - spec/signature_spec.rb