autoloaded 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/History.md +4 -0
- data/lib/autoloaded/autoloader.rb +6 -2
- data/lib/autoloaded/specifications.rb +3 -1
- data/lib/autoloaded/version.rb +1 -1
- data/lib/autoloaded/warning.rb +1 -1
- 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: 2047f7eef42a1cbbb9ad8e47748d3f99eaab4f32
|
4
|
+
data.tar.gz: be5523f0c2b3367d20546bb07af2b6fdef581dac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4fbb79d6f769531510d3c423b670598ae292f79ba2dd44c9c7fac2ba16f919b1a603c5b832ed3897ca5f1e994e9708361eb7f542740aa0c57856ef6169b2570
|
7
|
+
data.tar.gz: bf3585f53218dca2f703019e402dc86cf600001d8368e1d744b3217d9d1588cc0de6f83b655665b9325cfbec66a249417d33708b26d85a109da8fed54685737c
|
data/.travis.yml
CHANGED
data/History.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Version history for the _Autoloaded_ project
|
2
2
|
|
3
|
+
## <a name="v1.5.1"></a>v1.5.1, Wed 10/18/2017
|
4
|
+
|
5
|
+
* Eliminate Ruby warnings about undefined instance variables
|
6
|
+
|
3
7
|
## <a name="v1.5.0"></a>v1.5.0, Wed 2/22/2017
|
4
8
|
|
5
9
|
* Add support for Ruby load paths (`$:`) that contain one or more
|
@@ -213,7 +213,10 @@ module Autoloaded
|
|
213
213
|
# @see #autoload!
|
214
214
|
# @see #host_binding
|
215
215
|
def from(value=nil)
|
216
|
-
|
216
|
+
if value.nil?
|
217
|
+
return (instance_variable_defined?(:@from) && @from && @from.path) ||
|
218
|
+
default_from
|
219
|
+
end
|
217
220
|
|
218
221
|
# Validate value.
|
219
222
|
@from = LoadPathedDirectory.new(value)
|
@@ -249,7 +252,8 @@ module Autoloaded
|
|
249
252
|
end
|
250
253
|
|
251
254
|
def from_load_pathed_directory
|
252
|
-
@from ||
|
255
|
+
(instance_variable_defined?(:@from) && @from) ||
|
256
|
+
LoadPathedDirectory.new(default_from)
|
253
257
|
end
|
254
258
|
|
255
259
|
def host_eval(statement)
|
@@ -37,7 +37,9 @@ class Autoloaded::Specifications
|
|
37
37
|
%i(except only with).each do |attribute_name|
|
38
38
|
define_method attribute_name do
|
39
39
|
variable_name = "@#{attribute_name}"
|
40
|
-
(
|
40
|
+
((instance_variable_defined?(variable_name) &&
|
41
|
+
instance_variable_get(variable_name)) ||
|
42
|
+
[]).tap do |value|
|
41
43
|
instance_variable_set variable_name, value
|
42
44
|
end
|
43
45
|
end
|
data/lib/autoloaded/version.rb
CHANGED
data/lib/autoloaded/warning.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autoloaded
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nils Jonsson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
131
|
version: '0'
|
132
132
|
requirements: []
|
133
133
|
rubyforge_project:
|
134
|
-
rubygems_version: 2.6.
|
134
|
+
rubygems_version: 2.6.14
|
135
135
|
signing_key:
|
136
136
|
specification_version: 4
|
137
137
|
summary: Eliminates the drudgery of handcrafting a Ruby Core library `autoload` statement
|