bootsnap 0.2.10 → 0.2.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9899f0b2bee1a4e655277b00c7e31aa9b9bb11de
4
- data.tar.gz: 10d657b77486731b2dc6cb0c21b6b9cd59dcb021
3
+ metadata.gz: cd947bf62b1cc1309c2d1b41a8b712027435517c
4
+ data.tar.gz: d15f1bbd5ddeadded26f2f3884a29ddbe673817f
5
5
  SHA512:
6
- metadata.gz: 345a4bf40d80ca9b04d03a8c5088758f59dddf6ff8272637bc6cd247f8047ee4dfbccf9ff2d6866d6220361c110d60d6ba08addb76a43e6d7fd36f04fb643c5a
7
- data.tar.gz: 5ec8b6b63ef27265355d6ff879c710d3720a3fb7671e78e07326ddaeca7d77af800ddc86e13ddc4c1079449e9bbc79d7fedf1efe4a76c68dab6453f041d5fbac
6
+ metadata.gz: 572cf3a924e492cde28be986f2e466a4fcc5697f8e6dbc7eb2fff4b45c6a30a51d6e7777d6e300ceb8ddc5d7c876eeaa4ed3291011e5f4fb319734bbdf66daa6
7
+ data.tar.gz: 3baa2139ae74322a885124f7f5f02e6cb74803d26c609d811048abbd25c0d651c952c2cfef8b861d5310049e8f9449a2c7cc200a06143071e6205d43880ab86f
data/dev.yml CHANGED
@@ -1,3 +1,6 @@
1
+ env:
2
+ BOOTSNAP_PEDANTIC: '1'
3
+
1
4
  up:
2
5
  - ruby: 2.3.3
3
6
  - bundler
@@ -1,6 +1,17 @@
1
1
  require "mkmf"
2
- $CFLAGS << ' -O3 -std=c99'
3
- $CFLAGS << ' -Wall -Wextra -Wpedantic -Werror'
4
- $CFLAGS << ' -Wno-unused-parameter' # VALUE self has to be there but we don't care what it is.
5
- $CFLAGS << ' -Wno-keyword-macro' # hiding return
2
+ $CFLAGS << ' -O3 '
3
+ $CFLAGS << ' -std=c99'
4
+ $CFLAGS << ' -Wall'
5
+ $CFLAGS << ' -Werror'
6
+
7
+ # ruby.h has some -Wpedantic fails in some cases
8
+ # (e.g. https://github.com/Shopify/bootsnap/issues/15)
9
+ unless ['0', '', nil].include?(ENV['BOOTSNAP_PEDANTIC'])
10
+ $CFLAGS << ' -Wextra'
11
+ $CFLAGS << ' -Wpedantic'
12
+
13
+ $CFLAGS << ' -Wno-unused-parameter' # VALUE self has to be there but we don't care what it is.
14
+ $CFLAGS << ' -Wno-keyword-macro' # hiding return
15
+ end
16
+
6
17
  create_makefile("bootsnap/bootsnap")
@@ -120,6 +120,7 @@ module Bootsnap
120
120
  @store.transaction do
121
121
  paths.map(&:to_s).each do |path|
122
122
  p = Path.new(path)
123
+ next if p.non_directory?
123
124
  entries, dirs = p.entries_and_dirs(@store)
124
125
  # push -> low precedence -> set only if unset
125
126
  dirs.each { |dir| @dirs[dir] ||= true }
@@ -132,6 +133,7 @@ module Bootsnap
132
133
  @store.transaction do
133
134
  paths.map(&:to_s).reverse.each do |path|
134
135
  p = Path.new(path)
136
+ next if p.non_directory?
135
137
  entries, dirs = p.entries_and_dirs(@store)
136
138
  # unshift -> high precedence -> unconditional set
137
139
  dirs.each { |dir| @dirs[dir] = true }
@@ -23,6 +23,13 @@ module Bootsnap
23
23
  @path = path.to_s
24
24
  end
25
25
 
26
+ # True if the path exists, but represents a non-directory object
27
+ def non_directory?
28
+ !File.stat(path).directory?
29
+ rescue Errno::ENOENT
30
+ false
31
+ end
32
+
26
33
  # Return a list of all the requirable files and all of the subdirectories
27
34
  # of this +Path+.
28
35
  def entries_and_dirs(store)
@@ -1,3 +1,3 @@
1
1
  module Bootsnap
2
- VERSION = "0.2.10"
2
+ VERSION = "0.2.11"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootsnap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Burke Libbey
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-25 00:00:00.000000000 Z
11
+ date: 2017-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler