shopify_api 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.5
1
+ 1.0.6
@@ -122,7 +122,7 @@ module ShopifyAPI
122
122
  def initialize(url, token = nil, params = nil)
123
123
  self.url, self.token = url, token
124
124
 
125
- if params && params[:signature]
125
+ if params
126
126
  unless self.class.validate_signature(params) && params[:timestamp].to_i > 24.hours.ago.utc.to_i
127
127
  raise "Invalid Signature: Possible malicious login"
128
128
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{shopify_api}
8
- s.version = "1.0.5"
8
+ s.version = "1.0.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tobias L\303\274tke", "Cody Fauser", "Dennis Theisen"]
12
- s.date = %q{2010-01-28}
12
+ s.date = %q{2010-09-07}
13
13
  s.description = %q{= Shopify API
14
14
 
15
15
  The Shopify API gem allows Ruby developers to programmatically access the admin section of Shopify stores.
@@ -89,7 +89,7 @@ Copyright (c) 2009 "JadedPixel inc.". See LICENSE for details.
89
89
  s.rdoc_options = ["--charset=UTF-8"]
90
90
  s.require_paths = ["lib"]
91
91
  s.rubyforge_project = %q{shopify-api}
92
- s.rubygems_version = %q{1.3.5}
92
+ s.rubygems_version = %q{1.3.7}
93
93
  s.summary = %q{ShopifyAPI is a lightweight gem for accessing the Shopify admin REST web services}
94
94
  s.test_files = [
95
95
  "test/order_test.rb",
@@ -101,7 +101,7 @@ Copyright (c) 2009 "JadedPixel inc.". See LICENSE for details.
101
101
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
102
102
  s.specification_version = 3
103
103
 
104
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
104
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
105
105
  s.add_runtime_dependency(%q<activeresource>, [">= 2.2.2"])
106
106
  else
107
107
  s.add_dependency(%q<activeresource>, [">= 2.2.2"])
@@ -17,5 +17,17 @@ class ShopifyApiTest < Test::Unit::TestCase
17
17
  session = ShopifyAPI::Session.new("testshop.myshopify.com", "any-token")
18
18
  assert session.valid?
19
19
  end
20
+
21
+ should "not raise error without params" do
22
+ assert_nothing_raised do
23
+ session = ShopifyAPI::Session.new("testshop.myshopify.com", "any-token")
24
+ end
25
+ end
26
+
27
+ should "raise error if params passed but signature omitted" do
28
+ assert_raises(RuntimeError) do
29
+ session = ShopifyAPI::Session.new("testshop.myshopify.com", "any-token", {'foo' => 'bar'})
30
+ end
31
+ end
20
32
  end
21
33
  end
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ hash: 27
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 6
10
+ version: 1.0.6
5
11
  platform: ruby
6
12
  authors:
7
13
  - "Tobias L\xC3\xBCtke"
@@ -11,19 +17,25 @@ autorequire:
11
17
  bindir: bin
12
18
  cert_chain: []
13
19
 
14
- date: 2010-01-28 00:00:00 -05:00
20
+ date: 2010-09-07 00:00:00 -04:00
15
21
  default_executable:
16
22
  dependencies:
17
23
  - !ruby/object:Gem::Dependency
18
24
  name: activeresource
19
- type: :runtime
20
- version_requirement:
21
- version_requirements: !ruby/object:Gem::Requirement
25
+ prerelease: false
26
+ requirement: &id001 !ruby/object:Gem::Requirement
27
+ none: false
22
28
  requirements:
23
29
  - - ">="
24
30
  - !ruby/object:Gem::Version
31
+ hash: 3
32
+ segments:
33
+ - 2
34
+ - 2
35
+ - 2
25
36
  version: 2.2.2
26
- version:
37
+ type: :runtime
38
+ version_requirements: *id001
27
39
  description: "= Shopify API\n\n\
28
40
  The Shopify API gem allows Ruby developers to programmatically access the admin section of Shopify stores.\n\n\
29
41
  The API is implemented as XML over HTTP using all four verbs (GET/POST/PUT/DELETE). Each resource, like Order, Product, or Collection, has its own URL and is manipulated in isolation. In other words, we\xE2\x80\x99ve tried to make the API follow the REST principles as much as possible.\n\n\n\
@@ -75,21 +87,27 @@ rdoc_options:
75
87
  require_paths:
76
88
  - lib
77
89
  required_ruby_version: !ruby/object:Gem::Requirement
90
+ none: false
78
91
  requirements:
79
92
  - - ">="
80
93
  - !ruby/object:Gem::Version
94
+ hash: 3
95
+ segments:
96
+ - 0
81
97
  version: "0"
82
- version:
83
98
  required_rubygems_version: !ruby/object:Gem::Requirement
99
+ none: false
84
100
  requirements:
85
101
  - - ">="
86
102
  - !ruby/object:Gem::Version
103
+ hash: 3
104
+ segments:
105
+ - 0
87
106
  version: "0"
88
- version:
89
107
  requirements: []
90
108
 
91
109
  rubyforge_project: shopify-api
92
- rubygems_version: 1.3.5
110
+ rubygems_version: 1.3.7
93
111
  signing_key:
94
112
  specification_version: 3
95
113
  summary: ShopifyAPI is a lightweight gem for accessing the Shopify admin REST web services