prolog_mqi 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -0
- data/CODE_OF_CONDUCT.md +0 -0
- data/Gemfile +0 -0
- data/LICENSE +0 -0
- data/LICENSE.txt +0 -0
- data/README.md +0 -0
- data/Rakefile +7 -1
- data/lib/prolog_mqi/errors.rb +0 -0
- data/lib/prolog_mqi/parser.rb +0 -0
- data/lib/prolog_mqi/prolog_mqi.rb +7 -5
- data/lib/prolog_mqi/term.rb +6 -1
- data/lib/prolog_mqi/version.rb +1 -1
- data/lib/prolog_mqi.rb +0 -0
- data/prolog_mqi.gemspec +2 -2
- metadata +8 -9
- data/Gemfile.lock +0 -54
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c140e8137101d2baf02d0a584c067e9eab8129848c9180c0b4f0385afe24b916
|
4
|
+
data.tar.gz: ccd2b9ef79061e9c5eff1fb2292f2a8c8f986b50d302f7c4b7a7d1447ba6d71e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3891f27ddd92e97506998ba3ee15bf273bd575e846a478dba657307bbf4d3adea65e7a135ea992aa5c5dd9f668184255e472ddb42ecee9efc1a96c033e30351c
|
7
|
+
data.tar.gz: 6d21ed8b6dc2efd65132df959ae904625780c6138e50d3a3c2c598aa74371337d5d30516f0fee40d800a981d0918e8696e015d25a1c4dbc70b3a88beda63807c
|
data/.rubocop.yml
CHANGED
File without changes
|
data/CODE_OF_CONDUCT.md
CHANGED
File without changes
|
data/Gemfile
CHANGED
File without changes
|
data/LICENSE
CHANGED
File without changes
|
data/LICENSE.txt
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
@@ -9,8 +9,14 @@ Rake::TestTask.new(:test) do |t|
|
|
9
9
|
t.test_files = FileList['test/**/test_*.rb']
|
10
10
|
end
|
11
11
|
|
12
|
+
Rake::TestTask.new(:bench) do |t|
|
13
|
+
t.libs << 'test'
|
14
|
+
t.libs << 'lib'
|
15
|
+
t.test_files = FileList['test/**/bench_*.rb']
|
16
|
+
end
|
17
|
+
|
12
18
|
require 'rubocop/rake_task'
|
13
19
|
|
14
20
|
RuboCop::RakeTask.new
|
15
21
|
|
16
|
-
task default: %i[test rubocop]
|
22
|
+
task default: %i[test bench rubocop]
|
data/lib/prolog_mqi/errors.rb
CHANGED
File without changes
|
data/lib/prolog_mqi/parser.rb
CHANGED
File without changes
|
@@ -6,7 +6,7 @@ module PrologMQI
|
|
6
6
|
@timeout = timeout
|
7
7
|
|
8
8
|
@process = nil
|
9
|
-
@
|
9
|
+
@socket = nil
|
10
10
|
@running = false
|
11
11
|
end
|
12
12
|
|
@@ -22,8 +22,9 @@ module PrologMQI
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def start
|
25
|
-
|
25
|
+
raise LaunchError, 'PrologMQI is already running' if running?
|
26
26
|
|
27
|
+
# Start prolog process
|
27
28
|
@stdin, @stdout, @stderr, @process =
|
28
29
|
Open3.popen3('swipl', '--quiet', '-g', 'mqi_start', '-t', 'halt', '--', '--write_connection_values=true',
|
29
30
|
'--create_unix_domain_socket=true')
|
@@ -39,6 +40,7 @@ module PrologMQI
|
|
39
40
|
end
|
40
41
|
|
41
42
|
# Authenticate
|
43
|
+
@running = true
|
42
44
|
write(password)
|
43
45
|
read
|
44
46
|
end
|
@@ -64,13 +66,13 @@ module PrologMQI
|
|
64
66
|
@socket.write(message)
|
65
67
|
end
|
66
68
|
|
67
|
-
def stop
|
69
|
+
def stop
|
68
70
|
@socket.close
|
69
71
|
@stdin.close
|
70
72
|
@stdout.close
|
71
73
|
@stderr.close
|
72
|
-
@process.kill
|
73
|
-
@
|
74
|
+
@process.kill
|
75
|
+
@running = false
|
74
76
|
end
|
75
77
|
end
|
76
78
|
end
|
data/lib/prolog_mqi/term.rb
CHANGED
data/lib/prolog_mqi/version.rb
CHANGED
data/lib/prolog_mqi.rb
CHANGED
File without changes
|
data/prolog_mqi.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ['Delton Ding']
|
9
9
|
spec.email = ['shenghao.ding@yetanother.ai']
|
10
10
|
|
11
|
-
spec.summary = '
|
12
|
-
spec.description = '
|
11
|
+
spec.summary = 'Yet Another Prolog Interface for Ruby.'
|
12
|
+
spec.description = 'A PrologMQI implementation in Ruby.'
|
13
13
|
spec.homepage = 'https://github.com/yet-another-ai/prologmqi.rb'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
spec.required_ruby_version = '>= 3.0.0'
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prolog_mqi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Delton Ding
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
13
|
+
description: A PrologMQI implementation in Ruby.
|
14
14
|
email:
|
15
15
|
- shenghao.ding@yetanother.ai
|
16
16
|
executables: []
|
@@ -20,7 +20,6 @@ files:
|
|
20
20
|
- ".rubocop.yml"
|
21
21
|
- CODE_OF_CONDUCT.md
|
22
22
|
- Gemfile
|
23
|
-
- Gemfile.lock
|
24
23
|
- LICENSE
|
25
24
|
- LICENSE.txt
|
26
25
|
- README.md
|
@@ -39,7 +38,7 @@ metadata:
|
|
39
38
|
homepage_uri: https://github.com/yet-another-ai/prologmqi.rb
|
40
39
|
source_code_uri: https://github.com/yet-another-ai/prologmqi.rb
|
41
40
|
rubygems_mfa_required: 'true'
|
42
|
-
post_install_message:
|
41
|
+
post_install_message:
|
43
42
|
rdoc_options: []
|
44
43
|
require_paths:
|
45
44
|
- lib
|
@@ -54,8 +53,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
54
53
|
- !ruby/object:Gem::Version
|
55
54
|
version: '0'
|
56
55
|
requirements: []
|
57
|
-
rubygems_version: 3.4.
|
58
|
-
signing_key:
|
56
|
+
rubygems_version: 3.4.12
|
57
|
+
signing_key:
|
59
58
|
specification_version: 4
|
60
|
-
summary:
|
59
|
+
summary: Yet Another Prolog Interface for Ruby.
|
61
60
|
test_files: []
|
data/Gemfile.lock
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
prolog_mqi (0.1.0)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
ast (2.4.2)
|
10
|
-
json (2.6.3)
|
11
|
-
language_server-protocol (3.17.0.3)
|
12
|
-
minitest (5.18.1)
|
13
|
-
parallel (1.23.0)
|
14
|
-
parser (3.2.2.3)
|
15
|
-
ast (~> 2.4.1)
|
16
|
-
racc
|
17
|
-
racc (1.7.1)
|
18
|
-
rainbow (3.1.1)
|
19
|
-
rake (13.0.6)
|
20
|
-
regexp_parser (2.8.1)
|
21
|
-
rexml (3.2.5)
|
22
|
-
rubocop (1.53.1)
|
23
|
-
json (~> 2.3)
|
24
|
-
language_server-protocol (>= 3.17.0)
|
25
|
-
parallel (~> 1.10)
|
26
|
-
parser (>= 3.2.2.3)
|
27
|
-
rainbow (>= 2.2.2, < 4.0)
|
28
|
-
regexp_parser (>= 1.8, < 3.0)
|
29
|
-
rexml (>= 3.2.5, < 4.0)
|
30
|
-
rubocop-ast (>= 1.28.0, < 2.0)
|
31
|
-
ruby-progressbar (~> 1.7)
|
32
|
-
unicode-display_width (>= 2.4.0, < 3.0)
|
33
|
-
rubocop-ast (1.29.0)
|
34
|
-
parser (>= 3.2.1.0)
|
35
|
-
rubocop-minitest (0.31.0)
|
36
|
-
rubocop (>= 1.39, < 2.0)
|
37
|
-
rubocop-rake (0.6.0)
|
38
|
-
rubocop (~> 1.0)
|
39
|
-
ruby-progressbar (1.13.0)
|
40
|
-
unicode-display_width (2.4.2)
|
41
|
-
|
42
|
-
PLATFORMS
|
43
|
-
x86_64-linux
|
44
|
-
|
45
|
-
DEPENDENCIES
|
46
|
-
minitest (~> 5.0)
|
47
|
-
prolog_mqi!
|
48
|
-
rake (~> 13.0)
|
49
|
-
rubocop
|
50
|
-
rubocop-minitest
|
51
|
-
rubocop-rake
|
52
|
-
|
53
|
-
BUNDLED WITH
|
54
|
-
2.4.10
|