forked from railsbridge/bridge_troll
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Zeus rubymine adapter script and a couple of tweaks to appease…
… zeus
- Loading branch information
1 parent
7245467
commit dce2588
Showing
4 changed files
with
54 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
env RUBYLIB=/Applications/RubyMine.app/rb/testing/patch/common:/Applications/RubyMine.app/rb/testing/patch/bdd zeus start |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env ruby | ||
|
||
# Suppress zeus' whining about how it won't use your RAILS_ENV | ||
ENV.delete('RAILS_ENV') | ||
|
||
# Zeus 0.13.2 parses options badly. RubyMine will invoke this file like this: | ||
# rspec_runner.rb spec/my_cool_file.rb --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter | ||
# | ||
# ...but Zeus will parse those options thinking --require is meant for it, and die. | ||
# If the test file is moved to the end, it dies less. | ||
ARGV.push(ARGV.shift) | ||
|
||
# Add rspec to the beginning of the commands sent to Zeus | ||
ARGV.unshift 'rspec' | ||
|
||
require 'rubygems' | ||
|
||
def unbundled_load(gem, exec_name) | ||
if defined?(::Bundler) | ||
spec_path = Dir.glob("#{Gem.dir}/specifications/#{gem}-*.gemspec").last | ||
if spec_path.nil? | ||
warn "Couldn't find #{gem}" | ||
return | ||
end | ||
|
||
spec = Gem::Specification.load spec_path | ||
spec.activate | ||
bin_path = spec.bin_file exec_name | ||
if bin_path.nil? | ||
warn "Couldn't find binary for #{gem}" | ||
return | ||
end | ||
|
||
load bin_path | ||
end | ||
end | ||
|
||
unbundled_load 'zeus', 'zeus' |