suspenders 1.1.1 → 1.1.2

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
- suspenders (1.0.1)
4
+ suspenders (1.1.1)
5
5
  bundler (>= 1.1)
6
6
  hub (~> 1.10.2)
7
7
  rails (= 3.2.6)
data/NEWS.md CHANGED
@@ -1,3 +1,8 @@
1
+ 1.1.2 (August 6, 2012)
2
+
3
+ * Fix broken rake.
4
+ * Use Heroku-compliant asset pipeline settings.
5
+
1
6
  1.1.1 (August 3, 2012)
2
7
 
3
8
  * Fix broken newline interpolation
data/README.md CHANGED
@@ -15,7 +15,7 @@ Then run:
15
15
 
16
16
  suspenders projectname
17
17
 
18
- This will create a Rails 3.1 app in `projectname`. This script creates a new
18
+ This will create a Rails 3.2 app in `projectname`. This script creates a new
19
19
  new git repository. It is not meant to be used against an existing repo.
20
20
 
21
21
  Gemfile
@@ -50,6 +50,7 @@ Suspenders also comes with:
50
50
 
51
51
  * Rails' flashes set up and in application layout.
52
52
  * A few nice time formats.
53
+ * [Heroku-compliant asset pipeline settings](https://devcenter.heroku.com/articles/rails3x-asset-pipeline-cedar/).
53
54
 
54
55
  Heroku
55
56
  ------
@@ -27,6 +27,12 @@ module Suspenders
27
27
  run 'cp config/environments/production.rb config/environments/staging.rb'
28
28
  end
29
29
 
30
+ def initialize_on_precompile
31
+ inject_into_file 'config/application.rb',
32
+ "\n config.assets.initialize_on_precompile = false",
33
+ :after => 'config.assets.enabled = true'
34
+ end
35
+
30
36
  def create_partials_directory
31
37
  empty_directory 'app/views/application'
32
38
  end
@@ -167,12 +173,6 @@ module Suspenders
167
173
  run "#{path_addition} heroku create #{app_name}-staging --remote=staging"
168
174
  end
169
175
 
170
- def document_heroku
171
- heroku_readme_path = find_in_source_paths 'HEROKU_README.md'
172
- documentation = File.open(heroku_readme_path).read
173
- inject_into_file('README.md', "#{documentation}\n", :before => 'Most importantly')
174
- end
175
-
176
176
  def create_github_repo(repo_name)
177
177
  path_addition = override_path_for_tests
178
178
  run "#{path_addition} hub create #{repo_name}"
@@ -61,6 +61,7 @@ module Suspenders
61
61
  def setup_staging_environment
62
62
  say 'Setting up the staging environment'
63
63
  build :setup_staging_environment
64
+ build :initialize_on_precompile
64
65
  end
65
66
 
66
67
  def create_suspenders_views
@@ -143,7 +144,6 @@ module Suspenders
143
144
  if options[:heroku]
144
145
  say 'Creating Heroku apps'
145
146
  build :create_heroku_apps
146
- build :document_heroku
147
147
  end
148
148
  end
149
149
 
@@ -1,3 +1,3 @@
1
1
  module Suspenders
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.2'
3
3
  end
@@ -18,7 +18,7 @@ group :development, :test do
18
18
  end
19
19
 
20
20
  group :test do
21
- gem 'cucumber-rails', '1.3.0'
21
+ gem 'cucumber-rails', '1.3.0', :require => false
22
22
  gem 'factory_girl_rails'
23
23
  gem 'bourne'
24
24
  gem 'database_cleaner'
@@ -173,6 +173,10 @@ Watch logs and metrics dashboards. If the feature is working, merge into master.
173
173
  git merge production --ff-only
174
174
  git push origin master
175
175
 
176
+ Use scripts from [thoughtbot/dotfiles](http://github.com/thoughtbot/dotfiles)
177
+ to quickly access the Heroku console, backup the production database, and
178
+ transfer production data to staging.
179
+
176
180
  Formatting
177
181
  ----------
178
182
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: suspenders
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
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: 2012-08-03 00:00:00.000000000 Z
12
+ date: 2012-08-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -132,7 +132,6 @@ files:
132
132
  - suspenders.gemspec
133
133
  - templates/Gemfile_additions
134
134
  - templates/Guardfile
135
- - templates/HEROKU_README.md
136
135
  - templates/Procfile
137
136
  - templates/README.md.erb
138
137
  - templates/_flashes.html.erb
@@ -1,66 +0,0 @@
1
- Staging and production environments
2
- -----------------------------------
3
-
4
- We're using Heroku as a hosting provider. Deploying to Heroku is done via git. So, set up your git remotes for each environment:
5
-
6
- git remote add staging git@heroku.com:your-app-staging.git
7
- git remote add production git@heroku.com:your-app-production.git
8
-
9
- Heroku
10
- ------
11
-
12
- The following are mostly aliases from the `dotfiles` script.
13
-
14
- To access your code on Heroku:
15
-
16
- staging
17
- production
18
-
19
- That will drop you into a Rails console for either environment. You can run ActiveRecord queries from there.
20
-
21
- To dump staging or production data into your development environment:
22
-
23
- db-pull-staging
24
- db-pull-production
25
-
26
- You will see progress bars for each db index and table.
27
-
28
- We can create a database backup at any time:
29
-
30
- db-backup-production
31
-
32
- View backups:
33
-
34
- db-backups
35
-
36
- To destroy a backup:
37
-
38
- heroku pgbackups:destroy b003 --remote production
39
-
40
- Transfer production data to staging:
41
-
42
- db-copy-production-to-staging
43
-
44
- More information in the [Dev Center](http://devcenter.heroku.com/articles/pgbackups).
45
-
46
- To check the status of running app servers, background jobs, cron jobs, etc:
47
-
48
- staging-process
49
- production-process
50
-
51
- To see the performance of the staging application, see:
52
-
53
- https://heroku.newrelic.com/...
54
-
55
- To see the performance of the production application, see:
56
-
57
- https://heroku.newrelic.com/...
58
-
59
- ENV variables
60
- -------------
61
-
62
- ENV variables like AWS keys should not be in the source code. They are configuration and should be stored as ENV variables. On Heroku, they are called "config variables." You can pull config variables using the `heroku-config` plugin that comes with the `laptop` script:
63
-
64
- heroku config:pull --remote staging
65
-
66
- You'll see the Amazon credentials as config vars. You should delete lines that don't apply, like Redis to Go connection strings.