expressir 1.2.9-x64-mingw-ucrt → 1.2.11-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ffecf3ba606ff3b1f35ac6e3ea317651d6b0c3add6743fc4e666012971a5c82
4
- data.tar.gz: c19ef7f7374a7df4655bcd07d4d493c3c7893c14f56e07d63ab94adcee649f32
3
+ metadata.gz: 7aeb8fd5f39a9868736412c81cb81870925782a8a9e9e6306e8e22b6b040845f
4
+ data.tar.gz: fa10bcc2d54185a8d0b65d7f2fd8cd7afd2091ed02ee4c8ceabebcb35250d8bc
5
5
  SHA512:
6
- metadata.gz: 14e530eab9ebb8a3ac1a8730e2d0e71585bc7c8fc726f039c7caf2e8de3f90e17c7c2557dcf5af763675f7faaa82a8e8ea7d5b7012c7eb7afa45b0bdb91188c6
7
- data.tar.gz: a388581e9a25e18ea986eacecc25fef7f08e09fd37ff6a0d1d64a947e074100c43fcbd696d8e4293fc372c2da15d2f11c5c8c000176f1e8701985e37216631f7
6
+ metadata.gz: f153d875a3425908ecd687b4bdced7848c830df1929a06289e6b0228ef0987b6139f5f5bd901983ffe2d204eb6322c79679c92f0904ef33923af2525d91fa212
7
+ data.tar.gz: c2291ad1ad391e78d96266681c1ae652f2eba912352cd69f132458743fc5ed415fd5774ad61c2b8d53219d8e1043b26af0d6386a30dee35b9118ecc83d58ab09
data/.cross_rubies CHANGED
@@ -1,3 +1,8 @@
1
+ 3.2.0:x86_64-w64-mingw32
2
+ 3.2.0:x86_64-linux-gnu
3
+ 3.2.0:aarch64-linux-gnu
4
+ 3.2.0:x86_64-darwin
5
+ 3.2.0:arm64-darwin
1
6
  3.1.0:x86_64-w64-mingw32
2
7
  3.1.0:x86_64-linux-gnu
3
8
  3.1.0:aarch64-linux-gnu
@@ -10,7 +10,7 @@ concurrency:
10
10
  cancel-in-progress: true
11
11
 
12
12
  env:
13
- BUNDLER_VER: 2.3.24
13
+ BUNDLER_VER: 2.4.22
14
14
  # Forcing bundler version to ensure that it is consistent everywhere and
15
15
  # does not cause bundler gem reinstalls
16
16
  # bundler/rubygems 2.3.22 is a minimal requirement to support gnu/musl differentiation
@@ -21,14 +21,14 @@ jobs:
21
21
  runs-on: ubuntu-latest
22
22
  steps:
23
23
  - name: Checkout
24
- uses: actions/checkout@v3
24
+ uses: actions/checkout@v4
25
25
  with:
26
26
  submodules: recursive
27
27
 
28
28
  - name: Install Ruby
29
29
  uses: ruby/setup-ruby@master
30
30
  with:
31
- ruby-version: 3.0
31
+ ruby-version: 3.1
32
32
  bundler: ${{ env.BUNDLER_VER }}
33
33
  bundler-cache: true
34
34
 
@@ -44,12 +44,12 @@ jobs:
44
44
  strategy:
45
45
  fail-fast: false
46
46
  matrix:
47
- ruby: [ '3.1', '3.0', '2.7' ]
47
+ ruby: [ '3.2', '3.1', '3.0', '2.7' ]
48
48
  os: [ ubuntu-latest, windows-latest, macos-latest ]
49
49
 
50
50
  steps:
51
51
  - name: Checkout
52
- uses: actions/checkout@v3
52
+ uses: actions/checkout@v4
53
53
  with:
54
54
  submodules: recursive
55
55
 
@@ -69,7 +69,7 @@ jobs:
69
69
  id: cache
70
70
  with:
71
71
  path: lib/expressir/express/express_parser.*
72
- key: v4-${{ runner.os }}-${{ matrix.ruby }}-${{ hashFiles('ext/express-parser/extconf.rb', 'ext/express-parser/antlrgen/**', 'ext/express-parser/express_parser.cpp', '.git/modules/ext/express-parser/antlr4-upstream/HEAD') }}
72
+ key: v4-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('ext/express-parser/extconf.rb', 'ext/express-parser/antlrgen/**', 'ext/express-parser/express_parser.cpp', '.git/modules/ext/express-parser/antlr4-upstream/HEAD') }}
73
73
 
74
74
  - name: Build native extension
75
75
  if: steps.cache.outputs.cache-hit != 'true'
@@ -85,7 +85,7 @@ jobs:
85
85
  runs-on: ubuntu-latest
86
86
  steps:
87
87
  - name: Checkout
88
- uses: actions/checkout@v3
88
+ uses: actions/checkout@v4
89
89
  with:
90
90
  submodules: recursive
91
91
 
@@ -117,7 +117,7 @@ jobs:
117
117
  host: [ linux, windows, darwin ]
118
118
  steps:
119
119
  - name: Checkout
120
- uses: actions/checkout@v3
120
+ uses: actions/checkout@v4
121
121
  with:
122
122
  submodules: recursive
123
123
 
@@ -156,7 +156,7 @@ jobs:
156
156
  strategy:
157
157
  fail-fast: false
158
158
  matrix:
159
- ruby: [ '3.1', '3.0', '2.7' ]
159
+ ruby: [ '3.2', '3.1', '3.0', '2.7' ]
160
160
  os: [ ubuntu-latest, windows-latest, macos-latest ]
161
161
  steps:
162
162
  - name: Install Ruby
@@ -167,7 +167,7 @@ jobs:
167
167
  bundler: ${{ env.BUNDLER_VER }}
168
168
 
169
169
  - name: Checkout
170
- uses: actions/checkout@v3
170
+ uses: actions/checkout@v4
171
171
  with:
172
172
  submodules: recursive
173
173
 
@@ -196,7 +196,7 @@ jobs:
196
196
  strategy:
197
197
  fail-fast: false
198
198
  matrix:
199
- ruby: [ '3.1', '3.0', '2.7' ]
199
+ ruby: [ '3.2', '3.1', '3.0', '2.7' ]
200
200
  steps:
201
201
  - name: Install Ruby
202
202
  uses: ruby/setup-ruby@master
@@ -206,7 +206,7 @@ jobs:
206
206
  bundler: ${{ env.BUNDLER_VER }}
207
207
 
208
208
  - name: Checkout
209
- uses: actions/checkout@v3
209
+ uses: actions/checkout@v4
210
210
 
211
211
  - name: Bundle
212
212
  run: bundle install --jobs 4 --retry 3
@@ -234,7 +234,7 @@ jobs:
234
234
  strategy:
235
235
  fail-fast: false
236
236
  matrix:
237
- ruby: [ '3.1', '3.0', '2.7' ]
237
+ ruby: [ '3.2', '3.1', '3.0', '2.7' ]
238
238
  steps:
239
239
  - name: Install Ruby
240
240
  uses: ruby/setup-ruby@master
@@ -244,7 +244,7 @@ jobs:
244
244
  bundler: ${{ env.BUNDLER_VER }}
245
245
 
246
246
  - name: Checkout
247
- uses: actions/checkout@v3
247
+ uses: actions/checkout@v4
248
248
 
249
249
  - name: Bundle
250
250
  run: bundle install --jobs 4 --retry 3
@@ -274,7 +274,7 @@ jobs:
274
274
  # Ruby 3.1 fails
275
275
  # https://github.com/lutaml/expressir/issues/103
276
276
  matrix:
277
- ruby: [ '3.1', '3.0', '2.7' ]
277
+ ruby: [ '3.2', '3.1', '3.0', '2.7' ]
278
278
  steps:
279
279
  - name: Install Ruby
280
280
  uses: ruby/setup-ruby@master
@@ -284,7 +284,7 @@ jobs:
284
284
  bundler: ${{ env.BUNDLER_VER }}
285
285
 
286
286
  - name: Checkout
287
- uses: actions/checkout@v3
287
+ uses: actions/checkout@v4
288
288
 
289
289
  - name: Bundle
290
290
  run: bundle install --jobs 4 --retry 3
data/expressir.gemspec CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
30
30
 
31
31
  spec.extensions = File.join(*%w(ext express-parser extconf.rb))
32
32
 
33
- spec.add_runtime_dependency "rice", "~> 4.0.3"
33
+ spec.add_runtime_dependency "rice", "~> 4.1"
34
34
  spec.add_runtime_dependency "thor", "~> 1.0"
35
35
  spec.add_development_dependency "antlr4-native", "~> 2.1.0"
36
36
  spec.add_development_dependency "asciidoctor", "~> 2.0.13"
@@ -39,7 +39,7 @@ Gem::Specification.new do |spec|
39
39
  spec.add_development_dependency "pry", "~> 0.12.2"
40
40
  spec.add_development_dependency "rake", "~> 13.0"
41
41
  spec.add_development_dependency "rake-compiler", "~> 1.2"
42
- spec.add_development_dependency "rake-compiler-dock", "~> 1.2.1"
42
+ spec.add_development_dependency "rake-compiler-dock", "~> 1.3"
43
43
  spec.add_development_dependency "rspec", "~> 3.11"
44
44
  spec.add_development_dependency "rubocop", "1.58"
45
45
  spec.add_development_dependency "rubocop-performance", "~> 1.19"
@@ -31,11 +31,12 @@ module Expressir
31
31
  # @param [Boolean] include_source attach original source code to model elements
32
32
  # @return [Model::Repository]
33
33
  def self.from_file(file, skip_references: nil, include_source: nil)
34
+ raise Errno::ENOENT, "File not found: #{file}" unless File.exist?(file)
34
35
 
35
36
  # An important note re memory management
36
37
  # parse, syntax, visitor methods return complex tree structures created in native (C++) extension
37
38
  # visit method references nodes and leaves of this structures but it is totally untransparent for Ruby GarbageCllector
38
- # so in this class we keep those C++ structure marked for GC so they are not freed
39
+ # so in this class we keep those C++ structure marked for GC so they are not freed
39
40
  @parser = ::ExpressParser::ParserExt.new(file.to_s)
40
41
  @parse_tree = @parser.syntax()
41
42
 
@@ -1,3 +1,3 @@
1
1
  module Expressir
2
- VERSION = "1.2.9".freeze
2
+ VERSION = "1.2.11".freeze
3
3
  end
data/lib/expressir.rb CHANGED
@@ -3,6 +3,10 @@ require "expressir/version"
3
3
  require "expressir/cli"
4
4
  require "expressir/config"
5
5
 
6
+ Dir[File.join(__dir__, "expressir", "express", "*.rb")].sort.each do |fea|
7
+ require fea
8
+ end
9
+
6
10
  module Expressir
7
11
  class Error < StandardError; end
8
12
 
@@ -48,7 +48,7 @@ def create_pp_class_definition(parser_source_lines)
48
48
 
49
49
  class ParserProxyExt : public Object {
50
50
  public:
51
- ParserProxyExt(Object self, string file) {
51
+ ParserProxyExt(string file) {
52
52
  ifstream stream;
53
53
  stream.open(file);
54
54
  input = new ANTLRInputStream(stream);
@@ -115,7 +115,7 @@ def create_class_api(parser_source_lines)
115
115
  .define_method("token_index", &TokenProxy::getTokenIndex);
116
116
 
117
117
  rb_cParserExt = define_class_under<ParserProxyExt>(rb_mExpressParser, "ParserExt")
118
- .define_constructor(Constructor<ParserProxyExt, Object, string>())
118
+ .define_constructor(Constructor<ParserProxyExt, string>())
119
119
  .define_method("syntax", &ParserProxyExt::syntax, Return().keepAlive())
120
120
  .define_method("tokens", &ParserProxyExt::getTokens)
121
121
  .define_method("visit", &ParserProxyExt::visit, Return().keepAlive());
@@ -166,7 +166,7 @@ CrossRuby = Struct.new(:version, :host) do
166
166
  "api-ms-win-crt-filesystem-l1-1-0.dll",
167
167
  "api-ms-win-crt-math-l1-1-0.dll",
168
168
  "libwinpthread-1.dll",
169
- "x64-ucrt-ruby310.dll"]
169
+ "x64-ucrt-ruby#{api_ver_suffix}.dll"]
170
170
  end
171
171
  # rubocop:enable Metrics/MethodLength
172
172
 
@@ -195,6 +195,7 @@ CrossRuby = Struct.new(:version, :host) do
195
195
  "libm.so",
196
196
  "libstdc++.so",
197
197
  "libgcc_s.so",
198
+ "libpthread.so",
198
199
  ]
199
200
  end
200
201
 
@@ -33,6 +33,13 @@ RSpec.describe Expressir::Express::Cache do
33
33
  end
34
34
 
35
35
  describe ".from_file" do
36
+ it "throws an exception if the cache file does not exist" do |example|
37
+ print "\n[#{example.description}] "
38
+ expect do
39
+ Expressir::Express::Cache.from_file("non-existing-file", test_overwrite_version: TEST_VERSION)
40
+ end.to raise_error(Errno::ENOENT)
41
+ end
42
+
36
43
  it "parses a file" do |example|
37
44
  print "\n[#{example.description}] "
38
45
  temp_file = Tempfile.new
@@ -4,6 +4,13 @@ require "expressir/express/parser"
4
4
 
5
5
  RSpec.describe Expressir::Express::Parser do
6
6
  describe ".from_file" do
7
+ it "throws an exception if the file to parse does not exist" do |example|
8
+ print "\n[#{example.description}] "
9
+ expect do
10
+ Expressir::Express::Parser.from_file("non-existing-file")
11
+ end.to raise_error(Errno::ENOENT)
12
+ end
13
+
7
14
  it "parses a file (single.exp)" do |example|
8
15
  print "\n[#{example.description}] "
9
16
  exp_file = Expressir.root_path.join("spec", "syntax", "single.exp")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: expressir
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.9
4
+ version: 1.2.11
5
5
  platform: x64-mingw-ucrt
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-09 00:00:00.000000000 Z
11
+ date: 2023-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 1.2.1
131
+ version: '1.3'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 1.2.1
138
+ version: '1.3'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rspec
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -241,6 +241,7 @@ files:
241
241
  - lib/expressir/cli/ui.rb
242
242
  - lib/expressir/config.rb
243
243
  - lib/expressir/express/3.1/express_parser.so
244
+ - lib/expressir/express/3.2/express_parser.so
244
245
  - lib/expressir/express/cache.rb
245
246
  - lib/expressir/express/formatter.rb
246
247
  - lib/expressir/express/hyperlink_formatter.rb
@@ -362,7 +363,7 @@ metadata:
362
363
  homepage_uri: https://github.com/lutaml/expressir
363
364
  source_code_uri: https://github.com/lutaml/expressir
364
365
  changelog_uri: https://github.com/lutaml/expressir/releases
365
- post_install_message:
366
+ post_install_message:
366
367
  rdoc_options: []
367
368
  require_paths:
368
369
  - lib
@@ -373,15 +374,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
373
374
  version: '3.1'
374
375
  - - "<"
375
376
  - !ruby/object:Gem::Version
376
- version: 3.2.dev
377
+ version: 3.3.dev
377
378
  required_rubygems_version: !ruby/object:Gem::Requirement
378
379
  requirements:
379
380
  - - ">="
380
381
  - !ruby/object:Gem::Version
381
382
  version: '0'
382
383
  requirements: []
383
- rubygems_version: 3.3.4
384
- signing_key:
384
+ rubygems_version: 3.3.26
385
+ signing_key:
385
386
  specification_version: 4
386
387
  summary: ISO EXPRESS parser and tools in Ruby.
387
388
  test_files: []