Skip to content

Commit 4f043d1

Browse files
authored
Multiple gems repo restruct (#19)
* Introduce-basic-multi-gem-repo-structure * Introduce Controller gem * Prevent breaking backcompatability – Rollback root gem structure * `activefunction-core` cleanup * Rakefile cleanup * Fix CI config & Add more ruby runtimes 2.6..3.2 * Bump activefunction version & changelog
1 parent 1dede51 commit 4f043d1

42 files changed

Lines changed: 837 additions & 131 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/CI.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
env:
14+
BUNDLE_JOBS: 4
15+
BUNDLE_RETRY: 3
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
ruby: [2.6, 2.7, 3.0, 3.1, 3.2]
20+
steps:
21+
- uses: actions/checkout@v2
22+
- uses: ruby/setup-ruby@v1
23+
with:
24+
ruby-version: ${{ matrix.ruby }}
25+
bundler-cache: true
26+
- name: Run Ruby Next
27+
run: |
28+
bundle exec rake nextify:all
29+
- name: Run Minitest tests
30+
run: |
31+
bundle exec rake test:all

.github/workflows/lint.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/rubocop.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Lint Ruby
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
rubocop:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: ruby/setup-ruby@v1
15+
with:
16+
ruby-version: 3.2
17+
bundler: 2.2.15
18+
bundler-cache: true
19+
- name: Lint Rubocop
20+
run: |
21+
bundle exec rake rubocop:all

.rbnextrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
nextify: |
2-
./lib
3-
--min-version=2.5
2+
--min-version=2.6
43
--edge
54
--proposed

.rubocop.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Naming/FileName:
3030
Exclude:
3131
- '**/*.md'
3232

33-
# FIXME: Enable back when Ruby Next 0.14 is released
3433
Layout/SpaceAfterColon:
3534
Enabled: false
3635

.ruby-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,9 @@
4141
# [0.3.4] - 2023-05-02
4242

4343
- Fix RubyNext runtime integration
44+
45+
# [0.3.5] - 2023-08-20
46+
47+
- Start gem restructuring for modularizaition
48+
- Introduce `activefunction-core` gem with RubyNext integration
49+

Rakefile

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,11 @@
11
# frozen_string_literal: true
22

3-
require "bundler/gem_tasks"
4-
require "rake/testtask"
3+
require "fileutils"
54

6-
Rake::TestTask.new do |t|
7-
t.libs << "test"
8-
t.libs << "lib"
9-
t.test_files = FileList["test/**/*_test.rb"]
10-
t.warning = false
11-
t.verbose = true
12-
end
13-
14-
begin
15-
require "rubocop/rake_task"
16-
RuboCop::RakeTask.new
17-
rescue LoadError
18-
task(:rubocop) {}
19-
end
20-
21-
RuboCop::RakeTask.new
22-
23-
task :steep do
24-
require "steep"
25-
require "steep/cli"
5+
REPO_ROOT = File.dirname(__FILE__)
6+
GEMS_DIR = "#{REPO_ROOT}/gems"
7+
GEMS_DIRS = (Dir.glob("#{GEMS_DIR}/*") + Dir.glob(REPO_ROOT))
268

27-
Steep::CLI.new(argv: ["check"], stdout: $stdout, stderr: $stderr, stdin: $stdin).run
9+
Dir.glob("#{REPO_ROOT}/tasks/**/*.rake").each do |task_file|
10+
load(task_file)
2811
end
29-
30-
namespace :steep do
31-
task :stats do
32-
exec "bundle exec steep stats --log-level=fatal --format=table'"
33-
end
34-
end
35-
36-
desc "Run Ruby Next nextify"
37-
task :nextify do
38-
sh "bundle exec ruby-next nextify -V"
39-
end
40-
41-
task default: %i[test rubocop steep]

activefunction.gemspec

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ Gem::Specification.new do |spec|
3535

3636
spec.required_ruby_version = ">= 2.6"
3737

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

40-
spec.add_development_dependency "ruby-next", ">= 0.14.0"
4140
spec.add_development_dependency "rake", ">= 13.0"
4241
spec.add_development_dependency "minitest", "~> 5.15.0"
4342
spec.add_development_dependency "minitest-reporters", "~> 1.4.3"

0 commit comments

Comments
 (0)