Help us understand the problem. What is going on with this article?

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

メモ用に。
なんか直接 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]
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away