esa 1.18.0 → 2.1.0

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
  SHA256:
3
- metadata.gz: 30bd891e4b419207197f4357cbcebc7ba4c5be8237e6fb9a0d2597535a6e01d2
4
- data.tar.gz: 2b43e6798a52f317aa7cda989c7955ed1a06047e20c63b351a2a7b86efe36d21
3
+ metadata.gz: eea23711a36940309cbb971274c7fc6d284cf283da6eec30c9cff011fb75718f
4
+ data.tar.gz: 91db4cae26f412274440fa0f049cb0df75d4486a1b081668fd231d322ee22c7a
5
5
  SHA512:
6
- metadata.gz: d7dd2bac6331746966470399273015996a91ef5c2662c65ae0c9474a969dc27e6ae8c4c4d11cc0e40c9e1a59c4c3636abc49432a8787d475eb885cb880c67baa
7
- data.tar.gz: 4a8989aca4bdef1de8b64b24853096c50dab38f2240adddde800071d211f60d79fdc48c038811c60a97d4cf892a1474d29b20faa55557de2f04e91df0cd376a0
6
+ metadata.gz: 9790b5833e9c5f6cf2a31b89264a3b5db33b5f03c8c96e7cf253923cb2dd61572453009a470e5bfe4641cca4013b0e0285fff1113eb8821d7cc4461a010741cd
7
+ data.tar.gz: 658a076b4b69d6694bb62f5f2d02c3ecba0ad7e7e9b656800b38550c319ac701446d11877021f0c599e54fb08956bf38926a2308ad5aa6c6f3c2e52cfec02f33
data/CHANGELOG.md CHANGED
@@ -1,6 +1,18 @@
1
1
  ## Unreleased
2
2
 
3
3
  nothing
4
+ ## 2.1.0 (2023-10-03)
5
+
6
+ - add: [Support GET /v1/%{team_name}/members/%{identifier} API by ppworks · Pull Request #63 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/63)
7
+ - doc: [Update "DELETE /v1/teams/bar/members/" section in the README](https://github.com/esaio/esa-ruby/pull/62)
8
+ - ci: [Bump actions/checkout from 3 to 4](https://github.com/esaio/esa-ruby/pull/61)
9
+ - ci: [Add github-actions to Dependabot](https://github.com/esaio/esa-ruby/pull/60)
10
+
11
+ ## 2.0.0 (2023-04-06)
12
+
13
+ - :warning: breaking: [Support Faraday 2.0.1+ by fukayatsu · Pull Request #58 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/58)
14
+ - Drop support for Ruby < 2.7.0
15
+ - Drop support for Faraday < 2.0.1
4
16
 
5
17
  ## 1.18.0 (2020-10-19)
6
18
 
@@ -13,74 +25,96 @@ nothing
13
25
  - **changed**: Drop support for Ruby 2.4
14
26
 
15
27
  ## 1.16.0 (2020-01-20)
28
+
16
29
  - add: [Enable to set default_headers by fukayatsu · Pull Request #43 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/43)
17
30
 
18
31
  ## 1.15.0 (2019-12-27)
32
+
19
33
  - add: [Add ApiMethods#delete_member by fukayatsu · Pull Request #40 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/40)
20
34
  - ci: [Use github actions for CI by fukayatsu · Pull Request #38 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/38)
21
35
  - ci: [Update development environment by fukayatsu · Pull Request #37 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/37)
22
36
 
23
37
  ## 1.14.0 (2018-12-13)
38
+
24
39
  - changed: [Relax gem dependencies by ppworks · Pull Request #35 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/35)
25
40
 
26
41
  ## 1.13.0 (2017-11-01)
42
+
27
43
  - **changed**: [Retry on rate limit exceeded by default by fukayatsu · Pull Request #31 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/31)
28
44
  - Use `Esa::Client.new(retry_on_rate_limit_exceeded: false, ...)` for previous behavior.
29
45
  - doc: [Fixed README typo by polidog · Pull Request #30 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/30)
30
46
 
31
47
  ## 1.12.0 (2017-10-03)
48
+
32
49
  - add: [Support /api/v1/comments API by ppworks · Pull Request #29 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/29)
33
50
 
34
51
  ## 1.11.0 (2017-09-04)
52
+
35
53
  - add: [Support emoji API by ppworks · Pull Request #28 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/28)
36
54
 
37
55
  ## 1.10.0 (2017-08-22)
56
+
38
57
  - add: [Support invitation API by ppworks · Pull Request #27 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/27)
39
58
 
40
59
  ## 1.9.0 (2017-08-02)
60
+
41
61
  - add: [Enable to set headers for remote url on #upload_attachment by nownabe · Pull Request #26 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/26)
42
62
 
43
63
  ## 1.8.0 (2017-02-25)
64
+
44
65
  - add: [Add batch_move_category API by fukayatsu · Pull Request #25 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/25)
45
66
 
46
67
  ## 1.7.0 (2016-08-16)
68
+
47
69
  - add: [Support signed_url API by fukayatsu · Pull Request #24 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/24)
48
70
  - fix: [Fix a typo by ksss · Pull Request #23 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/23)
49
71
 
50
72
  ## 1.6.0 (2016-06-10)
73
+
51
74
  - add: [Add Categories API and Tags API by fukayatsu · Pull Request #22 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/22)
52
75
 
53
76
  ## 1.5.0 (2016-05-05)
77
+
54
78
  - add: [Add Reaction APIs: star&watch by fukayatsu · Pull Request #20 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/20)
55
79
 
56
80
  ## 1.4.0 (2016-04-17)
81
+
57
82
  - add: [Add Authenticated User API by fukayatsu · Pull Request #19 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/19)
58
83
 
59
84
  ## 1.3.0 (2016-02-09)
85
+
60
86
  - add: [Add Sharing API by fukayatsu · Pull Request #17 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/17)
61
87
 
62
88
  ## 1.2.0 (2015-12-03)
89
+
63
90
  - add: [Add Members API by fukayatsu · Pull Request #16 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/16)
64
91
 
65
92
  ## 1.1.2 (2015-10-05)
93
+
66
94
  - fix: [Esa::Client#upload_attachment needs 'multi_xml' gem by ppworks · Pull Request #15 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/15)
67
95
 
68
96
  ## 1.1.1 (2015-10-01)
97
+
69
98
  - add: [Enable to set cookie for remote url on #upload_attachment by fukayatsu · Pull Request #14 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/14)
70
99
 
71
100
  ## 1.1.0 (2015-10-01)
101
+
72
102
  - add: [Enable to Upload Attachment by fukayatsu · Pull Request #13 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/13)
73
103
 
74
104
  ## 1.0.0 (2015-09-25)
105
+
75
106
  - Production Ready (\\( ⁰⊖⁰)/)
76
107
  - [Add Stats API by fukayatsu · Pull Request #12 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/12)
77
108
  - [Use Travis CI for testing by hanachin · Pull Request #11 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/11)
78
109
 
79
110
  ## 0.0.6 (2015-06-21)
111
+
80
112
  - [Support Comment API by fukayatsu · Pull Request #9 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/9)
81
113
 
82
114
  ## 0.0.5 (2015-05-21)
115
+
83
116
  - [Use current_team! instead of current_team by fukayatsu · Pull Request #8 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/8)
84
117
 
85
118
  ## 0.0.4 (2015-05-14)
119
+
86
120
  - [Fix Esa::Response#headers and implement its spec by yasaichi · Pull Request #7 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/7)
data/README.md CHANGED
@@ -43,10 +43,25 @@ client.stats
43
43
  client.members
44
44
  #=> GET /v1/teams/bar/members
45
45
 
46
- screen_name = 'alice'
47
- client.delete_member(screen_name)
46
+ client.member('me')
47
+ #=> GET /v1/teams/bar/members/me
48
+
49
+ find_by_screen_name = 'alice'
50
+ client.member(find_by_screen_name)
51
+ #=> GET /v1/teams/bar/members/alice
52
+
53
+ find_by_email_address = 'alice@example.com'
54
+ client.member(find_by_email_address)
55
+ #=> GET /v1/teams/bar/members/alice@example.com
56
+
57
+ delete_by_screen_name = 'alice'
58
+ client.delete_member(delete_by_screen_name)
48
59
  #=> DELETE /v1/teams/bar/members/alice
49
60
 
61
+ delete_by_email_address = 'alice@example.com'
62
+ client.delete_member(delete_by_email_address)
63
+ #=> DELETE /v1/teams/bar/members/alice@example.com
64
+
50
65
  # Post API
51
66
  client.posts
52
67
  #=> GET /v1/teams/foo/posts
data/esa.gemspec CHANGED
@@ -13,13 +13,15 @@ Gem::Specification.new do |spec|
13
13
  spec.homepage = 'https://github.com/esaio/esa-ruby/'
14
14
  spec.license = 'MIT'
15
15
 
16
- spec.files = `git ls-files -z`.split("\x0")
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match?(%r{^(spec/|\.)}) }
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
18
  spec.require_paths = ['lib']
20
19
 
21
- spec.add_runtime_dependency 'faraday', '>= 0.9', '< 2.0'
22
- spec.add_runtime_dependency 'faraday_middleware', '>= 0.12', '< 2.0'
20
+ spec.required_ruby_version = ">= 2.7.0"
21
+
22
+ spec.add_runtime_dependency 'faraday', '>= 2.0.1', '< 3.0'
23
+ spec.add_runtime_dependency 'faraday-multipart'
24
+ spec.add_runtime_dependency 'faraday-xml'
23
25
  spec.add_runtime_dependency 'mime-types', '>= 2.6', '< 4.0'
24
26
  spec.add_runtime_dependency 'multi_xml', '>= 0.5.5', '< 1.0'
25
27
 
@@ -1,4 +1,6 @@
1
1
  require 'base64'
2
+ require 'mime/types'
3
+
2
4
  module Esa
3
5
  module ApiMethods
4
6
  HTTP_REGEX = %r{^https?://}
@@ -23,6 +25,10 @@ module Esa
23
25
  send_get("/v1/teams/#{current_team!}/members", params, headers)
24
26
  end
25
27
 
28
+ def member(identifier, params = nil, headers = nil)
29
+ send_get("/v1/teams/#{current_team!}/members/#{identifier}", params, headers)
30
+ end
31
+
26
32
  def delete_member(screen_name, params = nil, headers = nil)
27
33
  send_delete("/v1/teams/#{current_team!}/members/#{screen_name}", params, headers)
28
34
  end
@@ -183,7 +189,7 @@ module Esa
183
189
  return response unless response.status == 200
184
190
 
185
191
  attachment = response.body['attachment']
186
- form_data = response.body['form'].merge(file: Faraday::UploadIO.new(file, params[:type]))
192
+ form_data = response.body['form'].merge(file: Faraday::FilePart.new(file, params[:type]))
187
193
 
188
194
  s3_response = send_s3_request(:post, attachment['endpoint'], form_data)
189
195
  return s3_response unless s3_response.status == 204
@@ -206,7 +212,6 @@ module Esa
206
212
  end
207
213
 
208
214
  def content_type_from_file(file)
209
- require 'mime/types'
210
215
  if mime_type = MIME::Types.type_for(file.path).first
211
216
  mime_type.content_type
212
217
  end
data/lib/esa/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Esa
4
- VERSION = '1.18.0'
4
+ VERSION = '2.1.0'
5
5
  end
data/lib/esa.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require "faraday"
2
- require "faraday_middleware"
2
+ require "faraday/multipart"
3
+ require "faraday/xml"
3
4
 
4
5
  require "esa/version"
5
6
  require "esa/client"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esa
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - fukayatsu
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-19 00:00:00.000000000 Z
11
+ date: 2023-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -16,40 +16,48 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.9'
19
+ version: 2.0.1
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '2.0'
22
+ version: '3.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.9'
29
+ version: 2.0.1
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '2.0'
32
+ version: '3.0'
33
33
  - !ruby/object:Gem::Dependency
34
- name: faraday_middleware
34
+ name: faraday-multipart
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '0.12'
40
- - - "<"
41
- - !ruby/object:Gem::Version
42
- version: '2.0'
39
+ version: '0'
43
40
  type: :runtime
44
41
  prerelease: false
45
42
  version_requirements: !ruby/object:Gem::Requirement
46
43
  requirements:
47
44
  - - ">="
48
45
  - !ruby/object:Gem::Version
49
- version: '0.12'
50
- - - "<"
46
+ version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: faraday-xml
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
51
52
  - !ruby/object:Gem::Version
52
- version: '2.0'
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
53
61
  - !ruby/object:Gem::Dependency
54
62
  name: mime-types
55
63
  requirement: !ruby/object:Gem::Requirement
@@ -160,16 +168,13 @@ dependencies:
160
168
  - - "~>"
161
169
  - !ruby/object:Gem::Version
162
170
  version: 3.7.6
163
- description:
171
+ description:
164
172
  email:
165
173
  - fukayatsu@gmail.com
166
174
  executables: []
167
175
  extensions: []
168
176
  extra_rdoc_files: []
169
177
  files:
170
- - ".github/workflows/build.yml"
171
- - ".gitignore"
172
- - ".rspec"
173
178
  - CHANGELOG.md
174
179
  - Gemfile
175
180
  - LICENSE.txt
@@ -182,14 +187,11 @@ files:
182
187
  - lib/esa/errors.rb
183
188
  - lib/esa/response.rb
184
189
  - lib/esa/version.rb
185
- - spec/esa/client_spec.rb
186
- - spec/esa/response_spec.rb
187
- - spec/spec_helper.rb
188
190
  homepage: https://github.com/esaio/esa-ruby/
189
191
  licenses:
190
192
  - MIT
191
193
  metadata: {}
192
- post_install_message:
194
+ post_install_message:
193
195
  rdoc_options: []
194
196
  require_paths:
195
197
  - lib
@@ -197,18 +199,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
197
199
  requirements:
198
200
  - - ">="
199
201
  - !ruby/object:Gem::Version
200
- version: '0'
202
+ version: 2.7.0
201
203
  required_rubygems_version: !ruby/object:Gem::Requirement
202
204
  requirements:
203
205
  - - ">="
204
206
  - !ruby/object:Gem::Version
205
207
  version: '0'
206
208
  requirements: []
207
- rubygems_version: 3.0.3
208
- signing_key:
209
+ rubygems_version: 3.4.10
210
+ signing_key:
209
211
  specification_version: 4
210
212
  summary: esa API v1 client library, written in Ruby
211
- test_files:
212
- - spec/esa/client_spec.rb
213
- - spec/esa/response_spec.rb
214
- - spec/spec_helper.rb
213
+ test_files: []
@@ -1,26 +0,0 @@
1
- name: build
2
-
3
- on: [push]
4
-
5
- jobs:
6
- build:
7
- runs-on: ubuntu-latest
8
-
9
- strategy:
10
- matrix:
11
- ruby:
12
- # https://hub.docker.com/_/ruby
13
- - '2.5'
14
- - '2.6'
15
- - '2.7'
16
- - 'latest'
17
- container:
18
- image: ruby:${{ matrix.ruby }}
19
-
20
- steps:
21
- - uses: actions/checkout@v1
22
- - name: Build and test with Rake
23
- run: |
24
- gem install bundler
25
- bundle install --jobs 4 --retry 3
26
- bundle exec rake
data/.gitignore DELETED
@@ -1,14 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- *.bundle
11
- *.so
12
- *.o
13
- *.a
14
- mkmf.log
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --color
2
- --require spec_helper
3
- --format=progress
@@ -1,104 +0,0 @@
1
- require "spec_helper"
2
-
3
- RSpec.describe Esa::Client do
4
- let(:access_token) { nil }
5
- let(:api_endpoint) { nil }
6
- let(:current_team) { nil }
7
- let(:default_headers) { {} }
8
- let(:options) do
9
- {
10
- access_token: access_token,
11
- api_endpoint: api_endpoint,
12
- current_team: current_team,
13
- default_headers: default_headers
14
- }
15
- end
16
- subject(:client) { described_class.new(**options) }
17
-
18
- describe "#current_team!" do
19
- context 'team not specified' do
20
- it 'raise error' do
21
- expect do
22
- client.current_team!
23
- end.to raise_error Esa::TeamNotSpecifiedError
24
- end
25
- end
26
-
27
- context 'team specified' do
28
- let(:current_team) { '<team>' }
29
- it 'return current_team' do
30
- expect(client.current_team).to eq current_team
31
- end
32
- end
33
- end
34
-
35
- %i(get post put patch delete).each do |method|
36
- describe "#send_#{method}" do
37
- let(:path) { '<path>' }
38
- let(:params) { '<params>' }
39
- let(:headers) { '<headers>' }
40
- it "call send_request with method, path, params and headers" do
41
- expect(client).to receive(:send_request).with(method, path, params, headers)
42
- client.__send__("send_#{method}", path, params, headers)
43
- end
44
- end
45
- end
46
-
47
- describe 'default_headers' do
48
- before do
49
- stub_request(:any, 'https://api.esa.io/v1/teams')
50
- .to_return do |request|
51
- {
52
- body: request.body,
53
- headers: request.headers
54
- }
55
- end
56
- end
57
-
58
- context 'no default_headers option' do
59
- it 'request with basic headers' do
60
- response = client.teams
61
- expect(response.headers).to eq(
62
- 'Accept' => 'application/json',
63
- 'User-Agent' => "Esa Ruby Gem #{Esa::VERSION}",
64
- 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3'
65
- )
66
- end
67
-
68
- it 'request with basic headers and additional headers ' do
69
- response = client.teams(nil, { 'X-Foo' => 'bar' })
70
- expect(response.headers).to eq(
71
- 'Accept' => 'application/json',
72
- 'User-Agent' => "Esa Ruby Gem #{Esa::VERSION}",
73
- 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
74
- 'X-Foo' => 'bar'
75
- )
76
- end
77
- end
78
-
79
- context 'with default_headers option' do
80
- let(:default_headers) { { 'X-Default-Foo' => 'Bar' } }
81
-
82
- it 'request with basic headers and default_headers' do
83
- response = client.teams
84
- expect(response.headers).to eq(
85
- 'Accept' => 'application/json',
86
- 'User-Agent' => "Esa Ruby Gem #{Esa::VERSION}",
87
- 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
88
- 'X-Default-Foo' => 'Bar'
89
- )
90
- end
91
-
92
- it 'request with basic headers and additional headers ' do
93
- response = client.teams(nil, { 'X-Foo' => 'baz', 'X-Default-Foo' => 'qux' })
94
- expect(response.headers).to eq(
95
- 'Accept' => 'application/json',
96
- 'User-Agent' => "Esa Ruby Gem #{Esa::VERSION}",
97
- 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
98
- 'X-Default-Foo' => 'qux',
99
- 'X-Foo' => 'baz'
100
- )
101
- end
102
- end
103
- end
104
- end
@@ -1,42 +0,0 @@
1
- require 'spec_helper'
2
-
3
- RSpec.describe Esa::Response do
4
- let(:response_status) { 401 }
5
- let(:response_body) { '{"error":"unauthorized", "message":"Unauthorized"}' }
6
- let(:response_headers) do
7
- {
8
- 'server' => 'Cowboy',
9
- 'content-type' => 'application/json; charset=utf-8',
10
- }
11
- end
12
- let(:connection) do
13
- Faraday.new do |c|
14
- c.adapter :test, Faraday::Adapter::Test::Stubs.new do |stub|
15
- stub.get('/test') { [response_status, response_headers, response_body] }
16
- end
17
- end
18
- end
19
- let(:response) { described_class.new(connection.get('/test')) }
20
-
21
- describe '#body' do
22
- subject { response.body }
23
- it { is_expected.to eq response_body }
24
- end
25
-
26
- describe '#headers' do
27
- subject { response.headers }
28
- let(:expectation) do
29
- {
30
- 'Server' => 'Cowboy',
31
- 'Content-Type' => 'application/json; charset=utf-8',
32
- }
33
- end
34
-
35
- it { is_expected.to eq expectation }
36
- end
37
-
38
- describe '#status' do
39
- subject { response.status }
40
- it { is_expected.to eq response_status }
41
- end
42
- end
data/spec/spec_helper.rb DELETED
@@ -1,27 +0,0 @@
1
- require 'esa'
2
- require 'webmock/rspec'
3
-
4
- # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
5
- RSpec.configure do |config|
6
- config.expect_with :rspec do |expectations|
7
- expectations.include_chain_clauses_in_custom_matcher_descriptions = true
8
- end
9
-
10
- config.mock_with :rspec do |mocks|
11
- mocks.verify_partial_doubles = true
12
- end
13
-
14
- config.filter_run :focus
15
- config.run_all_when_everything_filtered = true
16
-
17
- config.disable_monkey_patching!
18
- config.warnings = true
19
-
20
- if config.files_to_run.one?
21
- config.default_formatter = 'doc'
22
- end
23
-
24
- config.profile_examples = 10
25
- config.order = :random
26
- Kernel.srand config.seed
27
- end