bundle_package_check 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c08759d0087d3115f66b4ec34edae5ac4f5ec47d
4
+ data.tar.gz: e144f9210c040bee6e50bd9180602911fa5daa34
5
+ SHA512:
6
+ metadata.gz: f3ca2cd51ab5edc7f539d0a9c3c7ca4a65a6e2171d9e580ed7f8ca21cc0ffe3e9e696939ca10259d70ebba4df8dec1d007276683ed71face46abde09cee81151
7
+ data.tar.gz: 18b6d650d0623650f004632a06f7112e390a2fb37e3d858e38ec89efbc9a1cf510ae7681f2e4846d64b46e4bbc4ccbadaf98fa651fb1d30eaea7bb61700c108e
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (C) 2013 Michael Grosser <michael@grosser.it>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,3 @@
1
+ module BundlePackageCheck
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,25 @@
1
+ module BundlePackageCheck
2
+ class << self
3
+ def errors(all: false)
4
+ expected = expected_from_lock(all)
5
+ actual = Dir["vendor/cache/*"]
6
+
7
+ errors = []
8
+ errors += (expected - actual).map { |f| "Missing #{f}" }
9
+ errors += (actual - expected).map { |f| "Unnecessary #{f}" }
10
+ errors
11
+ end
12
+
13
+ private
14
+
15
+ def expected_from_lock(all)
16
+ lock = File.read("Gemfile.lock")
17
+ expected = lock.scan(/(?:revision: (\S+)(?:\n .*)*\n specs:\n|^) (\S+) \((\S+)\)/)
18
+ expected.reject! { |x| x[0] } unless all
19
+ expected.map! do |revision, name, version|
20
+ identifier = revision ? revision[0...12] : "#{version}.gem"
21
+ "vendor/cache/#{name}-#{identifier}"
22
+ end.sort!
23
+ end
24
+ end
25
+ end
metadata ADDED
@@ -0,0 +1,46 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bundle_package_check
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Michael Grosser
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-01-20 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email: michael@grosser.it
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - MIT-LICENSE
20
+ - lib/bundle_package_check.rb
21
+ - lib/bundle_package_check/version.rb
22
+ homepage: https://github.com/grosser/bundle_package_check
23
+ licenses:
24
+ - MIT
25
+ metadata: {}
26
+ post_install_message:
27
+ rdoc_options: []
28
+ require_paths:
29
+ - lib
30
+ required_ruby_version: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ required_rubygems_version: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ requirements: []
41
+ rubyforge_project:
42
+ rubygems_version: 2.2.2
43
+ signing_key:
44
+ specification_version: 4
45
+ summary: Check if all gems you need are packaged
46
+ test_files: []