executive 0.0.2 → 0.0.3
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/README.md +13 -11
- data/bin/executive +2 -0
- data/executive.gemspec +1 -0
- data/lib/executive/version.rb +1 -1
- data/lib/executive.rb +16 -0
- metadata +17 -6
data/README.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# Executive
|
2
2
|
|
3
|
-
|
3
|
+
Executive is a set of developer tasks for managing your development environment in a congruent way to how you manage your production application on Heroku.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
7
|
Add this line to your application's Gemfile:
|
8
8
|
|
9
|
-
gem '
|
9
|
+
gem 'executive'
|
10
10
|
|
11
11
|
And then execute:
|
12
12
|
|
@@ -14,16 +14,18 @@ And then execute:
|
|
14
14
|
|
15
15
|
Or install it yourself as:
|
16
16
|
|
17
|
-
$ gem install
|
17
|
+
$ gem install executive
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
Deploy production
|
22
22
|
|
23
|
-
|
23
|
+
$ executive deploy production
|
24
|
+
|
25
|
+
Start your development application
|
24
26
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
$ executive start
|
28
|
+
|
29
|
+
Deploy to your running development application
|
30
|
+
|
31
|
+
$ executive deploy development
|
data/bin/executive
CHANGED
data/executive.gemspec
CHANGED
data/lib/executive/version.rb
CHANGED
data/lib/executive.rb
CHANGED
@@ -20,6 +20,22 @@ module Executive
|
|
20
20
|
Production.deploy
|
21
21
|
end
|
22
22
|
end
|
23
|
+
|
24
|
+
def bootstrap_data
|
25
|
+
config = YAML.load_file(File.join("config", "database.yml"))["development"]
|
26
|
+
|
27
|
+
old_backup = `heroku pgbackups | grep HEROKU_POSTGRESQL_RED | cut -d "|" -f 1 | head -n 1`
|
28
|
+
puts "Destroying Old Backup: #{old_backup}".green
|
29
|
+
`heroku pgbackups:destroy #{old_backup}`
|
30
|
+
puts "Capturing New Backup...".green
|
31
|
+
`heroku pgbackups:capture`
|
32
|
+
|
33
|
+
backup_url = `heroku pgbackups:url`.strip
|
34
|
+
`curl "#{backup_url}" > temporary_backup.dump`
|
35
|
+
puts "Restoring Backup to #{config["database"]}".green
|
36
|
+
`pg_restore --verbose --clean --no-acl --no-owner -h #{config["host"]} -U #{config["username"]} -d #{config["database"]} temporary_backup.dump`
|
37
|
+
`rm temporary_backup.dump`
|
38
|
+
end
|
23
39
|
end
|
24
40
|
|
25
41
|
module Development
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: executive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-10 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colorize
|
16
|
-
requirement: &
|
16
|
+
requirement: &70143489915100 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70143489915100
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: foreman
|
27
|
-
requirement: &
|
27
|
+
requirement: &70143489912940 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,18 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70143489912940
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: heroku
|
38
|
+
requirement: &70143489911520 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70143489911520
|
36
47
|
description: a Foreman wrapper with extra utilities.
|
37
48
|
email:
|
38
49
|
- roshan.choxi@gmail.com
|