learn-doctor 1.0.1 → 1.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 294feb9a419ec1b8f97bc59eda5f04a4eb94b82a
|
4
|
+
data.tar.gz: 47d4028a657c099e701b43e2560934771209eede
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 288fe943870622c0f221ff5bb6b560bb79cca17c4b91082eccc7ca245af4e528800a88730186a76574d2fb52ed84ca098ef7d4b8234886212345c2d0dd8324a2
|
7
|
+
data.tar.gz: 54326b585fcebddaa7958586ae36e0ca008f99822820bec4fad37346d8d35ba881dc65f53291050580463dc729f40d58a2775bb3fe2e53d6c0a9573e5280c253
|
@@ -1,12 +1,14 @@
|
|
1
1
|
module LearnDoctor
|
2
2
|
class HealthCheck
|
3
3
|
class StepInstaller
|
4
|
-
attr_reader :step, :title
|
4
|
+
attr_reader :step, :title, :sudo, :password_required
|
5
5
|
attr_accessor :file, :result
|
6
6
|
|
7
7
|
def initialize(step)
|
8
8
|
@step = step
|
9
9
|
@title = step[:title]
|
10
|
+
@sudo = step[:sudo]
|
11
|
+
@password_required = step[:password]
|
10
12
|
end
|
11
13
|
|
12
14
|
def execute
|
@@ -21,12 +23,20 @@ module LearnDoctor
|
|
21
23
|
private
|
22
24
|
|
23
25
|
def set_file
|
26
|
+
print "Installing #{title}..."
|
24
27
|
self.file = LearnDoctor::HealthCheck::File.new(step, :install)
|
25
28
|
end
|
26
29
|
|
27
30
|
def run_install_for_step
|
28
|
-
|
29
|
-
|
31
|
+
if password_required
|
32
|
+
puts "Your password is required to install #{title}."
|
33
|
+
print 'Password: '
|
34
|
+
password = gets.chomp
|
35
|
+
|
36
|
+
self.result = `#{file.path} #{password}`
|
37
|
+
else
|
38
|
+
self.result = `#{sudo ? 'sudo ' : ''}#{file.path}`.strip
|
39
|
+
end
|
30
40
|
end
|
31
41
|
|
32
42
|
def print_result
|
data/lib/learn_doctor/version.rb
CHANGED
data/lib/learn_doctor.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: learn-doctor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flatiron School
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|