esa 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +3 -0
- data/lib/esa/api_methods.rb +5 -5
- data/lib/esa/client.rb +3 -4
- data/lib/esa/version.rb +1 -1
- data/spec/esa/client_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30cc49fd90d3c354de6a2df5859e965db3cb2d3e
|
4
|
+
data.tar.gz: 6173bc7cab772617c3f975440e328dc64a903993
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14401b1a726694c1ab69dd3f22f5516457a3db14b74a283975b26263ae78cccaa42283fca5bdaf0ac0fc862dc6535504b12378c2a5b5d8c528e99dba9610321a
|
7
|
+
data.tar.gz: 2f7a659405b4f535b339885c76ff2cf7d0545386ac4963a3a10b870143d5639012882e0cdf35ea6fc967db1972df8cb843f93ef5a6d60d18d53df3251ec925e4
|
data/CHANGELOG.md
CHANGED
@@ -1,2 +1,5 @@
|
|
1
|
+
## 0.0.5 (2015-05-21)
|
2
|
+
- [Use current_team! instead of current_team by fukayatsu · Pull Request #8 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/8)
|
3
|
+
|
1
4
|
## 0.0.4 (2015-05-14)
|
2
5
|
- [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
data/lib/esa/api_methods.rb
CHANGED
@@ -9,23 +9,23 @@ module Esa
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def posts(params = nil, headers = nil)
|
12
|
-
send_get("/v1/teams/#{current_team}/posts", params, headers)
|
12
|
+
send_get("/v1/teams/#{current_team!}/posts", params, headers)
|
13
13
|
end
|
14
14
|
|
15
15
|
def post(number, params = nil, headers = nil)
|
16
|
-
send_get("/v1/teams/#{current_team}/posts/#{number}", params, headers)
|
16
|
+
send_get("/v1/teams/#{current_team!}/posts/#{number}", params, headers)
|
17
17
|
end
|
18
18
|
|
19
19
|
def create_post(params = nil, headers = nil)
|
20
|
-
send_post("/v1/teams/#{current_team}/posts", wrap(params, :post), headers)
|
20
|
+
send_post("/v1/teams/#{current_team!}/posts", wrap(params, :post), headers)
|
21
21
|
end
|
22
22
|
|
23
23
|
def update_post(number, params = nil, headers = nil)
|
24
|
-
send_patch("/v1/teams/#{current_team}/posts/#{number}", wrap(params, :post), headers)
|
24
|
+
send_patch("/v1/teams/#{current_team!}/posts/#{number}", wrap(params, :post), headers)
|
25
25
|
end
|
26
26
|
|
27
27
|
def delete_post(number, params = nil, headers = nil)
|
28
|
-
send_delete("/v1/teams/#{current_team}/posts/#{number}", params, headers)
|
28
|
+
send_delete("/v1/teams/#{current_team!}/posts/#{number}", params, headers)
|
29
29
|
end
|
30
30
|
|
31
31
|
private
|
data/lib/esa/client.rb
CHANGED
@@ -11,11 +11,11 @@ module Esa
|
|
11
11
|
@api_endpoint = api_endpoint
|
12
12
|
@current_team = current_team
|
13
13
|
end
|
14
|
-
|
14
|
+
attr_accessor :current_team
|
15
15
|
|
16
|
-
def current_team
|
16
|
+
def current_team!
|
17
17
|
raise TeamNotSpecifiedError, "current_team is not specified" unless @current_team
|
18
|
-
|
18
|
+
current_team
|
19
19
|
end
|
20
20
|
|
21
21
|
def send_get(path, params = nil, headers = nil)
|
@@ -56,7 +56,6 @@ module Esa
|
|
56
56
|
{
|
57
57
|
url: faraday_url,
|
58
58
|
headers: faraday_headers,
|
59
|
-
# ssl: { verify: !!faraday_url.match(/^https:\/\//) },
|
60
59
|
}
|
61
60
|
end
|
62
61
|
|
data/lib/esa/version.rb
CHANGED
data/spec/esa/client_spec.rb
CHANGED
@@ -13,11 +13,11 @@ RSpec.describe Esa::Client do
|
|
13
13
|
end
|
14
14
|
subject(:client) { described_class.new(options) }
|
15
15
|
|
16
|
-
describe "#current_team" do
|
16
|
+
describe "#current_team!" do
|
17
17
|
context 'team not specified' do
|
18
18
|
it 'raise error' do
|
19
19
|
expect do
|
20
|
-
client.current_team
|
20
|
+
client.current_team!
|
21
21
|
end.to raise_error Esa::TeamNotSpecifiedError
|
22
22
|
end
|
23
23
|
end
|
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: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fukayatsu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|