heroku-rails 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- heroku-rails (0.2.0)
4
+ heroku-rails (0.2.1)
5
5
  heroku
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -43,6 +43,46 @@ Then edit config/heroku.yml with your project's heroku configurations. To persis
43
43
 
44
44
  This will create the heroku apps you have defined, and create the settings for each.
45
45
 
46
+ ### Example Configuration File
47
+
48
+ apps:
49
+ production: awesomeapp
50
+ staging: awesomeapp-staging
51
+ legacy: awesomeapp-legacy
52
+
53
+ stacks:
54
+ all: bamboo-mri-1.9.2
55
+ legacy: bamboo-ree-1.8.7
56
+
57
+ config:
58
+ all:
59
+ BUNDLE_WITHOUT: "test development"
60
+ production:
61
+ MONGODB_URI: "mongodb://[username:password@]host1[:port1][/database]"
62
+ staging:
63
+ MONGODB_URI: "mongodb://[username:password@]host1[:port1][/database]"
64
+
65
+ collaborators:
66
+ all:
67
+ - "heroku1@somedomain.com"
68
+ - "heroku2@somedomain.com"
69
+
70
+ domains:
71
+ production:
72
+ - "awesomeapp.com"
73
+ - "www.awesomeapp.com"
74
+
75
+ addons:
76
+ all:
77
+ - newrelic:bronze
78
+ # add any other addons here
79
+
80
+ production:
81
+ - ssl:piggyback
82
+ - cron:hourly
83
+ # list production env specific addons here
84
+
85
+
46
86
  ## Usage
47
87
 
48
88
  After configuring your Heroku apps you can use rake tasks to control the
@@ -97,17 +137,11 @@ With this in place, you can be a bit more terse:
97
137
 
98
138
  ### Deploy Hooks
99
139
 
100
- You can easily hook into the deploy process by defining any of the following rake tasks:
101
-
102
- You can generate these automatically within lib/tasks/heroku.rake by running:
103
-
104
- rails generate heroku:callbacks
105
-
140
+ You can easily hook into the deploy process by defining any of the following rake tasks.
106
141
 
107
- Then edit the rake tasks to provide custom logic for each of these steps
142
+ When you ran `rails generate heroku:config`, it created a list of empty rake tasks within lib/tasks/heroku.rake. Edit these rake tasks to provide custom logic for before/after deployment.
108
143
 
109
144
  namespace :heroku do
110
-
111
145
  # runs before all the deploys complete
112
146
  task :before_deploy do
113
147
 
@@ -127,12 +161,9 @@ Then edit the rake tasks to provide custom logic for each of these steps
127
161
  task :after_deploy do
128
162
 
129
163
  end
130
-
131
164
  end
132
165
 
133
166
 
134
-
135
-
136
167
  ## About Heroku Rails
137
168
 
138
169
  ### Links
@@ -147,7 +178,7 @@ License:: Copyright (c) 2010 Jacques Crocker <railsjedi@gmail.com> released unde
147
178
 
148
179
  ## Forked from Heroku Sans
149
180
 
150
- Heroku Rails is a fork and rewrite/reorganiziation of Heroku Sans, and a nice simple set of Rake tasks for managing Heroku environments. Check out that project here: <http://github.com/fastestforward/heroku_san>
181
+ Heroku Rails is a fork and rewrite/reorganiziation of the heroku_sans gem. Heroku Sans is a simple and elegant set of Rake tasks for managing Heroku environments. Check out that project here: <http://github.com/fastestforward/heroku_san>
151
182
 
152
183
  ### Heroku Sans Contributors
153
184
 
data/heroku-rails.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "heroku-rails"
3
- s.version = "0.2.0"
3
+ s.version = "0.2.1"
4
4
 
5
5
  s.authors = ["Elijah Miller", "Glenn Roberts", "Jacques Crocker"]
6
6
  s.summary = "Deployment and configuration tools for Heroku/Rails"
@@ -10,6 +10,10 @@ module Heroku
10
10
  def create_config_file
11
11
  template 'heroku.yml', File.join('config', "heroku.yml")
12
12
  end
13
+
14
+ def create_rake_file
15
+ template 'heroku.rake', File.join('lib', 'tasks', "heroku.rake")
16
+ end
13
17
  end
14
18
  end
15
19
  end
@@ -1,3 +1,12 @@
1
+ # ### Shortcuts: uncomment these for easier to type deployments
2
+ # ### e.g. rake deploy (instead of rake heroku:deploy)
3
+ # ###
4
+ # task :deploy => ["heroku:deploy"]
5
+ # task :console => ["heroku:console"]
6
+ # task :setup => ["heroku:setup"]
7
+ # task :logs => ["heroku:logs"]
8
+ # task :restart => ["heroku:restart"]
9
+
1
10
  # Heroku Deploy Callbacks
2
11
  namespace :heroku do
3
12
 
@@ -222,7 +222,7 @@ module Heroku
222
222
  rake demo staging deploy"
223
223
 
224
224
  puts "\nYou can use also command all Heroku apps for this project:
225
- rake all heroku:share"
225
+ rake all heroku:setup"
226
226
 
227
227
  exit(1)
228
228
  end
@@ -103,6 +103,13 @@ namespace :heroku do
103
103
  end
104
104
  end
105
105
 
106
+ desc "Shows the Heroku logs"
107
+ task :logs do
108
+ HEROKU_RUNNER.each_heroku_app do |heroku_env, app_name, repo|
109
+ system_with_echo "heroku logs --app #{app_name}"
110
+ end
111
+ end
112
+
106
113
  desc "Restarts remote servers"
107
114
  task :restart do
108
115
  HEROKU_RUNNER.each_heroku_app do |heroku_env, app_name, repo|
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku-rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Elijah Miller
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-11-01 00:00:00 -07:00
20
+ date: 2010-11-02 00:00:00 -07:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -61,7 +61,6 @@ extra_rdoc_files:
61
61
  - TODO
62
62
  - CHANGELOG
63
63
  files:
64
- - lib/generators/heroku/callbacks_generator.rb
65
64
  - lib/generators/heroku/config_generator.rb
66
65
  - lib/generators/templates/heroku.rake
67
66
  - lib/generators/templates/heroku.yml
@@ -1,15 +0,0 @@
1
- module Heroku
2
- module Generators
3
- class CallbacksGenerator < ::Rails::Generators::Base
4
- desc "Generates the rake tasks (lib/tasks/heroku.rake) that let you override heroku deploy callbacks"
5
-
6
- def self.source_root
7
- @_heroku_gen_source_root ||= File.expand_path("../../templates", __FILE__)
8
- end
9
-
10
- def create_callbacks_rake_file
11
- template 'heroku.rake', File.join('lib', 'tasks', "heroku.rake")
12
- end
13
- end
14
- end
15
- end