shuttle 0.0.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +5 -3
- data/lib/generators/shuttle/install_generator.rb +11 -0
- data/lib/generators/shuttle/templates/shuttle.yml +6 -0
- data/lib/shuttle.rb +10 -1
- data/lib/shuttle/railtie.rb +7 -0
- data/lib/shuttle/version.rb +1 -1
- data/lib/tasks/shuttle.rake +57 -0
- data/shuttle.gemspec +3 -1
- metadata +24 -5
data/README.md
CHANGED
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
A simplest 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 and send your new feature to the origin repository. At the simplest way!
|
|
6
|
+
|
|
5
7
|
## Installation
|
|
6
8
|
|
|
7
9
|
Add this line to your application's Gemfile:
|
|
8
10
|
|
|
9
11
|
gem 'shuttle'
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
Install the gem with Bundler:
|
|
12
14
|
|
|
13
15
|
$ bundle
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
And then configure default Shuttle Steps:
|
|
16
18
|
|
|
17
|
-
$
|
|
19
|
+
$ rails g shuttle:install
|
|
18
20
|
|
|
19
21
|
## Usage
|
|
20
22
|
|
data/lib/shuttle.rb
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
require "shuttle/
|
|
1
|
+
require "shuttle/railtie"
|
|
2
|
+
require 'yaml'
|
|
2
3
|
|
|
3
4
|
module Shuttle
|
|
5
|
+
def self.steps
|
|
6
|
+
begin
|
|
7
|
+
yml = YAML::load(File.open(Rails.root.join('config', 'shuttle.yml').to_s))
|
|
8
|
+
yml['steps'] if yml.present?
|
|
9
|
+
rescue Errno::ENOENT
|
|
10
|
+
nil
|
|
11
|
+
end
|
|
12
|
+
end
|
|
4
13
|
end
|
data/lib/shuttle/version.rb
CHANGED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
namespace :shuttle do
|
|
2
|
+
namespace :git do
|
|
3
|
+
task :check do
|
|
4
|
+
out = `git status`
|
|
5
|
+
|
|
6
|
+
if out.include?('Untracked files:') || out.include?('unmerged:') || out.include?('modified:')
|
|
7
|
+
puts out
|
|
8
|
+
exit
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
task :pull do
|
|
13
|
+
sh "git pull --rebase"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
task :push do
|
|
17
|
+
sh "git push"
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
task :bundle do
|
|
22
|
+
sh 'bundle install --quiet'
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
task spec: 'db:test:prepare' do
|
|
26
|
+
sh 'rspec spec'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
task start: ['git:check', 'log:clear', 'tmp:clear', 'git:pull']
|
|
30
|
+
|
|
31
|
+
def p80(message)
|
|
32
|
+
puts '-' * 80
|
|
33
|
+
puts message if message
|
|
34
|
+
yield if block_given?
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
desc 'Integrate the project code'
|
|
39
|
+
task :shuttle do
|
|
40
|
+
if Shuttle.steps.nil?
|
|
41
|
+
require 'colored'
|
|
42
|
+
|
|
43
|
+
puts %{
|
|
44
|
+
You should define Shuttle Steps!
|
|
45
|
+
|
|
46
|
+
Just run 'rails g shuttle:install' to define default steps at 'config/shuttle.yml'.
|
|
47
|
+
}.yellow
|
|
48
|
+
exit
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
Shuttle.steps.values.each do |step|
|
|
52
|
+
p80("Executing #{step}...") do
|
|
53
|
+
RAILS_ENV = ENV['RAILS_ENV'] || 'development'
|
|
54
|
+
Rake::Task[step].invoke
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
data/shuttle.gemspec
CHANGED
|
@@ -5,11 +5,13 @@ Gem::Specification.new do |gem|
|
|
|
5
5
|
gem.authors = ["Felipe Bazzarella"]
|
|
6
6
|
gem.email = ["fbazzarella@gmail.com"]
|
|
7
7
|
gem.description = %q{A simplest continuous integration for a Rails application. Enjoy it!}
|
|
8
|
-
gem.summary = %q{Get a new code from another team members, install new gems, run new migrations, run specs and
|
|
8
|
+
gem.summary = %q{Get a new code from another team members, install new gems, run new migrations, run specs and send your new feature to the origin repository. At the simplest way!}
|
|
9
9
|
|
|
10
10
|
gem.files = `git ls-files`.split($\)
|
|
11
11
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
|
12
12
|
gem.name = "shuttle"
|
|
13
13
|
gem.require_paths = ["lib"]
|
|
14
14
|
gem.version = Shuttle::VERSION
|
|
15
|
+
|
|
16
|
+
gem.add_runtime_dependency('colored')
|
|
15
17
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shuttle
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,8 +9,24 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-10-
|
|
13
|
-
dependencies:
|
|
12
|
+
date: 2012-10-23 00:00:00.000000000 Z
|
|
13
|
+
dependencies:
|
|
14
|
+
- !ruby/object:Gem::Dependency
|
|
15
|
+
name: colored
|
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
|
17
|
+
none: false
|
|
18
|
+
requirements:
|
|
19
|
+
- - ! '>='
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '0'
|
|
22
|
+
type: :runtime
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
none: false
|
|
26
|
+
requirements:
|
|
27
|
+
- - ! '>='
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: '0'
|
|
14
30
|
description: A simplest continuous integration for a Rails application. Enjoy it!
|
|
15
31
|
email:
|
|
16
32
|
- fbazzarella@gmail.com
|
|
@@ -23,8 +39,12 @@ files:
|
|
|
23
39
|
- LICENSE
|
|
24
40
|
- README.md
|
|
25
41
|
- Rakefile
|
|
42
|
+
- lib/generators/shuttle/install_generator.rb
|
|
43
|
+
- lib/generators/shuttle/templates/shuttle.yml
|
|
26
44
|
- lib/shuttle.rb
|
|
45
|
+
- lib/shuttle/railtie.rb
|
|
27
46
|
- lib/shuttle/version.rb
|
|
47
|
+
- lib/tasks/shuttle.rake
|
|
28
48
|
- shuttle.gemspec
|
|
29
49
|
homepage:
|
|
30
50
|
licenses: []
|
|
@@ -50,6 +70,5 @@ rubygems_version: 1.8.24
|
|
|
50
70
|
signing_key:
|
|
51
71
|
specification_version: 3
|
|
52
72
|
summary: Get a new code from another team members, install new gems, run new migrations,
|
|
53
|
-
run specs and
|
|
54
|
-
At the simplest way!
|
|
73
|
+
run specs and send your new feature to the origin repository. At the simplest way!
|
|
55
74
|
test_files: []
|