heroku_ops 0.0.4 → 0.0.5
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.
- checksums.yaml +4 -4
- data/README.md +31 -19
- data/lib/heroku_ops/version.rb +1 -1
- data/lib/tasks/pipeline_setup.rake +7 -7
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33256155323898c07697e16006a1422080de7e17
|
4
|
+
data.tar.gz: ca90a151f5dd88816a9a9737cac4aa6d5334388e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5135d9069ffe240a510c0f1666947730b6cae51b49271bd3dbce44ac4e8e123d1d3f9d31c832c2bb21294e4558eec49c676b69c5b0902b6455f0a83f848fac2
|
7
|
+
data.tar.gz: 8f9b867fbdbc0534f2cd7d972f24141df1230472fbfaff236e2be3f71e3148e68d49127b6878e134aa1cab9d10a1f040551cc2b8a28814ecad55f63dc7dd7566
|
data/README.md
CHANGED
@@ -6,14 +6,22 @@ A (for now) very opinionated gem which has 3 sections:
|
|
6
6
|
* db restore (pull down your heroku database and `psql < tmp/latest.db`)
|
7
7
|
* deploys (push to heroku remotes)
|
8
8
|
|
9
|
-
These tasks
|
9
|
+
These tasks will use the two following environment variables to determine your staging and production app names:
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
If these variables aren't present, it will default to the following format:
|
12
|
+
`"#{Rails.application.class.parent_name.underscore.gsub('_','-')}-#{environment}"`
|
13
|
+
|
14
|
+
|
15
|
+
## Addons
|
16
|
+
|
17
|
+
Setting up an app includes the following free Heroku addons:
|
18
|
+
|
19
|
+
* heroku-postgresql:hobby-dev
|
20
|
+
* newrelic:wayne
|
21
|
+
* papertrail:choklad
|
22
|
+
* rediscloud:30
|
23
|
+
* scheduler:standard
|
24
|
+
* sendgrid:starter
|
17
25
|
|
18
26
|
App name configuration flags and more detailed documentation will come in a later version.
|
19
27
|
|
@@ -35,19 +43,19 @@ Or install it yourself as:
|
|
35
43
|
$ gem install heroku_ops
|
36
44
|
|
37
45
|
## Usage
|
38
|
-
To see an updated list of tasks and descriptions:
|
46
|
+
To see an updated list of tasks and descriptions implemented in this gem:
|
39
47
|
`bundle exec rake heroku_ops -T heroku_ops`
|
40
48
|
|
41
49
|
~~~bash
|
42
|
-
rake
|
43
|
-
rake
|
44
|
-
rake
|
45
|
-
rake
|
46
|
-
rake
|
47
|
-
rake
|
48
|
-
rake
|
49
|
-
rake
|
50
|
-
rake
|
50
|
+
rake db:restore # Pull Down a copy of the database from the specified heroku environment
|
51
|
+
rake db:restore:from_local_dump # Restore from local dump file (defaults to '/tmp/latest.dump' - specify with DUMP_FILE Environmental Variable)
|
52
|
+
rake db:restore:local # Erase local development and test database and restore from the local dump file
|
53
|
+
rake db:restore:production # Restore a local copy of Heroku's Production Environment database
|
54
|
+
rake db:restore:staging # Restore a local copy of Heroku's Staging Environment database
|
55
|
+
rake deploy # Deploy Safely to Heroku
|
56
|
+
rake deploy:production # Deploy to Heroku's Production Environment
|
57
|
+
rake deploy:production:quick # Quick Deploy to Production, without running migrations
|
58
|
+
rake deploy:staging:quick # Quick Deploy to Staging, without running migrations
|
51
59
|
rake heroku_ops:pipeline:setup # Create a pipeline, staging and production applications
|
52
60
|
rake heroku_ops:pipeline:setup:pipeline # Setup a pipeline with your applications in the appropriate stages
|
53
61
|
rake heroku_ops:pipeline:setup:production # Setup a production app (with addons) and git remote for heroku
|
@@ -55,6 +63,12 @@ rake heroku_ops:pipeline:setup:staging # Setup a staging app (with addons)
|
|
55
63
|
~~~
|
56
64
|
|
57
65
|
|
66
|
+
## Dependencies
|
67
|
+
The `db` and `deploy` tasks rely on the following two gems:
|
68
|
+
* https://github.com/ldstudios/heroku_rake_deploy
|
69
|
+
* https://github.com/ldstudios/heroku_db_restore
|
70
|
+
|
71
|
+
|
58
72
|
## Contributing
|
59
73
|
|
60
74
|
Bug reports and pull requests are welcome on GitHub at https://github.com/nrowegt/heroku_ops.
|
@@ -64,5 +78,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/nroweg
|
|
64
78
|
|
65
79
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
66
80
|
|
67
|
-
Thanks to [@danielricecodes](http://www.ldstudios.co/) for the inspiration and the initial base implementations of the restore and deploy tasks.
|
68
|
-
|
data/lib/heroku_ops/version.rb
CHANGED
@@ -5,9 +5,9 @@ end
|
|
5
5
|
def app_name_from_environment(env)
|
6
6
|
case env.downcase
|
7
7
|
when "production"
|
8
|
-
ENV['HEROKU_APPNAME_PRODUCTION'] ||
|
9
|
-
|
10
|
-
ENV['HEROKU_APPNAME_STAGING'] || "#{
|
8
|
+
ENV['HEROKU_APPNAME_PRODUCTION'] || base_app_name
|
9
|
+
else
|
10
|
+
ENV['HEROKU_APPNAME_STAGING'] || "#{base_app_name}-#{env}"
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
@@ -36,7 +36,7 @@ namespace :heroku_ops do
|
|
36
36
|
namespace :setup do
|
37
37
|
desc "Setup a staging app (with addons) and remote for heroku"
|
38
38
|
task :staging do
|
39
|
-
app_name =
|
39
|
+
app_name = app_name_from_environment("staging")
|
40
40
|
sh "heroku create #{app_name}"
|
41
41
|
sh "git remote remove heroku"
|
42
42
|
create_addons_for_appname(app_name)
|
@@ -44,7 +44,7 @@ namespace :heroku_ops do
|
|
44
44
|
end
|
45
45
|
desc "Setup a production app (with addons) and git remote for heroku"
|
46
46
|
task :production do
|
47
|
-
app_name =
|
47
|
+
app_name = app_name_from_environment("production")
|
48
48
|
sh "heroku create #{app_name}"
|
49
49
|
sh "git remote remove heroku"
|
50
50
|
create_addons_for_appname(app_name)
|
@@ -52,8 +52,8 @@ namespace :heroku_ops do
|
|
52
52
|
end
|
53
53
|
desc "Setup a pipeline with your applications in the appropriate stages."
|
54
54
|
task :pipeline do
|
55
|
-
sh "heroku pipelines:create -a#{
|
56
|
-
sh "heroku pipelines:add -a#{
|
55
|
+
sh "heroku pipelines:create -a#{app_name_from_environment("staging")} --stage staging"
|
56
|
+
sh "heroku pipelines:add -a#{app_name_from_environment("production")} #{base_app_name} --stage production"
|
57
57
|
end
|
58
58
|
end
|
59
59
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heroku_ops
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nrowegt
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
109
|
rubyforge_project:
|
110
|
-
rubygems_version: 2.5.
|
110
|
+
rubygems_version: 2.5.2
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: Helpful Heroku Ops Rake Tasks
|