LoginSignup
0
0

More than 3 years have passed since last update.

atom script package で bundle exec 付きで rspec 実行

Last updated at Posted at 2019-09-17

メモ用に。
なんか直接 script package のソースコードいじってるの気持ち悪いけどまぁ気にしない。

  1. ⌘, で設定一覧開く
  2. Open Config Folder.atom を開く
  3. .atom/packages/script/lib/grammers/ruby.coffee を開く
  4. 以下のように書き換え (以下の例では 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]
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0