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,12 +11,6 @@ AllCops:
11 11
     - 'db/schema.rb'
12 12
 
13 13
 # Offense count: 1
14
-# Configuration parameters: AllowSafeAssignment.
15
-Lint/AssignmentInCondition:
16
-  Exclude:
17
-    - 'bin/spring'
18
-
19
-# Offense count: 1
20 14
 # Configuration parameters: Whitelist.
21 15
 # Whitelist: present?, blank?, presence, try, try!
22 16
 Lint/SafeNavigationChain:

+ 2 - 1
bin/spring

@@ -8,7 +8,8 @@ unless defined?(Spring)
8 8
   require 'bundler'
9 9
 
10 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 13
     Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
13 14
     gem 'spring', spring.version
14 15
     require 'spring/binstub'