abid 0.2.6 → 0.2.7

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: 8d6ed5d736642592fa41615845574d6d8b3f12ce
4
- data.tar.gz: acb35938e8891b70d15f0fd4f0094c7352b31fd1
3
+ metadata.gz: 420b0b4d396c11040c6ff76cb6c11cfcd002dac2
4
+ data.tar.gz: 32ffa75a6ba088fda3d027f1a00903be37859e91
5
5
  SHA512:
6
- metadata.gz: d51640657c0891e6dd7b9369a330c14a7701ee3d4843f34d8375edda4ca092a3aa0356396f7041c54ab2e61a4aae73e6b3d8cb92e53293cdcca2996330406446
7
- data.tar.gz: b0bd5d5bce73c61507e1e5ac162c74f21393173c8458a33478654bf9409a03589b490d53f195704b3906f19f3a9fe180961de21953872985c87080593a5ca892
6
+ metadata.gz: bf79d8b03440fd6bca0c1ff8c0e03402ea9f97cb4ae8c0d391ef98a447bee75ada478ab24672fb86c9cb493164d596b568e2e11d711603237d85b7d665acb0e1
7
+ data.tar.gz: c67971534d3a2d5e397a0c73c5ab49bdb147ef7376292372c90b4aa70f90e1268ce1c153e1f3c6e34a575737cd3ec75e596886ae56c22ead72d7e09e48f4549a
@@ -12,20 +12,6 @@ module Abid
12
12
  hooks.each { |k, v| child.hooks[k] = v.dup }
13
13
  end
14
14
 
15
- def params_spec
16
- @params_spec ||= {}
17
- end
18
-
19
- def param(name, **param_spec)
20
- define_method(name) { task.params[name] }
21
- params_spec[name] = { significant: true }.merge(param_spec)
22
- end
23
-
24
- def undef_param(name)
25
- params_spec.delete(name)
26
- undef_method(name) if method_defined?(name)
27
- end
28
-
29
15
  def hooks
30
16
  @hooks ||= Hash.new { |h, k| h[k] = [] }
31
17
  end
@@ -15,6 +15,20 @@ module Abid
15
15
  end
16
16
  end
17
17
 
18
+ def params_spec
19
+ @params_spec ||= {}
20
+ end
21
+
22
+ def param(name, **param_spec)
23
+ define_method(name) { task.params[name] }
24
+ params_spec[name] = { significant: true }.merge(param_spec)
25
+ end
26
+
27
+ def undef_param(name)
28
+ params_spec.delete(name)
29
+ undef_method(name) if method_defined?(name)
30
+ end
31
+
18
32
  def include(*mod)
19
33
  ms = mod.map do |m|
20
34
  if m.is_a? Module
@@ -24,7 +38,12 @@ module Abid
24
38
 
25
39
  fail "#{m} is not a mixin" unless mixin_task.is_a? MixinTask
26
40
 
27
- mixin_task.mixin
41
+ mixin_task.mixin.tap do |mixin|
42
+ # inherit params_spec
43
+ mixin.params_spec.each do |k, v|
44
+ params_spec[k] ||= v
45
+ end
46
+ end
28
47
  end
29
48
  end
30
49
 
@@ -1,3 +1,3 @@
1
1
  module Abid
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hikaru Ojima
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-29 00:00:00.000000000 Z
11
+ date: 2016-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler