build-environment 1.9.0 → 1.10.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7eb5fe0826888d3bde938b5969034d7d12fa1b5e1e53ee87466e3167b6a88ad2
|
4
|
+
data.tar.gz: 32c5197bb33d2e71eb1271a0075d225315806af583df1f547080dfd203270316
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67f7def55c08b0226fa81bf88cdbce525017049fec676501ebe02985019d4db9fcaf9d81448a680e189880036e86aba2be0a4e09fc57d9a8f7b367848b257752
|
7
|
+
data.tar.gz: 4cc30800b6413c54e45f83f30dda0725e7b440fb089902314e3f02fcbeb47752cf7511dada3b2cb9807738ea52e482697be5ea6244c92407ded90040bd16d8d9
|
@@ -51,6 +51,10 @@ module Build
|
|
51
51
|
@proxy = proxy
|
52
52
|
end
|
53
53
|
|
54
|
+
def respond_to?(name, include_private = false)
|
55
|
+
@environment.include?(name) || @proxy&.respond_to?(name, include_private) || super
|
56
|
+
end
|
57
|
+
|
54
58
|
def method_missing(name, *args, **options, &block)
|
55
59
|
if options.empty?
|
56
60
|
if args.empty? and block_given?
|
@@ -22,7 +22,8 @@ require 'build/environment'
|
|
22
22
|
|
23
23
|
RSpec.describe Build::Environment::Constructor do
|
24
24
|
let(:proxy) {Object.new}
|
25
|
-
let(:
|
25
|
+
let(:parent) {Build::Environment.new}
|
26
|
+
let(:environment) {Build::Environment.new(parent)}
|
26
27
|
subject{described_class.new(environment, proxy)}
|
27
28
|
|
28
29
|
it "should set value" do
|
@@ -59,8 +60,9 @@ RSpec.describe Build::Environment::Constructor do
|
|
59
60
|
subject.build library: 'bar', &a_block
|
60
61
|
end
|
61
62
|
|
62
|
-
it "cannot get
|
63
|
-
|
63
|
+
it "cannot get value from environment" do
|
64
|
+
environment[:foo] = 'bar'
|
65
|
+
|
64
66
|
expect do
|
65
67
|
subject.foo
|
66
68
|
end.to raise_error(NoMethodError)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: build-environment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: covered
|