Permalink
Browse files

Simple content changes in scrabook

  • Loading branch information...
1 parent 33ccc3f commit 0011e36ccfeca242dbc4748ee29ae7bb7c2833f8 @equivalent committed Mar 18, 2013
Showing with 38 additions and 0 deletions.
  1. +1 −0 wisdom_inside/other/readed_articles
  2. +32 −0 wisdom_inside/scraps2/delayed_job
  3. +5 −0 wisdom_inside/scraps2/linux
@@ -1,3 +1,4 @@
+http://railscasts.com/episodes/221-subdomains-in-rails-3
http://www.pogoapp.com/blog/posts/websockets-on-rails-4-and-ruby-2?utm_source=rubyweekly&utm_medium=email (in pocket)
http://www.bluebox.net/about/blog/2013/02/using-regular-expressions-in-ruby-part-1-of-3/?utm_source=rubyweekly&utm_medium=email (in pocket)
@@ -0,0 +1,32 @@
+
+
+
+# disable delayed_job when running RSpec
+
+you can do this in `spec_helper`
+
+ # spec/spec_helper.rb
+ Spork.prefork do
+ ENV["RAILS_ENV"] ||= 'test'
+
+ Delayed::Worker.delay_jobs = false
+
+ RSpec.configure do |config|
+ #....
+ end
+ end
+
+or in initializer
+
+ # config/initializers/delayed_jobs.rb
+ Delayed::Worker.delay_jobs = !Rails.env.test?
+
+
+or individually where you call it
+
+ # app/model/notifications.rb
+ def create_notifications
+ end
+ handle_asynchronously :create_notifications unless Rails.env.test?
+
+----------------------------------------------------------------------------------------
@@ -1 +1,6 @@
+# replace string in multiple file
+
+ sed -i 's/what/with_what/g' app/*/*.rb
+ sed -i 's/lambda/->/g' app/*/*.rb
+

0 comments on commit 0011e36

Please sign in to comment.