rails-local-ci 0.1.0 → 0.2.0

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: 8840d3903d7f32a508350be3bfe4dad1d65ca3799bcc4ff08dc891f3d1158bde
4
- data.tar.gz: 17f2e4fe861ec938aca6bbcccc9139e8149a5d2aadfda7624f4807dccfe3e1ed
3
+ metadata.gz: bea5f0d0292bb64efb5fd49d72374f2d9e6435df2554d1d89fabdb43009b3343
4
+ data.tar.gz: e11563b36687390ee1bb34e818ec898ef221128a4904b2c0b06fdd3ed6bfb2bb
5
5
  SHA512:
6
- metadata.gz: 9b423912230035964b67068059469d28539ac9861efd47f34e9149a393a9e3efee5a5fcf4ce95bde08ad7d154cafac1933c754fa70fceab7d5762ab5f3226956
7
- data.tar.gz: 75caddc8fbf112217648ed8765fa57d886fc29a05bbab54048cd27d8474886888e5fb2e7d5c2fd79df594bc7ce7f7e2991d7b5b341eec96bcd65cd4dc5379fbf
6
+ metadata.gz: 03b4976064f75468c853a40ca407cc42d2bdec6fdea694667e1910ecd07da82eb8e53f0982bb2084e059442e698e7eff5e21cc90f38a36081817c66d4b42fe6c
7
+ data.tar.gz: c7b477829b1ba91ed43e9b5772cc753ea9ffa66d4182a87bb8c683923b776f3207fe50ed0e7cb1e94c710ef5e5c6f26591d1778ce84d38408a0301a4dafcc844
data/LICENSE CHANGED
@@ -1,6 +1,12 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 rails_local_ci contributors
3
+ Copyright (c) 2026 rails_local_ci contributors
4
+
5
+ ---
6
+
7
+ Portions of this software are adapted from Ruby on Rails (https://github.com/rails/rails).
8
+ Copyright (c) David Heinemeier Hansson, licensed under the MIT License.
9
+ See https://github.com/rails/rails/blob/main/MIT-LICENSE
4
10
 
5
11
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
12
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,10 +1,16 @@
1
1
  # rails-local-ci
2
2
 
3
- > Backport of Rails 8.1's `ActiveSupport::ContinuousIntegration` for Rails 5.2–7.x
3
+ [![Gem version](https://img.shields.io/gem/v/rails-local-ci)](https://rubygems.org/gems/rails-local-ci)
4
+ [![Gem downloads](https://img.shields.io/gem/dt/rails-local-ci)](https://rubygems.org/gems/rails-local-ci)
5
+ [![CI](https://github.com/its-magdy/rails-local-ci/actions/workflows/ci.yml/badge.svg)](https://github.com/its-magdy/rails-local-ci/actions/workflows/ci.yml)
4
6
 
5
- Rails 8.1 introduced a standardized `bin/ci` script and `ActiveSupport::ContinuousIntegration` class ([PR #54693](https://github.com/rails/rails/pull/54693)) that runs the same CI steps locally and in the cloud. This gem ships that class for apps on Rails 5.2–7.x so you don't have to wait for an upgrade.
7
+ > Backport of Rails' `ActiveSupport::ContinuousIntegration` (as on Rails `main`) for Rails 5.2–8.1
6
8
 
7
- When you do upgrade to Rails 8.1, remove the gem — `bin/ci` and `config/ci.rb` stay unchanged because Rails 8.1 provides the class at the same load path.
9
+ Rails 8.1 introduced a standardized `bin/ci` script and `ActiveSupport::ContinuousIntegration` class ([PR #54693](https://github.com/rails/rails/pull/54693)) that runs the same CI steps locally and in the cloud. This gem ships that class for apps on Rails 5.2–8.1 so you don't have to wait for an upgrade.
10
+
11
+ The gem tracks Rails `main`, so it also includes features that came after 8.1 shipped: parallel `group`s, fail-fast mode, and the end-of-run failure summary. Rails 8.1.x doesn't have them, so the gem is useful on 8.1 too.
12
+
13
+ Once you upgrade to Rails 8.2, remove the gem. `bin/ci` and `config/ci.rb` stay unchanged because Rails provides the class at the same load path.
8
14
 
9
15
  ---
10
16
 
@@ -19,7 +25,7 @@ When you do upgrade to Rails 8.1, remove the gem — `bin/ci` and `config/ci.rb`
19
25
  - [Commit Signoff](#commit-signoff)
20
26
  - [CI Integration](#ci-integration)
21
27
  - [Running Tests](#running-tests)
22
- - [Upgrading to Rails 8.1](#upgrading-to-rails-81)
28
+ - [Upgrading to Rails 8.2](#upgrading-to-rails-82)
23
29
  - [Compatibility](#compatibility)
24
30
  - [How It Works](#how-it-works)
25
31
  - [License](#license)
@@ -29,7 +35,7 @@ When you do upgrade to Rails 8.1, remove the gem — `bin/ci` and `config/ci.rb`
29
35
  ## Prerequisites
30
36
 
31
37
  - Ruby >= 2.4
32
- - Rails >= 5.2 and < 8.1
38
+ - Rails >= 5.2 and < 8.2
33
39
 
34
40
  ---
35
41
 
@@ -273,12 +279,18 @@ bundle exec ruby test/continuous_integration_test.rb
273
279
 
274
280
  ---
275
281
 
276
- ## Upgrading to Rails 8.1
282
+ ## Upgrading to Rails 8.2
277
283
 
278
284
  1. Remove `gem "rails-local-ci"` from your `Gemfile`
279
285
  2. Run `bundle install`
280
286
 
281
- `bin/ci` and `config/ci.rb` require no changes. Rails 8.1 ships `ActiveSupport::ContinuousIntegration` at the same load path this gem uses.
287
+ `bin/ci` and `config/ci.rb` require no changes. Rails 8.2 (in development on Rails `main` as of Nov 2026) ships `ActiveSupport::ContinuousIntegration` at the same load path this gem uses, with `group`, fail-fast, and the failure summary built in.
288
+
289
+ ### Rails 8.1
290
+
291
+ Keep the gem on Rails 8.1. Rails 8.1.x (checked through 8.1.4) only ships the original `step`, `success?`, `heading`, `echo`, and `failure` DSL. Without the gem, a `config/ci.rb` that uses `group` fails with `NoMethodError`, and `-f` / `--fail-fast` is silently ignored. With the gem installed, its copy of the class takes precedence over the Rails 8.1 built-in, because Bundler puts the gem's `lib` ahead of Active Support's on the load path. That holds for the normal boot order, where `bundler/setup` runs (via `config/boot`) before anything loads the class, as the generated `bin/ci` does. If something requires Rails' built-in copy first, or loads it by absolute path, the gem cannot replace it.
292
+
293
+ If you'd rather drop the gem on 8.1, replace each `group` block with the `step`s inside it, and stop relying on `-f`.
282
294
 
283
295
  ---
284
296
 
@@ -286,23 +298,24 @@ bundle exec ruby test/continuous_integration_test.rb
286
298
 
287
299
  | Rails | Ruby | Status |
288
300
  |-------|-------|--------|
301
+ | 8.1 | 3.2+ | Tested |
289
302
  | 7.2 | 3.1+ | Tested |
290
- | 7.1 | 3.0+ | Compatible |
303
+ | 7.1 | 3.0+ | Tested |
291
304
  | 7.0 | 2.7+ | Compatible |
292
305
  | 6.1 | 2.7+ | Compatible |
293
306
  | 6.0 | 2.7+ | Compatible |
294
307
  | 5.2 | 2.4+ | Compatible |
295
- | 8.1+ | — | Use built-in — remove this gem |
308
+ | 8.2+ | — | Use built-in — remove this gem |
296
309
 
297
310
  ---
298
311
 
299
312
  ## How It Works
300
313
 
301
- The gem places `ActiveSupport::ContinuousIntegration` at `lib/active_support/continuous_integration.rb` — the identical load path Rails 8.1 uses. The generated `bin/ci` does:
314
+ The gem places `ActiveSupport::ContinuousIntegration` at `lib/active_support/continuous_integration.rb` — the identical load path Rails uses. The generated `bin/ci` does:
302
315
 
303
316
  ```ruby
304
317
  require_relative "../config/boot"
305
- require "active_support/continuous_integration" # resolved by this gem, or Rails 8.1 built-in
318
+ require "active_support/continuous_integration" # resolved by this gem, or the Rails built-in once the gem is removed
306
319
 
307
320
  CI = ActiveSupport::ContinuousIntegration
308
321
  require_relative "../config/ci.rb"
@@ -1,5 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # This file is adapted from Ruby on Rails (https://github.com/rails/rails).
4
+ # Copyright (c) David Heinemeier Hansson, licensed under the MIT License.
5
+ # See https://github.com/rails/rails/blob/main/MIT-LICENSE
6
+
3
7
  require "tmpdir"
4
8
 
5
9
  module ActiveSupport
@@ -75,7 +79,7 @@ module ActiveSupport
75
79
  def execute_task(type, title, payload)
76
80
  case type
77
81
  when :step then execute_step(title, payload)
78
- when :group then execute_group(title, payload)
82
+ when :group then execute_group(payload)
79
83
  end
80
84
  end
81
85
 
@@ -96,7 +100,7 @@ module ActiveSupport
96
100
  success
97
101
  end
98
102
 
99
- def execute_group(name, block)
103
+ def execute_group(block)
100
104
  all_success = true
101
105
  TaskCollector.new(&block).tasks.each do |type, title, payload|
102
106
  unless execute_task(type, title, payload)
@@ -1,5 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # This file is adapted from Ruby on Rails (https://github.com/rails/rails).
4
+ # Copyright (c) David Heinemeier Hansson, licensed under the MIT License.
5
+ # See https://github.com/rails/rails/blob/main/MIT-LICENSE
6
+
3
7
  module ActiveSupport
4
8
  # Provides a DSL for declaring a continuous integration workflow that can be run either locally or in the cloud.
5
9
  # Each step is timed, reports success/error, and is aggregated into a collective report that reports total runtime,
@@ -29,7 +33,7 @@ module ActiveSupport
29
33
  error: "\033[1;31m", # Red
30
34
  success: "\033[1;32m", # Green
31
35
  progress: "\033[1;36m" # Cyan
32
- }
36
+ }.freeze
33
37
 
34
38
  attr_reader :results
35
39
 
@@ -1,4 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
+ # This file is adapted from Ruby on Rails (https://github.com/rails/rails).
3
+ # Copyright (c) David Heinemeier Hansson, licensed under the MIT License.
4
+ # See https://github.com/rails/rails/blob/main/MIT-LICENSE
2
5
  require_relative "../config/boot"
3
6
  require "active_support/continuous_integration"
4
7
 
@@ -1,3 +1,7 @@
1
+ # This file is adapted from Ruby on Rails (https://github.com/rails/rails).
2
+ # Copyright (c) David Heinemeier Hansson, licensed under the MIT License.
3
+ # See https://github.com/rails/rails/blob/main/MIT-LICENSE
4
+
1
5
  # Run using bin/ci
2
6
 
3
7
  CI.run do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-local-ci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mohamed Magdy Omar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-03-29 00:00:00.000000000 Z
11
+ date: 2026-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '5.2'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '8.1'
22
+ version: '8.2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,11 +29,11 @@ dependencies:
29
29
  version: '5.2'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '8.1'
32
+ version: '8.2'
33
33
  description: Ships ActiveSupport::ContinuousIntegration and a generator that installs
34
- bin/ci + config/ci.rb. Any Rails 6/7 app can `gem 'rails-local-ci'` and get the
35
- same Local CI DX as Rails 8.1 built-in. Upgrading to Rails 8.1 later = just remove
36
- the gem, zero code changes.
34
+ bin/ci + config/ci.rb. Any Rails 5.2–8.1 app can `gem 'rails-local-ci'` and get
35
+ the full Local CI DX from Rails main (parallel groups, fail-fast, failure summary).
36
+ Upgrading to Rails 8.2 later = just remove the gem, zero code changes.
37
37
  email:
38
38
  - mm.medany96@gmail.com
39
39
  executables: []
@@ -52,7 +52,11 @@ files:
52
52
  homepage: https://github.com/its-magdy/rails-local-ci
53
53
  licenses:
54
54
  - MIT
55
- metadata: {}
55
+ metadata:
56
+ rubygems_mfa_required: 'true'
57
+ source_code_uri: https://github.com/its-magdy/rails-local-ci
58
+ changelog_uri: https://github.com/its-magdy/rails-local-ci/blob/main/CHANGELOG.md
59
+ bug_tracker_uri: https://github.com/its-magdy/rails-local-ci/issues
56
60
  post_install_message:
57
61
  rdoc_options: []
58
62
  require_paths:
@@ -71,6 +75,6 @@ requirements: []
71
75
  rubygems_version: 3.5.22
72
76
  signing_key:
73
77
  specification_version: 4
74
- summary: Backport of Rails 8.1 Local CI (ActiveSupport::ContinuousIntegration) for
75
- Rails 5.2–7.x
78
+ summary: Backport of Rails Local CI (ActiveSupport::ContinuousIntegration, as on Rails
79
+ main) for Rails 5.2–8.1
76
80
  test_files: []