bard 0.11.1 → 0.11.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.rvmrc +1 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +24 -0
- data/VERSION +1 -1
- data/bard.gemspec +5 -2
- data/lib/bard.rb +1 -12
- data/lib/bard/capistrano.rb +11 -1
- data/lib/bard/ssh_delegation.rb +0 -5
- metadata +7 -4
data/.gitignore
CHANGED
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm --create use ree-1.8.7-2010.02@bard
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://gemcutter.org/
|
3
|
+
specs:
|
4
|
+
builder (2.1.2)
|
5
|
+
cucumber (0.9.4)
|
6
|
+
builder (~> 2.1.2)
|
7
|
+
diff-lcs (~> 1.1.2)
|
8
|
+
gherkin (~> 2.2.9)
|
9
|
+
json (~> 1.4.6)
|
10
|
+
term-ansicolor (~> 1.0.5)
|
11
|
+
diff-lcs (1.1.2)
|
12
|
+
gherkin (2.2.9)
|
13
|
+
json (~> 1.4.6)
|
14
|
+
term-ansicolor (~> 1.0.5)
|
15
|
+
json (1.4.6)
|
16
|
+
rspec (1.3.1)
|
17
|
+
term-ansicolor (1.0.5)
|
18
|
+
|
19
|
+
PLATFORMS
|
20
|
+
ruby
|
21
|
+
|
22
|
+
DEPENDENCIES
|
23
|
+
cucumber
|
24
|
+
rspec (~> 1.3.0)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.11.
|
1
|
+
0.11.2
|
data/bard.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{bard}
|
8
|
-
s.version = "0.11.
|
8
|
+
s.version = "0.11.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Micah Geisel", "Nick Hogle"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-11-15}
|
13
13
|
s.default_executable = %q{bard}
|
14
14
|
s.description = %q{This immaculate work of engineering genius allows mere mortals to collaborate with beings of transcendent intelligence like Micah, Michael, and Nick.}
|
15
15
|
s.email = %q{info@botandrose.com}
|
@@ -22,6 +22,9 @@ Gem::Specification.new do |s|
|
|
22
22
|
".document",
|
23
23
|
".gitignore",
|
24
24
|
".gitmodules",
|
25
|
+
".rvmrc",
|
26
|
+
"Gemfile",
|
27
|
+
"Gemfile.lock",
|
25
28
|
"LICENSE",
|
26
29
|
"README.rdoc",
|
27
30
|
"Rakefile",
|
data/lib/bard.rb
CHANGED
@@ -65,8 +65,7 @@ class Bard < Thor
|
|
65
65
|
raise NonFastForwardError unless fast_forward_merge?("origin/#{current_branch}")
|
66
66
|
|
67
67
|
run_crucial "git push origin #{current_branch}", true
|
68
|
-
|
69
|
-
run_crucial_via_bard "bard stage"
|
68
|
+
run_crucial "cap stage"
|
70
69
|
end
|
71
70
|
|
72
71
|
desc "deploy", "pushes, merges integration branch into master and deploys it to production"
|
@@ -100,16 +99,6 @@ class Bard < Thor
|
|
100
99
|
run_crucial "cap deploy"
|
101
100
|
end
|
102
101
|
|
103
|
-
desc "stage", "!!! INTERNAL USE ONLY !!! reset HEAD to integration, update submodules, run migrations, install gems, restart server"
|
104
|
-
def stage
|
105
|
-
ensure_sanity!(true)
|
106
|
-
|
107
|
-
run_crucial "git fetch"
|
108
|
-
run_crucial "git checkout master && git reset --hard origin/master"
|
109
|
-
run_crucial "git checkout integration && git reset --hard origin/integration"
|
110
|
-
run_crucial "rake bootstrap RAILS_ENV=staging"
|
111
|
-
end
|
112
|
-
|
113
102
|
private
|
114
103
|
def ensure_sanity!(dirty_ok = false)
|
115
104
|
auto_update!
|
data/lib/bard/capistrano.rb
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
require 'uri'
|
2
2
|
|
3
3
|
Capistrano::Configuration.instance(:must_exist).load do
|
4
|
+
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
|
5
|
+
require "rvm/capistrano"
|
6
|
+
set :rvm_type, :user
|
7
|
+
|
4
8
|
role :staging, "www@staging.botandrose.com:22022"
|
5
9
|
set :asset_paths, []
|
6
10
|
|
@@ -29,10 +33,16 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
29
33
|
|
30
34
|
after 'data:pull', 'data:pull:assets'
|
31
35
|
|
32
|
-
desc "push app
|
36
|
+
desc "push app to production"
|
33
37
|
task :deploy, :roles => :production do
|
34
38
|
system "git push github" if `git remote` =~ /\bgithub\b/
|
35
39
|
run "cd #{application} && git pull origin master && rake bootstrap:production"
|
36
40
|
puts "Deploy Succeeded"
|
37
41
|
end
|
42
|
+
|
43
|
+
desc "push app to staging"
|
44
|
+
task :stage, :roles => :staging do
|
45
|
+
run "cd #{application} && git fetch && git checkout -f origin/integration && rake bootstrap"
|
46
|
+
puts "Stage Succeeded"
|
47
|
+
end
|
38
48
|
end
|
data/lib/bard/ssh_delegation.rb
CHANGED
@@ -28,9 +28,4 @@ class Bard < Thor
|
|
28
28
|
def command_for(user, command)
|
29
29
|
%(sudo -H -u #{user} bash -c "cd ~ && #{command}")
|
30
30
|
end
|
31
|
-
|
32
|
-
def run_crucial_via_bard(command)
|
33
|
-
return if ENV['TESTING']
|
34
|
-
run_crucial %(ssh www@staging.botandrose.com -p22022 "cd #{project_name} && #{command}")
|
35
|
-
end
|
36
31
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 55
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 11
|
9
|
-
-
|
10
|
-
version: 0.11.
|
9
|
+
- 2
|
10
|
+
version: 0.11.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Micah Geisel
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-
|
19
|
+
date: 2010-11-15 00:00:00 -08:00
|
20
20
|
default_executable: bard
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -202,6 +202,9 @@ files:
|
|
202
202
|
- .document
|
203
203
|
- .gitignore
|
204
204
|
- .gitmodules
|
205
|
+
- .rvmrc
|
206
|
+
- Gemfile
|
207
|
+
- Gemfile.lock
|
205
208
|
- LICENSE
|
206
209
|
- README.rdoc
|
207
210
|
- Rakefile
|