abid 0.2.5 → 0.2.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fc06867a8a623282880bbcad00cec48c90e82b6b
4
- data.tar.gz: b833ae4472677b2f4f68dd6b8ecfefe022995354
3
+ metadata.gz: 8d6ed5d736642592fa41615845574d6d8b3f12ce
4
+ data.tar.gz: acb35938e8891b70d15f0fd4f0094c7352b31fd1
5
5
  SHA512:
6
- metadata.gz: f87dbbe6e1e99afd8a7c0f420371e65cdff0ad6f988cc14f3be05a11e7d4355fd3f9b3b0c8d02541f862770356e3bcc77fa1524b13b75b793cecc0a709a486e2
7
- data.tar.gz: d4566051016776a2b9bf7567b739c1110dd6f3eb20426a103bb1da4993098195f1604f959cde02fd88ad653a5eae1b6791b80b3471df08ce4c020542e478498e
6
+ metadata.gz: d51640657c0891e6dd7b9369a330c14a7701ee3d4843f34d8375edda4ca092a3aa0356396f7041c54ab2e61a4aae73e6b3d8cb92e53293cdcca2996330406446
7
+ data.tar.gz: b0bd5d5bce73c61507e1e5ac162c74f21393173c8458a33478654bf9409a03589b490d53f195704b3906f19f3a9fe180961de21953872985c87080593a5ca892
@@ -2,12 +2,18 @@ module Abid
2
2
  class MixinTask < Rake::Task
3
3
  class Mixin < Module
4
4
  include PlayCore
5
+ attr_reader :task
6
+
7
+ def initialize(task, *args, &block)
8
+ @task = task
9
+ super(*args, &block)
10
+ end
5
11
  end
6
12
 
7
13
  attr_accessor :mixin_definition
8
14
 
9
15
  def mixin
10
- @mixin ||= Mixin.new(&mixin_definition)
16
+ @mixin ||= Mixin.new(self, &mixin_definition)
11
17
  end
12
18
 
13
19
  def execute(_args = nil)
@@ -20,7 +20,7 @@ module Abid
20
20
  if m.is_a? Module
21
21
  m
22
22
  else
23
- mixin_task = Rake.application[m, @scope]
23
+ mixin_task = task.application[m, task.scope]
24
24
 
25
25
  fail "#{m} is not a mixin" unless mixin_task.is_a? MixinTask
26
26
 
@@ -15,9 +15,11 @@ module Abid
15
15
  def play_class
16
16
  return @play_class if @play_class
17
17
 
18
+ task = self
18
19
  klass = application.lookup_play_class(extends, scope)
19
- @play_class = Class.new(klass, &play_class_definition).tap do |c|
20
- c.task = self
20
+ @play_class = Class.new(klass) do |c|
21
+ c.task = task
22
+ c.class_eval(&task.play_class_definition)
21
23
  end
22
24
  end
23
25
 
@@ -1,3 +1,3 @@
1
1
  module Abid
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hikaru Ojima