Skip to content

Commit

Permalink
Merge pull request #242 from rollbar/eval-in-rails-module
Browse files Browse the repository at this point in the history
Eval runner code in ::Rails module.
  • Loading branch information
jondeandres committed May 19, 2015
2 parents 3fe6563 + 53488b3 commit 34c5b52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions bin/rollbar-rails-runner
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby

require 'rollbar/rails_runner'
require 'rails/rollbar_runner'

Rollbar::RailsRunner.new.run
Rails::RollbarRunner.new.run
6 changes: 3 additions & 3 deletions lib/rollbar/rails_runner.rb → lib/rails/rollbar_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

APP_PATH = File.expand_path('config/application', Dir.pwd)

module Rollbar
class RailsRunner
module Rails
class RollbarRunner
class GemResolver
def railties_gem
Gem::Specification.find_by_name('railties')
Expand Down Expand Up @@ -38,7 +38,7 @@ def prepare_environment
def eval_runner
string_to_eval = File.read(runner_path)

Module.module_eval(<<-EOL,__FILE__,__LINE__ + 2)
::Rails.module_eval(<<-EOL,__FILE__,__LINE__ + 2)
#{string_to_eval}
EOL
end
Expand Down

0 comments on commit 34c5b52

Please sign in to comment.