evt-dependency 0.1.1.0 → 0.1.2.0

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
  SHA256:
3
- metadata.gz: 37d4277973876388cf4a6090a30502d296ad03ba1d7f841f19abc4ab3d1a356b
4
- data.tar.gz: 25d0774669cf11fbf8dee43563093ded45607491ccffc38442d2e9563a733f0e
3
+ metadata.gz: 943ad57bf64493b75653c632e2f69eb7ef27643355b5ab3903e88a28a3ce0694
4
+ data.tar.gz: cbfa2ca746797358feb617782d98ce8c1fec9481e1ea6cf604b46db2403c5ab9
5
5
  SHA512:
6
- metadata.gz: 44fc08d72e722765a3429accefc1aba2844c4d78e3629761eb1fb0d4130b0c3f8e3b053247632047fe92c42612a59a322bc1037e7d58454fc8ff9fffdd143e8f
7
- data.tar.gz: 0c93879b8e8ac280379c4e2bfa318348f00fbd5e3b9f77ed8fca5bff71fa3797d7bedf681333eb6ddea05e5da224e32845fb3032a2ff6fbea663f020b2acb648
6
+ metadata.gz: 47e6b826c583787f88ec8354ae54044be19c786d1efc5e0f703b3a56a7f3e12aa3f37bf706174f8363227f10f0bf4e335f798de1635c438f2ddc84df345ea909
7
+ data.tar.gz: b933a73439903a79598d601f3af167d65c275e74480dd776c8874beeb2356f15e38e3bb45b40a965a631683438d042d9db615a4d9766451999c514dc7a729cc3
data/lib/dependency.rb CHANGED
@@ -2,4 +2,5 @@ require 'subst_attr'
2
2
 
3
3
  require 'dependency/macro'
4
4
  require 'dependency/activate'
5
+ require 'dependency/attribute'
5
6
  require 'dependency/substitute'
@@ -0,0 +1,7 @@
1
+ module Dependency
2
+ module Attribute
3
+ def self.define(receiver, attr_name, interface=nil)
4
+ SubstAttr::Attribute.define(receiver, attr_name, interface)
5
+ end
6
+ end
7
+ end
@@ -1,4 +1,4 @@
1
1
  require 'subst_attr/controls'
2
2
 
3
- require 'dependency/controls/subst_attr'
4
-
3
+ require 'dependency/controls/dependency'
4
+ require 'dependency/controls/example'
@@ -0,0 +1,5 @@
1
+ module Dependency
2
+ module Controls
3
+ Dependency = SubstAttr::Controls::Dependency
4
+ end
5
+ end
@@ -0,0 +1,17 @@
1
+ module Dependency
2
+ module Controls
3
+ class Example
4
+ ::Dependency.activate(self)
5
+
6
+ dependency :some_attr, Dependency::Example
7
+
8
+ dependency :weak_attr
9
+
10
+ def self.build
11
+ new.tap do |instance|
12
+ Dependency::Example.configure(instance)
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -1,7 +1,7 @@
1
1
  module Dependency
2
2
  module Macro
3
3
  def dependency_macro(attr_name, interface=nil)
4
- SubstAttr::Attribute.define self, attr_name, interface
4
+ Attribute.define(self, attr_name, interface)
5
5
  end
6
6
  alias :dependency :dependency_macro
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-dependency
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.0
4
+ version: 0.1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-10 00:00:00.000000000 Z
11
+ date: 2018-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evt-subst_attr
@@ -46,8 +46,10 @@ extra_rdoc_files: []
46
46
  files:
47
47
  - lib/dependency.rb
48
48
  - lib/dependency/activate.rb
49
+ - lib/dependency/attribute.rb
49
50
  - lib/dependency/controls.rb
50
- - lib/dependency/controls/subst_attr.rb
51
+ - lib/dependency/controls/dependency.rb
52
+ - lib/dependency/controls/example.rb
51
53
  - lib/dependency/macro.rb
52
54
  - lib/dependency/substitute.rb
53
55
  homepage: https://github.com/eventide-project/dependency
@@ -70,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
72
  version: '0'
71
73
  requirements: []
72
74
  rubyforge_project:
73
- rubygems_version: 2.7.3
75
+ rubygems_version: 2.7.6
74
76
  signing_key:
75
77
  specification_version: 4
76
78
  summary: Declare dependencies that have null object or substitute default values
@@ -1,3 +0,0 @@
1
- module Dependency
2
- Controls = SubstAttr::Controls
3
- end