procemon 1.0.0 → 1.0.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 +8 -8
- data/VERSION +1 -1
- data/procemon.gemspec +1 -0
- metadata +16 -3
- data/lib/procemon/function/binding/bindless.rb +0 -57
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDE3NTk0MjU3MjcwMTUwMDgxMjk5YmU5YTkxMjIyZWIxN2QxMGYxNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
M2VkZTQ2ZTBjMDY4ZGVlMTM4YjFhZDRkNTUwMGVjNjEzYjljMGM0Mg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzIzYzY5NTMzZDk1ZjI3ZjJiNDlkOWMyNjBmYmJmYmVlMTJmNzU2YTNiYjZm
|
10
|
+
YzdjODcwMGM2ZDliYjY5MjM5MmIyMDgxNzAyOGQ0MjBkZGUzMTQzZThkZTg2
|
11
|
+
NWQwMzgwYTczYmVhNGM4NGFkMmI5MjU4ZjBlMWVhNjc2M2RiNjM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTQzYzU0ZTdjNmFlNmNiZTQ2NmMyNDNjYmY5MzEwOTg2MTQ0YjQwZTNkNDcx
|
14
|
+
N2Y5MDU4YTdiMTZlOTNhZjJjYzNjMGUzYzkzNTQ0YjgwYzNiY2I2MTViYWVi
|
15
|
+
OTA0NWNkMjFjYTc5OTJlNTk0NDZmMmNkNmZiZGU5ZjY0N2FmZWM=
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
data/procemon.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: procemon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Luzsi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sourcerer
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bindless
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: ! 'This is a collection of my Ruby Procs in the adventure of becoming
|
56
70
|
the best! In short this provides extra tools in Application configs, argumens processing,daemonise,eval,
|
57
71
|
getting source of a block,method,process and work with it, or even fuse them into
|
@@ -79,7 +93,6 @@ files:
|
|
79
93
|
- lib/procemon/extra/str2duck.rb
|
80
94
|
- lib/procemon/function/application.rb
|
81
95
|
- lib/procemon/function/argv.rb
|
82
|
-
- lib/procemon/function/binding/bindless.rb
|
83
96
|
- lib/procemon/function/daemon.rb
|
84
97
|
- lib/procemon/function/documentation.rb
|
85
98
|
- lib/procemon/function/generate.rb
|
@@ -1,57 +0,0 @@
|
|
1
|
-
class Bindless
|
2
|
-
|
3
|
-
def initialize(bindings = [])
|
4
|
-
@bindings = bindings
|
5
|
-
end
|
6
|
-
|
7
|
-
def method_missing(m, *args)
|
8
|
-
@bindings.reverse_each do |bind|
|
9
|
-
begin
|
10
|
-
method = eval("method(%s)" % m.inspect, bind)
|
11
|
-
rescue NameError
|
12
|
-
else
|
13
|
-
return method.call(*args)
|
14
|
-
end
|
15
|
-
begin
|
16
|
-
value = eval(m.to_s, bind)
|
17
|
-
return value
|
18
|
-
rescue NameError
|
19
|
-
end
|
20
|
-
end
|
21
|
-
raise NoMethodError, "No such variable or method: %s" % m
|
22
|
-
end
|
23
|
-
|
24
|
-
def pop_binding
|
25
|
-
@bindings.pop
|
26
|
-
end
|
27
|
-
|
28
|
-
def push_binding(bind)
|
29
|
-
@bindings.push bind
|
30
|
-
end
|
31
|
-
|
32
|
-
def push_instance(obj)
|
33
|
-
@bindings.push obj.instance_eval { binding }
|
34
|
-
end
|
35
|
-
|
36
|
-
def push_hash(vars)
|
37
|
-
push_instance Struct.new(*vars.keys).new(*vars.values)
|
38
|
-
end
|
39
|
-
|
40
|
-
def get_binding
|
41
|
-
instance_eval { binding }
|
42
|
-
end
|
43
|
-
|
44
|
-
def run_proc(p, *args)
|
45
|
-
instance_exec(*args, &p)
|
46
|
-
end
|
47
|
-
|
48
|
-
def push_method(name, p, obj=nil)
|
49
|
-
x = Object.new
|
50
|
-
singleton = class << x; self; end
|
51
|
-
singleton.send(:define_method, name, lambda { |*args|
|
52
|
-
obj.instance_exec(*args, &p)
|
53
|
-
})
|
54
|
-
push_instance x
|
55
|
-
end
|
56
|
-
|
57
|
-
end
|