shuttle 1.2.9 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +0 -14
- data/LICENSE +1 -1
- data/README.md +19 -23
- data/lib/generators/shuttle/install_generator.rb +1 -1
- data/lib/generators/shuttle/templates/shuttle.yml +13 -0
- data/lib/shuttle.rb +14 -4
- data/lib/shuttle/railtie.rb +1 -1
- data/lib/shuttle/version.rb +1 -1
- data/lib/tasks/shuttle.rake +5 -5
- data/shuttle.gemspec +6 -6
- metadata +9 -9
- data/lib/generators/shuttle/templates/shuttle.rb +0 -17
data/.gitignore
CHANGED
data/LICENSE
CHANGED
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
19
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
20
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
21
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# Shuttle
|
2
2
|
|
3
|
-
A
|
3
|
+
A simple continuous integration for a Rails application. Enjoy it!
|
4
4
|
|
5
|
-
Get a new code from another team members, install new gems, run new migrations, run specs, send your new feature to the origin repository and deploy your application. At
|
5
|
+
Get a new code from another team members, install new gems, run new migrations, run specs, send your new feature to the origin repository and deploy your application. At simplest way!
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
Add this line
|
9
|
+
Add this line into your application's Gemfile:
|
10
10
|
|
11
11
|
gem 'shuttle'
|
12
12
|
|
@@ -20,31 +20,27 @@ And then configure default Shuttle Steps:
|
|
20
20
|
|
21
21
|
$ rails g shuttle:install
|
22
22
|
|
23
|
-
This will create a configuration file in `config/
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
# staging: 'your@server.com:staging-repository.git',
|
39
|
-
# production: 'your@server.com:production-repository.git'
|
40
|
-
# }
|
41
|
-
end
|
23
|
+
This will create a configuration file in `config/shuttle.yml` who looks like this:
|
24
|
+
|
25
|
+
steps:
|
26
|
+
- shuttle:git:check
|
27
|
+
- shuttle:git:pull
|
28
|
+
- shuttle:bundle
|
29
|
+
- db:migrate
|
30
|
+
- shuttle:spec
|
31
|
+
- shuttle:git:push
|
32
|
+
# - log:clear
|
33
|
+
# - tmp:clear
|
34
|
+
|
35
|
+
# stages:
|
36
|
+
# staging: your@server.com:staging-repository.git
|
37
|
+
# production: your@server.com:production-repository.git
|
42
38
|
|
43
39
|
### Understanding
|
44
40
|
|
45
41
|
#### Shuttle Steps
|
46
42
|
|
47
|
-
The steps are nothing more than Rake tasks
|
43
|
+
The steps are nothing more than Rake tasks, performed at the integration time. The array steps order will be the execution order. You have the freedom to rearrange, add or delete steps according to your need.
|
48
44
|
|
49
45
|
##### Shuttle's pre-defined Steps:
|
50
46
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
steps:
|
2
|
+
- shuttle:git:check
|
3
|
+
- shuttle:git:pull
|
4
|
+
- shuttle:bundle
|
5
|
+
- db:migrate
|
6
|
+
- shuttle:spec
|
7
|
+
- shuttle:git:push
|
8
|
+
# - log:clear
|
9
|
+
# - tmp:clear
|
10
|
+
|
11
|
+
# stages:
|
12
|
+
# staging: your@server.com:staging-repository.git
|
13
|
+
# production: your@server.com:production-repository.git
|
data/lib/shuttle.rb
CHANGED
@@ -1,9 +1,19 @@
|
|
1
|
-
require
|
1
|
+
require 'shuttle/railtie'
|
2
2
|
|
3
3
|
module Shuttle
|
4
|
-
|
4
|
+
def self.yaml
|
5
|
+
begin
|
6
|
+
YAML.load_file(Rails.root.join('config/shuttle.yml').to_s)
|
7
|
+
rescue Errno::ENOENT
|
8
|
+
nil
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.steps
|
13
|
+
yaml['steps'] if yaml.present?
|
14
|
+
end
|
5
15
|
|
6
|
-
def self.
|
7
|
-
|
16
|
+
def self.stages
|
17
|
+
yaml['stages'] if yaml.present?
|
8
18
|
end
|
9
19
|
end
|
data/lib/shuttle/railtie.rb
CHANGED
data/lib/shuttle/version.rb
CHANGED
data/lib/tasks/shuttle.rake
CHANGED
@@ -15,11 +15,11 @@ namespace :shuttle do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
task :pull do
|
18
|
-
sh
|
18
|
+
sh 'git pull --rebase'
|
19
19
|
end
|
20
20
|
|
21
21
|
task :push do
|
22
|
-
sh
|
22
|
+
sh 'git push'
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -36,8 +36,8 @@ desc 'Launch the code to space!'
|
|
36
36
|
task :shuttle, [:stages] => :environment do |t, args|
|
37
37
|
if Shuttle.steps.blank?
|
38
38
|
puts %{
|
39
|
-
You should define Shuttle Steps in 'config/
|
40
|
-
Or run 'rails g shuttle:install' to create this file with default steps.
|
39
|
+
You should define Shuttle Steps and Stages in 'config/shuttle.yml'.
|
40
|
+
Or run 'rails g shuttle:install' to create this file with default steps and stages.
|
41
41
|
}.yellow
|
42
42
|
|
43
43
|
exit
|
@@ -57,7 +57,7 @@ task :shuttle, [:stages] => :environment do |t, args|
|
|
57
57
|
|
58
58
|
if args[:stages].present?
|
59
59
|
args[:stages].split(':').each do |stage|
|
60
|
-
if repository = Shuttle.stages.try(:[], stage
|
60
|
+
if repository = Shuttle.stages.try(:[], stage)
|
61
61
|
p80("Executing deploy to #{stage}...") do
|
62
62
|
sh "git push #{repository} HEAD:master -f"
|
63
63
|
end
|
data/shuttle.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
require File.expand_path('../lib/shuttle/version', __FILE__)
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
|
-
gem.authors = [
|
5
|
-
gem.email = [
|
6
|
-
gem.description = %q{A
|
7
|
-
gem.summary = %q{Get a new code from another team members, install new gems, run new migrations, run specs, send your new feature to the origin repository and deploy your application. At
|
4
|
+
gem.authors = ['Felipe Bazzarella']
|
5
|
+
gem.email = ['fbazzarella@gmail.com']
|
6
|
+
gem.description = %q{A simple continuous integration for a Rails application. Enjoy it!}
|
7
|
+
gem.summary = %q{Get a new code from another team members, install new gems, run new migrations, run specs, send your new feature to the origin repository and deploy your application. At simplest way!}
|
8
8
|
|
9
9
|
gem.files = `git ls-files`.split($\)
|
10
10
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
11
|
-
gem.name =
|
12
|
-
gem.require_paths = [
|
11
|
+
gem.name = 'shuttle'
|
12
|
+
gem.require_paths = ['lib']
|
13
13
|
gem.version = Shuttle::VERSION
|
14
14
|
|
15
15
|
gem.add_runtime_dependency('colored', '~> 1.2')
|
metadata
CHANGED
@@ -1,33 +1,33 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shuttle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.9
|
5
4
|
prerelease:
|
5
|
+
version: 2.0.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Felipe Bazzarella
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
+
prerelease: false
|
16
|
+
type: :runtime
|
15
17
|
name: colored
|
16
|
-
|
18
|
+
version_requirements: !ruby/object:Gem::Requirement
|
17
19
|
none: false
|
18
20
|
requirements:
|
19
21
|
- - ~>
|
20
22
|
- !ruby/object:Gem::Version
|
21
23
|
version: '1.2'
|
22
|
-
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirement: !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '1.2'
|
30
|
-
description: A
|
30
|
+
description: A simple continuous integration for a Rails application. Enjoy it!
|
31
31
|
email:
|
32
32
|
- fbazzarella@gmail.com
|
33
33
|
executables: []
|
@@ -40,7 +40,7 @@ files:
|
|
40
40
|
- README.md
|
41
41
|
- Rakefile
|
42
42
|
- lib/generators/shuttle/install_generator.rb
|
43
|
-
- lib/generators/shuttle/templates/shuttle.
|
43
|
+
- lib/generators/shuttle/templates/shuttle.yml
|
44
44
|
- lib/shuttle.rb
|
45
45
|
- lib/shuttle/railtie.rb
|
46
46
|
- lib/shuttle/version.rb
|
@@ -71,5 +71,5 @@ signing_key:
|
|
71
71
|
specification_version: 3
|
72
72
|
summary: Get a new code from another team members, install new gems, run new migrations,
|
73
73
|
run specs, send your new feature to the origin repository and deploy your application.
|
74
|
-
At
|
74
|
+
At simplest way!
|
75
75
|
test_files: []
|
@@ -1,17 +0,0 @@
|
|
1
|
-
Shuttle.setup do |s|
|
2
|
-
s.steps = [
|
3
|
-
'shuttle:git:check',
|
4
|
-
'shuttle:git:pull',
|
5
|
-
'shuttle:bundle',
|
6
|
-
'db:migrate',
|
7
|
-
'shuttle:spec',
|
8
|
-
'shuttle:git:push',
|
9
|
-
# 'log:clear',
|
10
|
-
# 'tmp:clear',
|
11
|
-
]
|
12
|
-
|
13
|
-
# s.stages = {
|
14
|
-
# staging: 'your@server.com:staging-repository.git',
|
15
|
-
# production: 'your@server.com:production-repository.git'
|
16
|
-
# }
|
17
|
-
end
|