bundle_package_check 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bundle_package_check.rb +4 -4
- data/lib/bundle_package_check/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d1a17e1431bbf2b59f7483d85131338d16ae9d2
|
4
|
+
data.tar.gz: e1e22af5e5d15f59b16f7d372f840d6d8686090f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5aed2ecc1c0aca631668c4ce112fc9f5925649ea5b0ba99bb28ca42e91c0e84fbc7a5c0a8f6c609a76899d13779da64e0c545830a04d44da905faa6b3ae299c2
|
7
|
+
data.tar.gz: fae184edea7219d1e97d20e0652dc6dbc4d7c13ea6167c70ebc556f619c077b278cd5e880f5212497f63082a7d4219b8de74183166e1936fed4dead503f4752f
|
data/lib/bundle_package_check.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
module BundlePackageCheck
|
2
2
|
class << self
|
3
|
-
def errors(all: false)
|
3
|
+
def errors(all: false, ignore_extra: false)
|
4
4
|
expected = expected_from_lock(all)
|
5
|
-
actual = Dir["vendor/cache/*"]
|
5
|
+
actual = Dir["vendor/cache/*"].sort
|
6
6
|
|
7
7
|
errors = []
|
8
8
|
errors += (expected - actual).map { |f| "Missing #{f}" }
|
9
|
-
errors += (actual - expected).map { |f| "Unnecessary #{f}" }
|
9
|
+
errors += (actual - expected).map { |f| "Unnecessary #{f}" } unless ignore_extra
|
10
10
|
errors
|
11
11
|
end
|
12
12
|
|
@@ -15,7 +15,7 @@ module BundlePackageCheck
|
|
15
15
|
def expected_from_lock(all)
|
16
16
|
lock = File.read("Gemfile.lock")
|
17
17
|
expected = lock.scan(/(?:revision: (\S+)(?:\n .*)*\n specs:\n|^) (\S+) \((\S+)\)/)
|
18
|
-
expected.reject! { |
|
18
|
+
expected.reject! { |revision, _, _| revision } unless all
|
19
19
|
expected.map! do |revision, name, version|
|
20
20
|
identifier = revision ? revision[0...12] : "#{version}.gem"
|
21
21
|
"vendor/cache/#{name}-#{identifier}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundle_package_check
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: michael@grosser.it
|