ruby.py 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/ruby.py.rb +5 -5
- data/ruby.py.gemspec +2 -3
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f2b167135a5914b95038929c7098de36bc226cf363a62e0508557ff1566c114
|
4
|
+
data.tar.gz: 25a87baa586f4a55637467d7a9e7de7e7474bf88eddd854e425715caf84f80b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adf99697fa66ffd22aee9189045d6f1f72a96a90a0128bf7150cab3cecdd28f059ebaba404adb7bda05f06fec37dcdb35958c5eb5ec694aa68105d36d59c77e9
|
7
|
+
data.tar.gz: c70d594a5b93114c827b1631b2535a7bd9556c971baa7c3883027338716a9cd6e9fd1bdde3bcf8e58f15bc1320b2792e36e6595efe2da8932f9d8cfadd73794f
|
data/README.md
CHANGED
data/lib/ruby.py.rb
CHANGED
@@ -5,8 +5,8 @@ require 'pycall/import'
|
|
5
5
|
|
6
6
|
# Ruby wrapper for Python modules (based on the PyCall gem).
|
7
7
|
module RubyPy
|
8
|
-
# Import a
|
9
|
-
#
|
8
|
+
# Import a +python.module+ as a +RubyPy::Python::Module+ using the
|
9
|
+
# *PyCall* gem. Methods called on the Ruby module will be sent to
|
10
10
|
# the Python module.
|
11
11
|
def self.import(pym)
|
12
12
|
# very simple filter to mitigate the risk of code injection attacks
|
@@ -23,8 +23,8 @@ module RubyPy
|
|
23
23
|
instance_eval(create_module_hierarchy, __FILE__, __LINE__)
|
24
24
|
|
25
25
|
# import the python module into an anonymous module and delegate to it
|
26
|
-
instance_eval("#{<<-"
|
27
|
-
|
26
|
+
instance_eval("#{<<-"DEFMOD"}\n#{<<-"ENDMOD"}", __FILE__, __LINE__)
|
27
|
+
DEFMOD
|
28
28
|
module #{mod.join('::')}
|
29
29
|
unless @pycall
|
30
30
|
@pycall = Module.new do
|
@@ -46,7 +46,7 @@ module RubyPy
|
|
46
46
|
|
47
47
|
self
|
48
48
|
end
|
49
|
-
|
49
|
+
ENDMOD
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
data/ruby.py.gemspec
CHANGED
@@ -3,12 +3,11 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = 'ruby.py'
|
6
|
-
spec.version = '0.2.
|
6
|
+
spec.version = '0.2.5'
|
7
7
|
spec.authors = ['Frank J. Cameron']
|
8
8
|
spec.email = ['fjc@fastmail.net']
|
9
9
|
|
10
|
-
spec.summary = 'Ruby wrapper for Python modules.'
|
11
|
-
spec.description = ''
|
10
|
+
spec.summary = 'Ruby wrapper for Python modules using the PyCall gem.'
|
12
11
|
spec.homepage = 'https://gitlab.com/fjc/ruby.py'
|
13
12
|
spec.license = 'MIT'
|
14
13
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby.py
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank J. Cameron
|
@@ -84,17 +84,17 @@ dependencies:
|
|
84
84
|
name: pycall
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.
|
89
|
+
version: '1.0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 1.
|
97
|
-
description:
|
96
|
+
version: '1.0'
|
97
|
+
description:
|
98
98
|
email:
|
99
99
|
- fjc@fastmail.net
|
100
100
|
executables: []
|
@@ -136,5 +136,5 @@ rubyforge_project:
|
|
136
136
|
rubygems_version: 2.7.6
|
137
137
|
signing_key:
|
138
138
|
specification_version: 4
|
139
|
-
summary: Ruby wrapper for Python modules.
|
139
|
+
summary: Ruby wrapper for Python modules using the PyCall gem.
|
140
140
|
test_files: []
|