prolog_mqi 0.1.1 → 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 -4
- data/lib/prolog_mqi/term.rb +0 -0
- data/lib/prolog_mqi/version.rb +1 -1
- data/lib/prolog_mqi.rb +0 -0
- data/prolog_mqi.gemspec +0 -0
- metadata +6 -6
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,6 +22,8 @@ module PrologMQI
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def start
|
25
|
+
raise LaunchError, 'PrologMQI is already running' if running?
|
26
|
+
|
25
27
|
# Start prolog process
|
26
28
|
@stdin, @stdout, @stderr, @process =
|
27
29
|
Open3.popen3('swipl', '--quiet', '-g', 'mqi_start', '-t', 'halt', '--', '--write_connection_values=true',
|
@@ -38,6 +40,7 @@ module PrologMQI
|
|
38
40
|
end
|
39
41
|
|
40
42
|
# Authenticate
|
43
|
+
@running = true
|
41
44
|
write(password)
|
42
45
|
read
|
43
46
|
end
|
@@ -63,13 +66,13 @@ module PrologMQI
|
|
63
66
|
@socket.write(message)
|
64
67
|
end
|
65
68
|
|
66
|
-
def stop
|
69
|
+
def stop
|
67
70
|
@socket.close
|
68
71
|
@stdin.close
|
69
72
|
@stdout.close
|
70
73
|
@stderr.close
|
71
|
-
@process.kill
|
72
|
-
@
|
74
|
+
@process.kill
|
75
|
+
@running = false
|
73
76
|
end
|
74
77
|
end
|
75
78
|
end
|
data/lib/prolog_mqi/term.rb
CHANGED
File without changes
|
data/lib/prolog_mqi/version.rb
CHANGED
data/lib/prolog_mqi.rb
CHANGED
File without changes
|
data/prolog_mqi.gemspec
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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
13
|
description: A PrologMQI implementation in Ruby.
|
14
14
|
email:
|
@@ -38,7 +38,7 @@ metadata:
|
|
38
38
|
homepage_uri: https://github.com/yet-another-ai/prologmqi.rb
|
39
39
|
source_code_uri: https://github.com/yet-another-ai/prologmqi.rb
|
40
40
|
rubygems_mfa_required: 'true'
|
41
|
-
post_install_message:
|
41
|
+
post_install_message:
|
42
42
|
rdoc_options: []
|
43
43
|
require_paths:
|
44
44
|
- lib
|
@@ -53,8 +53,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
requirements: []
|
56
|
-
rubygems_version: 3.4.
|
57
|
-
signing_key:
|
56
|
+
rubygems_version: 3.4.12
|
57
|
+
signing_key:
|
58
58
|
specification_version: 4
|
59
59
|
summary: Yet Another Prolog Interface for Ruby.
|
60
60
|
test_files: []
|