xaiml 0.1.5 → 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 +23 -0
- data/.rubocop.rspec.yml +0 -2
- data/.rubocop.ruby.yml +1 -5
- data/.rubocop.yml +6 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +17 -0
- data/Gemfile.lock +104 -65
- data/README.md +19 -7
- data/lib/xaiml/document.rb +1 -2
- data/lib/xaiml/element/base.rb +5 -3
- data/lib/xaiml/version.rb +1 -1
- data/xaiml.gemspec +2 -1
- metadata +8 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2da598e90963473fa45fed38528aff3d8ca439b04485bc377fec3a33925bbeca
|
|
4
|
+
data.tar.gz: 352ef28122931cb3e901af96f39873246c5dec55cf0610bbcbf0bdef9f81f489
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c32dcb3876bcb8a511f54e6092319aca0c2d7c9c30a676e8b7294e593ac253f521ed830c4f063dfb8db312edd3882492efac76e01c7d6be0c774ce2c924fe72b
|
|
7
|
+
data.tar.gz: c4973e135ce1af02fb9a4ca7c532b4b5896f4634295c77c1185d3c6e5c3e837af8c446f18b4c39aa73df2ecdc118023ff7df3789e8c8f385b1f515d063fd0689
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: Ruby CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, release/* ]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
ruby: [ '3.2', '3.3', '3.4' ]
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v3
|
|
16
|
+
- name: Set up Ruby
|
|
17
|
+
uses: ruby/setup-ruby@v1
|
|
18
|
+
with:
|
|
19
|
+
ruby-version: ${{ matrix.ruby }}
|
|
20
|
+
- name: Install dependencies
|
|
21
|
+
run: bundle install
|
|
22
|
+
- name: Run tests
|
|
23
|
+
run: bundle exec rspec
|
data/.rubocop.rspec.yml
CHANGED
data/.rubocop.ruby.yml
CHANGED
|
@@ -148,7 +148,7 @@ Metrics/PerceivedComplexity:
|
|
|
148
148
|
#################### Naming ################################
|
|
149
149
|
|
|
150
150
|
# has_ から始まるメソッドは許可する
|
|
151
|
-
Naming/
|
|
151
|
+
Naming/PredicatePrefix:
|
|
152
152
|
ForbiddenPrefixes:
|
|
153
153
|
- "is_"
|
|
154
154
|
- "have_"
|
|
@@ -202,10 +202,6 @@ Style/BlockDelimiters:
|
|
|
202
202
|
Exclude:
|
|
203
203
|
- "spec/**/*_spec.rb"
|
|
204
204
|
|
|
205
|
-
# option 等、明示的にハッシュにした方が分かりやすい場合もある
|
|
206
|
-
Style/BracesAroundHashParameters:
|
|
207
|
-
Enabled: false
|
|
208
|
-
|
|
209
205
|
# scope が違うとか親 module の存在確認が必要とかデメリットはあるが、
|
|
210
206
|
# namespace 付きのクラスはかなり頻繁に作るので簡単に書きたい。
|
|
211
207
|
Style/ClassAndModuleChildren:
|
data/.rubocop.yml
CHANGED
|
@@ -2,22 +2,24 @@ inherit_from:
|
|
|
2
2
|
- .rubocop.ruby.yml
|
|
3
3
|
- .rubocop.rspec.yml
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
plugins:
|
|
6
6
|
- rubocop-performance
|
|
7
7
|
- rubocop-rspec
|
|
8
8
|
AllCops:
|
|
9
|
-
TargetRubyVersion:
|
|
9
|
+
TargetRubyVersion: 3.3
|
|
10
|
+
NewCops: disable
|
|
11
|
+
SuggestExtensions: false
|
|
10
12
|
Naming/FileName:
|
|
11
13
|
Exclude:
|
|
12
14
|
- "Gemfile"
|
|
13
15
|
- "Rakefile"
|
|
14
16
|
- "bin/*"
|
|
15
|
-
StringLiterals:
|
|
16
|
-
EnforcedStyle: double_quotes
|
|
17
17
|
Style/Documentation:
|
|
18
18
|
Enabled: false
|
|
19
19
|
RSpec/MultipleExpectations:
|
|
20
20
|
Max: 5
|
|
21
|
+
RSpec/MultipleMemoizedHelpers:
|
|
22
|
+
Max: 6
|
|
21
23
|
RSpec/LeakyConstantDeclaration:
|
|
22
24
|
Enabled: false
|
|
23
25
|
RSpec/DescribedClass:
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3.4.4
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# CHANGELOG
|
|
2
|
+
|
|
3
|
+
## [0.2.0] - 2026-07-21
|
|
4
|
+
### Changed
|
|
5
|
+
- **BREAKING**: Require Ruby >= 3.3 (3.2 is EOL as of 2026-04-01)
|
|
6
|
+
- Update transitive dev dependencies to close Dependabot security alerts (concurrent-ruby, rexml)
|
|
7
|
+
- Update development dependencies (RuboCop 1.88, rubocop-rspec 3.10)
|
|
8
|
+
|
|
9
|
+
## [0.1.6] - 2024-06-10
|
|
10
|
+
### Added / Changed
|
|
11
|
+
- Support for Ruby 3.4.4
|
|
12
|
+
- Updated ox dependency to support the latest version
|
|
13
|
+
- Improved and updated README
|
|
14
|
+
- Bumped version to 0.1.6
|
|
15
|
+
|
|
16
|
+
## Previous releases
|
|
17
|
+
- Previous versions omitted
|
data/Gemfile.lock
CHANGED
|
@@ -1,82 +1,121 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
xaiml (0.
|
|
5
|
-
ox (
|
|
4
|
+
xaiml (0.2.0)
|
|
5
|
+
ox (>= 2.10.0)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
ast (2.4.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
10
|
+
ast (2.4.3)
|
|
11
|
+
bigdecimal (4.1.2)
|
|
12
|
+
coderay (1.1.3)
|
|
13
|
+
concurrent-ruby (1.3.8)
|
|
14
|
+
diff-lcs (1.6.2)
|
|
15
|
+
dry-configurable (1.4.0)
|
|
16
|
+
dry-core (~> 1.0)
|
|
17
|
+
zeitwerk (~> 2.6)
|
|
18
|
+
dry-core (1.2.0)
|
|
19
|
+
concurrent-ruby (~> 1.0)
|
|
20
|
+
logger
|
|
21
|
+
zeitwerk (~> 2.6)
|
|
22
|
+
dry-inflector (1.3.1)
|
|
23
|
+
dry-initializer (3.2.0)
|
|
24
|
+
dry-logic (1.6.0)
|
|
25
|
+
bigdecimal
|
|
26
|
+
concurrent-ruby (~> 1.0)
|
|
27
|
+
dry-core (~> 1.1)
|
|
28
|
+
zeitwerk (~> 2.6)
|
|
29
|
+
dry-schema (1.16.0)
|
|
30
|
+
concurrent-ruby (~> 1.0)
|
|
31
|
+
dry-configurable (~> 1.0, >= 1.0.1)
|
|
32
|
+
dry-core (~> 1.1)
|
|
33
|
+
dry-initializer (~> 3.2)
|
|
34
|
+
dry-logic (~> 1.6)
|
|
35
|
+
dry-types (~> 1.9, >= 1.9.1)
|
|
36
|
+
zeitwerk (~> 2.6)
|
|
37
|
+
dry-types (1.9.1)
|
|
38
|
+
bigdecimal (>= 3.0)
|
|
39
|
+
concurrent-ruby (~> 1.0)
|
|
40
|
+
dry-core (~> 1.0)
|
|
41
|
+
dry-inflector (~> 1.0)
|
|
42
|
+
dry-logic (~> 1.4)
|
|
43
|
+
zeitwerk (~> 2.6)
|
|
44
|
+
io-console (0.8.2)
|
|
45
|
+
json (2.21.1)
|
|
46
|
+
language_server-protocol (3.17.0.6)
|
|
47
|
+
lint_roller (1.1.0)
|
|
48
|
+
logger (1.7.0)
|
|
49
|
+
method_source (1.1.0)
|
|
50
|
+
ox (2.14.28)
|
|
51
|
+
bigdecimal (>= 3.0)
|
|
52
|
+
parallel (2.1.0)
|
|
53
|
+
parser (3.3.12.0)
|
|
54
|
+
ast (~> 2.4.1)
|
|
55
|
+
racc
|
|
56
|
+
prism (1.9.0)
|
|
57
|
+
pry (0.16.0)
|
|
58
|
+
coderay (~> 1.1)
|
|
59
|
+
method_source (~> 1.0)
|
|
60
|
+
reline (>= 0.6.0)
|
|
61
|
+
racc (1.8.1)
|
|
62
|
+
rainbow (3.1.1)
|
|
63
|
+
rake (13.4.2)
|
|
64
|
+
reek (6.5.0)
|
|
65
|
+
dry-schema (~> 1.13)
|
|
66
|
+
logger (~> 1.6)
|
|
67
|
+
parser (~> 3.3.0)
|
|
43
68
|
rainbow (>= 2.0, < 4.0)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
69
|
+
rexml (~> 3.1)
|
|
70
|
+
regexp_parser (2.12.0)
|
|
71
|
+
reline (0.6.3)
|
|
72
|
+
io-console (~> 0.5)
|
|
73
|
+
rexml (3.4.4)
|
|
74
|
+
rspec (3.13.2)
|
|
75
|
+
rspec-core (~> 3.13.0)
|
|
76
|
+
rspec-expectations (~> 3.13.0)
|
|
77
|
+
rspec-mocks (~> 3.13.0)
|
|
78
|
+
rspec-core (3.13.6)
|
|
79
|
+
rspec-support (~> 3.13.0)
|
|
80
|
+
rspec-expectations (3.13.5)
|
|
51
81
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
52
|
-
rspec-support (~> 3.
|
|
53
|
-
rspec-mocks (3.8
|
|
82
|
+
rspec-support (~> 3.13.0)
|
|
83
|
+
rspec-mocks (3.13.8)
|
|
54
84
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
55
|
-
rspec-support (~> 3.
|
|
56
|
-
rspec-support (3.
|
|
57
|
-
rspec_junit_formatter (0.
|
|
85
|
+
rspec-support (~> 3.13.0)
|
|
86
|
+
rspec-support (3.13.7)
|
|
87
|
+
rspec_junit_formatter (0.6.0)
|
|
58
88
|
rspec-core (>= 2, < 4, != 2.12.0)
|
|
59
|
-
rubocop (
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
89
|
+
rubocop (1.88.2)
|
|
90
|
+
json (~> 2.3)
|
|
91
|
+
language_server-protocol (~> 3.17.0.2)
|
|
92
|
+
lint_roller (~> 1.1.0)
|
|
93
|
+
parallel (>= 1.10)
|
|
94
|
+
parser (>= 3.3.0.2)
|
|
63
95
|
rainbow (>= 2.2.2, < 4.0)
|
|
96
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
97
|
+
rubocop-ast (>= 1.49.0, < 2.0)
|
|
64
98
|
ruby-progressbar (~> 1.7)
|
|
65
|
-
unicode-display_width (>=
|
|
66
|
-
rubocop-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
99
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
100
|
+
rubocop-ast (1.50.0)
|
|
101
|
+
parser (>= 3.3.7.2)
|
|
102
|
+
prism (~> 1.7)
|
|
103
|
+
rubocop-performance (1.26.1)
|
|
104
|
+
lint_roller (~> 1.1)
|
|
105
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
106
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
|
107
|
+
rubocop-rspec (3.10.2)
|
|
108
|
+
lint_roller (~> 1.1)
|
|
109
|
+
regexp_parser (>= 2.0)
|
|
110
|
+
rubocop (~> 1.86, >= 1.86.2)
|
|
111
|
+
ruby-progressbar (1.13.0)
|
|
112
|
+
unicode-display_width (3.2.0)
|
|
113
|
+
unicode-emoji (~> 4.1)
|
|
114
|
+
unicode-emoji (4.2.0)
|
|
115
|
+
zeitwerk (2.8.2)
|
|
78
116
|
|
|
79
117
|
PLATFORMS
|
|
118
|
+
arm64-darwin-23
|
|
80
119
|
ruby
|
|
81
120
|
|
|
82
121
|
DEPENDENCIES
|
|
@@ -92,4 +131,4 @@ DEPENDENCIES
|
|
|
92
131
|
xaiml!
|
|
93
132
|
|
|
94
133
|
BUNDLED WITH
|
|
95
|
-
2.
|
|
134
|
+
2.6.9
|
data/README.md
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
# xAIML-ruby
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
xAIML is a parser library for xAIML written in Ruby.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Supported Ruby Versions
|
|
6
|
+
|
|
7
|
+
- Ruby >= 2.5, < 3.5
|
|
8
|
+
- Tested with Ruby 3.4.4
|
|
6
9
|
|
|
7
10
|
## Installation
|
|
8
11
|
|
|
@@ -14,7 +17,7 @@ gem 'xaiml'
|
|
|
14
17
|
|
|
15
18
|
And then execute:
|
|
16
19
|
|
|
17
|
-
$ bundle
|
|
20
|
+
$ bundle install
|
|
18
21
|
|
|
19
22
|
Or install it yourself as:
|
|
20
23
|
|
|
@@ -22,14 +25,23 @@ Or install it yourself as:
|
|
|
22
25
|
|
|
23
26
|
## Usage
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
```ruby
|
|
29
|
+
require 'xaiml'
|
|
30
|
+
# Add usage examples here as needed
|
|
31
|
+
```
|
|
26
32
|
|
|
27
33
|
## Development
|
|
28
34
|
|
|
29
|
-
|
|
35
|
+
1. Clone the repository
|
|
36
|
+
2. Install dependencies: `bin/setup`
|
|
37
|
+
3. Run tests: `bundle exec rspec`
|
|
38
|
+
4. Recommended to use Ruby 3.4.4 for development
|
|
39
|
+
|
|
40
|
+
## Release Procedure
|
|
30
41
|
|
|
31
|
-
|
|
42
|
+
1. Update the version number in `lib/xaiml/version.rb`
|
|
43
|
+
2. Run `bundle exec rake release` to release the gem
|
|
32
44
|
|
|
33
45
|
## Contributing
|
|
34
46
|
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub
|
|
47
|
+
Bug reports and pull requests are welcome on GitHub. See [CONTRIBUTING.md] for details.
|
data/lib/xaiml/document.rb
CHANGED
data/lib/xaiml/element/base.rb
CHANGED
|
@@ -5,6 +5,10 @@ module XAIML
|
|
|
5
5
|
class Base < XAIML::Document
|
|
6
6
|
attr_accessor :element
|
|
7
7
|
|
|
8
|
+
def self.allowed_object
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# rubocop:disable Lint/MissingSuper -- intentionally skips Document#initialize; elements build a standalone fragment, not a full @document tree
|
|
8
12
|
def initialize(attributes = {}, object = nil)
|
|
9
13
|
@element = Ox::Element.new(self.class.name.split("::").last.downcase)
|
|
10
14
|
attributes.each do |k, v|
|
|
@@ -12,13 +16,11 @@ module XAIML
|
|
|
12
16
|
end
|
|
13
17
|
append_child(object) if object
|
|
14
18
|
end
|
|
19
|
+
# rubocop:enable Lint/MissingSuper
|
|
15
20
|
|
|
16
21
|
def write
|
|
17
22
|
Ox.dump(@element)
|
|
18
23
|
end
|
|
19
|
-
|
|
20
|
-
def self.allowed_object
|
|
21
|
-
end
|
|
22
24
|
end
|
|
23
25
|
end
|
|
24
26
|
end
|
data/lib/xaiml/version.rb
CHANGED
data/xaiml.gemspec
CHANGED
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) {|f| File.basename(f) }
|
|
20
20
|
spec.require_paths = ["lib"]
|
|
21
21
|
|
|
22
|
-
spec.add_dependency "ox", "
|
|
22
|
+
spec.add_dependency "ox", ">= 2.10.0"
|
|
23
23
|
spec.add_development_dependency "bundler"
|
|
24
24
|
spec.add_development_dependency "pry"
|
|
25
25
|
spec.add_development_dependency "rake", "~> 13.0"
|
|
@@ -29,4 +29,5 @@ Gem::Specification.new do |spec|
|
|
|
29
29
|
spec.add_development_dependency "rubocop"
|
|
30
30
|
spec.add_development_dependency "rubocop-performance"
|
|
31
31
|
spec.add_development_dependency "rubocop-rspec"
|
|
32
|
+
spec.required_ruby_version = ">= 3.3"
|
|
32
33
|
end
|
metadata
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: xaiml
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- jagrament
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: ox
|
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
|
16
15
|
requirements:
|
|
17
|
-
- - "
|
|
16
|
+
- - ">="
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
18
|
version: 2.10.0
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
|
-
- - "
|
|
23
|
+
- - ">="
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
25
|
version: 2.10.0
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
@@ -159,6 +158,7 @@ extra_rdoc_files: []
|
|
|
159
158
|
files:
|
|
160
159
|
- ".circleci/config-2.0.yml"
|
|
161
160
|
- ".circleci/config.yml"
|
|
161
|
+
- ".github/workflows/ci.yml"
|
|
162
162
|
- ".gitignore"
|
|
163
163
|
- ".reek.yml"
|
|
164
164
|
- ".rspec"
|
|
@@ -167,6 +167,7 @@ files:
|
|
|
167
167
|
- ".rubocop.yml"
|
|
168
168
|
- ".ruby-version"
|
|
169
169
|
- ".travis.yml"
|
|
170
|
+
- CHANGELOG.md
|
|
170
171
|
- CODE_OF_CONDUCT.md
|
|
171
172
|
- Gemfile
|
|
172
173
|
- Gemfile.lock
|
|
@@ -189,7 +190,6 @@ files:
|
|
|
189
190
|
homepage: https://docs.xaiml.docomo-dialog.com/
|
|
190
191
|
licenses: []
|
|
191
192
|
metadata: {}
|
|
192
|
-
post_install_message:
|
|
193
193
|
rdoc_options: []
|
|
194
194
|
require_paths:
|
|
195
195
|
- lib
|
|
@@ -197,15 +197,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
197
197
|
requirements:
|
|
198
198
|
- - ">="
|
|
199
199
|
- !ruby/object:Gem::Version
|
|
200
|
-
version: '
|
|
200
|
+
version: '3.3'
|
|
201
201
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
202
202
|
requirements:
|
|
203
203
|
- - ">="
|
|
204
204
|
- !ruby/object:Gem::Version
|
|
205
205
|
version: '0'
|
|
206
206
|
requirements: []
|
|
207
|
-
rubygems_version: 3.
|
|
208
|
-
signing_key:
|
|
207
|
+
rubygems_version: 3.6.7
|
|
209
208
|
specification_version: 4
|
|
210
209
|
summary: xAIML parser library for ruby.
|
|
211
210
|
test_files: []
|