bundle-locker 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/bundle-locker +16 -0
- data/lib/bundle-locker.rb +5 -1
- data/lib/bundle-locker/version.rb +1 -1
- metadata +4 -2
data/bin/bundle-locker
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require File.expand_path('../lib/bundle-locker', File.dirname(__FILE__))
|
3
|
+
|
4
|
+
if gemfile_name = ENV['GEMFILE']
|
5
|
+
if File.exist?(gemfile_name)
|
6
|
+
Bundle::Locker.lock(gemfile_name)
|
7
|
+
else
|
8
|
+
$stderr.puts "#{gemfile_name} does not exist"
|
9
|
+
exit!(-1)
|
10
|
+
end
|
11
|
+
else
|
12
|
+
$stdout.puts "Lock all gems in a Gemfile to the specific version in Gemfile.lock"
|
13
|
+
$stdout.puts "See usage:"
|
14
|
+
$stdout.puts "\GEMFILE=[./path/to/Gemfile] ./#{File.basename(__FILE__)}"
|
15
|
+
exit!(-1)
|
16
|
+
end
|
data/lib/bundle-locker.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require "bundle-locker/version"
|
1
|
+
require File.expand_path("bundle-locker/version", File.dirname(__FILE__))
|
2
2
|
require 'bundler'
|
3
3
|
module Bundle
|
4
4
|
module Locker
|
@@ -39,5 +39,9 @@ module Bundle
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
42
|
+
|
43
|
+
def self.lock(gemfile_name)
|
44
|
+
Parser.new(gemfile_name).call
|
45
|
+
end
|
42
46
|
end
|
43
47
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundle-locker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,7 +14,8 @@ dependencies: []
|
|
14
14
|
description: Lock Gemfile gem declarations to specific Gemfile.lock versions
|
15
15
|
email:
|
16
16
|
- jeremy.n.friesen@gmail.com
|
17
|
-
executables:
|
17
|
+
executables:
|
18
|
+
- bundle-locker
|
18
19
|
extensions: []
|
19
20
|
extra_rdoc_files: []
|
20
21
|
files:
|
@@ -23,6 +24,7 @@ files:
|
|
23
24
|
- LICENSE.txt
|
24
25
|
- README.md
|
25
26
|
- Rakefile
|
27
|
+
- bin/bundle-locker
|
26
28
|
- bundle-locker.gemspec
|
27
29
|
- lib/bundle-locker.rb
|
28
30
|
- lib/bundle-locker/version.rb
|