cat_engine 0.1.1 → 0.2.0
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/.github/workflows/ci.yml +35 -0
- data/.ruby-version +1 -1
- data/lib/cat_engine/engine.rb +6 -10
- data/lib/cat_engine/version.rb +1 -1
- metadata +7 -4
- data/.travis.yml +0 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 235962a68b9f7a187b2aab3211cab12b99ab72ba3593ddbfa130c8c215ddd82c
|
|
4
|
+
data.tar.gz: 4cd6a963847173e4d6ac4d7c10d419d05bc09ecae6c41603c5de284b2e1d646d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b87dca1dcf5502eba9e56850738a3862ec92dfc09303ab5389f2cca5ce4fd9185991fbb4e4772dc8159ffb74e46fc3e70a71cede66e6031ea55ab16057c113b5
|
|
7
|
+
data.tar.gz: 7f308779db0d6290b6699961738deb44b0792c0287f40eeb0d8a5014e9daea727d738e2b8cfcddc55ff94590413f035b82afb10da08ce0b46c7e23bbe0ecd958
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
ruby: ["3.2", "3.3", "3.4"]
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
|
22
|
+
uses: ruby/setup-ruby@v1
|
|
23
|
+
with:
|
|
24
|
+
ruby-version: ${{ matrix.ruby }}
|
|
25
|
+
bundler-cache: true
|
|
26
|
+
|
|
27
|
+
- name: Install Mono (for C# engine)
|
|
28
|
+
run: |
|
|
29
|
+
sudo apt-get update
|
|
30
|
+
sudo apt-get install -y mono-complete
|
|
31
|
+
|
|
32
|
+
- name: Run build and tests
|
|
33
|
+
run: |
|
|
34
|
+
bundle exec rake
|
|
35
|
+
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
ruby-
|
|
1
|
+
ruby-3.3.4
|
data/lib/cat_engine/engine.rb
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
require "nokogiri"
|
|
2
2
|
require "memoist"
|
|
3
|
+
require "open3"
|
|
3
4
|
require "cat_engine/config"
|
|
4
5
|
|
|
5
6
|
module CatEngine
|
|
@@ -13,18 +14,14 @@ module CatEngine
|
|
|
13
14
|
raise unless $?.success?
|
|
14
15
|
end
|
|
15
16
|
|
|
16
|
-
def process id, history
|
|
17
|
-
|
|
18
|
-
output
|
|
19
|
-
|
|
20
|
-
Nokogiri::XML.parse(output, nil, "utf-8")
|
|
21
|
-
else
|
|
22
|
-
raise EngineError.new(output)
|
|
23
|
-
end
|
|
17
|
+
def process id, history = []
|
|
18
|
+
output, status = Open3.capture2e("mono", "--debug", CatEngine.cat_engine_executable_path, id, *history, chdir: CatEngine.cat_path)
|
|
19
|
+
raise EngineError.new(output) unless status.success?
|
|
20
|
+
Nokogiri::XML.parse(output, nil, "utf-8")
|
|
24
21
|
end
|
|
25
22
|
memoize :process
|
|
26
23
|
|
|
27
|
-
def valid_history? id, history
|
|
24
|
+
def valid_history? id, history = []
|
|
28
25
|
process id, history
|
|
29
26
|
true
|
|
30
27
|
rescue EngineError => e
|
|
@@ -32,4 +29,3 @@ module CatEngine
|
|
|
32
29
|
end
|
|
33
30
|
end
|
|
34
31
|
end
|
|
35
|
-
|
data/lib/cat_engine/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cat_engine
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Micah Geisel
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: exe
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date:
|
|
11
|
+
date: 2026-09-12 00:00:00.000000000 Z
|
|
11
12
|
dependencies:
|
|
12
13
|
- !ruby/object:Gem::Dependency
|
|
13
14
|
name: activemodel
|
|
@@ -100,11 +101,11 @@ executables: []
|
|
|
100
101
|
extensions: []
|
|
101
102
|
extra_rdoc_files: []
|
|
102
103
|
files:
|
|
104
|
+
- ".github/workflows/ci.yml"
|
|
103
105
|
- ".gitignore"
|
|
104
106
|
- ".rspec"
|
|
105
107
|
- ".ruby-gemset"
|
|
106
108
|
- ".ruby-version"
|
|
107
|
-
- ".travis.yml"
|
|
108
109
|
- Gemfile
|
|
109
110
|
- LICENSE.txt
|
|
110
111
|
- README.md
|
|
@@ -131,6 +132,7 @@ homepage: https://github.com/botandrose/cat_engine
|
|
|
131
132
|
licenses:
|
|
132
133
|
- MIT
|
|
133
134
|
metadata: {}
|
|
135
|
+
post_install_message:
|
|
134
136
|
rdoc_options: []
|
|
135
137
|
require_paths:
|
|
136
138
|
- lib
|
|
@@ -145,7 +147,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
145
147
|
- !ruby/object:Gem::Version
|
|
146
148
|
version: '0'
|
|
147
149
|
requirements: []
|
|
148
|
-
rubygems_version: 3.
|
|
150
|
+
rubygems_version: 3.5.11
|
|
151
|
+
signing_key:
|
|
149
152
|
specification_version: 4
|
|
150
153
|
summary: Ruby wrapper around C# Cat Engine
|
|
151
154
|
test_files: []
|
data/.travis.yml
DELETED