Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions .github/workflows/CI.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build

on:
push:
branches:
- master
pull_request:
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
env:
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
strategy:
fail-fast: false
matrix:
ruby: [2.6, 2.7, 3.0, 3.1, 3.2]
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run Ruby Next
run: |
bundle exec rake nextify:all
- name: Run Minitest tests
run: |
bundle exec rake test:all
41 changes: 0 additions & 41 deletions .github/workflows/lint.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint Ruby

on:
push:
branches:
- master
pull_request:

jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler: 2.2.15
bundler-cache: true
- name: Lint Rubocop
run: |
bundle exec rake rubocop:all
3 changes: 1 addition & 2 deletions .rbnextrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
nextify: |
./lib
--min-version=2.5
--min-version=2.6
--edge
--proposed
1 change: 0 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Naming/FileName:
Exclude:
- '**/*.md'

# FIXME: Enable back when Ruby Next 0.14 is released
Layout/SpaceAfterColon:
Enabled: false

Expand Down
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,9 @@
# [0.3.4] - 2023-05-02

- Fix RubyNext runtime integration

# [0.3.5] - 2023-08-20

- Start gem restructuring for modularizaition
- Introduce `activefunction-core` gem with RubyNext integration

42 changes: 6 additions & 36 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,41 +1,11 @@
# frozen_string_literal: true

require "bundler/gem_tasks"
require "rake/testtask"
require "fileutils"

Rake::TestTask.new do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/*_test.rb"]
t.warning = false
t.verbose = true
end

begin
require "rubocop/rake_task"
RuboCop::RakeTask.new
rescue LoadError
task(:rubocop) {}
end

RuboCop::RakeTask.new

task :steep do
require "steep"
require "steep/cli"
REPO_ROOT = File.dirname(__FILE__)
GEMS_DIR = "#{REPO_ROOT}/gems"
GEMS_DIRS = (Dir.glob("#{GEMS_DIR}/*") + Dir.glob(REPO_ROOT))

Steep::CLI.new(argv: ["check"], stdout: $stdout, stderr: $stderr, stdin: $stdin).run
Dir.glob("#{REPO_ROOT}/tasks/**/*.rake").each do |task_file|
load(task_file)
end

namespace :steep do
task :stats do
exec "bundle exec steep stats --log-level=fatal --format=table'"
end
end

desc "Run Ruby Next nextify"
task :nextify do
sh "bundle exec ruby-next nextify -V"
end

task default: %i[test rubocop steep]
3 changes: 1 addition & 2 deletions activefunction.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = ">= 2.6"

spec.add_runtime_dependency "ruby-next-core", ">= 0.14.0"
spec.add_dependency "activefunction-core", ">= 0.0.1"

spec.add_development_dependency "ruby-next", ">= 0.14.0"
spec.add_development_dependency "rake", ">= 13.0"
spec.add_development_dependency "minitest", "~> 5.15.0"
spec.add_development_dependency "minitest-reporters", "~> 1.4.3"
Expand Down
27 changes: 27 additions & 0 deletions bin/rubocop
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'rubocop' is installed as part of a gem, and
# this file is here to facilitate running it.
#

ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)

bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

load Gem.bin_path("rubocop", "rubocop")
16 changes: 16 additions & 0 deletions bin/ruby-next
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby

lib_path = File.expand_path("../lib", __dir__)
$LOAD_PATH.unshift(lib_path) unless $LOAD_PATH.include?(lib_path)

require "ruby-next/cli"

begin
cli = RubyNext::CLI.new
cli.run(ARGV)
rescue => e
raise e if $DEBUG
STDERR.puts e.message
STDERR.puts e.backtrace.join("\n") if ENV["RUBY_NEXT_DEBUG"] == "1"
exit 1
end
2 changes: 1 addition & 1 deletion gemfiles/rubocop.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ source "https://rubygems.org" do
gem "rubocop-rake"
gem "rubocop-shopify"
gem "standard", "~> 1.12.1"
gem "ruby-next", ">= 0.12"
gem "ruby-next", ">= 0.15.3"
end
3 changes: 3 additions & 0 deletions gems/activefunction-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## [0.1.0]

- Introduce ruby-next integration
21 changes: 21 additions & 0 deletions gems/activefunction-core/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2023 Nerbyk

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading