Last active
August 29, 2015 14:05
-
-
Save chris-skud/653abd769c7082eb4b74 to your computer and use it in GitHub Desktop.
trick to exec ruby file from shell or rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
$:.unshift File.dirname(__FILE__) | |
require ‘<the_module>’ | |
#run if command line, do not if required (called from rspec) | |
if $0 == __FILE__ | |
require File.join(File.expand_path("..", Dir.pwd), 'path/to/other/rubies') | |
<TheClass>.provider_pull | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment