Browse Source

New spring binstub

Maarten van den Berg 6 years ago
parent
commit
70a7dda45e
2 changed files with 2 additions and 7 deletions
  1. 0 6
      .rubocop.yml
  2. 2 1
      bin/spring

+ 0 - 6
.rubocop.yml

11
     - 'db/schema.rb'
11
     - 'db/schema.rb'
12
 
12
 
13
 # Offense count: 1
13
 # Offense count: 1
14
-# Configuration parameters: AllowSafeAssignment.
15
-Lint/AssignmentInCondition:
16
-  Exclude:
17
-    - 'bin/spring'
18
-
19
-# Offense count: 1
20
 # Configuration parameters: Whitelist.
14
 # Configuration parameters: Whitelist.
21
 # Whitelist: present?, blank?, presence, try, try!
15
 # Whitelist: present?, blank?, presence, try, try!
22
 Lint/SafeNavigationChain:
16
 Lint/SafeNavigationChain:

+ 2 - 1
bin/spring

8
   require 'bundler'
8
   require 'bundler'
9
 
9
 
10
   lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
10
   lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
11
-  if spring = lockfile.specs.detect { |spec| spec.name == "spring" }
11
+  spring = lockfile.specs.detect { |spec| spec.name == "spring" }
12
+  if spring
12
     Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
13
     Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
13
     gem 'spring', spring.version
14
     gem 'spring', spring.version
14
     require 'spring/binstub'
15
     require 'spring/binstub'