faststrap 0.0.2 → 0.0.3
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/lib/faststrap.rb +33 -3
- data/lib/faststrap/install_action.rb +22 -0
- data/lib/faststrap/install_actions/bash_completion_install_action.rb +19 -0
- data/lib/faststrap/install_actions/homebrew_install_action.rb +17 -0
- data/lib/faststrap/install_actions/install_actions_helper.rb +9 -0
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1f64113192d7d3154ad1c3d7c8ce7c630b055a0
|
4
|
+
data.tar.gz: dd86cdef64998b8a18a77c39d4a8cbb68bd5f715
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a450e454a8173573dda3a4340cfe0d9d5ce1cefa5a5c7200c77b26db074a82f6fa374e42b767ad056132e77e111c875a4acbfe51f15b7f3c29adcfce84d592d5
|
7
|
+
data.tar.gz: 16b8738456629ffd173d45009cb6040bf5ad8c6255b4679276d886d4ee7d085c5a23b7610c6e2172f3205c6e097e987f3881e88f6c8e31ac6adc205d846a5711
|
data/lib/faststrap.rb
CHANGED
@@ -1,5 +1,35 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
require 'faststrap/install_actions/install_actions_helper'
|
2
|
+
require 'faststrap/install_action'
|
3
|
+
|
4
|
+
module Faststrap
|
5
|
+
|
6
|
+
def self.list_actions(mod)
|
7
|
+
cs = mod.constants.select {|c| Class === mod.const_get(c)}
|
8
|
+
cs.collect! { |c| eval("#{mod}::#{c.to_s}") }
|
9
|
+
sort_actions(cs)
|
4
10
|
end
|
11
|
+
|
12
|
+
def self.sort_actions(actions)
|
13
|
+
actions.sort {|x,y| x.index_pos <=> y.index_pos }
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.present_actions(mod)
|
17
|
+
list_actions(mod).each do |a|
|
18
|
+
puts "#{a.index_pos} - #{a.description}"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
Faststrap::InstallActions.load_default_actions
|
24
|
+
|
25
|
+
|
26
|
+
puts "\nSelect what you want to install by typing the number of the action.\nYou can type more than one separeted by commas (Ex: 0,1,3,5)\nType all to install everything."
|
27
|
+
present_actions(Faststrap::InstallActions)
|
28
|
+
puts "all - Everything"
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
|
5
35
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'faststrap/install_actions/install_actions_helper'
|
2
|
+
|
3
|
+
module Faststrap
|
4
|
+
class InstallAction
|
5
|
+
|
6
|
+
def self.index_pos
|
7
|
+
0
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.description
|
11
|
+
"InstallAction description"
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.install_cmd
|
15
|
+
"InstallAction cmd"
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.install_action_name
|
19
|
+
"InstallAction"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Faststrap
|
2
|
+
module InstallActions
|
3
|
+
class BashCompletionInstallAction < InstallAction
|
4
|
+
|
5
|
+
def self.index_pos
|
6
|
+
1
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.description
|
10
|
+
"BashCompletionInstallAction description"
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.install_cmd
|
14
|
+
puts "echo BashCompletionInstallAction"
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Faststrap
|
2
|
+
module InstallActions
|
3
|
+
class HomebrewInstallAction < InstallAction
|
4
|
+
|
5
|
+
def self.index_pos
|
6
|
+
0
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.description
|
10
|
+
"HomebrewInstallAction description"
|
11
|
+
end
|
12
|
+
def self.install_cmd
|
13
|
+
puts "echo HomebrewInstallAction"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faststrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thiago Lioy
|
@@ -21,6 +21,10 @@ files:
|
|
21
21
|
- README.md
|
22
22
|
- bin/faststrap
|
23
23
|
- lib/faststrap.rb
|
24
|
+
- lib/faststrap/install_action.rb
|
25
|
+
- lib/faststrap/install_actions/bash_completion_install_action.rb
|
26
|
+
- lib/faststrap/install_actions/homebrew_install_action.rb
|
27
|
+
- lib/faststrap/install_actions/install_actions_helper.rb
|
24
28
|
homepage: https://github.com/thiagolioy/faststrap
|
25
29
|
licenses:
|
26
30
|
- MIT
|