expressir 1.3.0.pre.2-arm64-darwin → 1.3.0.pre.4-arm64-darwin

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: 1966c45355e75e0be23699138f9e064ef386bd6ab0b6e77295698c5de85f0b2c
4
- data.tar.gz: 1c66f73a2d0eb93c5ab66fd6b87d7dca852ff3acb428ac80a79d23cab60580b6
3
+ metadata.gz: fa3fc6d012478c0fdb11c75cd93895040e31befbe6a982a07b77ae8517926d61
4
+ data.tar.gz: e516316ab248b6d3d7e29b672e3dc95ffd848132fc4722bfe8242858533e9425
5
5
  SHA512:
6
- metadata.gz: 4869cc5e840d9c49047b76e659b60c92748e511bab772598dac96f2032cbf4222623e6c788421ee6dd0b8c47f1b9eededaf885efc6f55b8158bba319bf19dbaf
7
- data.tar.gz: 157ecd8b4ddb2d69c3473efefeeffd082ba4cf62cd6c6c00637cf959d4c576f2962546afe954c15cfedfb9972e08b0b0b9da432005e261d31bb28e243412ba62
6
+ metadata.gz: f52a8ba3ec4499735c604b735d99eac1fc8d968f5c5c9ab3fbf2a648c21b59b5b243104af6c315578798c90912a4740561161d4624cda39ad23fa6517f8dbaf5
7
+ data.tar.gz: a016c9e365cce7a9019eb5947cf3263faae15ef31cccb5e7ed4c9bc5dd187cf7eb4fea09bb4e85c629883b21c1c0429a4846e2e1a6f76e9ee65ab9e734b821a5
@@ -7,7 +7,6 @@ on:
7
7
  - 'docs/**'
8
8
  - '**.adoc'
9
9
  - '**.md'
10
- - .github/workflows/alpine.yml
11
10
  - .github/workflows/release.yml
12
11
  pull_request:
13
12
  workflow_dispatch:
@@ -69,7 +68,13 @@ jobs:
69
68
  with:
70
69
  ruby-version: ${{ matrix.ruby }}
71
70
  bundler: ${{ env.BUNDLER_VER }}
72
- bundler-cache: true
71
+ # Rice gem has issues with bundler cache
72
+ # more info https://github.com/lutaml/expressir/runs/2097658383?check_suite_focus=true#step:7:2126
73
+ # but it is not the only issue
74
+ bundler-cache: false
75
+
76
+ - name: Bundle
77
+ run: bundle install --jobs 4 --retry 3
73
78
 
74
79
  - name: Process cache
75
80
  uses: actions/cache@v3
@@ -99,10 +104,9 @@ jobs:
99
104
  - name: Setup Ruby
100
105
  uses: ruby/setup-ruby@master
101
106
  with:
102
- ruby-version: '3.0'
103
- # bundler-cache: true important to not use cache because it leads to "cannot find -lrice"
104
- # more info https://github.com/lutaml/expressir/runs/2097658383?check_suite_focus=true#step:7:2126
107
+ ruby-version: '3.1'
105
108
  bundler: ${{ env.BUNDLER_VER }}
109
+ bundler-cache: false
106
110
 
107
111
  - name: Bundle
108
112
  run: bundle install --jobs 4 --retry 3
@@ -131,9 +135,8 @@ jobs:
131
135
  - name: Setup Ruby
132
136
  uses: ruby/setup-ruby@master
133
137
  with:
134
- ruby-version: '3.0'
135
- # bundler-cache: true important to not use cache because it leads to "cannot find -lrice"
136
- # more info https://github.com/lutaml/expressir/runs/2097658383?check_suite_focus=true#step:7:2126
138
+ ruby-version: '3.1'
139
+ bundler-cache: false
137
140
  bundler: ${{ env.BUNDLER_VER }}
138
141
 
139
142
  - name: Bundle
@@ -150,19 +150,15 @@ jobs:
150
150
  uses: actions/download-artifact@v3
151
151
  with:
152
152
  name: version
153
- path: version
154
153
 
155
154
  - name: Install gem
156
155
  run: gem install expressir -v $(cat version)
157
156
 
158
157
  - name: Verify
159
- run: |
160
- cd $(ruby -e "puts RbConfig::TOPDIR + '\/lib\/ruby\/gems\/' + RbConfig::CONFIG['ruby_version'] + '\/gems\/expressir*'")
161
- ruby bin/rspec
162
- cat .rspec_status || echo ".rspec_status was not found"
158
+ run: expressir version
163
159
 
164
160
  verify-alpine:
165
- name: Verify published gem on Alpine
161
+ name: Verify published gem on alpine
166
162
  needs: publish
167
163
  runs-on: ubuntu-latest
168
164
  container:
@@ -175,13 +171,9 @@ jobs:
175
171
  uses: actions/download-artifact@v3
176
172
  with:
177
173
  name: version
178
- path: version
179
174
 
180
175
  - name: Install gem
181
176
  run: gem install expressir -v $(cat version)
182
177
 
183
178
  - name: Verify
184
- run: |
185
- cd $(ruby -e "puts RbConfig::TOPDIR + '\/lib\/ruby\/gems\/' + RbConfig::CONFIG['ruby_version'] + '\/gems\/expressir*'")
186
- ruby bin/rspec
187
- cat .rspec_status || echo ".rspec_status was not found"
179
+ run: expressir version
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require "yard"
6
6
 
7
7
  RSpec::Core::RakeTask.new(:spec)
8
8
 
9
- task default: %i[compile spec]
9
+ task default: :spec
10
10
 
11
11
  GEMSPEC = Gem::Specification.load("expressir.gemspec")
12
12
 
@@ -1,4 +1,9 @@
1
- require_relative 'extension'
1
+ begin
2
+ RUBY_VERSION =~ /(\d+\.\d+)/
3
+ require_relative "#{$1}/express_parser"
4
+ rescue LoadError
5
+ require_relative "express_parser"
6
+ end
2
7
  require 'expressir/express/visitor'
3
8
  require 'expressir/express/resolve_references_model_visitor'
4
9
 
@@ -1,4 +1,9 @@
1
- require_relative 'extension'
1
+ begin
2
+ RUBY_VERSION =~ /(\d+\.\d+)/
3
+ require_relative "#{$1}/express_parser"
4
+ rescue LoadError
5
+ require_relative "express_parser"
6
+ end
2
7
  require "expressir/model"
3
8
  require "set"
4
9
 
@@ -26,6 +31,8 @@ require "set"
26
31
  # - prevents segfault in ANTLR4 C++ runtime, not sure why they are caused
27
32
  # - e.g. see visit_schema_decl
28
33
 
34
+ require 'objspace'
35
+
29
36
  module Expressir
30
37
  module Express
31
38
  class Visitor < ::ExpressParser::Visitor
@@ -1,3 +1,3 @@
1
1
  module Expressir
2
- VERSION = "1.3.0.pre.2".freeze
2
+ VERSION = "1.3.0.pre.4".freeze
3
3
  end
@@ -335,15 +335,16 @@ def pre_req(plat)
335
335
  end
336
336
 
337
337
  namespace "gem" do
338
- CROSS_RUBIES.find_all { |cr| cr.windows? || cr.linux_gnu? || cr.darwin? }.map { |cr| { platform: cr.platform, tag: cr.tag } }
338
+ CROSS_RUBIES.find_all { |cr| cr.windows? || cr.linux_gnu? || cr.darwin? }
339
+ .map { |cr| { platform: cr.platform, tag: cr.tag } }
339
340
  .uniq { |hash| hash[:platform] }.each do |hash|
340
341
  plat = hash[:platform]
341
342
  tag = hash[:tag]
343
+
342
344
  desc "build native gem for #{plat} platform"
343
345
  task plat do
344
346
  RakeCompilerDock.sh <<~RCD, platform: tag
345
- #{pre_req(plat)} &&
346
- gem install bundler --no-document &&
347
+ #{pre_req(plat)} && gem install bundler --no-document &&
347
348
  bundle && bundle exec rake gem:#{plat}:builder MAKE="nice make -j`nproc`"
348
349
  RCD
349
350
  end
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.3.0.pre.2
4
+ version: 1.3.0.pre.4
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-13 00:00:00.000000000 Z
11
+ date: 2023-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -245,7 +245,6 @@ files:
245
245
  - lib/expressir/express/3.1/express_parser.bundle
246
246
  - lib/expressir/express/3.2/express_parser.bundle
247
247
  - lib/expressir/express/cache.rb
248
- - lib/expressir/express/extension.rb
249
248
  - lib/expressir/express/formatter.rb
250
249
  - lib/expressir/express/hyperlink_formatter.rb
251
250
  - lib/expressir/express/model_visitor.rb
@@ -1,30 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- begin
4
- # native precompiled gems package shared libraries in <gem_dir>/lib/nokogiri/<ruby_version>
5
- ::RUBY_VERSION =~ /(\d+\.\d+)/
6
- require_relative "#{Regexp.last_match(1)}/express_parser"
7
- rescue LoadError => e
8
- # if /musl/.match?(RUBY_PLATFORM)
9
- # warn(<<~EOM)
10
- #
11
- # ERROR: It looks like you're trying to use Expressir as a precompiled native gem on a musl system.
12
- #
13
- # #{e.message}
14
- #
15
- # If that's the case, then please install Expressir via the `ruby` platform gem:
16
- # gem install expressir --platform=ruby
17
- # or:
18
- # bundle config set force_ruby_platform true
19
- #
20
- #
21
- # EOM
22
- # raise e
23
- # end
24
-
25
- # use "require" instead of "require_relative" because non-native gems will place C extension files
26
- # in Gem::BasicSpecification#extension_dir after compilation (during normal installation), which
27
- # is in $LOAD_PATH but not necessarily relative to this file
28
- require "expressir/express/express_parser"
29
- end
30
-