maxirmx_test_gem 0.1.2-x86_64-linux

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6f5f5319478804eb36c6071c6c35d98c9873bdf04775f1a5adebfc0c364f148e
4
+ data.tar.gz: 6e23b29640a11072af4c40a0f0af2be7ee9f03e5b7e77dc2a90771fccf196cf8
5
+ SHA512:
6
+ metadata.gz: 9b8f9430aaffe28e959dbf04e1e6cbc8462e67d09e771dea2aafd3eab123347d89439aef69dbdc6373f4ec07568a8b38d83cdccf7a882ead40de830839373520
7
+ data.tar.gz: 8830b26dddb3879f21004da8a34d6a925ddd79aa845d90cdb8f8b6447a8022052459a80f1352ca4415b25a0ddff1b3c6acbfb540999b91d0da3fb00bf52b3cb9
@@ -0,0 +1,63 @@
1
+ name: build
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ ubuntu:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+
15
+ - uses: ruby/setup-ruby@v1
16
+ with:
17
+ bundler-cache: true
18
+ ruby-version: 3.1
19
+
20
+ - run: bundle install
21
+
22
+ - run: bundle exec rake build
23
+
24
+ - uses: actions/upload-artifact@v2
25
+ with:
26
+ name: pkg-ruby
27
+ path: pkg/*.gem
28
+
29
+ - run: rm pkg/*.gem
30
+
31
+ - run: bundle exec rake --tasks
32
+
33
+ - run: bundle exec rake gem:native:$(ruby -e "puts RUBY_PLATFORM")
34
+
35
+ - uses: actions/upload-artifact@v2
36
+ with:
37
+ name: pkg-x86_64-linux
38
+ path: pkg/*.gem
39
+
40
+ alpine:
41
+ runs-on: ubuntu-latest
42
+ container:
43
+ image: alpine:latest
44
+
45
+ steps:
46
+ - name: Install packages
47
+ run: |
48
+ apk --no-cache --upgrade add build-base cmake git bash ruby-dev
49
+
50
+ - uses: actions/checkout@v3
51
+
52
+ - run: gem install bundler
53
+
54
+ - run: bundle install
55
+
56
+ - run: bundle exec rake --tasks
57
+
58
+ - run: bundle exec rake gem:native:$(ruby -e "puts RUBY_PLATFORM")
59
+
60
+ - uses: actions/upload-artifact@v2
61
+ with:
62
+ name: pkg-x86_64-linux-musl
63
+ path: pkg/*.gem
@@ -0,0 +1,127 @@
1
+ name: release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ next_version:
7
+ description: |
8
+ Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
9
+ required: true
10
+ default: 'patch'
11
+ push:
12
+ tags: [ v* ]
13
+
14
+ jobs:
15
+ bump:
16
+ runs-on: ubuntu-18.04
17
+ steps:
18
+ - uses: actions/checkout@v2
19
+ with:
20
+ submodules: recursive
21
+
22
+ - uses: ruby/setup-ruby@v1
23
+ with:
24
+ ruby-version: '3.0'
25
+
26
+ - if: ${{ github.event_name == 'workflow_dispatch' }}
27
+ run: |
28
+ git config user.name github-actions
29
+ git config user.email github-actions@github.com
30
+ gem install gem-release
31
+ gem bump --version ${{ github.event.inputs.next_version }} --tag --push
32
+
33
+ ubuntu:
34
+ runs-on: ubuntu-latest
35
+ needs: bump
36
+
37
+ steps:
38
+ - uses: actions/checkout@v3
39
+
40
+ - uses: ruby/setup-ruby@v1
41
+ with:
42
+ bundler-cache: true
43
+ ruby-version: 3.1
44
+
45
+ - run: bundle install
46
+
47
+ - run: bundle exec rake build
48
+
49
+ - uses: actions/upload-artifact@v2
50
+ with:
51
+ name: pkg-ruby
52
+ path: pkg/*.gem
53
+
54
+ - run: rm pkg/*.gem
55
+
56
+ - run: bundle exec rake --tasks
57
+
58
+ - run: bundle exec rake gem:native:$(ruby -e "puts RUBY_PLATFORM")
59
+
60
+ - uses: actions/upload-artifact@v2
61
+ with:
62
+ name: pkg-x86_64-linux
63
+ path: pkg/*.gem
64
+
65
+ alpine:
66
+ runs-on: ubuntu-latest
67
+ needs: bump
68
+ container:
69
+ image: alpine:latest
70
+
71
+ steps:
72
+ - name: Install packages
73
+ run: |
74
+ apk --no-cache --upgrade add build-base cmake git bash ruby-dev
75
+
76
+ - uses: actions/checkout@v3
77
+
78
+ - run: gem install bundler
79
+
80
+ - run: bundle install
81
+
82
+ - run: bundle exec rake --tasks
83
+
84
+ - run: bundle exec rake gem:native:$(ruby -e "puts RUBY_PLATFORM")
85
+
86
+ - uses: actions/upload-artifact@v2
87
+ with:
88
+ name: pkg-x86_64-linux-musl
89
+ path: pkg/*.gem
90
+
91
+ publish:
92
+ runs-on: ubuntu-latest
93
+ needs: [ubuntu, alpine]
94
+ steps:
95
+ - uses: actions/download-artifact@v2
96
+ with:
97
+ name: pkg-ruby
98
+ path: pkg
99
+
100
+ - uses: actions/download-artifact@v2
101
+ with:
102
+ name: pkg-x86_64-linux
103
+ path: pkg
104
+
105
+ - uses: actions/download-artifact@v2
106
+ with:
107
+ name: pkg-x86_64-linux-musl
108
+ path: pkg
109
+
110
+ - uses: ruby/setup-ruby@v1
111
+ with:
112
+ ruby-version: '3.1'
113
+
114
+ - run: ls -l pkg/
115
+
116
+ - name: Publish to rubygems.org
117
+ env:
118
+ RUBYGEMS_API_KEY: ${{ secrets.MAXIRMX_RUBYGEM_API_KEY }}
119
+ run: |
120
+ mkdir -p ~/.gem
121
+ cat > ~/.gem/credentials << EOF
122
+ ---
123
+ :rubygems_api_key: ${RUBYGEMS_API_KEY}
124
+ EOF
125
+ chmod 0600 ~/.gem/credentials
126
+ gem signin
127
+ for gem in pkg/*.gem; do gem push $gem -V; done
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ *.bundle
10
+ *.so
11
+ *.o
12
+ *.a
13
+ mkmf.log
14
+ Gemfile.lock
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in maxirmx_test_gem.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rake-compiler"
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Maxim [maxirmx] Samsonov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ [![Gem Version](https://badge.fury.io/rb/maxirmx_test_gem.svg)](https://badge.fury.io/rb/maxirmx_test_gem)
2
+
3
+ # maxirmx test gem
4
+
5
+ This is a test gem. Nothing interesting, folks.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'maxirmx_test_gem'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install maxirmx_test_gem
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/maxirmx_test_gem.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/extensiontask"
5
+ require "rspec/core/rake_task"
6
+
7
+ RSpec::Core::RakeTask.new(:spec)
8
+
9
+ task build: :compile
10
+
11
+ Rake::ExtensionTask.new("maxirmx_test_gem") do |ext|
12
+ ext.lib_dir = "lib/maxirmx_test_gem"
13
+ end
14
+
15
+ task default: %i[compile spec]
16
+
17
+ desc "Build pre-compiled gem for the #{RUBY_PLATFORM} platform"
18
+ task "gem:native:#{RUBY_PLATFORM}" do
19
+ sh "rake compile platform:#{RUBY_PLATFORM} gem target_platform=#{RUBY_PLATFORM}"
20
+ end
21
+
22
+ desc "Build pre-compiled gem for #{RUBY_PLATFORM} platform (internal task)"
23
+ task "platform:#{RUBY_PLATFORM}" do
24
+ spec = Gem::Specification::load("maxirmx_test_gem.gemspec").dup
25
+ spec.platform = Gem::Platform.new(RUBY_PLATFORM)
26
+ spec.files += Dir.glob("lib/maxirmx_test_gem/*.{dll,so,dylib}")
27
+ spec.extensions = []
28
+
29
+ task = Gem::PackageTask.new(spec)
30
+ task.define
31
+ end
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "maxirmx_test_gem"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "mkmf-rice"
4
+ $CPPFLAGS << " -std=c++17"
5
+ create_makefile("maxirmx_test_gem/maxirmx_test_gem")
@@ -0,0 +1,20 @@
1
+ #include "maxirmx_test_gem.h"
2
+
3
+ using namespace Rice;
4
+
5
+ class Hello
6
+ {
7
+ public:
8
+ Hello() { };
9
+ std::string hello() { return "=== Hello ==="; };
10
+ };
11
+
12
+ extern "C"
13
+ void Init_maxirmx_test_gem(void)
14
+ {
15
+ Module rb_mMaxirmxTestGem = define_module("MaxirmxTestGem");
16
+ Data_Type<Hello> rb_cHello =
17
+ define_class_under<Hello>(rb_mMaxirmxTestGem, "Hello")
18
+ .define_constructor(Constructor<Hello>())
19
+ .define_method("hello", &Hello::hello);
20
+ }
@@ -0,0 +1,7 @@
1
+ #ifndef MAXIRMX_TEST_GEM_H
2
+ #define MAXIRMX_TEST_GEM_H 1
3
+
4
+ #include <rice/rice.hpp>
5
+ #include <rice/stl.hpp>
6
+
7
+ #endif /* MAXIRMX_TEST_GEM_H */
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MaxirmxTestGem
4
+ VERSION = "0.1.2"
5
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "maxirmx_test_gem/version"
4
+ require_relative "maxirmx_test_gem/maxirmx_test_gem"
5
+
6
+ module MaxirmxTestGem
7
+ class Error < StandardError; end
8
+ # Your code goes here...
9
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/maxirmx_test_gem/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "maxirmx_test_gem"
7
+ spec.version = MaxirmxTestGem::VERSION
8
+ spec.authors = ["Maxim [maxirmx] Samsonov"]
9
+ spec.email = ["m.samsonov@computer.org"]
10
+
11
+ spec.summary = "Test gem"
12
+ spec.description = "Test gem to validate musl-compatible packaging"
13
+ spec.homepage = "https://github.com/maxirmx/maxirmx_test_gem"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
16
+
17
+
18
+ spec.metadata["homepage_uri"] = spec.homepage
19
+ spec.metadata["source_code_uri"] = spec.homepage
20
+
21
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
22
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
23
+ end
24
+ spec.test_files = `git ls-files -- {spec}/*`.split("\n")
25
+
26
+ spec.bindir = "exe"
27
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ["lib"]
29
+ spec.extensions = ["ext/maxirmx_test_gem/extconf.rb"]
30
+
31
+ spec.add_runtime_dependency "rice", "~> 4.0.4"
32
+
33
+ spec.add_development_dependency "rspec", "~> 3.11"
34
+ end
metadata ADDED
@@ -0,0 +1,89 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: maxirmx_test_gem
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
+ platform: x86_64-linux
6
+ authors:
7
+ - Maxim [maxirmx] Samsonov
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-06-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rice
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 4.0.4
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 4.0.4
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.11'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.11'
41
+ description: Test gem to validate musl-compatible packaging
42
+ email:
43
+ - m.samsonov@computer.org
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".github/workflows/build.yml"
49
+ - ".github/workflows/release.yml"
50
+ - ".gitignore"
51
+ - Gemfile
52
+ - LICENSE.txt
53
+ - README.md
54
+ - Rakefile
55
+ - bin/console
56
+ - bin/setup
57
+ - ext/maxirmx_test_gem/extconf.rb
58
+ - ext/maxirmx_test_gem/maxirmx_test_gem.cpp
59
+ - ext/maxirmx_test_gem/maxirmx_test_gem.h
60
+ - lib/maxirmx_test_gem.rb
61
+ - lib/maxirmx_test_gem/maxirmx_test_gem.so
62
+ - lib/maxirmx_test_gem/version.rb
63
+ - maxirmx_test_gem.gemspec
64
+ homepage: https://github.com/maxirmx/maxirmx_test_gem
65
+ licenses:
66
+ - MIT
67
+ metadata:
68
+ homepage_uri: https://github.com/maxirmx/maxirmx_test_gem
69
+ source_code_uri: https://github.com/maxirmx/maxirmx_test_gem
70
+ post_install_message:
71
+ rdoc_options: []
72
+ require_paths:
73
+ - lib
74
+ required_ruby_version: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: 2.7.0
79
+ required_rubygems_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ requirements: []
85
+ rubygems_version: 3.3.7
86
+ signing_key:
87
+ specification_version: 4
88
+ summary: Test gem
89
+ test_files: []