stash-api 1.1.27.0 → 1.1.28.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 +8 -8
- data/lib/stash-api/client.rb +9 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NGQ2ZThiMzY0MDAzNDRiMGFlZjQ4OWY4NjgzNjA5NGVjNWM1MWFhYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzczMmMwY2I4OTJkMThlYjM5ZmUxMzExN2YwN2E3ZThiYjIyODAzZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTI1MTMwM2JjY2I1ZmRjZTlmZThhOTcyOTA1YjU3NzYzZGM3MGQzMTQzZmEw
|
10
|
+
N2UyZWRlNGI4MmRmNmY1ODM5MWRjZmJlNWFjMWMyZTQ1ZTJjNTFkY2UyMWUy
|
11
|
+
NDViZGMzNWQ3ZmNkODY4ODI3NTdiMTVlOGVmM2ZkMDg1ODQ5M2U=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzAxMTE4MzIwOWJlNTFiYmE3NGE3NjgzZDYxZTIyN2UwNWMzOWM1N2M4NzRh
|
14
|
+
MjYxM2ZhYzI0Y2EwMzk0NGVhMzdlN2JjODg5YTFhZDMwNDdhZWUwMGU3Yzk1
|
15
|
+
M2E1MzBhZjA0NzBiMjRjMDNkMjViMzM4NzViNmNmZDAxMThmNmE=
|
data/lib/stash-api/client.rb
CHANGED
@@ -49,15 +49,6 @@ module Stash
|
|
49
49
|
|
50
50
|
def set_hooks(hooks)
|
51
51
|
hooks.keys.each do |hook|
|
52
|
-
RestClient::Request.new(
|
53
|
-
:method => :put,
|
54
|
-
:url => URI::encode("#{File.join(@remote_api_url, SETTINGS_HOOKS_URL)}/#{hook}/enabled"),
|
55
|
-
:user => @username,
|
56
|
-
:password => @password,
|
57
|
-
:headers => { :accept => :json, :content_type => :json }).execute do |response, request, result|
|
58
|
-
raise "Could not enable hook: #{hook} - #{JSON::pretty_generate(JSON::parse(response.body))}" if !response.code.to_s.match(/^2\d{2}$/)
|
59
|
-
end
|
60
|
-
|
61
52
|
config = hooks[hook][:config]
|
62
53
|
if config
|
63
54
|
RestClient::Request.new(
|
@@ -70,6 +61,15 @@ module Stash
|
|
70
61
|
raise "Could not configure hook: #{hook} - #{JSON::pretty_generate(JSON::parse(response.body))}" if !response.code.to_s.match(/^2\d{2}$/)
|
71
62
|
end
|
72
63
|
end
|
64
|
+
|
65
|
+
RestClient::Request.new(
|
66
|
+
:method => :put,
|
67
|
+
:url => URI::encode("#{File.join(@remote_api_url, SETTINGS_HOOKS_URL)}/#{hook}/enabled"),
|
68
|
+
:user => @username,
|
69
|
+
:password => @password,
|
70
|
+
:headers => { :accept => :json, :content_type => :json }).execute do |response, request, result|
|
71
|
+
raise "Could not enable hook: #{hook} - #{JSON::pretty_generate(JSON::parse(response.body))}" if !response.code.to_s.match(/^2\d{2}$/)
|
72
|
+
end
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|