easy-resources 0.7.0 → 0.7.1
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/lib/easy/resources/redmine/redmine_base.rb +3 -5
- data/lib/easy/resources/version.rb +1 -1
- data/spec/easy_resources_spec.rb +0 -8
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b13b871c516db6c5acd9c0156f18dc6418e580deab83aec29d67b7762e5296b2
|
|
4
|
+
data.tar.gz: 68002f057cefa72367103556ef0dac798dafd0eb3494aa9c7fe96a735e08e77a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 78eb63c22e0d245d4c8b0330e1e69cfa7d07b33c445216bc3ba04a6f5359a6bea463e45d21834a1a21f8a651cdd1e7987b78f6ff9909999b1fd59a102fee06ae
|
|
7
|
+
data.tar.gz: 50a9662fc8c23451cae5d81a06e3c019e20d8e08c79ca2a8d0aa1338ef7c96aad623c5026dcd4311b7e47c26ceb195ed8f1b63990e0baf3f6921bfc90e396568
|
|
@@ -7,11 +7,9 @@ module Easy
|
|
|
7
7
|
self.format = :xml
|
|
8
8
|
self.add_response_method :http_response
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
class_attribute :api_key
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
@api_key = key
|
|
14
|
-
end
|
|
12
|
+
class << self
|
|
15
13
|
|
|
16
14
|
# @param [Hash, nil] conf
|
|
17
15
|
def configure(conf = nil)
|
|
@@ -24,7 +22,7 @@ module Easy
|
|
|
24
22
|
|
|
25
23
|
def headers
|
|
26
24
|
h = super
|
|
27
|
-
h['X-Redmine-API-Key'] =
|
|
25
|
+
h['X-Redmine-API-Key'] = api_key
|
|
28
26
|
h
|
|
29
27
|
end
|
|
30
28
|
|
data/spec/easy_resources_spec.rb
CHANGED
|
@@ -7,12 +7,6 @@ RSpec.describe Easy::Resources do
|
|
|
7
7
|
|
|
8
8
|
describe '.configure' do
|
|
9
9
|
|
|
10
|
-
context "Easy::Resource" do
|
|
11
|
-
it "resource raise error" do
|
|
12
|
-
expect { Easy::Resource.configure api_key: "xx1", url: "https://test.dummy" }.to raise_exception NoMethodError
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
|
|
16
10
|
context "Easy::Resources::Redmine::RedmineBase" do
|
|
17
11
|
it "Easy::Resources::Redmine::RedmineBase" do
|
|
18
12
|
expect(Easy::Resources::Redmine::RedmineBase).to receive(:api_key=).with("xx1")
|
|
@@ -21,8 +15,6 @@ RSpec.describe Easy::Resources do
|
|
|
21
15
|
end
|
|
22
16
|
end
|
|
23
17
|
|
|
24
|
-
|
|
25
|
-
|
|
26
18
|
end
|
|
27
19
|
|
|
28
20
|
end
|