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.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/lib/stash-api/client.rb +9 -9
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTVhMzBjOTI2YmFmYjIwODBmOTgzN2E4OWVkNDliNDdiZmM1Y2ZjZQ==
4
+ NGQ2ZThiMzY0MDAzNDRiMGFlZjQ4OWY4NjgzNjA5NGVjNWM1MWFhYQ==
5
5
  data.tar.gz: !binary |-
6
- ZjkzYzgzNjM0NThiNWU0YWY5ZGU4NzgzZTM2YTk5ZjA4YmMxODIyNg==
6
+ NzczMmMwY2I4OTJkMThlYjM5ZmUxMzExN2YwN2E3ZThiYjIyODAzZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MmI5ZTY1M2M5MTQzY2RmNjEwMjc3YjgxZTRlMDNjMjM1ZjA5NTQzNWVlZTJi
10
- Y2U4NmNiNWU0MTRiNTU4M2MwYzE0N2VhNWQ5MGY3MzM5ZjBiMGRkNjUyZjkx
11
- NjVhYTQ4ODlhODE0ZjAxNmQyZjM1YmY5MTJmZTNmYTVlYTk3Yzk=
9
+ ZTI1MTMwM2JjY2I1ZmRjZTlmZThhOTcyOTA1YjU3NzYzZGM3MGQzMTQzZmEw
10
+ N2UyZWRlNGI4MmRmNmY1ODM5MWRjZmJlNWFjMWMyZTQ1ZTJjNTFkY2UyMWUy
11
+ NDViZGMzNWQ3ZmNkODY4ODI3NTdiMTVlOGVmM2ZkMDg1ODQ5M2U=
12
12
  data.tar.gz: !binary |-
13
- ZTQzNDkwMWYzNGU3MWIwNjkzMzU5YjJhOGQ2OWM2ZjBlNjE5YzIxYWExYTUz
14
- Y2VmZTMxOGE4MjE0OTIxMzgyZDQ0NWNiOTVmMDExMTIwODI3YmIyY2M3M2Jk
15
- YzE2ZjA5MjAyNTBiZjRmYTQ5MWMzNGU0NzYwMGY0ZGI3ZDk4Yzg=
13
+ MzAxMTE4MzIwOWJlNTFiYmE3NGE3NjgzZDYxZTIyN2UwNWMzOWM1N2M4NzRh
14
+ MjYxM2ZhYzI0Y2EwMzk0NGVhMzdlN2JjODg5YTFhZDMwNDdhZWUwMGU3Yzk1
15
+ M2E1MzBhZjA0NzBiMjRjMDNkMjViMzM4NzViNmNmZDAxMThmNmE=
@@ -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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stash-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.27.0
4
+ version: 1.1.28.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Warren Parad