shuttle-deploy 0.3.0.beta1 → 0.3.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
2
  SHA1:
3
- metadata.gz: a60eef8a58e783fe2a2ef12ca30eb520028c112e
4
- data.tar.gz: c89dea78a0aab855018b83b841e9055da4d9a434
3
+ metadata.gz: 9b4112af6d635cb4038808612be1c24d688bd7d8
4
+ data.tar.gz: 0670095e6b330219b74d21d49f455e0136a9e244
5
5
  SHA512:
6
- metadata.gz: 70760088dbcef4c8bb0b73eae39d4e93bfc5fbe3984a14df5226bbdec8211556ff28f704c7ff9c5cdc9a9dfe17b07dbedb27ddff872612d00ebe7f281bff2a4a
7
- data.tar.gz: e53f549d4b5cc575aa7372da18b99b69ddc8168c3c37a57b2f0f9d3d7d0fc7656894325428ae1bd504628380dd007e3c384873528f007851458e14b60403020e
6
+ metadata.gz: 1b8128127b8f5350540c3e75eef813407c747527a3586b46b57fb0611b2bd9e8beaba254b3aac3ef6c901c676ebd31c1817096b440ae6362c02524f40a9a173b
7
+ data.tar.gz: c5fa59f52b38ec1842d5b57219ddddf3267f4c04deb985de1ebe702331f512e2f042a3b6575f22d431f4be99519470e6a29662ea99e65447c7be8aa6994037ef
data/.travis.yml ADDED
@@ -0,0 +1,9 @@
1
+ language: ruby
2
+
3
+ rvm:
4
+ - 1.8.7
5
+ - 1.9.2
6
+ - 1.9.3
7
+ - 2.0.0
8
+ - 2.1.0
9
+ - 2.1.2
data/README.md CHANGED
@@ -4,7 +4,9 @@ Shuttle is a minimalistic application deployment tool designed for small applica
4
4
  and one-server deployments. Configuration is stored as YAML-encoded file, no need to use ruby code.
5
5
  Operations are performed on SSH connection with target server.
6
6
 
7
- ![Build Status](https://magnum-ci.com/status/dea40dc3b6055d6a628a444149e2fead.png)
7
+ ![Build Status](http://img.shields.io/travis/sosedoff/shuttle.svg?style=flat)
8
+
9
+ ![Gem Version](http://img.shields.io/gem/v/shuttle-deploy.svg?style=flat)
8
10
 
9
11
  ## Install
10
12
 
@@ -26,6 +28,8 @@ Supported ruby versions:
26
28
  - 1.9.2
27
29
  - 1.9.3
28
30
  - 2.0.0
31
+ - 2.1.0
32
+ - 2.1.2
29
33
 
30
34
  ## Structure
31
35
 
@@ -337,6 +341,40 @@ List of all available hooks that you can use to run custom commands:
337
341
 
338
342
  Each hook could include one or many bash commands.
339
343
 
344
+ ## Tasks
345
+
346
+ Tasks are user-defined commands or a set of multiple commands that could be integrated
347
+ into hooks. The benefit of having tasks defined separate from the hooks is to
348
+ make deployment steps more readable.
349
+
350
+ Here's an example a task:
351
+
352
+ ```yaml
353
+ tasks:
354
+ flush_cache:
355
+ - bundle exec cache:clear
356
+
357
+ reset_counters:
358
+ - bundle exec counters:submit
359
+ - bundle exec counters:reset
360
+
361
+ hooks:
362
+ before_link_release:
363
+ - task=flush_cache
364
+ - task=reset_counters
365
+ ```
366
+
367
+ Tasks could only be invoked from a hook, invoking a task from within another task
368
+ does not work and intended to keep things simple.
369
+
370
+ Commands in tasks are treated in the same way as commands in a hook, thus any failure
371
+ of a command within a hook that does not allow any failures will trigger a deployment
372
+ rollback. The only hook that allows failures is `after_link_release`, basically
373
+ release is already symlinked and if something goes wrong it will not affect anything.
374
+
375
+ Tasks are also a great way to split up groups of steps into smaller, more logical
376
+ chunks.
377
+
340
378
  ## Rollback
341
379
 
342
380
  In case if you want to revert latest deploy, run:
@@ -1,3 +1,3 @@
1
1
  module Shuttle
2
- VERSION = "0.3.0.beta1"
2
+ VERSION = "0.3.0"
3
3
  end
data/spec/target_spec.rb CHANGED
@@ -5,7 +5,7 @@ describe Shuttle::Target do
5
5
 
6
6
  describe '#connection' do
7
7
  let(:attributes) do
8
- {:host => 'host.com', user: 'user', password: 'password'}
8
+ { :host => 'host.com', :user => 'user', :password => 'password' }
9
9
  end
10
10
 
11
11
  it 'returns a new ssh session connection' do
data/spec/task_spec.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  require "spec_helper"
2
2
 
3
3
  describe Shuttle::Task do
4
- let(:config) { double(tasks: tasks) }
5
- let(:deploy) { double(config: config) }
4
+ let(:config) { double(:tasks => tasks) }
5
+ let(:deploy) { double(:config => config) }
6
6
  let(:task) { described_class.new(deploy, "foo") }
7
7
 
8
8
  before do
@@ -23,7 +23,7 @@ describe Shuttle::Task do
23
23
  end
24
24
 
25
25
  context "when task does not have commands" do
26
- let(:tasks) { Hashr.new(foo: []) }
26
+ let(:tasks) { Hashr.new(:foo => []) }
27
27
 
28
28
  before do
29
29
  task.run
@@ -35,7 +35,7 @@ describe Shuttle::Task do
35
35
  end
36
36
 
37
37
  context "when task has commands" do
38
- let(:tasks) { Hashr.new(foo: ["cmd1", "cmd2"]) }
38
+ let(:tasks) { Hashr.new(:foo => ["cmd1", "cmd2"]) }
39
39
 
40
40
  before do
41
41
  task.run
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shuttle-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0.beta1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Sosedoff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-03 00:00:00.000000000 Z
11
+ date: 2014-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -160,6 +160,7 @@ extra_rdoc_files: []
160
160
  files:
161
161
  - ".gitignore"
162
162
  - ".rspec"
163
+ - ".travis.yml"
163
164
  - Gemfile
164
165
  - LICENSE
165
166
  - README.md
@@ -220,9 +221,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
220
221
  version: '0'
221
222
  required_rubygems_version: !ruby/object:Gem::Requirement
222
223
  requirements:
223
- - - ">"
224
+ - - ">="
224
225
  - !ruby/object:Gem::Version
225
- version: 1.3.1
226
+ version: '0'
226
227
  requirements: []
227
228
  rubyforge_project:
228
229
  rubygems_version: 2.2.2