spark_api 1.6.3 → 2.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1c6fe64e532ec608eaf6ab28400e609bac9509cc4435a308555647f807f82fe7
4
- data.tar.gz: 981c83997a7c44bce902ad7eae8fe5eea87ff63ae6294973bd39d4183eb89f8e
3
+ metadata.gz: 225a876c0d7cc718e2f7b02544ad280b304d2dae759af03e1a0f2a54558f5323
4
+ data.tar.gz: 0da2c909ca58b47e9dd9583a6fef4256fcf0ab55448a6eff00ff29cc6a42bd5c
5
5
  SHA512:
6
- metadata.gz: b875967cf9b92b12f9cdb4dc6a17fb8fd1b03ec596eb60450ed7321ec2a1ef62bdf8c649c66413ca6d25eac18a3e38997058a6a69cf1416628c7e248a4d083ec
7
- data.tar.gz: b51357fb93db5a941efa1503dacc8f0a16c04ed6f0ef971473947ee982c12df79bf2ea97970da686c8c02bf792f7f8cb4c38cba3e413f788fb3e02893fd28694
6
+ metadata.gz: 7435c421f7978b5e48b79a6d2f2cb9fc9e88ac664b5b4c9b9f956e0e72b7d4cf115e7ebb4024b0551aacc98975d887f0957c67ddecc232fa6777d92567d20875
7
+ data.tar.gz: 6a71260f031fd07ac91721b026beec5665986b447a25d1465ff1875819197d38840999879d0ec73717b844e9abb00f94d8e5103a001152bdfaa49ec4853503cf
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  Spark API
2
2
  =====================
3
- ![CI](https://github.com/sparkapi/spark_api/workflows/CI/badge.svg) ![Code Climate](https://codeclimate.com/badge.png)
3
+ ![CI](https://github.com/sparkapi/spark_api/workflows/CI/badge.svg)
4
4
 
5
5
  A Ruby wrapper for the Spark REST API. Loosely based on ActiveResource to provide models to interact with remote services.
6
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.6.3
1
+ 2.0.0
@@ -1,5 +1,3 @@
1
- require "highline"
2
-
3
1
  module SparkApi
4
2
  module Authentication
5
3
  module OAuth2Impl
@@ -18,9 +16,11 @@ module SparkApi
18
16
  def redirect(url)
19
17
  puts "Missing OAuth2 session, redirecting..."
20
18
  puts "Please visit #{url}, login as a user, and paste the authorization code here:"
21
- self.code = HighLine.ask("Authorization code?") do |q|
22
- q.whitespace = :strip_and_collapse
23
- q.validate = /^\w+$/
19
+ puts "Authorization code?"
20
+ raw_code = gets.strip
21
+
22
+ unless raw_code.match?(/^\w+$/)
23
+ raise "Invalid authorization code. Please try again."
24
24
  end
25
25
  end
26
26
 
@@ -6,7 +6,7 @@ module SparkApi
6
6
 
7
7
  #==OAuth2 Faraday response middleware
8
8
  # HTTP Response after filter to package oauth2 responses and bubble up basic api errors.
9
- class FaradayMiddleware < Faraday::Response::Middleware
9
+ class FaradayMiddleware < Faraday::Middleware
10
10
 
11
11
  def initialize(app)
12
12
  super(app)
@@ -42,7 +42,7 @@ module SparkApi
42
42
 
43
43
  #==OAuth2 Faraday response middleware
44
44
  # HTTP Response after filter to package oauth2 responses and bubble up basic api errors.
45
- class SparkbarFaradayMiddleware < Faraday::Response::Middleware
45
+ class SparkbarFaradayMiddleware < Faraday::Middleware
46
46
 
47
47
  def initialize(app)
48
48
  super(app)
@@ -60,7 +60,7 @@ module SparkApi
60
60
  end
61
61
 
62
62
  def self.exists?(name)
63
- File.exists? "#{config_path}/#{name}.yml"
63
+ File.exist? "#{config_path}/#{name}.yml"
64
64
  end
65
65
 
66
66
  def self.build(name)
@@ -9,9 +9,9 @@ module SparkApi
9
9
  end
10
10
 
11
11
  # valid configuration options
12
- VALID_OPTION_KEYS = [:api_key, :api_secret, :api_user, :endpoint,
13
- :user_agent, :version, :ssl, :ssl_verify, :oauth2_provider, :authentication_mode,
14
- :auth_endpoint, :callback, :compress, :timeout, :middleware, :dictionary_version, :request_id_chain, :user_ip_address].freeze
12
+ VALID_OPTION_KEYS = [:api_key, :api_secret, :api_user, :endpoint,
13
+ :user_agent, :version, :ssl, :ssl_verify, :oauth2_provider, :authentication_mode,
14
+ :auth_endpoint, :callback, :timeout, :middleware, :dictionary_version, :request_id_chain, :user_ip_address, :verbose].freeze
15
15
  OAUTH2_KEYS = [:authorization_uri, :access_uri, :client_id, :client_secret,
16
16
  # Requirements for authorization_code grant type
17
17
  :redirect_uri,
@@ -41,12 +41,12 @@ module SparkApi
41
41
  DEFAULT_SSL = true
42
42
  DEFAULT_SSL_VERIFY = true
43
43
  DEFAULT_OAUTH2 = nil
44
- DEFAULT_COMPRESS = false
45
44
  DEFAULT_TIMEOUT = 5 # seconds
46
45
  DEFAULT_MIDDLEWARE = 'spark_api'
47
46
  DEFAULT_DICTIONARY_VERSION = nil
48
47
  DEFAULT_REQUEST_ID_CHAIN = nil
49
48
  DEFAULT_USER_IP_ADDRESS = nil
49
+ DEFAULT_VERBOSE = false
50
50
 
51
51
  X_SPARK_API_USER_AGENT = "X-SparkApi-User-Agent"
52
52
  X_USER_IP_ADDRESS = "X-User-IP-Address"
@@ -79,12 +79,12 @@ module SparkApi
79
79
  self.ssl = DEFAULT_SSL
80
80
  self.ssl_verify = DEFAULT_SSL_VERIFY
81
81
  self.version = DEFAULT_VERSION
82
- self.compress = DEFAULT_COMPRESS
83
82
  self.timeout = DEFAULT_TIMEOUT
84
83
  self.middleware = DEFAULT_MIDDLEWARE
85
84
  self.dictionary_version = DEFAULT_DICTIONARY_VERSION
86
85
  self.request_id_chain = DEFAULT_REQUEST_ID_CHAIN
87
86
  self.user_ip_address = DEFAULT_USER_IP_ADDRESS
87
+ self.verbose = DEFAULT_VERBOSE
88
88
  self
89
89
  end
90
90
  end
@@ -10,7 +10,6 @@ module SparkApi
10
10
  HTTP_SCHEME = 'http:'
11
11
  HTTPS_SCHEME = 'https:'
12
12
  ACCEPT_ENCODING = 'Accept-Encoding'
13
- COMPRESS_ACCEPT_ENCODING = 'gzip, deflate'
14
13
  X_REQUEST_ID_CHAIN = 'X-Request-Id-Chain'
15
14
  MIME_JSON = 'application/json'
16
15
  MIME_RESO = 'application/json, application/xml'
@@ -27,10 +26,6 @@ module SparkApi
27
26
  opts[:url] = @endpoint.sub REG_HTTPS, HTTP_SCHEME
28
27
  end
29
28
 
30
- if self.compress
31
- opts[:headers][ACCEPT_ENCODING] = COMPRESS_ACCEPT_ENCODING
32
- end
33
-
34
29
  if request_id_chain
35
30
  opts[:headers][X_REQUEST_ID_CHAIN] = request_id_chain
36
31
  end
@@ -40,7 +35,9 @@ module SparkApi
40
35
  conn.options[:timeout] = self.timeout
41
36
  conn.adapter Faraday.default_adapter
42
37
  end
43
- SparkApi.logger.debug { "Connection: #{conn.inspect}" }
38
+ if self.verbose
39
+ SparkApi.logger.debug { "Connection: #{conn.inspect}" }
40
+ end
44
41
  conn
45
42
  end
46
43
 
@@ -5,7 +5,7 @@ require 'zlib'
5
5
  module SparkApi
6
6
  #=Spark API Faraday middleware
7
7
  # HTTP Response after filter to package api responses and bubble up basic api errors.
8
- class FaradayMiddleware < Faraday::Response::Middleware
8
+ class FaradayMiddleware < Faraday::Middleware
9
9
  include SparkApi::PaginateHelper
10
10
 
11
11
  def initialize(app)
@@ -15,10 +15,10 @@ module SparkApi
15
15
  # Handles pretty much all the api response parsing and error handling. All responses that
16
16
  # indicate a failure will raise a SparkApi::ClientError exception
17
17
  def on_complete(env)
18
- env[:body] = decompress_body(env)
19
-
20
18
  body = MultiJson.decode(env[:body])
21
- SparkApi.logger.debug{ "Response Body: #{body.inspect}" }
19
+ if SparkApi.verbose
20
+ SparkApi.logger.debug{ "Response Body: #{body.inspect}" }
21
+ end
22
22
  unless body.is_a?(Hash) && body.key?("D")
23
23
  raise InvalidResponse, "The server response could not be understood"
24
24
  end
@@ -80,18 +80,6 @@ module SparkApi
80
80
  env[:body] = results
81
81
  end
82
82
 
83
- def decompress_body(env)
84
- encoding = env[:response_headers]['content-encoding'].to_s.downcase
85
-
86
- if encoding == 'gzip'
87
- env[:body] = Zlib::GzipReader.new(StringIO.new(env[:body])).read
88
- elsif encoding == 'deflate'
89
- env[:body] = Zlib::Inflate.inflate(env[:body])
90
- end
91
-
92
- env[:body]
93
- end
94
-
95
83
  private
96
84
 
97
85
  def http_method_override_request?(env)
@@ -93,7 +93,9 @@ module SparkApi
93
93
  response = authenticator.request(method, request_path, nil, request_opts)
94
94
  else
95
95
  post_data = process_request_body(body)
96
- SparkApi.logger.debug { "#{method.to_s.upcase} Data: #{post_data}" }
96
+ if self.verbose
97
+ SparkApi.logger.debug { "#{method.to_s.upcase} Data: #{post_data}" }
98
+ end
97
99
  response = authenticator.request(method, request_path, post_data, request_opts)
98
100
  end
99
101
  request_time = Time.now - start_time
@@ -1,14 +1,9 @@
1
1
 
2
2
  module SparkApi
3
-
4
3
  class ResoFaradayMiddleware < FaradayMiddleware
5
-
6
4
  def on_complete(env)
7
-
8
- body = decompress_body(env)
9
-
10
5
  begin
11
- body = MultiJson.decode(body)
6
+ body = MultiJson.decode(env[:body])
12
7
 
13
8
  if body["D"]
14
9
  super(env)
@@ -21,9 +16,7 @@ module SparkApi
21
16
  # some minor format verification
22
17
  raise e if body.strip[/\A<\?xml/].nil?
23
18
  end
24
-
25
19
  end
26
-
27
20
  end
28
21
 
29
22
  Faraday::Response.register_middleware :reso_api => ResoFaradayMiddleware
data/spec/spec_helper.rb CHANGED
@@ -23,7 +23,7 @@ require path + '/spark_api'
23
23
 
24
24
  require 'spark_api'
25
25
 
26
- FileUtils.mkdir 'log' unless File.exists? 'log'
26
+ FileUtils.mkdir 'log' unless File.exist? 'log'
27
27
 
28
28
  module SparkApi
29
29
  def self.logger
@@ -27,9 +27,9 @@ describe SparkApi::Configuration::YamlConfig, "Yaml Config" do
27
27
  end
28
28
  it "should raise an error for a bad configuration" do
29
29
  allow(subject).to receive(:env){ {} }
30
- expect { subject.load_file("spec/config/spark_api/some_random_key.yml")}.to raise_error
30
+ expect { subject.load_file("spec/config/spark_api/some_random_key.yml")}.to raise_error(Errno::ENOENT)
31
31
  allow(subject).to receive(:env){ {"RAILS_ENV" => "fake_env"} }
32
- expect { subject.load_file(api_file)}.to raise_error
32
+ expect { subject.load_file(api_file)}.to raise_error(NoMethodError)
33
33
  end
34
34
  end
35
35
  describe "oauth2" do
@@ -16,6 +16,7 @@ describe SparkApi::Client, "Client config" do
16
16
  expect(SparkApi.request_id_chain).to be_nil
17
17
  expect(SparkApi.user_ip_address).to be_nil
18
18
  expect(SparkApi.middleware).to eq('spark_api')
19
+ expect(SparkApi.verbose).to be false
19
20
  end
20
21
  end
21
22
 
@@ -28,7 +29,8 @@ describe SparkApi::Client, "Client config" do
28
29
  :endpoint => "http://api.wade.dev.fbsdata.com",
29
30
  :timeout => 15,
30
31
  :request_id_chain => 'foobar',
31
- :user_ip_address => 'barfoo')
32
+ :user_ip_address => 'barfoo',
33
+ :verbose => true)
32
34
 
33
35
  expect(client.api_key).to match("key_of_wade")
34
36
  expect(client.api_secret).to match("TopSecret")
@@ -39,6 +41,7 @@ describe SparkApi::Client, "Client config" do
39
41
  expect(client.timeout).to eq(15)
40
42
  expect(client.request_id_chain).to eq('foobar')
41
43
  expect(client.user_ip_address).to eq('barfoo')
44
+ expect(client.verbose).to be true
42
45
  end
43
46
 
44
47
  it "should allow unverified ssl certificates when verification is off" do
@@ -101,6 +104,7 @@ describe SparkApi::Client, "Client config" do
101
104
  config.endpoint = "test.api.sparkapi.com"
102
105
  config.user_agent = "my useragent"
103
106
  config.timeout = 15
107
+ config.verbose = true
104
108
  end
105
109
 
106
110
  expect(SparkApi.api_key).to match("my_key")
@@ -111,6 +115,7 @@ describe SparkApi::Client, "Client config" do
111
115
  expect(SparkApi.user_agent).to match("my useragent")
112
116
  expect(SparkApi.oauth2_enabled?()).to be false
113
117
  expect(SparkApi.timeout).to eq(15)
118
+ expect(SparkApi.verbose).to be true
114
119
  end
115
120
 
116
121
  it "should correctly set up the client for oauth2" do
@@ -223,12 +228,6 @@ describe SparkApi::Client, "Client config" do
223
228
  expect(c.connection.headers["Accept-Encoding"]).to be_nil
224
229
  end
225
230
 
226
- it "should set gzip header if compress option is set" do
227
- c = SparkApi::Client.new(:endpoint => "https://api.sparkapi.com",
228
- :compress => true)
229
- expect(c.connection.headers["Accept-Encoding"]).to eq("gzip, deflate")
230
- end
231
-
232
231
  it "should set default timeout of 5 seconds" do
233
232
  c = SparkApi::Client.new(:endpoint => "https://sparkapi.com")
234
233
  expect(c.connection.options[:timeout]).to eq(5)
@@ -97,55 +97,6 @@ describe SparkApi do
97
97
  expect(e.errors).to eq("Some errors and stuff.")
98
98
  }
99
99
  end
100
-
101
- end
102
-
103
- describe "#decompress_body" do
104
- let(:middleware) do
105
- SparkApi::FaradayMiddleware.new(SparkApi)
106
- end
107
-
108
- it "should leave the body along if content-encoding not set" do
109
- env = {
110
- :body => "UNCOMPRESSED",
111
- :response_headers => {}
112
- }
113
-
114
- expect(middleware.decompress_body(env)).to eq("UNCOMPRESSED")
115
- end
116
-
117
- it "should unzip gzipped data" do
118
- bod = "OUTPUT BODY"
119
-
120
- out = StringIO.new
121
- gz = Zlib::GzipWriter.new(out)
122
- gz.write bod
123
- gz.close
124
-
125
- env = {
126
- :body => out.string,
127
- :response_headers => {
128
- 'content-encoding' => 'gzip'
129
- }
130
- }
131
-
132
- expect(middleware.decompress_body(env)).to eq(bod)
133
- end
134
-
135
- it "should inflate deflated data" do
136
- bod = "INFLATED BODY"
137
- deflated_bod = Zlib::Deflate.deflate(bod)
138
-
139
- env = {
140
- :body => deflated_bod,
141
- :response_headers => {
142
- 'content-encoding' => 'deflate'
143
- }
144
- }
145
-
146
- expect(middleware.decompress_body(env)).to eq(bod)
147
- end
148
100
  end
149
-
150
101
  end
151
102
 
@@ -44,7 +44,7 @@ describe SparkApi::MultiClient do
44
44
  expect(SparkApi.client.api_key).to eq('c')
45
45
  raise "OH MY GOODNESS I BLEW UP!!!"
46
46
  end
47
- end.to raise_error
47
+ end.to raise_error(RuntimeError)
48
48
  expect(SparkApi.client.api_key).to eq('a')
49
49
  end
50
50
 
@@ -223,7 +223,7 @@ describe SparkApi do
223
223
  it "should escape a path correctly" do
224
224
  expect(subject.get('/test path with spaces').length).to eq(0)
225
225
  # now try this with an already escaped path. Kaboom!
226
- expect { subject.get('/test%20path%20with%20spaces') }.to raise_error()
226
+ expect { subject.get('/test%20path%20with%20spaces') }.to raise_error(Faraday::Adapter::Test::Stubs::NotFound)
227
227
  end
228
228
 
229
229
  it "post data should support non json data" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spark_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.3
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Hornseth
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-07-26 00:00:00.000000000 Z
12
+ date: 2024-12-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: addressable
@@ -31,32 +31,26 @@ dependencies:
31
31
  requirements:
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: 0.17.3
35
- - - "<"
36
- - !ruby/object:Gem::Version
37
- version: '2.0'
34
+ version: 2.0.0
38
35
  type: :runtime
39
36
  prerelease: false
40
37
  version_requirements: !ruby/object:Gem::Requirement
41
38
  requirements:
42
39
  - - ">="
43
40
  - !ruby/object:Gem::Version
44
- version: 0.17.3
45
- - - "<"
46
- - !ruby/object:Gem::Version
47
- version: '2.0'
41
+ version: 2.0.0
48
42
  - !ruby/object:Gem::Dependency
49
43
  name: multi_json
50
44
  requirement: !ruby/object:Gem::Requirement
51
45
  requirements:
52
- - - "~>"
46
+ - - ">"
53
47
  - !ruby/object:Gem::Version
54
48
  version: '1.0'
55
49
  type: :runtime
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
52
  requirements:
59
- - - "~>"
53
+ - - ">"
60
54
  - !ruby/object:Gem::Version
61
55
  version: '1.0'
62
56
  - !ruby/object:Gem::Dependency
@@ -73,26 +67,6 @@ dependencies:
73
67
  - - ">="
74
68
  - !ruby/object:Gem::Version
75
69
  version: '1.7'
76
- - !ruby/object:Gem::Dependency
77
- name: builder
78
- requirement: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: 2.1.2
83
- - - "<"
84
- - !ruby/object:Gem::Version
85
- version: 4.0.0
86
- type: :runtime
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- requirements:
90
- - - ">="
91
- - !ruby/object:Gem::Version
92
- version: 2.1.2
93
- - - "<"
94
- - !ruby/object:Gem::Version
95
- version: 4.0.0
96
70
  - !ruby/object:Gem::Dependency
97
71
  name: will_paginate
98
72
  requirement: !ruby/object:Gem::Requirement
@@ -114,21 +88,21 @@ dependencies:
114
88
  - !ruby/object:Gem::Version
115
89
  version: 4.0.0
116
90
  - !ruby/object:Gem::Dependency
117
- name: highline
91
+ name: rake
118
92
  requirement: !ruby/object:Gem::Requirement
119
93
  requirements:
120
94
  - - ">="
121
95
  - !ruby/object:Gem::Version
122
- version: '1.0'
123
- type: :runtime
96
+ version: '0'
97
+ type: :development
124
98
  prerelease: false
125
99
  version_requirements: !ruby/object:Gem::Requirement
126
100
  requirements:
127
101
  - - ">="
128
102
  - !ruby/object:Gem::Version
129
- version: '1.0'
103
+ version: '0'
130
104
  - !ruby/object:Gem::Dependency
131
- name: rake
105
+ name: rspec
132
106
  requirement: !ruby/object:Gem::Requirement
133
107
  requirements:
134
108
  - - ">="
@@ -142,7 +116,7 @@ dependencies:
142
116
  - !ruby/object:Gem::Version
143
117
  version: '0'
144
118
  - !ruby/object:Gem::Dependency
145
- name: rspec
119
+ name: webmock
146
120
  requirement: !ruby/object:Gem::Requirement
147
121
  requirements:
148
122
  - - ">="
@@ -156,7 +130,7 @@ dependencies:
156
130
  - !ruby/object:Gem::Version
157
131
  version: '0'
158
132
  - !ruby/object:Gem::Dependency
159
- name: webmock
133
+ name: rexml
160
134
  requirement: !ruby/object:Gem::Requirement
161
135
  requirements:
162
136
  - - ">="
@@ -170,7 +144,7 @@ dependencies:
170
144
  - !ruby/object:Gem::Version
171
145
  version: '0'
172
146
  - !ruby/object:Gem::Dependency
173
- name: rexml
147
+ name: typhoeus
174
148
  requirement: !ruby/object:Gem::Requirement
175
149
  requirements:
176
150
  - - ">="
@@ -184,7 +158,7 @@ dependencies:
184
158
  - !ruby/object:Gem::Version
185
159
  version: '0'
186
160
  - !ruby/object:Gem::Dependency
187
- name: typhoeus
161
+ name: ci_reporter_rspec
188
162
  requirement: !ruby/object:Gem::Requirement
189
163
  requirements:
190
164
  - - ">="
@@ -198,19 +172,25 @@ dependencies:
198
172
  - !ruby/object:Gem::Version
199
173
  version: '0'
200
174
  - !ruby/object:Gem::Dependency
201
- name: ci_reporter_rspec
175
+ name: builder
202
176
  requirement: !ruby/object:Gem::Requirement
203
177
  requirements:
204
178
  - - ">="
205
179
  - !ruby/object:Gem::Version
206
- version: '0'
180
+ version: 2.1.2
181
+ - - "<"
182
+ - !ruby/object:Gem::Version
183
+ version: 4.0.0
207
184
  type: :development
208
185
  prerelease: false
209
186
  version_requirements: !ruby/object:Gem::Requirement
210
187
  requirements:
211
188
  - - ">="
212
189
  - !ruby/object:Gem::Version
213
- version: '0'
190
+ version: 2.1.2
191
+ - - "<"
192
+ - !ruby/object:Gem::Version
193
+ version: 4.0.0
214
194
  - !ruby/object:Gem::Dependency
215
195
  name: simplecov-rcov
216
196
  requirement: !ruby/object:Gem::Requirement
@@ -556,208 +536,208 @@ required_rubygems_version: !ruby/object:Gem::Requirement
556
536
  - !ruby/object:Gem::Version
557
537
  version: '1.8'
558
538
  requirements: []
559
- rubygems_version: 3.1.6
539
+ rubygems_version: 3.5.22
560
540
  signing_key:
561
541
  specification_version: 4
562
542
  summary: A library for interacting with the Spark web services.
563
543
  test_files:
564
- - spec/fixtures/sharedlinks/success.json
565
- - spec/fixtures/listing_carts/listing_cart.json
566
- - spec/fixtures/listing_carts/new_portal_cart.json
567
- - spec/fixtures/listing_carts/put_name.json
568
- - spec/fixtures/listing_carts/add_listings.json
569
- - spec/fixtures/listing_carts/add_listing_post.json
570
- - spec/fixtures/listing_carts/add_portal_cart_listings_post.json
571
- - spec/fixtures/listing_carts/add_portal_cart_listings.json
572
- - spec/fixtures/listing_carts/put_ids.json
573
- - spec/fixtures/listing_carts/post_portal_cart.json
574
- - spec/fixtures/listing_carts/add_listings_post.json
575
- - spec/fixtures/listing_carts/add_listing.json
576
- - spec/fixtures/listing_carts/remove_listing.json
577
- - spec/fixtures/listing_carts/empty.json
578
- - spec/fixtures/listing_carts/put.json
579
- - spec/fixtures/listing_carts/post.json
580
- - spec/fixtures/listing_carts/listing_portal_cart.json
581
- - spec/fixtures/listing_carts/new.json
582
- - spec/fixtures/newsfeeds/get.json
583
- - spec/fixtures/newsfeeds/inactive.json
584
- - spec/fixtures/newsfeeds/meta.json
585
- - spec/fixtures/errors/failure_with_msg.json
586
- - spec/fixtures/errors/expired.json
587
- - spec/fixtures/errors/failure.json
588
- - spec/fixtures/errors/failure_with_constraint.json
589
- - spec/fixtures/messages/new_empty.json
590
- - spec/fixtures/messages/count.json
591
- - spec/fixtures/messages/get.json
592
- - spec/fixtures/messages/new_with_recipients.json
593
- - spec/fixtures/messages/post.json
594
- - spec/fixtures/messages/new.json
595
- - spec/fixtures/sorts/get.json
596
- - spec/fixtures/fields/order_a.json
597
- - spec/fixtures/fields/settings.json
598
- - spec/fixtures/fields/order.json
599
- - spec/fixtures/notifications/new_empty.json
600
- - spec/fixtures/notifications/unread.json
601
- - spec/fixtures/notifications/mark_read.json
602
- - spec/fixtures/notifications/notifications.json
603
- - spec/fixtures/notifications/post.json
604
- - spec/fixtures/notifications/new.json
605
- - spec/fixtures/activities/get.json
606
- - spec/fixtures/property_types/property_types.json
607
- - spec/fixtures/listing_meta_translations/get.json
608
- - spec/fixtures/no_results.json
609
- - spec/fixtures/comments/get.json
610
- - spec/fixtures/comments/post.json
611
- - spec/fixtures/comments/new.json
612
- - spec/fixtures/count.json
613
- - spec/fixtures/oauth2/error.json
614
- - spec/fixtures/oauth2/access.json
615
- - spec/fixtures/oauth2/access_with_refresh.json
616
- - spec/fixtures/oauth2/access_with_old_refresh.json
617
- - spec/fixtures/oauth2/refresh_body.json
618
- - spec/fixtures/oauth2/authorization_code_body.json
619
- - spec/fixtures/oauth2/password_body.json
620
- - spec/fixtures/standardfields/nearby.json
621
- - spec/fixtures/standardfields/standardfields.json
622
- - spec/fixtures/standardfields/city.json
623
- - spec/fixtures/standardfields/stateorprovince.json
624
- - spec/fixtures/accounts/office.json
625
- - spec/fixtures/accounts/my_put.json
626
544
  - spec/fixtures/accounts/all.json
627
- - spec/fixtures/accounts/my_portal.json
628
545
  - spec/fixtures/accounts/my.json
629
- - spec/fixtures/accounts/password_save.json
546
+ - spec/fixtures/accounts/my_portal.json
547
+ - spec/fixtures/accounts/my_put.json
630
548
  - spec/fixtures/accounts/my_save.json
631
- - spec/fixtures/session.json
632
- - spec/fixtures/generic_delete.json
633
- - spec/fixtures/generic_failure.json
634
- - spec/fixtures/success.json
635
- - spec/fixtures/idx_links/get.json
636
- - spec/fixtures/empty.json
549
+ - spec/fixtures/accounts/office.json
550
+ - spec/fixtures/accounts/password_save.json
551
+ - spec/fixtures/activities/get.json
552
+ - spec/fixtures/authentication_failure.json
553
+ - spec/fixtures/base.json
554
+ - spec/fixtures/comments/get.json
555
+ - spec/fixtures/comments/new.json
556
+ - spec/fixtures/comments/post.json
557
+ - spec/fixtures/contacts/contacts.json
558
+ - spec/fixtures/contacts/my.json
559
+ - spec/fixtures/contacts/new.json
637
560
  - spec/fixtures/contacts/new_empty.json
638
561
  - spec/fixtures/contacts/new_notify.json
639
- - spec/fixtures/contacts/contacts.json
562
+ - spec/fixtures/contacts/post.json
640
563
  - spec/fixtures/contacts/tags.json
641
564
  - spec/fixtures/contacts/vow_accounts/edit.json
642
565
  - spec/fixtures/contacts/vow_accounts/get.json
643
- - spec/fixtures/contacts/vow_accounts/post.json
644
566
  - spec/fixtures/contacts/vow_accounts/new.json
645
- - spec/fixtures/contacts/my.json
646
- - spec/fixtures/contacts/post.json
647
- - spec/fixtures/contacts/new.json
648
- - spec/fixtures/oauth2_error.json
649
- - spec/fixtures/listings/no_subresources.json
650
- - spec/fixtures/listings/put_expiration_date.json
567
+ - spec/fixtures/contacts/vow_accounts/post.json
568
+ - spec/fixtures/count.json
569
+ - spec/fixtures/empty.json
570
+ - spec/fixtures/errors/expired.json
571
+ - spec/fixtures/errors/failure.json
572
+ - spec/fixtures/errors/failure_with_constraint.json
573
+ - spec/fixtures/errors/failure_with_msg.json
574
+ - spec/fixtures/fields/order.json
575
+ - spec/fixtures/fields/order_a.json
576
+ - spec/fixtures/fields/settings.json
577
+ - spec/fixtures/finders.json
578
+ - spec/fixtures/generic_delete.json
579
+ - spec/fixtures/generic_failure.json
580
+ - spec/fixtures/idx_links/get.json
581
+ - spec/fixtures/listing_carts/add_listing.json
582
+ - spec/fixtures/listing_carts/add_listing_post.json
583
+ - spec/fixtures/listing_carts/add_listings.json
584
+ - spec/fixtures/listing_carts/add_listings_post.json
585
+ - spec/fixtures/listing_carts/add_portal_cart_listings.json
586
+ - spec/fixtures/listing_carts/add_portal_cart_listings_post.json
587
+ - spec/fixtures/listing_carts/empty.json
588
+ - spec/fixtures/listing_carts/listing_cart.json
589
+ - spec/fixtures/listing_carts/listing_portal_cart.json
590
+ - spec/fixtures/listing_carts/new.json
591
+ - spec/fixtures/listing_carts/new_portal_cart.json
592
+ - spec/fixtures/listing_carts/post.json
593
+ - spec/fixtures/listing_carts/post_portal_cart.json
594
+ - spec/fixtures/listing_carts/put.json
595
+ - spec/fixtures/listing_carts/put_ids.json
596
+ - spec/fixtures/listing_carts/put_name.json
597
+ - spec/fixtures/listing_carts/remove_listing.json
598
+ - spec/fixtures/listing_meta_translations/get.json
599
+ - spec/fixtures/listings/constraints.json
651
600
  - spec/fixtures/listings/constraints_with_pagination.json
652
- - spec/fixtures/listings/floplans_index.json
653
601
  - spec/fixtures/listings/document_index.json
654
- - spec/fixtures/listings/shared_listing_post.json
655
- - spec/fixtures/listings/reorder_photo.json
656
- - spec/fixtures/listings/shared_listing_get.json
657
- - spec/fixtures/listings/photos/rollback.json
658
- - spec/fixtures/listings/photos/rotate.json
659
- - spec/fixtures/listings/photos/index.json
660
- - spec/fixtures/listings/photos/batch_delete.json
661
- - spec/fixtures/listings/photos/post.json
662
- - spec/fixtures/listings/photos/new.json
663
- - spec/fixtures/listings/with_supplement.json
664
- - spec/fixtures/listings/with_documents.json
665
- - spec/fixtures/listings/with_rental_calendar.json
666
- - spec/fixtures/listings/with_photos.json
667
- - spec/fixtures/listings/rental_calendar.json
668
- - spec/fixtures/listings/put_reorder_photo.json
669
- - spec/fixtures/listings/videos_index.json
602
+ - spec/fixtures/listings/floplans_index.json
670
603
  - spec/fixtures/listings/multiple.json
671
- - spec/fixtures/listings/with_videos.json
672
- - spec/fixtures/listings/virtual_tours_index.json
604
+ - spec/fixtures/listings/no_subresources.json
673
605
  - spec/fixtures/listings/open_houses.json
674
- - spec/fixtures/listings/tour_of_homes.json
606
+ - spec/fixtures/listings/photos/batch_delete.json
607
+ - spec/fixtures/listings/photos/index.json
608
+ - spec/fixtures/listings/photos/new.json
609
+ - spec/fixtures/listings/photos/post.json
610
+ - spec/fixtures/listings/photos/rollback.json
611
+ - spec/fixtures/listings/photos/rotate.json
675
612
  - spec/fixtures/listings/put.json
613
+ - spec/fixtures/listings/put_expiration_date.json
614
+ - spec/fixtures/listings/put_reorder_photo.json
615
+ - spec/fixtures/listings/rental_calendar.json
616
+ - spec/fixtures/listings/reorder_photo.json
617
+ - spec/fixtures/listings/shared_listing_get.json
676
618
  - spec/fixtures/listings/shared_listing_new.json
677
- - spec/fixtures/listings/constraints.json
619
+ - spec/fixtures/listings/shared_listing_post.json
620
+ - spec/fixtures/listings/tour_of_homes.json
678
621
  - spec/fixtures/listings/tour_of_homes_search.json
679
- - spec/fixtures/listings/with_vtour.json
622
+ - spec/fixtures/listings/videos_index.json
623
+ - spec/fixtures/listings/virtual_tours_index.json
624
+ - spec/fixtures/listings/with_documents.json
680
625
  - spec/fixtures/listings/with_permissions.json
681
- - spec/fixtures/notes/agent_shared.json
626
+ - spec/fixtures/listings/with_photos.json
627
+ - spec/fixtures/listings/with_rental_calendar.json
628
+ - spec/fixtures/listings/with_supplement.json
629
+ - spec/fixtures/listings/with_videos.json
630
+ - spec/fixtures/listings/with_vtour.json
631
+ - spec/fixtures/logo_fbs.png
632
+ - spec/fixtures/messages/count.json
633
+ - spec/fixtures/messages/get.json
634
+ - spec/fixtures/messages/new.json
635
+ - spec/fixtures/messages/new_empty.json
636
+ - spec/fixtures/messages/new_with_recipients.json
637
+ - spec/fixtures/messages/post.json
638
+ - spec/fixtures/newsfeeds/get.json
639
+ - spec/fixtures/newsfeeds/inactive.json
640
+ - spec/fixtures/newsfeeds/meta.json
641
+ - spec/fixtures/no_results.json
682
642
  - spec/fixtures/notes/add.json
643
+ - spec/fixtures/notes/agent_shared.json
683
644
  - spec/fixtures/notes/agent_shared_empty.json
684
645
  - spec/fixtures/notes/new.json
685
- - spec/fixtures/saved_searches/update.json
686
- - spec/fixtures/saved_searches/with_newsfeed.json
646
+ - spec/fixtures/notifications/mark_read.json
647
+ - spec/fixtures/notifications/new.json
648
+ - spec/fixtures/notifications/new_empty.json
649
+ - spec/fixtures/notifications/notifications.json
650
+ - spec/fixtures/notifications/post.json
651
+ - spec/fixtures/notifications/unread.json
652
+ - spec/fixtures/oauth2/access.json
653
+ - spec/fixtures/oauth2/access_with_old_refresh.json
654
+ - spec/fixtures/oauth2/access_with_refresh.json
655
+ - spec/fixtures/oauth2/authorization_code_body.json
656
+ - spec/fixtures/oauth2/error.json
657
+ - spec/fixtures/oauth2/password_body.json
658
+ - spec/fixtures/oauth2/refresh_body.json
659
+ - spec/fixtures/oauth2_error.json
660
+ - spec/fixtures/portal/disable.json
661
+ - spec/fixtures/portal/enable.json
662
+ - spec/fixtures/portal/my.json
663
+ - spec/fixtures/portal/my_non_existant.json
664
+ - spec/fixtures/portal/new.json
665
+ - spec/fixtures/portal/post.json
666
+ - spec/fixtures/property_types/property_types.json
667
+ - spec/fixtures/rules/get.json
687
668
  - spec/fixtures/saved_searches/get.json
688
- - spec/fixtures/saved_searches/without_newsfeed.json
689
- - spec/fixtures/saved_searches/with_inactive_newsfeed.json
690
- - spec/fixtures/saved_searches/post.json
691
669
  - spec/fixtures/saved_searches/get_provided.json
692
670
  - spec/fixtures/saved_searches/new.json
693
- - spec/fixtures/authentication_failure.json
694
- - spec/fixtures/rules/get.json
695
- - spec/fixtures/finders.json
696
- - spec/fixtures/base.json
697
- - spec/fixtures/logo_fbs.png
671
+ - spec/fixtures/saved_searches/post.json
672
+ - spec/fixtures/saved_searches/update.json
673
+ - spec/fixtures/saved_searches/with_inactive_newsfeed.json
674
+ - spec/fixtures/saved_searches/with_newsfeed.json
675
+ - spec/fixtures/saved_searches/without_newsfeed.json
698
676
  - spec/fixtures/search_templates/quick_searches/get.json
699
- - spec/fixtures/portal/enable.json
700
- - spec/fixtures/portal/my_non_existant.json
701
- - spec/fixtures/portal/my.json
702
- - spec/fixtures/portal/disable.json
703
- - spec/fixtures/portal/post.json
704
- - spec/fixtures/portal/new.json
705
- - spec/unit/spark_api/primary_array_spec.rb
706
- - spec/unit/spark_api/faraday_middleware_spec.rb
707
- - spec/unit/spark_api/options_hash_spec.rb
677
+ - spec/fixtures/session.json
678
+ - spec/fixtures/sharedlinks/success.json
679
+ - spec/fixtures/sorts/get.json
680
+ - spec/fixtures/standardfields/city.json
681
+ - spec/fixtures/standardfields/nearby.json
682
+ - spec/fixtures/standardfields/standardfields.json
683
+ - spec/fixtures/standardfields/stateorprovince.json
684
+ - spec/fixtures/success.json
685
+ - spec/unit/spark_api/authentication/api_auth_spec.rb
686
+ - spec/unit/spark_api/authentication/base_auth_spec.rb
687
+ - spec/unit/spark_api/authentication/oauth2_impl/faraday_middleware_spec.rb
688
+ - spec/unit/spark_api/authentication/oauth2_impl/grant_type_base_spec.rb
689
+ - spec/unit/spark_api/authentication/oauth2_impl/single_session_provider_spec.rb
690
+ - spec/unit/spark_api/authentication/oauth2_spec.rb
708
691
  - spec/unit/spark_api/authentication_spec.rb
709
- - spec/unit/spark_api/models/rule_spec.rb
710
- - spec/unit/spark_api/models/shared_listing_spec.rb
711
- - spec/unit/spark_api/models/constraint_spec.rb
712
- - spec/unit/spark_api/models/photo_spec.rb
713
- - spec/unit/spark_api/models/portal_spec.rb
714
- - spec/unit/spark_api/models/finders_spec.rb
715
- - spec/unit/spark_api/models/subresource_spec.rb
716
- - spec/unit/spark_api/models/rental_calendar_spec.rb
717
- - spec/unit/spark_api/models/listing_spec.rb
692
+ - spec/unit/spark_api/configuration/yaml_spec.rb
693
+ - spec/unit/spark_api/configuration_spec.rb
694
+ - spec/unit/spark_api/faraday_middleware_spec.rb
718
695
  - spec/unit/spark_api/models/account_report_spec.rb
719
- - spec/unit/spark_api/models/vow_account_spec.rb
696
+ - spec/unit/spark_api/models/account_spec.rb
720
697
  - spec/unit/spark_api/models/activity_spec.rb
721
- - spec/unit/spark_api/models/search_template/quick_search_spec.rb
722
- - spec/unit/spark_api/models/shared_link_spec.rb
723
- - spec/unit/spark_api/models/sort_spec.rb
724
- - spec/unit/spark_api/models/standard_fields_spec.rb
725
- - spec/unit/spark_api/models/concerns/savable_spec.rb
698
+ - spec/unit/spark_api/models/base_spec.rb
726
699
  - spec/unit/spark_api/models/concerns/destroyable_spec.rb
727
- - spec/unit/spark_api/models/dirty_spec.rb
728
- - spec/unit/spark_api/models/property_types_spec.rb
729
- - spec/unit/spark_api/models/floplan_spec.rb
730
- - spec/unit/spark_api/models/tour_of_home_spec.rb
700
+ - spec/unit/spark_api/models/concerns/savable_spec.rb
731
701
  - spec/unit/spark_api/models/connect_prefs_spec.rb
732
- - spec/unit/spark_api/models/listing_meta_translations_spec.rb
702
+ - spec/unit/spark_api/models/constraint_spec.rb
703
+ - spec/unit/spark_api/models/contact_spec.rb
733
704
  - spec/unit/spark_api/models/defaultable_spec.rb
734
- - spec/unit/spark_api/models/base_spec.rb
735
- - spec/unit/spark_api/models/virtual_tour_spec.rb
736
- - spec/unit/spark_api/models/system_info_spec.rb
737
- - spec/unit/spark_api/models/saved_search_spec.rb
738
- - spec/unit/spark_api/models/open_house_spec.rb
739
- - spec/unit/spark_api/models/account_spec.rb
740
- - spec/unit/spark_api/models/video_spec.rb
741
- - spec/unit/spark_api/models/newsfeed_spec.rb
705
+ - spec/unit/spark_api/models/dirty_spec.rb
742
706
  - spec/unit/spark_api/models/document_spec.rb
743
707
  - spec/unit/spark_api/models/email_link_spec.rb
744
- - spec/unit/spark_api/models/note_spec.rb
745
708
  - spec/unit/spark_api/models/fields_spec.rb
709
+ - spec/unit/spark_api/models/finders_spec.rb
710
+ - spec/unit/spark_api/models/floplan_spec.rb
711
+ - spec/unit/spark_api/models/listing_cart_spec.rb
712
+ - spec/unit/spark_api/models/listing_meta_translations_spec.rb
713
+ - spec/unit/spark_api/models/listing_spec.rb
714
+ - spec/unit/spark_api/models/message_spec.rb
746
715
  - spec/unit/spark_api/models/news_feed_meta_spec.rb
716
+ - spec/unit/spark_api/models/newsfeed_spec.rb
717
+ - spec/unit/spark_api/models/note_spec.rb
747
718
  - spec/unit/spark_api/models/notification_spec.rb
748
- - spec/unit/spark_api/models/message_spec.rb
749
- - spec/unit/spark_api/models/contact_spec.rb
750
- - spec/unit/spark_api/models/listing_cart_spec.rb
751
- - spec/unit/spark_api/paginate_spec.rb
719
+ - spec/unit/spark_api/models/open_house_spec.rb
720
+ - spec/unit/spark_api/models/photo_spec.rb
721
+ - spec/unit/spark_api/models/portal_spec.rb
722
+ - spec/unit/spark_api/models/property_types_spec.rb
723
+ - spec/unit/spark_api/models/rental_calendar_spec.rb
724
+ - spec/unit/spark_api/models/rule_spec.rb
725
+ - spec/unit/spark_api/models/saved_search_spec.rb
726
+ - spec/unit/spark_api/models/search_template/quick_search_spec.rb
727
+ - spec/unit/spark_api/models/shared_link_spec.rb
728
+ - spec/unit/spark_api/models/shared_listing_spec.rb
729
+ - spec/unit/spark_api/models/sort_spec.rb
730
+ - spec/unit/spark_api/models/standard_fields_spec.rb
731
+ - spec/unit/spark_api/models/subresource_spec.rb
732
+ - spec/unit/spark_api/models/system_info_spec.rb
733
+ - spec/unit/spark_api/models/tour_of_home_spec.rb
734
+ - spec/unit/spark_api/models/video_spec.rb
735
+ - spec/unit/spark_api/models/virtual_tour_spec.rb
736
+ - spec/unit/spark_api/models/vow_account_spec.rb
752
737
  - spec/unit/spark_api/multi_client_spec.rb
753
- - spec/unit/spark_api/authentication/oauth2_spec.rb
754
- - spec/unit/spark_api/authentication/api_auth_spec.rb
755
- - spec/unit/spark_api/authentication/oauth2_impl/faraday_middleware_spec.rb
756
- - spec/unit/spark_api/authentication/oauth2_impl/grant_type_base_spec.rb
757
- - spec/unit/spark_api/authentication/oauth2_impl/single_session_provider_spec.rb
758
- - spec/unit/spark_api/authentication/base_auth_spec.rb
759
- - spec/unit/spark_api/configuration/yaml_spec.rb
760
- - spec/unit/spark_api/configuration_spec.rb
738
+ - spec/unit/spark_api/options_hash_spec.rb
739
+ - spec/unit/spark_api/paginate_spec.rb
740
+ - spec/unit/spark_api/primary_array_spec.rb
761
741
  - spec/unit/spark_api/request_spec.rb
762
742
  - spec/unit/spark_api_spec.rb
763
743
  - spec/spec_helper.rb