Permalink
Browse files

raise delivery errors of emails in development environment. more visi…

…bility into problems. fail fast.
  • Loading branch information...
1 parent a0225bd commit 637427d45a2c57f19603aaa19d2e064a6a2bb573 @croaky croaky committed Oct 29, 2011
Showing with 19 additions and 10 deletions.
  1. +4 −4 Gemfile.lock
  2. +5 −1 lib/suspenders/app_builder.rb
  3. +10 −5 lib/suspenders/generators/app_generator.rb
View
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- suspenders (0.3)
+ suspenders (0.3.1)
bundler (>= 1.0.7)
rails (= 3.1.1)
@@ -66,7 +66,7 @@ GEM
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
- mime-types (1.16)
+ mime-types (1.17.2)
multi_json (1.0.3)
polyglot (0.3.2)
rack (1.3.5)
@@ -93,7 +93,7 @@ GEM
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
- rake (0.9.2)
+ rake (0.9.2.2)
rdiscount (1.6.8)
rdoc (3.11)
json (~> 1.4)
@@ -108,7 +108,7 @@ GEM
sprockets (2.0.3)
hike (~> 1.2)
rack (~> 1.0)
- tilt (!= 1.3.0, ~> 1.1)
+ tilt (~> 1.1, != 1.3.0)
term-ansicolor (1.0.7)
thor (0.14.6)
tilt (1.3.3)
@@ -14,7 +14,11 @@ def remove_public_images_rails
remove_file 'public/images/rails.png'
end
- def setup_staging
+ def setup_development_environment
+ replace_in_file "config/environments/development.rb", "raise_delivery_errors = false", "raise_delivery_errors = true"
+ end
+
+ def setup_staging_environment
run "cp config/environments/production.rb config/environments/staging.rb"
end
@@ -17,7 +17,8 @@ def finish_template
def suspenders_customization
invoke :remove_files_we_dont_need
- invoke :setup_staging
+ invoke :setup_development_environment
+ invoke :setup_staging_environment
invoke :create_suspenders_views
invoke :create_common_javascripts
invoke :add_jquery_ui
@@ -38,9 +39,14 @@ def remove_files_we_dont_need
build(:remove_public_images_rails)
end
- def setup_staging
+ def setup_development_environment
+ say "Setting up the development environment"
+ build(:setup_development_environment)
+ end
+
+ def setup_staging_environment
say "Setting up the staging environment"
- build(:setup_staging)
+ build(:setup_staging_environment)
end
def create_suspenders_views
@@ -125,6 +131,7 @@ def outro
end
protected
+
def get_builder_class
Suspenders::AppBuilder
end
@@ -135,5 +142,3 @@ def using_active_record?
end
end
-
-

1 comment on commit 637427d

@hgmnz
hgmnz commented on 637427d Oct 31, 2011

👍

Please sign in to comment.