Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update generator to default to the running version of ruby
- Loading branch information
1 parent
940fdde
commit a8e367b
Showing
6 changed files
with
66 additions
and
7 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,31 @@ | ||
module MoonshineGeneratorHelpers | ||
|
||
def self.included(base) | ||
base.class_eval do | ||
extend ClassMethods | ||
end | ||
end | ||
|
||
def rails_root_path | ||
RAILS_ROOT rescue Rails.root | ||
end | ||
end | ||
|
||
module ClassMethods | ||
def ruby_version | ||
RUBY_VERSION | ||
end | ||
|
||
def default_ruby | ||
case ruby_version | ||
when /^1\.8/ | ||
'ree187' | ||
when "1.9.2" | ||
'src192' | ||
when "1.9.3" | ||
'src193' | ||
else | ||
end | ||
end | ||
end | ||
|
||
end |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
--colour | ||
--debugger | ||
--format progress |