shuttle 1.0.0 → 1.1.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.
@@ -4,7 +4,7 @@ module Shuttle
4
4
  source_root File.expand_path('../templates', __FILE__)
5
5
 
6
6
  def copy_install_file
7
- template 'shuttle.yml', 'config/shuttle.yml'
7
+ template 'shuttle.rb', 'config/initializers/shuttle.rb'
8
8
  end
9
9
  end
10
10
  end
@@ -0,0 +1,13 @@
1
+ Shuttle.setup do |s|
2
+
3
+ # TODO: Setup Steps Description
4
+
5
+ s.steps = [
6
+ 'shuttle:start',
7
+ 'shuttle:bundle',
8
+ 'db:migrate',
9
+ 'shuttle:spec',
10
+ 'shuttle:git:push'
11
+ ]
12
+
13
+ end
@@ -1,13 +1,9 @@
1
1
  require "shuttle/railtie"
2
- require 'yaml'
3
2
 
4
3
  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
4
+ mattr_accessor :steps
5
+
6
+ def self.setup
7
+ yield self
12
8
  end
13
9
  end
@@ -1,3 +1,3 @@
1
1
  module Shuttle
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -35,20 +35,21 @@ namespace :shuttle do
35
35
  end
36
36
  end
37
37
 
38
- desc 'Integrate the project code'
39
- task :shuttle do
40
- if Shuttle.steps.nil?
38
+ desc 'Launch the code to the space!'
39
+ task shuttle: :environment do
40
+ if Shuttle.steps.blank?
41
41
  require 'colored'
42
42
 
43
43
  puts %{
44
- You should define Shuttle Steps!
44
+ You should define Shuttle Steps in 'config/initializers/shuttle.rb'.
45
45
 
46
- Just run 'rails g shuttle:install' to define default steps at 'config/shuttle.yml'.
46
+ Or run 'rails g shuttle:install' to create this file with default steps.
47
47
  }.yellow
48
+
48
49
  exit
49
50
  end
50
51
 
51
- Shuttle.steps.values.each do |step|
52
+ Shuttle.steps.each do |step|
52
53
  p80("Executing #{step}...") do
53
54
  RAILS_ENV = ENV['RAILS_ENV'] || 'development'
54
55
  Rake::Task[step].invoke
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: 1.0.0
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-23 00:00:00.000000000 Z
12
+ date: 2012-10-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colored
@@ -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.yml
43
+ - lib/generators/shuttle/templates/shuttle.rb
44
44
  - lib/shuttle.rb
45
45
  - lib/shuttle/railtie.rb
46
46
  - lib/shuttle/version.rb
@@ -1,6 +0,0 @@
1
- steps:
2
- 1: 'shuttle:start'
3
- 2: 'shuttle:bundle'
4
- 3: 'db:migrate'
5
- 4: 'shuttle:spec'
6
- 5: 'shuttle:git:push'