pay_dirt 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pay_dirt/base.rb +0 -1
- data/lib/pay_dirt/version.rb +1 -1
- data/pay_dirt.thor +7 -4
- 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: f71a66d986dd7306f081a8733941c86732d1241d
|
4
|
+
data.tar.gz: 6136207dd8d8019fc5d67bad7524603776adbc3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c05fc08df625e3233f4483d157ab423494d77c289d106ee1662904aac4d0cc510adef77be92fa37fd1f79c5431987f29da01f11148c03f3eb0892e5aecbca97
|
7
|
+
data.tar.gz: 19484512b38035bb91d339b1dd4f1ba907129fc78d7b1e2cd1da765db46b67900690a0466149724bcb1fd66a61b3bf9800182cdc86556297a620ea90cfa2286e
|
data/lib/pay_dirt/base.rb
CHANGED
data/lib/pay_dirt/version.rb
CHANGED
data/pay_dirt.thor
CHANGED
@@ -6,8 +6,7 @@ module PayDirt
|
|
6
6
|
method_option :dependencies,
|
7
7
|
type: :array,
|
8
8
|
aliases: "-d",
|
9
|
-
desc: "specify required dependencies"
|
10
|
-
required: true
|
9
|
+
desc: "specify required dependencies"
|
11
10
|
method_option :defaults,
|
12
11
|
type: :hash,
|
13
12
|
aliases: "-D",
|
@@ -27,7 +26,7 @@ module PayDirt
|
|
27
26
|
rets = ""
|
28
27
|
class_names = file.split("/").map { |str| str.split("_").map{ |s| (s[0].upcase + s[1..-1]) }.join("") }
|
29
28
|
defaults = options[:defaults] || []
|
30
|
-
dependencies = options[:dependencies]
|
29
|
+
dependencies = options[:dependencies] || []
|
31
30
|
|
32
31
|
# Favor 2 spaces
|
33
32
|
append = Proc.new { |depth, string, rets| rets << (" " * depth) + string }
|
@@ -63,7 +62,11 @@ module PayDirt
|
|
63
62
|
rets = append.call(inner_depth.next, "}.merge(options)\n\n", rets)
|
64
63
|
end
|
65
64
|
|
66
|
-
rets = append.call(inner_depth.next, "load_options(
|
65
|
+
rets = append.call(inner_depth.next, "load_options(", rets)
|
66
|
+
dependencies.each do |dep|
|
67
|
+
rets = append.call(0, ":#{dep}, ", rets)
|
68
|
+
end
|
69
|
+
rets = append.call(0, "options)\n", rets)
|
67
70
|
rets = append.call(inner_depth, "end\n\n", rets)
|
68
71
|
|
69
72
|
# The execute! method
|