expressir 1.2.11 → 1.3.0.pre.2
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/rake.yml +15 -10
- data/.github/workflows/release.yml +74 -12
- data/Rakefile +1 -1
- data/expressir.gemspec +1 -1
- data/ext/express-parser/antlrgen/ExpressLexer.cpp +1 -0
- data/ext/express-parser/extconf.rb +2 -0
- data/lib/expressir/express/extension.rb +30 -0
- data/lib/expressir/express/parser.rb +1 -6
- data/lib/expressir/express/visitor.rb +1 -8
- data/lib/expressir/version.rb +1 -1
- data/rakelib/cross-ruby.rake +36 -21
- metadata +6 -5
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 5085ab1404256459d6563172f11a8a60d4ec9a806a17e0d2ddde89c38fa34c35
         | 
| 4 | 
            +
              data.tar.gz: 9453e11c12706e6723794193b10d54b2e0539ab72570b8aa0ff15c7de81594e2
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 8c6756552aebff926d2bc1974f1a6ab3556972cece14bc3d31893a1619fc21d2e0aeae1bfb621f7c81c2080aa9ae8fd3d42022d33a671f480121fbe544d47066
         | 
| 7 | 
            +
              data.tar.gz: fbdbc405c508e247301045c507c518afaf4b985e789092ff88d06a5fe3a70da5e5ebed78a1f8aa7da4f0dbb296ceda6ee6b5212034c428252c5ad7995f8dfa45
         | 
    
        data/.github/workflows/rake.yml
    CHANGED
    
    | @@ -2,8 +2,15 @@ name: rake | |
| 2 2 |  | 
| 3 3 | 
             
            on:
         | 
| 4 4 | 
             
              push:
         | 
| 5 | 
            -
                branches: [  | 
| 5 | 
            +
                branches: [ main ]
         | 
| 6 | 
            +
                paths-ignore:
         | 
| 7 | 
            +
                  - 'docs/**'
         | 
| 8 | 
            +
                  - '**.adoc'
         | 
| 9 | 
            +
                  - '**.md'
         | 
| 10 | 
            +
                  - .github/workflows/alpine.yml
         | 
| 11 | 
            +
                  - .github/workflows/release.yml
         | 
| 6 12 | 
             
              pull_request:
         | 
| 13 | 
            +
              workflow_dispatch:
         | 
| 7 14 |  | 
| 8 15 | 
             
            concurrency:
         | 
| 9 16 | 
             
              group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}'
         | 
| @@ -114,7 +121,7 @@ jobs: | |
| 114 121 | 
             
                strategy:
         | 
| 115 122 | 
             
                  fail-fast: false
         | 
| 116 123 | 
             
                  matrix:
         | 
| 117 | 
            -
                     | 
| 124 | 
            +
                    platform: [ linux-gnu, windows, darwin ]
         | 
| 118 125 | 
             
                steps:
         | 
| 119 126 | 
             
                  - name: Checkout
         | 
| 120 127 | 
             
                    uses: actions/checkout@v4
         | 
| @@ -141,12 +148,12 @@ jobs: | |
| 141 148 | 
             
                      sudo swapon --all --verbose
         | 
| 142 149 |  | 
| 143 150 | 
             
                  - name: Build gem with native extension
         | 
| 144 | 
            -
                    run: bundle exec rake gem:${{ matrix. | 
| 151 | 
            +
                    run: bundle exec rake gem:${{ matrix.platform }}
         | 
| 145 152 |  | 
| 146 153 | 
             
                  - name: Package gem with native extension
         | 
| 147 154 | 
             
                    uses: actions/upload-artifact@v3
         | 
| 148 155 | 
             
                    with:
         | 
| 149 | 
            -
                      name: pkg-${{ matrix. | 
| 156 | 
            +
                      name: pkg-${{ matrix.platform }}
         | 
| 150 157 | 
             
                      path: pkg/*.gem
         | 
| 151 158 |  | 
| 152 159 | 
             
              verify-ruby:
         | 
| @@ -227,8 +234,8 @@ jobs: | |
| 227 234 | 
             
                      ruby bin/rspec
         | 
| 228 235 | 
             
                      cat .rspec_status || echo ".rspec_status was not found"
         | 
| 229 236 |  | 
| 230 | 
            -
              verify-linux:
         | 
| 231 | 
            -
                name: verify Linux binary gem on ruby-${{ matrix.ruby }}
         | 
| 237 | 
            +
              verify-linux-gnu:
         | 
| 238 | 
            +
                name: verify Linux (gnu) binary gem on ruby-${{ matrix.ruby }}
         | 
| 232 239 | 
             
                needs: pack
         | 
| 233 240 | 
             
                runs-on: ubuntu-latest
         | 
| 234 241 | 
             
                strategy:
         | 
| @@ -252,11 +259,11 @@ jobs: | |
| 252 259 | 
             
                  - name: Download packaged gem
         | 
| 253 260 | 
             
                    uses: actions/download-artifact@v3
         | 
| 254 261 | 
             
                    with:
         | 
| 255 | 
            -
                     name: pkg-linux
         | 
| 262 | 
            +
                     name: pkg-linux-gnu
         | 
| 256 263 | 
             
                     path: pkg
         | 
| 257 264 |  | 
| 258 265 | 
             
                  - name: Install binary gem
         | 
| 259 | 
            -
                    run: gem install -l pkg/expressir-*-$(ruby -e "puts RUBY_PLATFORM").gem
         | 
| 266 | 
            +
                    run: gem install -l pkg/expressir-*-$(ruby -e "puts RUBY_PLATFORM")-gnu.gem
         | 
| 260 267 |  | 
| 261 268 | 
             
                  - name: Verify
         | 
| 262 269 | 
             
                    run: |
         | 
| @@ -271,8 +278,6 @@ jobs: | |
| 271 278 | 
             
                runs-on: windows-latest
         | 
| 272 279 | 
             
                strategy:
         | 
| 273 280 | 
             
                  fail-fast: false
         | 
| 274 | 
            -
            # Ruby 3.1 fails
         | 
| 275 | 
            -
            # https://github.com/lutaml/expressir/issues/103
         | 
| 276 281 | 
             
                  matrix:
         | 
| 277 282 | 
             
                    ruby: [ '3.2', '3.1', '3.0', '2.7' ]
         | 
| 278 283 | 
             
                steps:
         | 
| @@ -30,8 +30,8 @@ jobs: | |
| 30 30 |  | 
| 31 31 | 
             
                  - if: ${{ github.event_name == 'workflow_dispatch' }} # unfortunatelly cannot keep this condition on job level
         | 
| 32 32 | 
             
                    run: |
         | 
| 33 | 
            -
                      git config user.name github-actions
         | 
| 34 | 
            -
                      git config user.email github-actions@github.com
         | 
| 33 | 
            +
                      git config --global user.name github-actions
         | 
| 34 | 
            +
                      git config --global user.email github-actions@github.com
         | 
| 35 35 | 
             
                      gem install gem-release
         | 
| 36 36 | 
             
                      gem bump --version ${{ github.event.inputs.next_version }} --tag --push
         | 
| 37 37 |  | 
| @@ -41,12 +41,11 @@ jobs: | |
| 41 41 | 
             
                strategy:
         | 
| 42 42 | 
             
                  fail-fast: false
         | 
| 43 43 | 
             
                  matrix:
         | 
| 44 | 
            -
                     | 
| 44 | 
            +
                    platform: [ linux-gnu, windows, darwin ]
         | 
| 45 45 | 
             
                steps:
         | 
| 46 46 | 
             
                  - uses: actions/checkout@v4
         | 
| 47 47 | 
             
                    with:
         | 
| 48 48 | 
             
                      submodules: recursive
         | 
| 49 | 
            -
                      ref: main # https://github.com/actions/checkout/issues/439#issuecomment-830862188
         | 
| 50 49 |  | 
| 51 50 | 
             
                  - uses: ruby/setup-ruby@master
         | 
| 52 51 | 
             
                    with:
         | 
| @@ -56,15 +55,23 @@ jobs: | |
| 56 55 |  | 
| 57 56 | 
             
                  - run: bundle install --jobs 4 --retry 3
         | 
| 58 57 |  | 
| 59 | 
            -
                   | 
| 60 | 
            -
             | 
| 58 | 
            +
                  - name: Build gem and save version
         | 
| 59 | 
            +
                    if: matrix.platform == 'linux-gnu'
         | 
| 60 | 
            +
                    run: |
         | 
| 61 | 
            +
                      gem build expressir.gemspec | grep -o 'Version: .*' | awk '{print $2}' > version
         | 
| 61 62 |  | 
| 62 | 
            -
                  - if: matrix. | 
| 63 | 
            +
                  - if: matrix.platform == 'linux-gnu'
         | 
| 63 64 | 
             
                    uses: actions/upload-artifact@v3
         | 
| 64 65 | 
             
                    with:
         | 
| 65 66 | 
             
                      name: pkg-ruby
         | 
| 66 67 | 
             
                      path: expressir-*.gem
         | 
| 67 68 |  | 
| 69 | 
            +
                  - if: matrix.platform == 'linux-gnu'
         | 
| 70 | 
            +
                    uses: actions/upload-artifact@v3
         | 
| 71 | 
            +
                    with:
         | 
| 72 | 
            +
                      name: version
         | 
| 73 | 
            +
                      path: version
         | 
| 74 | 
            +
             | 
| 68 75 | 
             
                  - name: Enable swap
         | 
| 69 76 | 
             
                    run: |
         | 
| 70 77 | 
             
                      sudo fallocate -l 15g /compile.swap
         | 
| @@ -74,11 +81,11 @@ jobs: | |
| 74 81 | 
             
                      sudo swapon --all --verbose
         | 
| 75 82 |  | 
| 76 83 | 
             
                  # build gem WITH pre-built native extension
         | 
| 77 | 
            -
                  - run: bundle exec rake gem:${{ matrix. | 
| 84 | 
            +
                  - run: bundle exec rake gem:${{ matrix.platform }}
         | 
| 78 85 |  | 
| 79 86 | 
             
                  - uses: actions/upload-artifact@v3
         | 
| 80 87 | 
             
                    with:
         | 
| 81 | 
            -
                      name: pkg-${{ matrix. | 
| 88 | 
            +
                      name: pkg-${{ matrix.platform }}
         | 
| 82 89 | 
             
                      path: pkg/*.gem
         | 
| 83 90 |  | 
| 84 91 | 
             
              publish:
         | 
| @@ -92,7 +99,7 @@ jobs: | |
| 92 99 |  | 
| 93 100 | 
             
                  - uses: actions/download-artifact@v3
         | 
| 94 101 | 
             
                    with:
         | 
| 95 | 
            -
                      name: pkg-linux
         | 
| 102 | 
            +
                      name: pkg-linux-gnu
         | 
| 96 103 | 
             
                      path: pkg
         | 
| 97 104 |  | 
| 98 105 | 
             
                  - uses: actions/download-artifact@v3
         | 
| @@ -109,12 +116,11 @@ jobs: | |
| 109 116 | 
             
                    with:
         | 
| 110 117 | 
             
                      ruby-version: '3.1'
         | 
| 111 118 |  | 
| 112 | 
            -
                  - run: ls -l pkg/
         | 
| 113 | 
            -
             | 
| 114 119 | 
             
                  - name: Publish to rubygems.org
         | 
| 115 120 | 
             
                    env:
         | 
| 116 121 | 
             
                      RUBYGEMS_API_KEY: ${{ secrets.LUTAML_CI_RUBYGEMS_API_KEY }}
         | 
| 117 122 | 
             
                    run: |
         | 
| 123 | 
            +
                      ls -l pkg/
         | 
| 118 124 | 
             
                      mkdir -p ~/.gem
         | 
| 119 125 | 
             
                      cat > ~/.gem/credentials << EOF
         | 
| 120 126 | 
             
                      ---
         | 
| @@ -123,3 +129,59 @@ jobs: | |
| 123 129 | 
             
                      chmod 0600 ~/.gem/credentials
         | 
| 124 130 | 
             
                      gem signin
         | 
| 125 131 | 
             
                      for gem in pkg/*.gem; do gem push $gem -V; done
         | 
| 132 | 
            +
             | 
| 133 | 
            +
              verify:
         | 
| 134 | 
            +
                name: Verify published gem on ${{ matrix.os }}
         | 
| 135 | 
            +
                needs: publish
         | 
| 136 | 
            +
                runs-on: ${{ matrix.os }}
         | 
| 137 | 
            +
                strategy:
         | 
| 138 | 
            +
                  fail-fast: false
         | 
| 139 | 
            +
                  matrix:
         | 
| 140 | 
            +
                    os: [ ubuntu-latest, windows-latest, macos-latest ]
         | 
| 141 | 
            +
                steps:
         | 
| 142 | 
            +
                  - name: Install Ruby
         | 
| 143 | 
            +
                    uses: ruby/setup-ruby@master
         | 
| 144 | 
            +
                    with:
         | 
| 145 | 
            +
                      ruby-version: 3.1
         | 
| 146 | 
            +
                      bundler-cache: true
         | 
| 147 | 
            +
                      bundler: ${{ env.BUNDLER_VER }}
         | 
| 148 | 
            +
             | 
| 149 | 
            +
                  - name: Download version
         | 
| 150 | 
            +
                    uses: actions/download-artifact@v3
         | 
| 151 | 
            +
                    with:
         | 
| 152 | 
            +
                     name: version
         | 
| 153 | 
            +
                     path: version
         | 
| 154 | 
            +
             | 
| 155 | 
            +
                  - name: Install gem
         | 
| 156 | 
            +
                    run: gem install expressir -v $(cat version)
         | 
| 157 | 
            +
             | 
| 158 | 
            +
                  - 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"
         | 
| 163 | 
            +
             | 
| 164 | 
            +
              verify-alpine:
         | 
| 165 | 
            +
                name: Verify published gem on Alpine
         | 
| 166 | 
            +
                needs: publish
         | 
| 167 | 
            +
                runs-on: ubuntu-latest
         | 
| 168 | 
            +
                container:
         | 
| 169 | 
            +
                  image: alpine:3.17
         | 
| 170 | 
            +
                steps:
         | 
| 171 | 
            +
                  - name: Install packages
         | 
| 172 | 
            +
                    run: apk --no-cache add bash build-base git ruby-dev gcc g++ automake
         | 
| 173 | 
            +
             | 
| 174 | 
            +
                  - name: Download version
         | 
| 175 | 
            +
                    uses: actions/download-artifact@v3
         | 
| 176 | 
            +
                    with:
         | 
| 177 | 
            +
                     name: version
         | 
| 178 | 
            +
                     path: version
         | 
| 179 | 
            +
             | 
| 180 | 
            +
                  - name: Install gem
         | 
| 181 | 
            +
                    run: gem install expressir -v $(cat version)
         | 
| 182 | 
            +
             | 
| 183 | 
            +
                  - 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"
         | 
    
        data/Rakefile
    CHANGED
    
    
    
        data/expressir.gemspec
    CHANGED
    
    | @@ -6,7 +6,7 @@ Gem::Specification.new do |spec| | |
| 6 6 | 
             
              spec.name          = "expressir"
         | 
| 7 7 | 
             
              spec.version       = Expressir::VERSION
         | 
| 8 8 | 
             
              spec.authors       = ["Ribose Inc."]
         | 
| 9 | 
            -
              spec.email         = ["open.source@ribose.com | 
| 9 | 
            +
              spec.email         = ["open.source@ribose.com"]
         | 
| 10 10 |  | 
| 11 11 | 
             
              spec.summary       = "ISO EXPRESS parser and tools in Ruby."
         | 
| 12 12 | 
             
              spec.description   = "Expressir (“EXPRESS in Ruby”) is a Ruby parser for EXPRESS and a set of Ruby tools for accessing ISO EXPRESS data models."
         | 
| @@ -625,6 +625,7 @@ void expresslexerLexerInitialize() { | |
| 625 625 | 
             
              	390,1,0,0,0,15,0,1383,1393,1407,1415,1425,1429,1433,1439,1441,1448,1458,
         | 
| 626 626 | 
             
              	1460,1474,1482,2,0,2,0,0,1,0
         | 
| 627 627 | 
             
              };
         | 
| 628 | 
            +
             | 
| 628 629 | 
             
              staticData->serializedATN = antlr4::atn::SerializedATNView(serializedATNSegment, sizeof(serializedATNSegment) / sizeof(serializedATNSegment[0]));
         | 
| 629 630 |  | 
| 630 631 | 
             
              antlr4::atn::ATNDeserializer deserializer;
         | 
| @@ -0,0 +1,30 @@ | |
| 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 | 
            +
              
         | 
| @@ -1,9 +1,4 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
              RUBY_VERSION =~ /(\d+\.\d+)/
         | 
| 3 | 
            -
              require_relative "#{$1}/express_parser"
         | 
| 4 | 
            -
            rescue LoadError
         | 
| 5 | 
            -
              require_relative "express_parser"
         | 
| 6 | 
            -
            end
         | 
| 1 | 
            +
            require_relative 'extension'
         | 
| 7 2 | 
             
            require 'expressir/express/visitor'
         | 
| 8 3 | 
             
            require 'expressir/express/resolve_references_model_visitor'
         | 
| 9 4 |  | 
| @@ -1,9 +1,4 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
              RUBY_VERSION =~ /(\d+\.\d+)/
         | 
| 3 | 
            -
              require_relative "#{$1}/express_parser"
         | 
| 4 | 
            -
            rescue LoadError
         | 
| 5 | 
            -
              require_relative "express_parser"
         | 
| 6 | 
            -
            end
         | 
| 1 | 
            +
            require_relative 'extension'
         | 
| 7 2 | 
             
            require "expressir/model"
         | 
| 8 3 | 
             
            require "set"
         | 
| 9 4 |  | 
| @@ -31,8 +26,6 @@ require "set" | |
| 31 26 | 
             
            # - prevents segfault in ANTLR4 C++ runtime, not sure why they are caused
         | 
| 32 27 | 
             
            # - e.g. see visit_schema_decl
         | 
| 33 28 |  | 
| 34 | 
            -
            require 'objspace'
         | 
| 35 | 
            -
             | 
| 36 29 | 
             
            module Expressir
         | 
| 37 30 | 
             
              module Express
         | 
| 38 31 | 
             
                class Visitor < ::ExpressParser::Visitor
         | 
    
        data/lib/expressir/version.rb
    CHANGED
    
    
    
        data/rakelib/cross-ruby.rake
    CHANGED
    
    | @@ -2,7 +2,7 @@ require "rbconfig" | |
| 2 2 | 
             
            require "shellwords"
         | 
| 3 3 |  | 
| 4 4 | 
             
            WINDOWS_PLATFORM_REGEX = /mingw|mswin/.freeze
         | 
| 5 | 
            -
             | 
| 5 | 
            +
            LINUX_GNU_PLATFORM_REGEX = /linux-gnu/.freeze
         | 
| 6 6 | 
             
            DARWIN_PLATFORM_REGEX = /darwin/.freeze
         | 
| 7 7 | 
             
            GLIBC_MIN_VERSION = "2.17".freeze
         | 
| 8 8 |  | 
| @@ -15,8 +15,8 @@ CrossRuby = Struct.new(:version, :host) do | |
| 15 15 | 
             
                !!(platform =~ WINDOWS_PLATFORM_REGEX)
         | 
| 16 16 | 
             
              end
         | 
| 17 17 |  | 
| 18 | 
            -
              def  | 
| 19 | 
            -
                !!(platform =~  | 
| 18 | 
            +
              def linux_gnu?
         | 
| 19 | 
            +
                !!(platform =~ LINUX_GNU_PLATFORM_REGEX)
         | 
| 20 20 | 
             
              end
         | 
| 21 21 |  | 
| 22 22 | 
             
              def darwin?
         | 
| @@ -59,10 +59,10 @@ CrossRuby = Struct.new(:version, :host) do | |
| 59 59 | 
             
                    else
         | 
| 60 60 | 
             
                      "x64-mingw32"
         | 
| 61 61 | 
             
                    end
         | 
| 62 | 
            -
                  when  | 
| 63 | 
            -
                    "x86_64-linux"
         | 
| 64 | 
            -
                  when  | 
| 65 | 
            -
                    "aarch64-linux"
         | 
| 62 | 
            +
                  when "x86_64-linux-gnu"
         | 
| 63 | 
            +
                    "x86_64-linux-gnu"
         | 
| 64 | 
            +
                  when "aarch64-linux-gnu"
         | 
| 65 | 
            +
                    "aarch64-linux-gnu"
         | 
| 66 66 | 
             
                  when /\Ax86_64-darwin/
         | 
| 67 67 | 
             
                    "x86_64-darwin"
         | 
| 68 68 | 
             
                  when /\Aarm64-darwin/
         | 
| @@ -72,12 +72,24 @@ CrossRuby = Struct.new(:version, :host) do | |
| 72 72 | 
             
                  end
         | 
| 73 73 | 
             
              end
         | 
| 74 74 |  | 
| 75 | 
            +
              def tag
         | 
| 76 | 
            +
                @tag ||=
         | 
| 77 | 
            +
                  case platform
         | 
| 78 | 
            +
                  when "x86_64-linux-gnu"
         | 
| 79 | 
            +
                    "x86_64-linux"
         | 
| 80 | 
            +
                  when "aarch64-linux-gnu"
         | 
| 81 | 
            +
                    "aarch64-linux"
         | 
| 82 | 
            +
                  else
         | 
| 83 | 
            +
                    platform
         | 
| 84 | 
            +
                  end
         | 
| 85 | 
            +
              end
         | 
| 86 | 
            +
             | 
| 75 87 | 
             
              def tool(name)
         | 
| 76 88 | 
             
                (@binutils_prefix ||=
         | 
| 77 89 | 
             
                   case platform
         | 
| 78 90 | 
             
                   when /x64-mingw(32|-ucrt)/
         | 
| 79 91 | 
             
                     "x86_64-w64-mingw32-"
         | 
| 80 | 
            -
                   when /(x86_64|aarch64)-linux/
         | 
| 92 | 
            +
                   when /(x86_64|aarch64)-linux-gnu/
         | 
| 81 93 | 
             
                     # We do believe that we are on Linux and can use native tools
         | 
| 82 94 | 
             
                     ""
         | 
| 83 95 | 
             
                   when /x86_64.*darwin/
         | 
| @@ -93,9 +105,9 @@ CrossRuby = Struct.new(:version, :host) do | |
| 93 105 | 
             
                case platform
         | 
| 94 106 | 
             
                when /64-mingw(32|-ucrt)/
         | 
| 95 107 | 
             
                  "pei-x86-64"
         | 
| 96 | 
            -
                when "x86_64-linux"
         | 
| 108 | 
            +
                when "x86_64-linux-gnu"
         | 
| 97 109 | 
             
                  "elf64-x86-64"
         | 
| 98 | 
            -
                when "aarch64-linux"
         | 
| 110 | 
            +
                when "aarch64-linux-gnu"
         | 
| 99 111 | 
             
                  "elf64-little"
         | 
| 100 112 | 
             
                when "x86_64-darwin"
         | 
| 101 113 | 
             
                  "Mach-O 64-bit x86-64"
         | 
| @@ -142,7 +154,7 @@ CrossRuby = Struct.new(:version, :host) do | |
| 142 154 | 
             
                case platform
         | 
| 143 155 | 
             
                when WINDOWS_PLATFORM_REGEX
         | 
| 144 156 | 
             
                  verify_entry_windows(dump, dll)
         | 
| 145 | 
            -
                when  | 
| 157 | 
            +
                when LINUX_GNU_PLATFORM_REGEX
         | 
| 146 158 | 
             
                  verify_entry_linux(dll)
         | 
| 147 159 | 
             
                when DARWIN_PLATFORM_REGEX
         | 
| 148 160 | 
             
                  verify_entry_darwin(dll)
         | 
| @@ -188,7 +200,7 @@ CrossRuby = Struct.new(:version, :host) do | |
| 188 200 | 
             
              end
         | 
| 189 201 |  | 
| 190 202 | 
             
              def allowed_dlls_linux
         | 
| 191 | 
            -
                suffix = (platform == "x86_64-linux" ? "x86-64" : "aarch64")
         | 
| 203 | 
            +
                suffix = (platform == "x86_64-linux-gnu" ? "x86-64" : "aarch64")
         | 
| 192 204 | 
             
                [
         | 
| 193 205 | 
             
                  "ld-linux-#{suffix}.so",
         | 
| 194 206 | 
             
                  "libc.so",
         | 
| @@ -210,7 +222,7 @@ CrossRuby = Struct.new(:version, :host) do | |
| 210 222 | 
             
                case platform
         | 
| 211 223 | 
             
                when WINDOWS_PLATFORM_REGEX
         | 
| 212 224 | 
             
                  allowed_dlls_windows
         | 
| 213 | 
            -
                when  | 
| 225 | 
            +
                when LINUX_GNU_PLATFORM_REGEX
         | 
| 214 226 | 
             
                  allowed_dlls_linux
         | 
| 215 227 | 
             
                when DARWIN_PLATFORM_REGEX
         | 
| 216 228 | 
             
                  allowed_dlls_darwin
         | 
| @@ -236,7 +248,7 @@ CrossRuby = Struct.new(:version, :host) do | |
| 236 248 | 
             
                case platform
         | 
| 237 249 | 
             
                when DARWIN_PLATFORM_REGEX
         | 
| 238 250 | 
             
                  actual_dlls_darwin(dll)
         | 
| 239 | 
            -
                when  | 
| 251 | 
            +
                when LINUX_GNU_PLATFORM_REGEX
         | 
| 240 252 | 
             
                  actual_dlls_linux(dump)
         | 
| 241 253 | 
             
                when WINDOWS_PLATFORM_REGEX
         | 
| 242 254 | 
             
                  actual_dlls_windows(dump)
         | 
| @@ -291,7 +303,7 @@ def verify_dll(dll, cross_ruby) | |
| 291 303 | 
             
              cross_ruby.verify_imports(dump, dll)
         | 
| 292 304 | 
             
              #  Not sure if it is required, probably not
         | 
| 293 305 | 
             
              #  I am keeping related code as a reference for future advances
         | 
| 294 | 
            -
              #  cross_ruby.verify_glibc_version(dump, dll) if cross_ruby. | 
| 306 | 
            +
              #  cross_ruby.verify_glibc_version(dump, dll) if cross_ruby.linux_gnu?
         | 
| 295 307 |  | 
| 296 308 | 
             
              puts "#{dll}: passed shared library sanity checks"
         | 
| 297 309 | 
             
            end
         | 
| @@ -315,7 +327,7 @@ UBUNTU_PREREQ = "sudo apt-get update -y && sudo apt-get install -y automake auto | |
| 315 327 |  | 
| 316 328 | 
             
            def pre_req(plat)
         | 
| 317 329 | 
             
              case plat
         | 
| 318 | 
            -
              when  | 
| 330 | 
            +
              when /linux/
         | 
| 319 331 | 
             
                "if [[ $(awk -F= '/^NAME/{print $2}' /etc/os-release) == '\"Ubuntu\"' ]]; then #{UBUNTU_PREREQ}; else #{REDHAT_PREREQ}; fi"
         | 
| 320 332 | 
             
              else
         | 
| 321 333 | 
             
                UBUNTU_PREREQ.to_s
         | 
| @@ -323,14 +335,16 @@ def pre_req(plat) | |
| 323 335 | 
             
            end
         | 
| 324 336 |  | 
| 325 337 | 
             
            namespace "gem" do
         | 
| 326 | 
            -
              CROSS_RUBIES.find_all { |cr| cr.windows? || cr. | 
| 338 | 
            +
              CROSS_RUBIES.find_all { |cr| cr.windows? || cr.linux_gnu? || cr.darwin? }.map { |cr| { platform: cr.platform, tag: cr.tag } }
         | 
| 339 | 
            +
                .uniq { |hash| hash[:platform] }.each do |hash|
         | 
| 340 | 
            +
                plat = hash[:platform]
         | 
| 341 | 
            +
                tag = hash[:tag]
         | 
| 327 342 | 
             
                desc "build native gem for #{plat} platform"
         | 
| 328 343 | 
             
                task plat do
         | 
| 329 | 
            -
                  RakeCompilerDock.sh <<~RCD, platform:  | 
| 344 | 
            +
                  RakeCompilerDock.sh <<~RCD, platform: tag
         | 
| 330 345 | 
             
                    #{pre_req(plat)} &&
         | 
| 331 346 | 
             
                    gem install bundler --no-document &&
         | 
| 332 | 
            -
                    bundle &&
         | 
| 333 | 
            -
                    bundle exec rake gem:#{plat}:builder MAKE="nice make -j`nproc`"
         | 
| 347 | 
            +
                    bundle && bundle exec rake gem:#{plat}:builder MAKE="nice make -j`nproc`"
         | 
| 334 348 | 
             
                  RCD
         | 
| 335 349 | 
             
                end
         | 
| 336 350 |  | 
| @@ -346,7 +360,7 @@ namespace "gem" do | |
| 346 360 | 
             
              multitask "windows" => CROSS_RUBIES.find_all(&:windows?).map(&:platform).uniq
         | 
| 347 361 |  | 
| 348 362 | 
             
              desc "build native gems for linux"
         | 
| 349 | 
            -
              multitask "linux" => CROSS_RUBIES.find_all(&: | 
| 363 | 
            +
              multitask "linux-gnu" => CROSS_RUBIES.find_all(&:linux_gnu?).map(&:platform).uniq
         | 
| 350 364 |  | 
| 351 365 | 
             
              desc "build native gems for darwin"
         | 
| 352 366 | 
             
              multitask "darwin" => CROSS_RUBIES.find_all(&:darwin?).map(&:platform).uniq
         | 
| @@ -361,6 +375,7 @@ Rake::ExtensionTask.new("express_parser", GEMSPEC) do |ext| | |
| 361 375 | 
             
              ext.cross_compile  = true
         | 
| 362 376 | 
             
              ext.cross_platform = CROSS_RUBIES.map(&:platform).uniq
         | 
| 363 377 | 
             
              ext.cross_config_options << "--enable-cross-build"
         | 
| 378 | 
            +
             | 
| 364 379 | 
             
              ext.cross_compiling do |spec|
         | 
| 365 380 | 
             
                spec.files.reject! { |path| File.fnmatch?("ext/*", path) }
         | 
| 366 381 | 
             
                spec.dependencies.reject! { |dep| dep.name == "rice" }
         | 
    
        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 | 
| 4 | 
            +
              version: 1.3.0.pre.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Ribose Inc.
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2023-12- | 
| 11 | 
            +
            date: 2023-12-13 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rice
         | 
| @@ -223,7 +223,7 @@ dependencies: | |
| 223 223 | 
             
            description: Expressir (“EXPRESS in Ruby”) is a Ruby parser for EXPRESS and a set
         | 
| 224 224 | 
             
              of Ruby tools for accessing ISO EXPRESS data models.
         | 
| 225 225 | 
             
            email:
         | 
| 226 | 
            -
            - open.source@ribose.com | 
| 226 | 
            +
            - open.source@ribose.com
         | 
| 227 227 | 
             
            executables:
         | 
| 228 228 | 
             
            - expressir
         | 
| 229 229 | 
             
            extensions:
         | 
| @@ -596,6 +596,7 @@ files: | |
| 596 596 | 
             
            - lib/expressir/cli/ui.rb
         | 
| 597 597 | 
             
            - lib/expressir/config.rb
         | 
| 598 598 | 
             
            - lib/expressir/express/cache.rb
         | 
| 599 | 
            +
            - lib/expressir/express/extension.rb
         | 
| 599 600 | 
             
            - lib/expressir/express/formatter.rb
         | 
| 600 601 | 
             
            - lib/expressir/express/hyperlink_formatter.rb
         | 
| 601 602 | 
             
            - lib/expressir/express/model_visitor.rb
         | 
| @@ -727,9 +728,9 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 727 728 | 
             
                  version: 2.7.0
         | 
| 728 729 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 729 730 | 
             
              requirements:
         | 
| 730 | 
            -
              - - " | 
| 731 | 
            +
              - - ">"
         | 
| 731 732 | 
             
                - !ruby/object:Gem::Version
         | 
| 732 | 
            -
                  version:  | 
| 733 | 
            +
                  version: 1.3.1
         | 
| 733 734 | 
             
            requirements: []
         | 
| 734 735 | 
             
            rubygems_version: 3.3.26
         | 
| 735 736 | 
             
            signing_key: 
         |