bard 0.9.14 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/bard.gemspec +2 -2
  3. data/lib/bard/capistrano.rb +17 -0
  4. metadata +5 -5
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.14
1
+ 0.10.0
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.9.14"
8
+ s.version = "0.10.0"
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-07-20}
12
+ s.date = %q{2010-07-22}
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}
@@ -1,5 +1,8 @@
1
+ require 'uri'
2
+
1
3
  Capistrano::Configuration.instance(:must_exist).load do
2
4
  role :staging, "www@staging.botandrose.com:22022"
5
+ set :asset_paths, []
3
6
 
4
7
  namespace "data" do
5
8
  namespace "pull" do
@@ -9,9 +12,23 @@ Capistrano::Configuration.instance(:must_exist).load do
9
12
  transfer :down, "#{application}/db/data.sql.gz", "db/data.sql.gz"
10
13
  system "gunzip -f db/data.sql.gz && rake db:load"
11
14
  end
15
+
16
+ desc "sync the static assets"
17
+ task "assets" do
18
+ uri = URI.parse("ssh://#{roles[ENV['ROLES'].to_sym].first.to_s}")
19
+ portopt = "-e'ssh -p#{uri.port}'" if uri.port
20
+
21
+ [asset_paths].flatten.each do |path|
22
+ dest_path = path.dup
23
+ dest_path.sub! %r(/[^/]+$), '/'
24
+ system "rsync #{portopt} --delete -avz #{uri.user}@#{uri.host}:#{application}/#{path} #{dest_path}"
25
+ end
26
+ end
12
27
  end
13
28
  end
14
29
 
30
+ after 'data:pull', 'data:pull:assets'
31
+
15
32
  desc "push app from staging to production"
16
33
  task :deploy, :roles => :production do
17
34
  system "git push github" if `git remote` =~ /\bgithub\b/
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: 39
4
+ hash: 55
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 9
9
- - 14
10
- version: 0.9.14
8
+ - 10
9
+ - 0
10
+ version: 0.10.0
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-07-20 00:00:00 -07:00
19
+ date: 2010-07-22 00:00:00 -07:00
20
20
  default_executable: bard
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency