access 2.0.29 → 2.0.30

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: c656412bbe6b22ce545df2140285b0b7518bdef0
4
- data.tar.gz: b2765f004774df682890ba8698ff05fa5fe31cef
3
+ metadata.gz: 7267410376dbffe9631a1ac96dfe8a52891d5743
4
+ data.tar.gz: 34593a241cd80c5bfdb7acba65c70d4dae63f534
5
5
  SHA512:
6
- metadata.gz: cc2256733caaa5daf59ac71ee3ee7cb2b33abfa90af4930c9be42a31c7281539cd93f358ea9343d705d0e538bb2869634866ad4fd0154873ec88ac750e6665b3
7
- data.tar.gz: 3f1494eb7eb7cfd7dceb642dacdb57f60c1b3d0078221ba3bf188eb5ccc3803af3a0b691639abc91cf2ac1a248275e94cfdd81a2fa466b5384219cec7a4bc602
6
+ metadata.gz: 97f8be53dfa1e4be76f64c97343a8d02f4346b3940c6fc8e4c801025c82c24898424cfe5ae410c364d4d733bd69c05c97bd327ace1d31e5f51fd1dec8b158f38
7
+ data.tar.gz: d00a59f126ef2469db5ecf9080b3bb8530ffe80345916e0a8dd1a14c50644e2dd5d768a80e6553025f69de7f5647ac0effb7b4ab3c4d128cda6ca194ebc1601b
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
@@ -15,4 +14,4 @@ mkmf.log
15
14
  *.sublime-project
16
15
  *.sublime-workspace
17
16
 
18
- .DS_Store
17
+ .DS_Store
@@ -0,0 +1,114 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ access (2.0.30)
5
+ hashie (~> 3.3.1)
6
+ httparty (~> 0.13.3)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ addressable (2.3.8)
12
+ coderay (1.1.0)
13
+ coveralls (0.8.10)
14
+ json (~> 1.8)
15
+ rest-client (>= 1.6.8, < 2)
16
+ simplecov (~> 0.11.0)
17
+ term-ansicolor (~> 1.3)
18
+ thor (~> 0.19.1)
19
+ tins (~> 1.6.0)
20
+ crack (0.4.2)
21
+ safe_yaml (~> 1.0.0)
22
+ docile (1.1.5)
23
+ domain_name (0.5.25)
24
+ unf (>= 0.0.5, < 1.0.0)
25
+ ffi (1.9.10)
26
+ formatador (0.2.5)
27
+ guard (2.13.0)
28
+ formatador (>= 0.2.4)
29
+ listen (>= 2.7, <= 4.0)
30
+ lumberjack (~> 1.0)
31
+ nenv (~> 0.1)
32
+ notiffany (~> 0.0)
33
+ pry (>= 0.9.12)
34
+ shellany (~> 0.0)
35
+ thor (>= 0.18.1)
36
+ guard-compat (1.2.1)
37
+ guard-minitest (2.4.4)
38
+ guard-compat (~> 1.2)
39
+ minitest (>= 3.0)
40
+ hashdiff (0.2.3)
41
+ hashie (3.3.2)
42
+ http-cookie (1.0.2)
43
+ domain_name (~> 0.5)
44
+ httparty (0.13.7)
45
+ json (~> 1.8)
46
+ multi_xml (>= 0.5.2)
47
+ json (1.8.3)
48
+ listen (3.0.5)
49
+ rb-fsevent (>= 0.9.3)
50
+ rb-inotify (>= 0.9)
51
+ lumberjack (1.0.9)
52
+ method_source (0.8.2)
53
+ mime-types (2.99)
54
+ minitest (5.8.3)
55
+ minitest-focus (1.1.2)
56
+ minitest (>= 4, < 6)
57
+ multi_xml (0.5.5)
58
+ nenv (0.2.0)
59
+ netrc (0.11.0)
60
+ notiffany (0.0.8)
61
+ nenv (~> 0.1)
62
+ shellany (~> 0.0)
63
+ pry (0.10.3)
64
+ coderay (~> 1.1.0)
65
+ method_source (~> 0.8.1)
66
+ slop (~> 3.4)
67
+ rake (10.4.2)
68
+ rb-fsevent (0.9.6)
69
+ rb-inotify (0.9.5)
70
+ ffi (>= 0.5.0)
71
+ rest-client (1.8.0)
72
+ http-cookie (>= 1.0.2, < 2.0)
73
+ mime-types (>= 1.16, < 3.0)
74
+ netrc (~> 0.7)
75
+ safe_yaml (1.0.4)
76
+ shellany (0.0.1)
77
+ simplecov (0.11.0)
78
+ docile (~> 1.1.0)
79
+ json (~> 1.8)
80
+ simplecov-html (~> 0.10.0)
81
+ simplecov-html (0.10.0)
82
+ slop (3.6.0)
83
+ term-ansicolor (1.3.2)
84
+ tins (~> 1.0)
85
+ thor (0.19.1)
86
+ tins (1.6.0)
87
+ unf (0.1.4)
88
+ unf_ext
89
+ unf_ext (0.0.7.1)
90
+ vcr (3.0.0)
91
+ webmock (1.22.3)
92
+ addressable (>= 2.3.6)
93
+ crack (>= 0.3.2)
94
+ hashdiff
95
+
96
+ PLATFORMS
97
+ ruby
98
+
99
+ DEPENDENCIES
100
+ access!
101
+ bundler (~> 1.7)
102
+ coveralls
103
+ guard
104
+ guard-minitest
105
+ minitest
106
+ minitest-focus
107
+ pry
108
+ rake (~> 10.0)
109
+ simplecov
110
+ vcr
111
+ webmock
112
+
113
+ BUNDLED WITH
114
+ 1.10.6
@@ -20,6 +20,8 @@ module Access
20
20
  self.send(self.favorite_type)
21
21
  end
22
22
 
23
+ # search / index
24
+
23
25
  def self.search(options = {})
24
26
  Access::Api.new.favorites_search options
25
27
  end
@@ -36,8 +38,11 @@ module Access
36
38
  Access::Api.new.favorites_search options.merge(favorite_type: 'stores')
37
39
  end
38
40
 
39
- def self.find(offer_key, options = {})
40
- Access::Api.new.favorites_find offer_key, options
41
+ # find / show
42
+
43
+ def self.find(resource_id, options = {})
44
+ # must pass in a favorite_type
45
+ Access::Api.new.favorites_find resource_id, options
41
46
  end
42
47
 
43
48
  def self.find_offer(offer_key, options = {})
@@ -52,7 +57,10 @@ module Access
52
57
  Access::Api.new.favorites_find store_key, options.merge(favorite_type: 'stores')
53
58
  end
54
59
 
60
+ # create
61
+
55
62
  def self.create(offer_key, options = {})
63
+ # must pass in a favorite_type
56
64
  Access::Api.new.favorites_create offer_key, options
57
65
  end
58
66
 
@@ -68,6 +76,8 @@ module Access
68
76
  Access::Api.new.favorites_create store_key, options.merge(favorite_type: 'stores')
69
77
  end
70
78
 
79
+ #delete
80
+
71
81
  def self.delete(offer_key, options = {})
72
82
  Access::Api.new.favorites_delete offer_key, options
73
83
  end
@@ -5,7 +5,7 @@ module Access
5
5
  attr_reader :url, :headers, :timeout, :return_json, :use_hasify
6
6
 
7
7
  def base_setup(path, api_type, options)
8
- @url = set_base(api_type, path, options.delete(:api_environment))
8
+ @url = set_base(path, api_type, options.delete(:api_environment))
9
9
  @headers = set_headers options.delete(:access_token)
10
10
  @timeout = options.delete(:access_timeout) || Access.config.access_timeout
11
11
  @return_json = should_return_json?(options.delete(:return_json))
@@ -70,7 +70,7 @@ module Access
70
70
 
71
71
  private
72
72
 
73
- def set_base(api_type, path, environment)
73
+ def set_base(path, api_type, environment)
74
74
  if environment
75
75
  "https://#{ api_type }#{ Access::Config::DOMAINS[environment] }.adcrws.com/v1#{path}"
76
76
  else
@@ -1,4 +1,4 @@
1
1
  module Access
2
- VERSION = "2.0.29"
2
+ VERSION = "2.0.30"
3
3
  end
4
4
 
@@ -1,10 +1,7 @@
1
1
  require 'simplecov'
2
2
  require 'coveralls'
3
3
  require 'pry'
4
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
5
- SimpleCov::Formatter::HTMLFormatter,
6
- Coveralls::SimpleCov::Formatter
7
- ]
4
+
8
5
  SimpleCov.start
9
6
 
10
7
  require './lib/access'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: access
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.29
4
+ version: 2.0.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Eggett
@@ -209,6 +209,7 @@ files:
209
209
  - ".ruby-version"
210
210
  - ".travis.yml"
211
211
  - Gemfile
212
+ - Gemfile.lock
212
213
  - Guardfile
213
214
  - LICENSE.txt
214
215
  - README.md