capistrano-isitdeployed 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/capistrano/isitdeployed/version.rb +1 -1
- data/lib/capistrano/isitdeployed.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA512:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f80102f4c89acb7c65049c08c669f7c310e3a0d6c5dd5b9bcecb265aeac36bc7bef3e9e2565b17a98f3b0ba7124f4b1de6da590932b1be3bf80bf1a8e7df2ed9
|
4
|
+
data.tar.gz: c37cca59740726022bdb3f07f298bb0de3e9a29f4a1156823b0578f1488510bb324dcb3ba853aa24b4f74c422d69dffa2437b9ad7dd29051684c90b6f7f6e8a2
|
5
5
|
SHA1:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 904824f76985a8416d95b7f7a718695eeb7f5466
|
7
|
+
data.tar.gz: f634ed7922390af3d8dbbeb7f4b7c4a7153fc043
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'capistrano/isitdeployed/version'
|
2
2
|
require 'capistrano/isitdeployed/config'
|
3
3
|
require 'capistrano/isitdeployed/debug'
|
4
|
-
require 'active_support/
|
4
|
+
require 'active_support/json'
|
5
5
|
require 'rest_client'
|
6
6
|
|
7
7
|
module Capistrano
|
@@ -49,7 +49,7 @@ module Capistrano
|
|
49
49
|
if File.exists?(CONFIG_DEST)
|
50
50
|
config = Capistrano::Isitdeployed.load_user_config
|
51
51
|
started = Capistrano::Isitdeployed.timestamp
|
52
|
-
RestClient.post(ENDPOINT + "/p/#{config['project_id']}/d", { :status => 1, :platform => "#{stage}", :release => "#{release_name}", :started => started, :token => config['api_secret'] }
|
52
|
+
RestClient.post(ENDPOINT + "/p/#{config['project_id']}/d", ActiveSupport::JSON.encode({ :status => 1, :platform => "#{stage}", :release => "#{release_name}", :started => started, :token => config['api_secret'] }), :content_type => :json, :accept => :json, :timeout => 5, :open_timeout => 5){ |response, request, result| response
|
53
53
|
case response.code
|
54
54
|
when 201
|
55
55
|
logger.trace "IsItDeployed > New deploy created for #{application} to #{stage} with version: #{release_name}"
|
@@ -92,7 +92,7 @@ module Capistrano
|
|
92
92
|
config = Capistrano::Isitdeployed.load_user_config
|
93
93
|
stopped = Capistrano::Isitdeployed.timestamp
|
94
94
|
duration = stopped.to_i - isitdeployed_started.to_i
|
95
|
-
RestClient.put(ENDPOINT + "/p/#{config['project_id']}/d/#{isitdeployed_did}", { :status => isitdeployed_status, :stopped => stopped, :duration => duration, :token => config['api_secret'] }
|
95
|
+
RestClient.put(ENDPOINT + "/p/#{config['project_id']}/d/#{isitdeployed_did}", ActiveSupport::JSON.encode({ :status => isitdeployed_status, :stopped => stopped, :duration => duration, :token => config['api_secret'] }), :content_type => :json, :accept => :json, :timeout => 5, :open_timeout => 5){ |response, request, result| response
|
96
96
|
case response.code
|
97
97
|
when 204
|
98
98
|
logger.trace "IsItDeployed > Deploy ##{isitdeployed_did} has been updated for #{application} to #{stage}."
|