drab 0.1.0 → 0.1.1
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/drab/drab.rb +15 -8
- data/lib/drab/version.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: 9c366ae218465e13f13c2c6ce48de1612af4ba3e
|
4
|
+
data.tar.gz: cbce23254a6f54562fce94113e20e454e45692b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec98a26a4f3235b53130ae376de0fb4fb8c65d8198866defd52298513a610402f2cc6f425c3a689ff6f9696d2c4c564cb99b2876cb4d646302b5b7315c7674ea
|
7
|
+
data.tar.gz: ec21ccae5c2dce241b45532bf831075da2f20f42c7a5b6f0299279ee8115abdb75b174fbdb25919ac71dc96cc94d28e26938c53ec1d0fa999ce926982c40124b
|
data/lib/drab/drab.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
#
|
3
3
|
# = ./drab.rb
|
4
4
|
#
|
5
|
-
# Restricted Distributed Ruby:
|
5
|
+
# Restricted Distributed Ruby: drab
|
6
6
|
#
|
7
7
|
# Copyright (c) 1999-2003 Masatoshi SEKI. You can redistribute it and/or
|
8
8
|
# modify it under the same terms as Ruby.
|
@@ -288,25 +288,32 @@ module DRab
|
|
288
288
|
return false
|
289
289
|
end
|
290
290
|
|
291
|
-
template.size.
|
291
|
+
return (0...template.size).collect do |n|
|
292
292
|
if template[n].is_a?(Array)
|
293
|
-
|
293
|
+
hld = match_structures(template[n], target[n])
|
294
|
+
if !hld
|
295
|
+
return [false]
|
296
|
+
else
|
297
|
+
next hld
|
298
|
+
end
|
294
299
|
end
|
295
300
|
|
296
301
|
if template[n] === target[n]
|
297
|
-
|
302
|
+
next true
|
298
303
|
end
|
299
304
|
|
300
305
|
if template[n].is_a?(String) and target[n].is_a?(String)
|
301
306
|
if template[n] === "*"
|
302
|
-
|
307
|
+
next true
|
303
308
|
elsif template[n].start_with?("*")
|
304
|
-
|
309
|
+
next target[n].end_with?(template[n][1..-1])
|
305
310
|
elsif template[n].end_with?("*")
|
306
|
-
|
311
|
+
next target[n].start_with?(template[n][0..-2])
|
312
|
+
else
|
313
|
+
return [false]
|
307
314
|
end
|
308
315
|
end
|
309
|
-
end
|
316
|
+
end.inject { |t, n| t and n }
|
310
317
|
rescue Exception => e
|
311
318
|
STDERR.puts e
|
312
319
|
STDERR.puts e.backtrace
|
data/lib/drab/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masatoshi SEKI
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-01-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: marshal-structure
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
119
|
rubyforge_project:
|
120
|
-
rubygems_version: 2.
|
120
|
+
rubygems_version: 2.5.2
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: Make DRb great again!
|