handy 0.0.21 → 0.0.22
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.
- data/lib/handy/heroku_helpers.rb +26 -0
- data/lib/handy/version.rb +1 -1
- metadata +4 -4
data/lib/handy/heroku_helpers.rb
CHANGED
@@ -34,6 +34,32 @@ namespace :handy do
|
|
34
34
|
execute "heroku pgbackups:restore DATABASE #{get_src_db_url_cmd} --app #{dst_app_name} --confirm #{dst_app_name}"
|
35
35
|
end
|
36
36
|
|
37
|
+
desc "Takes snapshot of branch A and pushes to branch B"
|
38
|
+
task :a2b, :app do |t, args|
|
39
|
+
a = ENV['A'] || ENV['a']
|
40
|
+
b = ENV['B'] || ENV['b']
|
41
|
+
|
42
|
+
if a.nil?
|
43
|
+
puts "A was not supplied"
|
44
|
+
puts "Usage: rake handy:heroku:a2b A=production B=533-home-page-design--ip"
|
45
|
+
exit 1
|
46
|
+
end
|
47
|
+
|
48
|
+
if b.nil?
|
49
|
+
puts "B was not supplied"
|
50
|
+
puts "Usage: rake handy:heroku:a2b A=production B=533-home-page-design--ip"
|
51
|
+
exit 1
|
52
|
+
end
|
53
|
+
|
54
|
+
take_current_snapshot "#{heroku_app_name(t, args)}-#{a}"
|
55
|
+
|
56
|
+
heroku_app_name = heroku_app_name(t, args)
|
57
|
+
src_app_name = "#{heroku_app_name}-#{a}"
|
58
|
+
dst_app_name = "#{heroku_app_name}-#{b}"
|
59
|
+
|
60
|
+
get_src_db_url_cmd = "`heroku pgbackups:url --app #{src_app_name}`"
|
61
|
+
execute "heroku pgbackups:restore DATABASE #{get_src_db_url_cmd} --app #{dst_app_name} --confirm #{dst_app_name}"
|
62
|
+
end
|
37
63
|
|
38
64
|
def export2local(app_name)
|
39
65
|
take_current_snapshot(app_name)
|
data/lib/handy/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: handy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.22
|
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: 2013-
|
12
|
+
date: 2013-09-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hashr
|
@@ -62,7 +62,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
62
62
|
version: '0'
|
63
63
|
segments:
|
64
64
|
- 0
|
65
|
-
hash:
|
65
|
+
hash: 4596920742940519601
|
66
66
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
67
|
none: false
|
68
68
|
requirements:
|
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
71
|
version: '0'
|
72
72
|
segments:
|
73
73
|
- 0
|
74
|
-
hash:
|
74
|
+
hash: 4596920742940519601
|
75
75
|
requirements: []
|
76
76
|
rubyforge_project:
|
77
77
|
rubygems_version: 1.8.23
|