hmac_signature 0.0.4 → 0.0.5

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.
@@ -8,7 +8,7 @@ module HmacSignature
8
8
  attr_reader :method, :path, :params, :credentials
9
9
 
10
10
  def initialize method, path, params, credentials=nil
11
- raise ArgumentError, "Expected GET or POST" unless method.is_a?(String) && VALID_METHODS.include?(method)
11
+ raise ArgumentError, "Expected string" unless method.is_a?(String) && !method.empty?
12
12
  raise ArgumentError, "Expected string" unless path.is_a?(String) && !path.empty?
13
13
  raise ArgumentError, "Expected hash" unless params.is_a?(Hash)
14
14
  raise ArgumentError, "Expected credentials" unless credentials.nil? || credentials.is_a?(HmacSignature::Credentials)
@@ -1,3 +1,3 @@
1
1
  module HmacSignature
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -97,14 +97,14 @@ describe HmacSignature do
97
97
  context "when method is nil" do
98
98
  let(:req_method){ nil }
99
99
  it "raises error" do
100
- expect{ request }.to raise_error(ArgumentError, 'Expected GET or POST')
100
+ expect{ request }.to raise_error(ArgumentError, 'Expected string')
101
101
  end
102
102
  end
103
103
 
104
104
  context "when method is empty string" do
105
105
  let(:req_method){ '' }
106
106
  it "raises error" do
107
- expect{ request }.to raise_error(ArgumentError, 'Expected GET or POST')
107
+ expect{ request }.to raise_error(ArgumentError, 'Expected string')
108
108
  end
109
109
  end
110
110
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hmac_signature
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: