aye_commander 1.1.0 → 1.1.1
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 +4 -4
- data/lib/aye_commander/shareable.rb +2 -2
- data/lib/aye_commander/version.rb +1 -1
- data/spec/aye_commander/shareable_spec.rb +12 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 13efe8fd83fdb3729b477d71de97b3f0563a9b4a
|
|
4
|
+
data.tar.gz: 32c1cec5d15a1304acc82a6758c2ad5a71f74fed
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '028a6c60f92cd4c6c44e19ccf1b0a21cf6d81cb41fce9cf21bebd9990ad71d8f86469106980895c2546c233800dfece3112540ced15a8b12be5bd61aa620b673'
|
|
7
|
+
data.tar.gz: 6d2e656ae2cfed569f61dfc420abd26b088022f146c5c87217d36f1215373d958dc27483d85991c83904512dc423a4248c4d9fcde73492315031813c4852d0ad
|
|
@@ -11,7 +11,7 @@ module AyeCommander
|
|
|
11
11
|
includer.extend AyeCommander::Command::ClassMethods
|
|
12
12
|
%i[@limiters @succeeds @hooks].each do |var|
|
|
13
13
|
if instance_variable_defined? var
|
|
14
|
-
includer.instance_variable_set var, instance_variable_get(var)
|
|
14
|
+
includer.instance_variable_set var, instance_variable_get(var).dup
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
end
|
|
@@ -23,7 +23,7 @@ module AyeCommander
|
|
|
23
23
|
super
|
|
24
24
|
%i[@limiters @succeeds @hooks].each do |var|
|
|
25
25
|
if instance_variable_defined? var
|
|
26
|
-
inheriter.instance_variable_set var, instance_variable_get(var)
|
|
26
|
+
inheriter.instance_variable_set var, instance_variable_get(var).dup
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
end
|
|
@@ -19,6 +19,12 @@ describe AyeCommander::Shareable::ClassMethods do
|
|
|
19
19
|
expect(includer2.succeeds).to include :inclusion
|
|
20
20
|
expect(includer2.send(:hooks)).to be_empty
|
|
21
21
|
end
|
|
22
|
+
|
|
23
|
+
it 'does not add the instance variables of the includers to the original' do
|
|
24
|
+
includer.requires :something
|
|
25
|
+
includer2.requires :other
|
|
26
|
+
expect(includer.requires).to_not include :other
|
|
27
|
+
end
|
|
22
28
|
end
|
|
23
29
|
|
|
24
30
|
context '.inherited' do
|
|
@@ -34,5 +40,11 @@ describe AyeCommander::Shareable::ClassMethods do
|
|
|
34
40
|
expect(inheriter.succeeds).to include :inclusion
|
|
35
41
|
expect(inheriter.send(:hooks)).to be_empty
|
|
36
42
|
end
|
|
43
|
+
|
|
44
|
+
it 'does not add the instance variables of the inheriter to the original' do
|
|
45
|
+
command.requires :something
|
|
46
|
+
inheriter.requires :other
|
|
47
|
+
expect(command.requires).to_not include :other
|
|
48
|
+
end
|
|
37
49
|
end
|
|
38
50
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: aye_commander
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- pyzlnar
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-04-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: A gem that helps to write commands in ruby.
|
|
14
14
|
email: pyzlnar@gmail.com
|
|
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
68
68
|
version: '0'
|
|
69
69
|
requirements: []
|
|
70
70
|
rubyforge_project:
|
|
71
|
-
rubygems_version: 2.
|
|
71
|
+
rubygems_version: 2.5.2.1
|
|
72
72
|
signing_key:
|
|
73
73
|
specification_version: 4
|
|
74
74
|
summary: A simple command pattern gem
|