global 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/lib/global/base.rb +5 -1
- data/lib/global/version.rb +1 -1
- data/spec/global_spec.rb +14 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff7ffaa8d2e0f5e244d2a8afbe0d8e938cea9244
|
4
|
+
data.tar.gz: 8153165733bd12e6c4673c39abdbb16b706a7fc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efa24df45cb25c916773f4ff7c1dcc0621421016f567a54af18f77bae41a9242e9dd9a5f5bf942db4db8e133f0b17d971fed83de28fd787cf301859d035b5d61
|
7
|
+
data.tar.gz: 01156ae25535c3d559da859c6717feb59c07510291e23306920e722d35bf3c8c112b789c61d633ec7dc1d019f9ee36380c9889c56b1c7a5e990a2b79930363ff
|
data/.travis.yml
CHANGED
data/lib/global/base.rb
CHANGED
@@ -81,9 +81,13 @@ module Global
|
|
81
81
|
|
82
82
|
config
|
83
83
|
end
|
84
|
+
|
85
|
+
def respond_to_missing?(method, include_private=false)
|
86
|
+
configuration.key?(method) || super
|
87
|
+
end
|
84
88
|
|
85
89
|
def method_missing(method, *args, &block)
|
86
90
|
configuration.key?(method) ? configuration[method] : super
|
87
91
|
end
|
88
92
|
end
|
89
|
-
end
|
93
|
+
end
|
data/lib/global/version.rb
CHANGED
data/spec/global_spec.rb
CHANGED
@@ -93,6 +93,20 @@ RSpec.describe Global do
|
|
93
93
|
end
|
94
94
|
end
|
95
95
|
end
|
96
|
+
|
97
|
+
describe ".respond_to_missing?" do
|
98
|
+
context "when file exists" do
|
99
|
+
subject{ described_class.respond_to?(:rspec_config) }
|
100
|
+
|
101
|
+
it{ is_expected.to be_truthy }
|
102
|
+
end
|
103
|
+
|
104
|
+
context "when file does not exist" do
|
105
|
+
subject{ described_class.respond_to?(:some_file) }
|
106
|
+
|
107
|
+
it{ is_expected.to be_falsey }
|
108
|
+
end
|
109
|
+
end
|
96
110
|
|
97
111
|
describe ".method_missing" do
|
98
112
|
context "when file exists" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: global
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Railsware LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|