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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 837c904cbf3d627c748c454d955a4c8a8a8654e824a0a8e0f17c65cbac59ce22
4
- data.tar.gz: 6b8f3785510159e7d5b56553bd238ba636b6a5d501a7f92cef672e7444b34a37
3
+ metadata.gz: 235962a68b9f7a187b2aab3211cab12b99ab72ba3593ddbfa130c8c215ddd82c
4
+ data.tar.gz: 4cd6a963847173e4d6ac4d7c10d419d05bc09ecae6c41603c5de284b2e1d646d
5
5
  SHA512:
6
- metadata.gz: 83abafe49e34d2319771c59426ef061cbdf724e25bc79190c830db782e1193f9404d3386331a6e6865ab911fe81a85b25d954f65a3fc36dec77ee6df2e02c2d3
7
- data.tar.gz: e3072eef253987af8c6a01d48952a3c053ac887ff5448ab2925438dd33efbeacea263d1ef79a6aa8a76f9fb7314559d0ae063bfe645458435785e63059819b10
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-2.2.3
1
+ ruby-3.3.4
@@ -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
- command = %(cd #{CatEngine.cat_path} && mono --debug #{CatEngine.cat_engine_executable_path} "#{id}" #{history} 2>&1)
18
- output = `#{command}`.chomp
19
- if $?.success?
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
-
@@ -1,3 +1,3 @@
1
1
  module CatEngine
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
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.1.1
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: 2025-05-14 00:00:00.000000000 Z
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.6.2
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
@@ -1,3 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2.0