heroku_ops 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87efff934872674d9853d7165df342cc6471d106
4
- data.tar.gz: 1a34d491a9cd64716932edf141d038bd0596ba5f
3
+ metadata.gz: 33256155323898c07697e16006a1422080de7e17
4
+ data.tar.gz: ca90a151f5dd88816a9a9737cac4aa6d5334388e
5
5
  SHA512:
6
- metadata.gz: 1852ae2ee6fbd903096d8b804cf4462da0202414bbd0f6e98f24d8538c4eb1371133c58f84012ad0f457b2ead944805f771302fe02e66371ea840e66590114cb
7
- data.tar.gz: 3115404a1c90b71f78f2b99f6d5b93be8df238ca1ccc43836d25de3702697abc49054dc6b9c8246c11be7c601ad1a62ca2168745d2732a31875220de1b5d564f
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 all assume your heroku application names are of the format `"#{Rails.application.class.parent_name.underscore.gsub('_','-')}-#{environment}"`, where environment is one of staging, production. Setting up an app includes the following free Heroku addons:
9
+ These tasks will use the two following environment variables to determine your staging and production app names:
10
10
 
11
- *heroku-postgresql:hobby-dev
12
- *newrelic:wayne
13
- *papertrail:choklad
14
- *rediscloud:30
15
- *scheduler:standard
16
- *sendgrid:starter
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 heroku_ops:db:restore # Pull Down a copy of the database from the specified heroku environment
43
- rake heroku_ops:db:restore:from_local_dump # Restore from local dump file (defaults to '/tmp/latest.dump' - specify with DUMP_FILE Environmental Variable)
44
- rake heroku_ops:db:restore:local # Erase local development and test database and restore from the local dump file
45
- rake heroku_ops:db:restore:production # Restore a local copy of Heroku's Production Environment database
46
- rake heroku_ops:db:restore:staging # Restore a local copy of Heroku's Staging Environment database
47
- rake heroku_ops:deploy # Deploy Safely to Heroku
48
- rake heroku_ops:deploy:production # Deploy to Heroku's Production Environment
49
- rake heroku_ops:deploy:production:quick # Quick Deploy to Production, without running migrations
50
- rake heroku_ops:deploy:staging:quick # Quick Deploy to Staging, without running migrations
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
-
@@ -1,3 +1,3 @@
1
1
  module HerokuOps
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -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'] || "#{Rails.application.class.parent_name.underscore.gsub('_','-')}-production"
9
- when "staging"
10
- ENV['HEROKU_APPNAME_STAGING'] || "#{Rails.application.class.parent_name.underscore.gsub('_','-')}-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 = app_name_for_env("staging")
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 = app_name_for_env("production")
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#{app_name_for_env("staging")} --stage staging"
56
- sh "heroku pipelines:add -a#{app_name_for_env("production")} #{base_app_name} --stage production"
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
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: 2016-11-25 00:00:00.000000000 Z
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.1
110
+ rubygems_version: 2.5.2
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: Helpful Heroku Ops Rake Tasks