whiplash_api 1.0.3 → 1.0.6
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.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/whiplash_api/base.rb +7 -2
- data/lib/whiplash_api/version.rb +1 -1
- data/whiplash_api.gemspec +2 -2
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a92bd769283e38a3430455207ddc5481d7c55745
|
|
4
|
+
data.tar.gz: 2d6c8ea5e92d6dd5002b1a02571ca482ff7c7da8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
data/lib/whiplash_api/base.rb
CHANGED
|
@@ -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
|
data/lib/whiplash_api/version.rb
CHANGED
data/whiplash_api.gemspec
CHANGED
|
@@ -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.
|
|
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-
|
|
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: []
|