rubtools 0.0.4 → 0.0.5
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/rubtools/recipe.rb +10 -1
- data/lib/rubtools/version.rb +1 -1
- data/lib/rubtools.rb +10 -7
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 22527797eacfb02733bc730908b3c0cfc5a192dd
|
|
4
|
+
data.tar.gz: 5d8219a89981a3a0acb12b40924b6ef4d14ef4f4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6351028b8801489e355353db68c65f896fd06de170cc7277cdd1114eedd80ea37800f6ffafdcf4f747b11cff693fb499b540b9ea48ad74985344cfc9c44a7214
|
|
7
|
+
data.tar.gz: 898fc255b24a6eafaab92df7f285445a78fac923d1ffb502c9fa6a66c4dd751a04f51b18d3b509fe4ace9d76aaab7d57891c2da56651cda48fd355fbda6a1063
|
data/lib/rubtools/recipe.rb
CHANGED
|
@@ -2,7 +2,8 @@ require "open3"
|
|
|
2
2
|
|
|
3
3
|
module Rubtools
|
|
4
4
|
class Recipe
|
|
5
|
-
attr_accessor :available_methods, :options, :config
|
|
5
|
+
attr_accessor :available_methods, :methods_hidden, :options, :config
|
|
6
|
+
@methods_hidden = false
|
|
6
7
|
|
|
7
8
|
def self.register_methods methods
|
|
8
9
|
@available_methods = methods
|
|
@@ -12,6 +13,14 @@ module Rubtools
|
|
|
12
13
|
@available_methods ? @available_methods : []
|
|
13
14
|
end
|
|
14
15
|
|
|
16
|
+
def self.hide_methods
|
|
17
|
+
@methods_hidden = true
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def self.are_methods_hidden?
|
|
21
|
+
@methods_hidden
|
|
22
|
+
end
|
|
23
|
+
|
|
15
24
|
## Override new method to initialize recipes objects without config and options
|
|
16
25
|
#
|
|
17
26
|
def self.new config, options, *args, &blk
|
data/lib/rubtools/version.rb
CHANGED
data/lib/rubtools.rb
CHANGED
|
@@ -81,15 +81,18 @@ module Rubtools
|
|
|
81
81
|
for constant in Rubtools::Tools.constants
|
|
82
82
|
@tools[constant.downcase] = Array.new
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
const = Rubtools::Tools.const_get(constant)
|
|
85
|
+
unless const.are_methods_hidden?
|
|
86
|
+
for method in const.available_methods
|
|
87
|
+
method_hash = Hash.new
|
|
88
|
+
method_hash[method] = Array.new
|
|
89
|
+
|
|
90
|
+
for param in Rubtools::Tools.const_get(constant).instance_method(method).parameters
|
|
91
|
+
method_hash[method] << param.last
|
|
92
|
+
end
|
|
87
93
|
|
|
88
|
-
|
|
89
|
-
method_hash[method] << param.last
|
|
94
|
+
@tools[constant.downcase] << method_hash
|
|
90
95
|
end
|
|
91
|
-
|
|
92
|
-
@tools[constant.downcase] << method_hash
|
|
93
96
|
end
|
|
94
97
|
end
|
|
95
98
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rubtools
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pierre FILSTROFF
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-04-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: term-ansicolor
|