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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 531fbcbb84276e7741f3732bed7c34d920b396056af4a22c3fb72879a2ba1fcb
4
- data.tar.gz: 63317766f0301bbc8fc173f716ac2d1cb66202ced361dd33d38e6f8641b48f95
3
+ metadata.gz: 2da598e90963473fa45fed38528aff3d8ca439b04485bc377fec3a33925bbeca
4
+ data.tar.gz: 352ef28122931cb3e901af96f39873246c5dec55cf0610bbcbf0bdef9f81f489
5
5
  SHA512:
6
- metadata.gz: 516ec8a1856b5e4bee03165c627851aa131b15da4253dc4742e9804c2c1d6c7b571624e591bba776c5640c4c62fe78f2ee8e913715a7d5d40160346e2623a249
7
- data.tar.gz: 26c8c0f551b4c5933df7f411ff76cb4144877d4059b99fc37dc1fdc2fd2023e6ee1276842e097e186fe53540039e71f4edbd8f0dc8b1f45c70aa43fba441655d
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
@@ -1,5 +1,3 @@
1
- require: "rubocop-rspec"
2
-
3
1
  # 日本語だと「〜の場合」になるので suffix でないと対応できない
4
2
  RSpec/ContextWording:
5
3
  Enabled: false
data/.rubocop.ruby.yml CHANGED
@@ -148,7 +148,7 @@ Metrics/PerceivedComplexity:
148
148
  #################### Naming ################################
149
149
 
150
150
  # has_ から始まるメソッドは許可する
151
- Naming/PredicateName:
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
- require:
5
+ plugins:
6
6
  - rubocop-performance
7
7
  - rubocop-rspec
8
8
  AllCops:
9
- TargetRubyVersion: 2.6
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
- 2.6.3
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.1.5)
5
- ox (~> 2.10.0)
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.0)
11
- axiom-types (0.1.1)
12
- descendants_tracker (~> 0.0.4)
13
- ice_nine (~> 0.11.0)
14
- thread_safe (~> 0.3, >= 0.3.1)
15
- codeclimate-engine-rb (0.4.1)
16
- virtus (~> 1.0)
17
- coderay (1.1.2)
18
- coercible (1.0.0)
19
- descendants_tracker (~> 0.0.1)
20
- descendants_tracker (0.0.4)
21
- thread_safe (~> 0.3, >= 0.3.1)
22
- diff-lcs (1.3)
23
- equalizer (0.0.11)
24
- ice_nine (0.11.2)
25
- jaro_winkler (1.5.4)
26
- kwalify (0.7.2)
27
- method_source (0.9.2)
28
- ox (2.10.1)
29
- parallel (1.19.1)
30
- parser (2.6.5.0)
31
- ast (~> 2.4.0)
32
- pry (0.12.2)
33
- coderay (~> 1.1.0)
34
- method_source (~> 0.9.0)
35
- psych (3.1.0)
36
- rainbow (3.0.0)
37
- rake (13.0.1)
38
- reek (5.4.0)
39
- codeclimate-engine-rb (~> 0.4.0)
40
- kwalify (~> 0.7.0)
41
- parser (>= 2.5.0.0, < 2.7, != 2.5.1.1)
42
- psych (~> 3.1.0)
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
- rspec (3.8.0)
45
- rspec-core (~> 3.8.0)
46
- rspec-expectations (~> 3.8.0)
47
- rspec-mocks (~> 3.8.0)
48
- rspec-core (3.8.2)
49
- rspec-support (~> 3.8.0)
50
- rspec-expectations (3.8.4)
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.8.0)
53
- rspec-mocks (3.8.1)
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.8.0)
56
- rspec-support (3.8.2)
57
- rspec_junit_formatter (0.4.1)
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 (0.78.0)
60
- jaro_winkler (~> 1.5.1)
61
- parallel (~> 1.10)
62
- parser (>= 2.6)
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 (>= 1.4.0, < 1.7)
66
- rubocop-performance (1.5.1)
67
- rubocop (>= 0.71.0)
68
- rubocop-rspec (1.35.0)
69
- rubocop (>= 0.60.0)
70
- ruby-progressbar (1.10.1)
71
- thread_safe (0.3.6)
72
- unicode-display_width (1.6.1)
73
- virtus (1.0.5)
74
- axiom-types (~> 0.1)
75
- coercible (~> 1.0)
76
- descendants_tracker (~> 0.0, >= 0.0.3)
77
- equalizer (~> 0.0, >= 0.0.9)
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.1.4
134
+ 2.6.9
data/README.md CHANGED
@@ -1,8 +1,11 @@
1
1
  # xAIML-ruby
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/xaiml`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ xAIML is a parser library for xAIML written in Ruby.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
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
- TODO: Write usage instructions here
28
+ ```ruby
29
+ require 'xaiml'
30
+ # Add usage examples here as needed
31
+ ```
26
32
 
27
33
  ## Development
28
34
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
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
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
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 at https://github.com/[USERNAME]/aiml. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
47
+ Bug reports and pull requests are welcome on GitHub. See [CONTRIBUTING.md] for details.
@@ -2,8 +2,7 @@
2
2
 
3
3
  module XAIML
4
4
  class Document
5
- attr_accessor :document
6
- attr_accessor :element
5
+ attr_accessor :document, :element
7
6
 
8
7
  def self.allowed_object
9
8
  ["Element::Topic", "Element::Category"]
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module XAIML
4
- VERSION = "0.1.5"
4
+ VERSION = "0.2.0"
5
5
  end
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", "~> 2.10.0"
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.1.5
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: 2020-08-11 00:00:00.000000000 Z
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: '0'
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.0.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: []