gemfile_lock_to_gemfile 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/gemfile_lock_to_gemfile +16 -6
- data/gemfile_lock_to_gemfile.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acd55fba3acf555ee0073e5fe5c9ffcdb29fe597
|
4
|
+
data.tar.gz: 4f7d76fcd229106d65601fdeee564a7f5d8e9a17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5033be91bdfc0e5bb00ec205003b6010f4b83e85b1db5b6741a6f95674e40181436732599530243daedb7a3e51ef673d1cc731c65974f9567dd3a35e028ecb3
|
7
|
+
data.tar.gz: 7c3af1780eabb3539c3bcab5a9135753a9e7c95686ca00c2d1fd66a94760e3bc54b62c18c60edf1fd96a0f8ff010d82b6eb3b61238a8a2362770a78f1abb2c65
|
data/bin/gemfile_lock_to_gemfile
CHANGED
@@ -4,10 +4,10 @@
|
|
4
4
|
require 'gemfile_lock_to_gemfile'
|
5
5
|
|
6
6
|
options = { custom_sources: {} }
|
7
|
-
OptionParser.new do |opts|
|
8
|
-
opts.banner = "Usage: gemfile_lock_to_gemfile [options]"
|
7
|
+
optparse = OptionParser.new do |opts|
|
8
|
+
opts.banner = "Usage: gemfile_lock_to_gemfile [options] -fGemfile.lock"
|
9
9
|
|
10
|
-
opts.on("-fGemfile.lock", "--file=Gemfile.lock", "Provide Gemfile.lock") do |f|
|
10
|
+
opts.on("-fGemfile.lock", "--file=Gemfile.lock", "[required] Provide Gemfile.lock") do |f|
|
11
11
|
options[:file] = f
|
12
12
|
end
|
13
13
|
|
@@ -28,8 +28,18 @@ OptionParser.new do |opts|
|
|
28
28
|
puts opts
|
29
29
|
exit
|
30
30
|
end
|
31
|
-
end
|
31
|
+
end
|
32
|
+
|
33
|
+
begin
|
34
|
+
optparse.parse!
|
32
35
|
|
33
|
-
|
36
|
+
raise OptionParser::MissingArgument.new("--file") unless options[:file]
|
37
|
+
|
38
|
+
lock_content = File.read(options[:file])
|
39
|
+
puts GemfileLockToGemfile::Converter.convert(lock_content, options)
|
40
|
+
rescue OptionParser::MissingArgument
|
41
|
+
puts $!.to_s
|
42
|
+
puts optparse
|
43
|
+
exit
|
44
|
+
end
|
34
45
|
|
35
|
-
puts GemfileLockToGemfile::Converter.convert(lock_content, options)
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "gemfile_lock_to_gemfile"
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.2"
|
6
6
|
s.date = Time.now.strftime('%Y-%m-%d')
|
7
7
|
s.summary = "A tool for reversing `Gemfile.lock` -> `Gemfile`"
|
8
8
|
s.homepage = "https://github.com/agate/gemfile_lock_to_gemfile"
|