standup 0.3.14 → 0.3.15

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.14
1
+ 0.3.15
data/bin/standup CHANGED
@@ -1,42 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'rubygems'
4
- require 'trollop'
5
4
  require 'standup'
6
5
 
7
- opt_parser = Trollop::Parser.new do
8
- version "Standup #{Standup.version} (c) 2010 Ilia Ablamonov, Cloud Castle Inc."
9
-
10
- banner 'Standup is an application deployment and infrastructure management tool for Rails and Amazon EC2.'
11
- banner ''
12
- banner 'Usage:'
13
- banner ' standup [options] <script> [script arguments]'
14
- banner ''
15
- banner 'where <script> is one of the following:'
16
- banner ''
17
-
18
- offset = Standup.scripts.keys.map(&:length).max + 2
19
- Standup.scripts.keys.sort.each do |name|
20
- banner "#{"%-#{offset}s" % name} #{Standup.scripts[name].description}"
21
- end
22
-
23
- banner ''
24
- banner "and [options] are:"
25
- banner ''
26
-
27
- stop_on Standup.scripts.keys
28
- end
29
-
30
- Trollop::with_standard_exception_handling opt_parser do
31
- opt_parser.parse ARGV
32
- raise Trollop::HelpNeeded if ARGV.empty?
33
- end
34
-
35
- script_name = ARGV.shift
36
- script = Standup.scripts[script_name]
37
-
38
- if script
39
- script.execute
40
- else
41
- opt_parser.die "unknown script #{script_name}", nil
42
- end
6
+ Standup.run_from_command_line
data/lib/standup.rb CHANGED
@@ -4,6 +4,7 @@ require 'AWS'
4
4
  require 'aws/s3'
5
5
  require 'net/ssh'
6
6
  require 'highline'
7
+ require 'trollop'
7
8
 
8
9
  require 'standup/core_ext'
9
10
  require 'standup/settings'
@@ -62,4 +63,47 @@ module Standup
62
63
  def self.version
63
64
  File.read(File.expand_path('../../VERSION', __FILE__)).strip
64
65
  end
66
+
67
+ def self.run_from_command_line
68
+ unless ENV['BUNDLE_GEMFILE']
69
+ Kernel.exec "bundle exec standup #{ARGV.join(' ')}"
70
+ end
71
+
72
+ opt_parser = Trollop::Parser.new do
73
+ version "Standup #{Standup.version} (c) 2010 Ilia Ablamonov, Artem Orlov, Cloud Castle Inc."
74
+
75
+ banner 'Standup is an application deployment and infrastructure management tool for Rails and Amazon EC2.'
76
+ banner ''
77
+ banner 'Usage:'
78
+ banner ' standup [options] <script> [script arguments]'
79
+ banner ''
80
+ banner 'where <script> is one of the following:'
81
+ banner ''
82
+
83
+ offset = Standup.scripts.keys.map(&:length).max + 2
84
+ Standup.scripts.keys.sort.each do |name|
85
+ banner "#{"%-#{offset}s" % name} #{Standup.scripts[name].description}"
86
+ end
87
+
88
+ banner ''
89
+ banner "and [options] are:"
90
+ banner ''
91
+
92
+ stop_on Standup.scripts.keys
93
+ end
94
+
95
+ Trollop::with_standard_exception_handling opt_parser do
96
+ opt_parser.parse ARGV
97
+ raise Trollop::HelpNeeded if ARGV.empty?
98
+ end
99
+
100
+ script_name = ARGV.shift
101
+ script = Standup.scripts[script_name]
102
+
103
+ if script
104
+ script.execute
105
+ else
106
+ opt_parser.die "unknown script #{script_name}", nil
107
+ end
108
+ end
65
109
  end
data/scripts/webapp.rb CHANGED
@@ -2,7 +2,7 @@ Standup.script :node do
2
2
  self.default_params = {
3
3
  :rails_env => 'production',
4
4
  :name => 'webapp',
5
- :server_name => 'localhost'
5
+ :server_name => '_'
6
6
  }
7
7
 
8
8
  def run
data/standup.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{standup}
8
- s.version = "0.3.14"
8
+ s.version = "0.3.15"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ilia Ablamonov", "Artem Orlov", "Cloud Castle Inc."]
12
- s.date = %q{2010-12-30}
12
+ s.date = %q{2011-01-02}
13
13
  s.default_executable = %q{standup}
14
14
  s.email = %q{ilia@flamefork.ru}
15
15
  s.executables = ["standup"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standup
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 14
10
- version: 0.3.14
9
+ - 15
10
+ version: 0.3.15
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ilia Ablamonov
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-12-30 00:00:00 +03:00
20
+ date: 2011-01-02 00:00:00 +03:00
21
21
  default_executable: standup
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency