standup 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -43,8 +43,6 @@ For example, if you want to add `rescue` to your configuration, you need to:
43
43
 
44
44
  ## To do
45
45
 
46
- - Allow Rails environment specification other than production (make it param)
47
-
48
46
  - If there is more than one node in standup.yml, require node name(s) or `all` explicitly set:
49
47
  `standup shell web`
50
48
  `standup update db,web`
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
@@ -1,3 +1,5 @@
1
+ require 'tempfile'
2
+
1
3
  module Standup
2
4
  class Remoting
3
5
  def initialize node
@@ -2,6 +2,6 @@ Standup.script do
2
2
  self.description = 'Run remote Rails application console'
3
3
 
4
4
  def run
5
- Kernel.exec "#{node.ssh_string} -t 'cd /opt/webapp && rails console production'".tap(&:bright_p)
5
+ Kernel.exec "#{node.ssh_string} -t 'cd /opt/webapp && rails console #{scripts.webapp.params.rails_env}'".tap(&:bright_p)
6
6
  end
7
7
  end
data/scripts/update.rb CHANGED
@@ -6,7 +6,7 @@ Standup.script do
6
6
  sudo 'chown -R ubuntu:ubuntu /opt/webapp'
7
7
  exec 'git pull'
8
8
  sudo 'bundle install'
9
- sudo 'RAILS_ENV=production rake db:migrate'
9
+ sudo "RAILS_ENV=#{scripts.webapp.params.rails_env} rake db:migrate"
10
10
  sudo 'mkdir -p tmp'
11
11
  sudo 'chown -R nobody:nogroup /opt/webapp'
12
12
  sudo 'touch tmp/restart.txt'
data/scripts/webapp.rb CHANGED
@@ -1,4 +1,8 @@
1
1
  Standup.script do
2
+ self.default_params = {
3
+ :rails_env => 'production'
4
+ }
5
+
2
6
  def run
3
7
  install_package 'git-core'
4
8
  install_gem 'bundler'
@@ -56,8 +60,8 @@ Standup.script do
56
60
 
57
61
  in_dir '/opt/webapp' do
58
62
  sudo 'bundle install'
59
- exec 'RAILS_ENV=production rake db:schema:load'
60
- exec 'RAILS_ENV=production rake db:seed'
63
+ exec "RAILS_ENV=#{params.rails_env} rake db:schema:load"
64
+ exec "RAILS_ENV=#{params.rails_env} rake db:seed"
61
65
  end
62
66
  end
63
67
  end
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.0"
8
+ s.version = "0.3.1"
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", "Cloud Castle Inc."]
12
- s.date = %q{2010-11-09}
12
+ s.date = %q{2010-11-10}
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: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 0
10
- version: 0.3.0
9
+ - 1
10
+ version: 0.3.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ilia Ablamonov
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-11-09 00:00:00 +03:00
19
+ date: 2010-11-10 00:00:00 +03:00
20
20
  default_executable: standup
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency