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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c08759d0087d3115f66b4ec34edae5ac4f5ec47d
4
- data.tar.gz: e144f9210c040bee6e50bd9180602911fa5daa34
3
+ metadata.gz: 6d1a17e1431bbf2b59f7483d85131338d16ae9d2
4
+ data.tar.gz: e1e22af5e5d15f59b16f7d372f840d6d8686090f
5
5
  SHA512:
6
- metadata.gz: f3ca2cd51ab5edc7f539d0a9c3c7ca4a65a6e2171d9e580ed7f8ca21cc0ffe3e9e696939ca10259d70ebba4df8dec1d007276683ed71face46abde09cee81151
7
- data.tar.gz: 18b6d650d0623650f004632a06f7112e390a2fb37e3d858e38ec89efbc9a1cf510ae7681f2e4846d64b46e4bbc4ccbadaf98fa651fb1d30eaea7bb61700c108e
6
+ metadata.gz: 5aed2ecc1c0aca631668c4ce112fc9f5925649ea5b0ba99bb28ca42e91c0e84fbc7a5c0a8f6c609a76899d13779da64e0c545830a04d44da905faa6b3ae299c2
7
+ data.tar.gz: fae184edea7219d1e97d20e0652dc6dbc4d7c13ea6167c70ebc556f619c077b278cd5e880f5212497f63082a7d4219b8de74183166e1936fed4dead503f4752f
@@ -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! { |x| x[0] } unless all
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}"
@@ -1,3 +1,3 @@
1
1
  module BundlePackageCheck
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-01-20 00:00:00.000000000 Z
11
+ date: 2015-02-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: michael@grosser.it