mineshaft 0.3.0 → 0.4.0
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/mineshaft +20 -8
- data/lib/mineshaft/environment.rb +1 -0
- data/lib/mineshaft/installer.rb +19 -10
- data/lib/mineshaft/shell.rb +1 -1
- data/lib/mineshaft/version.rb +1 -1
- data/versions/versions.yaml +3 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e99ffb52da7f6667663e90bd5139530d3640bf57
|
4
|
+
data.tar.gz: f991da105f10417463fb6cdad66ea10375756b49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 806411af7a7f9b276457e222bad45e233dc1691a4e3150a45824b9d6e7af21f86804080d1c22370900201f06b188222e0df3565024d155634d7d2cd49847fa03
|
7
|
+
data.tar.gz: df0b3e02e41c1bdf78df025e3b94f73327fa99595413ef558d1f3ca1e8c76db2eaa8a8f9bf6b29ab7640dac91cd033fc6e35ad975ae765302d1903093b8a9ece
|
data/bin/mineshaft
CHANGED
@@ -15,18 +15,30 @@ require "yaml"
|
|
15
15
|
options = {}
|
16
16
|
|
17
17
|
parser = OptionParser.new do |opts|
|
18
|
-
opts.banner = "
|
18
|
+
opts.banner = "Usage: mineshaft [command] [options]"
|
19
|
+
opts.separator ""
|
20
|
+
opts.separator "Commands"
|
21
|
+
opts.separator " new create new environment"
|
22
|
+
opts.separator ""
|
23
|
+
opts.separator "Options"
|
19
24
|
|
20
|
-
opts.on("-v",
|
21
|
-
|
22
|
-
|
25
|
+
opts.on("-v",
|
26
|
+
"--version",
|
27
|
+
"displays the current version of minecart") do
|
28
|
+
puts "#{Mineshaft::VERSION[:name]} v#{Mineshaft::VERSION[:number]}"
|
29
|
+
exit
|
23
30
|
end
|
24
31
|
|
25
32
|
opts.on("-r",
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
33
|
+
"--ruby-version VERSION",
|
34
|
+
"specify the version of Ruby to install") do |version|
|
35
|
+
options[:version] = version
|
36
|
+
end
|
37
|
+
|
38
|
+
opts.on("-o",
|
39
|
+
"--with-openssl-dir DIR",
|
40
|
+
"specify the directory where OpenSSL is installed") do |openssl_dir|
|
41
|
+
options[:openssl_dir] = openssl_dir
|
30
42
|
end
|
31
43
|
end
|
32
44
|
|
data/lib/mineshaft/installer.rb
CHANGED
@@ -14,7 +14,7 @@ require 'mineshaft/shell'
|
|
14
14
|
|
15
15
|
module Mineshaft
|
16
16
|
class Installer
|
17
|
-
attr_accessor :url, :directory, :version
|
17
|
+
attr_accessor :url, :directory, :version, :options
|
18
18
|
|
19
19
|
include Mineshaft::Shell
|
20
20
|
|
@@ -27,6 +27,14 @@ module Mineshaft
|
|
27
27
|
"2.4.2"
|
28
28
|
end
|
29
29
|
|
30
|
+
def run
|
31
|
+
download @url, @directory
|
32
|
+
unzip @directory
|
33
|
+
build @directory
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
30
38
|
def find_slash_indices(url)
|
31
39
|
slash_array = []
|
32
40
|
url = url.split("")
|
@@ -68,30 +76,31 @@ module Mineshaft
|
|
68
76
|
FileUtils::mkdir_p("#{dir}/ruby-#@version")
|
69
77
|
tar_extract = Gem::Package::TarReader.new(Zlib::GzipReader.open("#{dir}/#@ruby_archive"))
|
70
78
|
tar_extract.rewind
|
79
|
+
puts "Unzipping archive"
|
71
80
|
tar_extract.each do |entry|
|
72
|
-
puts entry.full_name
|
73
81
|
if entry.directory?
|
74
82
|
FileUtils::mkdir_p("#{dir}/#{entry.full_name}")
|
75
83
|
elsif entry.file?
|
76
84
|
File.open("#{dir}/#{entry.full_name}", 'w') {|file| file.write(entry.read)}
|
77
85
|
end
|
78
86
|
end
|
87
|
+
puts "Archive successfully unzipped"
|
79
88
|
tar_extract.close
|
80
89
|
end
|
81
90
|
|
82
|
-
def
|
83
|
-
|
84
|
-
|
85
|
-
build(@directory)
|
91
|
+
def configure_options(prefix)
|
92
|
+
config = "./configure --prefix #{Dir.pwd}/#{prefix}"
|
93
|
+
config << " --with-openssl-dir=#{@options[:openssl_dir]}"
|
86
94
|
end
|
87
95
|
|
88
96
|
def build(prefix)
|
97
|
+
puts "Building environment in #{prefix}"
|
89
98
|
dir = "#{Dir.pwd}/#{prefix}/ruby-#@version"
|
90
99
|
commands = [
|
91
|
-
"
|
92
|
-
|
93
|
-
"
|
94
|
-
"
|
100
|
+
"chmod +x configure tool/ifchange",
|
101
|
+
configure_options(prefix),
|
102
|
+
"make",
|
103
|
+
"make install"
|
95
104
|
]
|
96
105
|
commands.each { |command| shell(dir, command) }
|
97
106
|
end
|
data/lib/mineshaft/shell.rb
CHANGED
data/lib/mineshaft/version.rb
CHANGED
data/versions/versions.yaml
CHANGED
@@ -1,3 +1,6 @@
|
|
1
1
|
---
|
2
|
+
2.5.0-preview1: http://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.0-preview1.tar.gz
|
2
3
|
2.4.2: https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.2.tar.gz
|
4
|
+
2.4.1: https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.1.tar.gz
|
5
|
+
2.4.0: https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.gz
|
3
6
|
2.3.5: https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.5.tar.gz
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mineshaft
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Testerman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: cameronbtesterman@gmail.com
|
@@ -17,13 +17,13 @@ executables:
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
-
- bin/mineshaft
|
21
|
-
- lib/mineshaft.rb
|
22
20
|
- lib/mineshaft/environment.rb
|
23
21
|
- lib/mineshaft/installer.rb
|
24
22
|
- lib/mineshaft/shell.rb
|
25
23
|
- lib/mineshaft/version.rb
|
24
|
+
- lib/mineshaft.rb
|
26
25
|
- versions/versions.yaml
|
26
|
+
- bin/mineshaft
|
27
27
|
homepage: https://github.com/camerontesterman/mineshaft
|
28
28
|
licenses:
|
29
29
|
- MIT
|
@@ -34,17 +34,17 @@ require_paths:
|
|
34
34
|
- lib
|
35
35
|
required_ruby_version: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- -
|
37
|
+
- - '>='
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: '0'
|
40
40
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
41
41
|
requirements:
|
42
|
-
- -
|
42
|
+
- - '>='
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: '0'
|
45
45
|
requirements: []
|
46
46
|
rubyforge_project:
|
47
|
-
rubygems_version: 2.
|
47
|
+
rubygems_version: 2.0.14.1
|
48
48
|
signing_key:
|
49
49
|
specification_version: 4
|
50
50
|
summary: Ruby virtual environment manager
|