whiplash_api 1.0.3 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74a85dbf10a36892fe32bd9e139c24c224e8f646
4
- data.tar.gz: 098b22a96b9eb3b97473feb2c5731cfdfb2f6261
3
+ metadata.gz: a92bd769283e38a3430455207ddc5481d7c55745
4
+ data.tar.gz: 2d6c8ea5e92d6dd5002b1a02571ca482ff7c7da8
5
5
  SHA512:
6
- metadata.gz: 838992e0107a5a1f879e36310b758769260b480696e1bf94fd3f5986218b1169ed7b63d1a084c14096a34260433828d450827cf7e985b6d6b53c2211d1adff0f
7
- data.tar.gz: 0ea784819cc42c368884c4ae1093d032064edf2ee4b50fa4f054155655825a4f6d28c08819166ad6e7cac5b8cc1e50a1667c1b0f4a083b23ce4339a0b61c0dc7
6
+ metadata.gz: 2839984f50273684227e474a41a5e93d12fe30bb17a016dc91c0f5463c37703e81aadd5ddfe8bc1bd4bd2c3aae840a83b895d0ba496f65fb1d723ed420b28069
7
+ data.tar.gz: 768fb3dee5910cb1e37d149c9bfba65cd01d473679b0ac26b1c02e2d6a02c7193d0d4cbab2a345704f3b18aaa00485ec3c50b88060c0c4b2f888996e9d12fa6c
data/README.md CHANGED
@@ -92,6 +92,8 @@ You can run the tests on the current version of this gem, by cloning it locally,
92
92
  WL_KEY=Hc2BHTn3bcrwyPooyYTP rspec spec
93
93
  ```
94
94
 
95
+ You can skip teardown for the tests (where the test suite removes/deleted instances of created resources on the testing server) by setting an environment variable `NO_TEARDOWN`.
96
+
95
97
  Note that, testing can take a long time, since tests are performed directly on the testing server, and no mocks are used. This is to ensure that the API conforms to the tests, at the same time.
96
98
 
97
99
  ### Copyright
@@ -25,12 +25,17 @@ module WhiplashApi
25
25
  super
26
26
  end
27
27
 
28
+ def headers
29
+ Thread.current["active.resource.currentthread.headers"] = {} if Thread.current["active.resource.currentthread.headers"].blank?
30
+ Thread.current["active.resource.currentthread.headers"]
31
+ end
32
+
28
33
  def api_key=(api_key)
29
34
  headers['X-API-KEY'] = api_key
30
35
  end
31
36
 
32
- def api_version=(v)
33
- headers['X-API-VERSION'] = v
37
+ def api_version=(v = nil)
38
+ headers['X-API-VERSION'] = v || 1
34
39
  end
35
40
 
36
41
  protected
@@ -1,3 +1,3 @@
1
1
  module WhiplashApi
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.6"
3
3
  end
@@ -6,8 +6,8 @@ require 'whiplash_api/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "whiplash_api"
8
8
  spec.version = WhiplashApi::VERSION
9
- spec.authors = ["Mark Dickson"]
10
- spec.email = ["mark@sitesteaders.com"]
9
+ spec.authors = ["Mark Dickson", "Nikhil Gupta"]
10
+ spec.email = ["mark@sitesteaders.com", "mestoic@gmail.com"]
11
11
 
12
12
  spec.summary = %q{Ruby Gem for connecting to the Whiplash Merchandising API}
13
13
  spec.description = %q{Ruby Gem for connecting to the Whiplash Merchandising API}
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whiplash_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Dickson
8
+ - Nikhil Gupta
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2015-10-21 00:00:00.000000000 Z
12
+ date: 2015-10-23 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
@@ -111,6 +112,7 @@ dependencies:
111
112
  description: Ruby Gem for connecting to the Whiplash Merchandising API
112
113
  email:
113
114
  - mark@sitesteaders.com
115
+ - mestoic@gmail.com
114
116
  executables:
115
117
  - whiplash_api
116
118
  extensions: []