vips-process 0.2.1 → 0.2.2
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/vips-process.rb +4 -3
- data/lib/vips-process/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9deb204f6b71b3f7852df3ffc080c35950492d36
|
4
|
+
data.tar.gz: cedc593219e56669c6f08af4e025018ebcee9a2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 237f1a3f7d85a03757b45a40fe182f53b7a798ad068dc35f95188d735a68dfeeddf170a98f87f76773f2ec7abae30d75389161633cc6d5b709f3448435f3ead0
|
7
|
+
data.tar.gz: 5a285a3c0650df4f1a11fdd25185aeebd27766b8198cc9955ac3f58d94268359d6d76272d3da8d58b1057ebdb21f6e0e07311db4ea2190fb087e00ce23c8df55
|
data/lib/vips-process.rb
CHANGED
@@ -105,7 +105,7 @@ module Vips
|
|
105
105
|
def version(name, deps = [], &block)
|
106
106
|
throw :need_block_or_deps unless block_given? || !deps.empty?
|
107
107
|
|
108
|
-
versions =
|
108
|
+
versions = class_variable_defined?(:@@_versions) ? class_variable_get(:@@_versions) : {}
|
109
109
|
versions[name] = {deps: deps, block: block}
|
110
110
|
class_variable_set :@@_versions, versions
|
111
111
|
|
@@ -115,13 +115,14 @@ module Vips
|
|
115
115
|
old_dst = @dst
|
116
116
|
@dst = new_dst
|
117
117
|
end
|
118
|
-
|
118
|
+
|
119
|
+
_versions = self.class.class_variable_get :@@_versions
|
119
120
|
|
120
121
|
# Recursively call dependencies but don't process them yet
|
121
122
|
_versions[name][:deps].each { |dep| send "#{dep}_version", new_dst, false }
|
122
123
|
|
123
124
|
# Run the version's block
|
124
|
-
instance_eval _versions[name][:block]
|
125
|
+
instance_eval &_versions[name][:block]
|
125
126
|
|
126
127
|
# Process if we were explicitly told to do so
|
127
128
|
version_dst = process! if should_process
|
data/lib/vips-process/version.rb
CHANGED