capistrano-isitdeployed 0.0.9 → 0.1.0

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
- SHA512:
3
- data.tar.gz: 12dc1429bb5719838bfbfca84b6c12b5e57756e662c502c05a8ead6a6ef012fd6248fd75af56c74a794b6a8214aaa62a6787d369b2380ce7e77e5e6f35cea20f
4
- metadata.gz: 464c53178b89e139444a89ee70106b180e75473185a8a40b4eef9f65c82779cc388fb576b7c22141842e078fd8af139cb3733cf8ddd7ac813b64662196041e40
5
2
  SHA1:
6
- data.tar.gz: dfa78489cd14884d8c77052edd4a3d26aad315a4
7
- metadata.gz: 2157994f46b798ba8384b3b214e375e1734486a3
3
+ data.tar.gz: ba18eb121a80bd12ebb7d52a9f104964d8594eb0
4
+ metadata.gz: 68025a3aeb97788f1e6482d9f0a9666bd529f75e
5
+ SHA512:
6
+ data.tar.gz: 4f663d701b8ce838dfaa485fc0d13e34e988e6665da4670712f3c5edaf37d31c154578229805d32a5d373a1547662ebd143c3a7520e0ad38fa4e7f6ec2472528
7
+ metadata.gz: 555c9e740cf147ae049b12b85e7174f140e447ec44f92720127bedc7fb9ae7e8ea5479a967079190ad8ee077c63fe770ab888420fd97550803074aa0bdfdf4f8
data/README.md CHANGED
@@ -1,24 +1,47 @@
1
- # Capistrano::Isitdeployed
1
+ # capistrano-isitdeployed
2
2
 
3
- TODO: Write a gem description
3
+ This plugin works as an interface between your [Capistrano](http://capistranorb.com/) deployments and [www.isitdeployed.com](http://www.isitdeployed.com) which gives you :
4
+ * deployments counter for your projects
5
+ * a deployment status page for you and your team which displays current deploy status (does not nead page reload for updates)
6
+ * soon : deploys statistics
7
+
8
+ And it's Free.
9
+
10
+ If you already use Capistrano, welcome on board!
11
+ If not, you should! :-)
12
+
13
+ Has been tested with Rails3 and Symfony2 projects.
4
14
 
5
15
  ## Installation
6
16
 
7
- Add this line to your application's Gemfile:
17
+ * install the gem
18
+ * create a project on [www.isitdeployed.com](http://www.isitdeployed.com) with a valid email address
19
+ * you will receive the instructions to enable capistrano-isitdeployed in you deploy.rb
8
20
 
9
- gem 'capistrano-isitdeployed'
21
+ ## Detailed installation
10
22
 
11
- And then execute:
23
+ ### 1. install gem
12
24
 
13
- $ bundle
25
+ ##### Rails users
14
26
 
15
- Or install it yourself as:
27
+ in your `Gemfile`, add:
28
+ `gem 'capistrano-isitdeployed'`
29
+ and run:
30
+ `bundle`
16
31
 
17
- $ gem install capistrano-isitdeployed
32
+ ##### Others
18
33
 
19
- ## Usage
34
+ `gem install capistrano-isitdeployed`
35
+ (you may have to use sudo)
20
36
 
21
- TODO: Write usage instructions here
37
+ ### 2. at the top of `config/deploy.rb`, add:
38
+ `require 'capistrano/isitdeployed'`
39
+
40
+ ### 3. generate config file running:
41
+ `cap isit:setup`
42
+
43
+ ### 4. edit `config/isitdeployed.yml` config file
44
+ Configure `project_id` and `api_secret` with values received on your email
22
45
 
23
46
  ## Contributing
24
47
 
@@ -27,3 +50,4 @@ TODO: Write usage instructions here
27
50
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
51
  4. Push to the branch (`git push origin my-new-feature`)
29
52
  5. Create new Pull Request
53
+
@@ -8,7 +8,7 @@ module Capistrano
8
8
  # Do not use unless you want to poluate your data
9
9
  namespace :isit do
10
10
  namespace :check do
11
- desc "Check feature for success"
11
+ desc "DO NOT USE - Check feature for success"
12
12
  task :success do
13
13
  find_and_execute_task("isit:deploy")
14
14
  sleep(5)
@@ -16,7 +16,7 @@ module Capistrano
16
16
  find_and_execute_task("isit:update")
17
17
  end
18
18
 
19
- desc "Check feature for rollback"
19
+ desc "DO NOT USE - Check feature for rollback"
20
20
  task :rollback do
21
21
  find_and_execute_task("isit:deploy")
22
22
  sleep(5)
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Isitdeployed
3
- VERSION = "0.0.9"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
@@ -28,7 +28,8 @@ module Capistrano
28
28
 
29
29
  # task definitions
30
30
  namespace :isit do
31
-
31
+ # TODO: generate a pre-configured file using command line arguments
32
+ # cap isit-setup -project_id=x -api_secret=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
32
33
  desc "Creates a configuration file"
33
34
  task :setup do
34
35
  if File.exists?(CONFIG_DEST)
@@ -51,12 +52,16 @@ module Capistrano
51
52
  config = Capistrano::Isitdeployed.load_user_config
52
53
  started = Capistrano::Isitdeployed.timestamp
53
54
  set(:stage, "my platform") unless exists?(:stage)
54
- RestClient.post(ENDPOINT + "/p/#{config['project_id']}/d", JSON.generate({ :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
55
+ RestClient.post(ENDPOINT + "/p/#{config['project_id']}/d", JSON.generate({ :status => 1, :platform => "#{stage}", :release => "#{release_name}", :started => started, :token => config['api_secret'], :version => VERSION }), :content_type => :json, :accept => :json, :timeout => 5, :open_timeout => 5){ |response, request, result| response
55
56
  case response.code
56
57
  when 201
57
58
  logger.trace "IsItDeployed > New deploy created for #{application} to #{stage} with version: #{release_name}"
58
59
  logger.trace "IsItDeployed > URL is #{ENDPOINT}/p/#{config['project_id']}"
59
- set(:isitdeployed_did, response.gsub(/\s+/, ""))
60
+ json = JSON.parse(response)
61
+ if json['latest_version'] > VERSION
62
+ logger.trace "IsItDeployed > WARNING: Your 'capistrano-isitdeployed' gem is outdated. Consider upgrade to #{json['latest_version']}"
63
+ end
64
+ set(:isitdeployed_did, json['deploy_id'])
60
65
  set(:isitdeployed_started, started)
61
66
  set(:isitdeployed_created, 1)
62
67
  when 401
@@ -88,7 +93,7 @@ module Capistrano
88
93
  end
89
94
  end
90
95
 
91
- desc "Updates deploy status using the API (succes or rollback)"
96
+ desc "Updates deploy status using the API (success or rollback)"
92
97
  task :update do
93
98
  if isitdeployed_created === 1
94
99
  config = Capistrano::Isitdeployed.load_user_config
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.9
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas VIAL
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2013-04-04 00:00:00 Z
12
+ date: 2013-04-07 00:00:00 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano