Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eval runner code in ::Rails module. #242

Merged
merged 1 commit into from
May 19, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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