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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cf8344185d4a1298169b244cf23f489243eace6b
4
- data.tar.gz: 32a3740b097d5e552821911207567a0a2bfa91c2
3
+ metadata.gz: f71a66d986dd7306f081a8733941c86732d1241d
4
+ data.tar.gz: 6136207dd8d8019fc5d67bad7524603776adbc3c
5
5
  SHA512:
6
- metadata.gz: fc804ad76e3d60ad5afb2426a19f6880cec4768261e4406859ee8227ff8ff2da891502dba57765177570889490e7726ced468ab7d7dedddb6a97d6d53c05d04d
7
- data.tar.gz: dd906232ef74d54c6248d2fbfe844929822b4c08fd65b110b16ed1e290b7f64ce6520111a5205e7dec6574730defd2dc0dd99ed63f491b55c2e951c397c1de60
6
+ metadata.gz: 5c05fc08df625e3233f4483d157ab423494d77c289d106ee1662904aac4d0cc510adef77be92fa37fd1f79c5431987f29da01f11148c03f3eb0892e5aecbca97
7
+ data.tar.gz: 19484512b38035bb91d339b1dd4f1ba907129fc78d7b1e2cd1da765db46b67900690a0466149724bcb1fd66a61b3bf9800182cdc86556297a620ea90cfa2286e
data/lib/pay_dirt/base.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require_relative 'use_case'
2
2
 
3
-
4
3
  # Here's something you can inherit from
5
4
  module PayDirt
6
5
  class Base
@@ -1,3 +1,3 @@
1
1
  module PayDirt
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
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(:#{dependencies.join(', :')}, options)\n", rets)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pay_dirt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tad Hosford