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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA512:
3
- metadata.gz: 8228be5bb77d78ccd4cfe36ba02c2f74ebf6686c67fef258e41c4b193bdf00b623b4cf91be85473667d48be0403ea7d80210d2509e0cdbc8d4b9a42970493189
4
- data.tar.gz: 5b340d8c407ac08fcd6459928e9ad9c3e3bb254ef0773f9007f83dfe6f573eec510f8ff71e248ea4289b6a97f23db3cd4aacfe15aa748ceb1b881394ad397eda
3
+ metadata.gz: f80102f4c89acb7c65049c08c669f7c310e3a0d6c5dd5b9bcecb265aeac36bc7bef3e9e2565b17a98f3b0ba7124f4b1de6da590932b1be3bf80bf1a8e7df2ed9
4
+ data.tar.gz: c37cca59740726022bdb3f07f298bb0de3e9a29f4a1156823b0578f1488510bb324dcb3ba853aa24b4f74c422d69dffa2437b9ad7dd29051684c90b6f7f6e8a2
5
5
  SHA1:
6
- metadata.gz: cbff4dfd443b38406ea5e65bc6ab9c1c0977f26e
7
- data.tar.gz: f6647ecdfcb4feef608aaaae17417a9aedb0f6d9
6
+ metadata.gz: 904824f76985a8416d95b7f7a718695eeb7f5466
7
+ data.tar.gz: f634ed7922390af3d8dbbeb7f4b7c4a7153fc043
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Isitdeployed
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
@@ -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/core_ext'
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'] }.to_json, :content_type => :json, :accept => :json, :timeout => 5, :open_timeout => 5){ |response, request, result| response
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'] }.to_json, :content_type => :json, :accept => :json, :timeout => 5, :open_timeout => 5){ |response, request, result| response
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}."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-isitdeployed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas VIAL