core-extension 0.0.0 → 0.1.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: 8a71a7e994976d0d1541932017b638a74dc3403686c8c49f517e3c019d7ad656
4
- data.tar.gz: 6edfca3b01dbaa1c52df86e9a1cd024395772abf1438e3d6b0845785972a70b4
3
+ metadata.gz: 95231fea0fd981dbd609b053f8a334003490a1a90805c9168665b5d7574a66b1
4
+ data.tar.gz: 510b7bb6e4efbf527431cc178a5229b0482ab3280ebc1d4d2c9c9a0290051278
5
5
  SHA512:
6
- metadata.gz: 13c7cfc9dce149e23b940830cce4e9e45d8e8b03cfd43e56030638267514f614271d4ba9979a58800df6dec8a70a33a92bdb46cd783513b3f0c8f4df9174cd51
7
- data.tar.gz: '04704682e6f059cd22b6f4c7f68590ed59b2c4a0be43bbc003cac5f77fd27ee54a481a1251f51c1004e3c1c10078ec0bb47b9e5891e079d9d432b5d4b81269af'
6
+ metadata.gz: a543f05bbebd33a68b9ad4fdf9d0c91d213d9423790edaefb59a60be4b39496f8b3a83174f9f7592bcd638f2a875cf1830128c139515076ff90955213f4f28c4
7
+ data.tar.gz: 2cc2758b3c0589e5130c873623de64d8777e5bd3d7959ee2eb7d7446fd9bf3ca8061847d01b91030f374a90a0d45ff077090130d19db9976aedc54d539c75bd0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [v0.1.0](https://github.com/metabahn/corerb/releases/tag/2021-02-10)
2
+
3
+ *released on 2021-02-10*
4
+
5
+ * `chg` [#3](https://github.com/metabahn/corerb/pull/3) Apply extension dependencies before behavior ([bryanp](https://github.com/bryanp))
6
+
1
7
  ## [v0.0.0](https://github.com/metabahn/corerb/releases/tag/2020-12-29)
2
8
 
3
9
  *released on 2020-12-29*
@@ -6,3 +6,5 @@ module Core
6
6
  require_relative "extension/version"
7
7
  end
8
8
  end
9
+
10
+ require_relative "../is/extension"
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Core
4
4
  module Extension
5
- # [public] Defines behavior that can be applied to objects. Behavior will only be applied to each object once.
5
+ # [public] Defines behavior that can be applied to objects. Behavior will only be applied to each object once by default.
6
6
  #
7
7
  # force - If true, behavior will be applied even if it has already been applied to the including object.
8
8
  #
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Core
4
4
  module Extension
5
- VERSION = "0.0.0"
5
+ VERSION = "0.1.0"
6
6
 
7
7
  def self.version
8
8
  VERSION
data/lib/is/extension.rb CHANGED
@@ -14,24 +14,21 @@ module Is
14
14
  end
15
15
 
16
16
  # [public] Define a module to be extended or included into objects that include this extension.
17
- # See [Core::Extension::Dependency] for argument details.
18
17
  #
19
18
  def extends(*flags, dependencies: [], prepend: false, &block)
20
19
  defined_methods << Core::Extension::Dependency.new(*flags, modules: dependencies, prepend: prepend, &block)
21
20
  end
22
21
 
23
22
  # [public] Define behavior to be evaled on objects that include this extension.
24
- # See [Core::Extension::Behavior] for argument details.
25
23
  #
26
24
  def applied(force: false, &block)
27
25
  defined_behaviors << Core::Extension::Behavior.new(force: force, &block)
28
26
  end
29
27
 
30
- # @api private
31
28
  def included(base)
32
29
  enforce_allowed_types(base)
33
- apply_defined_behaviors(base)
34
30
  apply_defined_methods(base)
31
+ apply_defined_behaviors(base)
35
32
 
36
33
  super
37
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: core-extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Powell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-29 00:00:00.000000000 Z
11
+ date: 2021-02-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Create mixins with superpowers.
14
14
  email: bryan@metabahn.com
@@ -42,7 +42,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
42
42
  - !ruby/object:Gem::Version
43
43
  version: '0'
44
44
  requirements: []
45
- rubygems_version: 3.1.2
45
+ rubygems_version: 3.2.4
46
46
  signing_key:
47
47
  specification_version: 4
48
48
  summary: Create mixins with superpowers.