メモ用に。
なんか直接 script package のソースコードいじってるの気持ち悪いけどまぁ気にしない。
-
⌘,
で設定一覧開く -
Open Config Folder
で.atom
を開く -
.atom/packages/script/lib/grammers/ruby.coffee
を開く - 以下のように書き換え (以下の例では File Based のもののみ
bundle exec
つけてる)
before
module.exports =
RSpec:
'Selection Based':
command: 'ruby'
args: (context) -> ['-e', context.getCode()]
'File Based':
command: 'rspec'
args: ({filepath}) -> ['--tty', '--color', filepath]
'Line Number Based':
command: 'rspec'
args: (context) -> ['--tty', '--color', context.fileColonLine()]
Ruby:
'Selection Based':
command: 'ruby'
args: (context) -> ['-e', context.getCode()]
'File Based':
command: 'ruby'
args: ({filepath}) -> [filepath]
'Ruby on Rails':
'Selection Based':
command: 'rails'
args: (context) -> ['runner', context.getCode()]
'File Based':
command: 'rails'
args: ({filepath}) -> ['runner', filepath]
after
module.exports =
RSpec:
'Selection Based':
command: 'ruby'
args: (context) -> ['-e', context.getCode()]
'File Based':
command: 'bundle'
args: ({filepath}) -> ['exec', 'rspec', '--tty', '--color', filepath]
'Line Number Based':
command: 'rspec'
args: (context) -> ['--tty', '--color', context.fileColonLine()]
Ruby:
'Selection Based':
command: 'ruby'
args: (context) -> ['-e', context.getCode()]
'File Based':
command: 'ruby'
args: ({filepath}) -> [filepath]
'Ruby on Rails':
'Selection Based':
command: 'rails'
args: (context) -> ['runner', context.getCode()]
'File Based':
command: 'rails'
args: ({filepath}) -> ['runner', filepath]