epitools 0.5.93 → 0.5.94

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/epitools/minimal.rb +14 -11
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ccd113a18ef194f3dfeb84a6cde8196031734ce2
4
- data.tar.gz: 5829f09d3fd9719cac246f744f5fd33cdda00b05
3
+ metadata.gz: 5d01371fe8e7b1abdb22e2f34fa33972aa7b58ef
4
+ data.tar.gz: cd1b1caf85ea32aeec4ebcc4caf2e0dae2459c59
5
5
  SHA512:
6
- metadata.gz: 579ccbea64bdc0b3c3f130d53fd1932b2692591ac75426f6e7a3a14e891bf9807a9d3f409d164ccf473a805c5c5e231d54e1074e10239045d28323a3942c8389
7
- data.tar.gz: 5be9db454be2fdea00fe2babd98bdb90308b14b6b99b41135d3bd8a7cdaeac270b0afe812f9636e6a94a285fe2366ae036c967edb893500c3b97b161d4020a08
6
+ metadata.gz: d45da94f1c6618763d097c779df99d4c5144e2678d6a2da89a76d3f26a535146057ada16f2c2e179a2a3ccdf8968609d77918fb212cc487b6fa26bce60d787f9
7
+ data.tar.gz: 419827e53335a23f21b69988b255811aae29f762c2490bfd8b7a793a2e29cf5cfc9adf8257f944b7a672da92e53456effbbb0373d754ea8d3345b320e88131a9
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.93
1
+ 0.5.94
@@ -11,10 +11,13 @@ end
11
11
 
12
12
  RbConfig = Config unless defined? RbConfig
13
13
 
14
+ Infinity = Float::INFINITY
15
+ Inf = Float::INFINITY
16
+
14
17
  class Object
15
18
 
16
19
  unless defined?(__DIR__)
17
- #
20
+ #
18
21
  # This method is convenience for the `File.expand_path(File.dirname(__FILE__))` idiom.
19
22
  # (taken from Michael Fellinger's Ramaze... thanx, dood! :D)
20
23
  #
@@ -24,7 +27,7 @@ class Object
24
27
  ::File.expand_path(::File.join(dir, *args.map{|a| a.to_s}))
25
28
  end
26
29
  end
27
-
30
+
28
31
  #
29
32
  # 'autoreq' is a replacement for autoload that can load gems.
30
33
  #
@@ -38,7 +41,7 @@ class Object
38
41
  #
39
42
  def autoreq(const, path=nil, &block)
40
43
  raise "Error: autoreq must be supplied with a file to load, or a block." unless !!path ^ block_given?
41
-
44
+
42
45
  if block_given?
43
46
  Module.autoreqs[const] = block
44
47
  else
@@ -67,7 +70,7 @@ class Object
67
70
  raise "Error: don't know how to 'del #{x.inspect}'"
68
71
  end
69
72
  end
70
-
73
+
71
74
  # The hidden singleton lurks behind everyone
72
75
  if defined? singleton_class
73
76
  alias metaclass singleton_class
@@ -179,12 +182,12 @@ end
179
182
  class Module
180
183
 
181
184
  @@autoreq_is_searching_for = nil
182
-
185
+
183
186
  alias const_missing_without_autoreq const_missing
184
-
187
+
185
188
  def const_missing(const)
186
189
  return if const == @@autoreq_is_searching_for
187
-
190
+
188
191
  if thing = autoreqs[const]
189
192
  case thing
190
193
  when String, Symbol
@@ -195,15 +198,15 @@ class Module
195
198
  raise "Error: Don't know how to autoload a #{thing.class}: #{thing.inspect}"
196
199
  end
197
200
  end
198
-
201
+
199
202
  @@autoreq_is_searching_for = const
200
203
  const_get(const) || const_missing_without_autoreq(const)
201
204
  end
202
-
205
+
203
206
  def autoreqs
204
207
  @@autoreqs ||= {}
205
208
  end
206
-
209
+
207
210
  end
208
211
 
209
212
 
@@ -225,7 +228,7 @@ module Kernel
225
228
  # Same as Kernel#run, but includes stderr in the result.
226
229
  #
227
230
  def run_with_stderr(*cmd)
228
- result = IO.popen(cmd, err: [:child, :out]) do |io|
231
+ result = IO.popen(cmd, err: [:child, :out]) do |io|
229
232
  block_given? ? yield(io) : io.read
230
233
  end
231
234
  String === result && result.empty? ? nil : result
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epitools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.93
4
+ version: 0.5.94
5
5
  platform: ruby
6
6
  authors:
7
7
  - epitron
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-07 00:00:00.000000000 Z
11
+ date: 2016-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec