rspec-osc7501 0.1.2 → 0.1.3

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: 5768212549d6cfe8f1db7e61e6e9ccb8b930c51536f00c3dd25c1aa7788d11fc
4
- data.tar.gz: a93974d3e6cc872aca1845d9590e1945773d29020c3774277ba5023175c1951f
3
+ metadata.gz: dd41d289a0bf23e97697865b61a02cbab47a71deac877207f2299897f952277a
4
+ data.tar.gz: 23f1e885b80df344e008650a4f7d65d65fd64c596167245fa6ca6c2ad5dd7012
5
5
  SHA512:
6
- metadata.gz: 8193fb2359fc8227db3646ebe4d3b8e20810bf3ba3f8adf379fb2dd634a6ecea6729ed7dbc49c7e4772a377175760a61169a1718516c603f3f83c87da6dc8393
7
- data.tar.gz: f484ce546596745aff7671d4dd474405197fbc36d0bfaaefe0fa09f30f8bcfff989c7216881b91c89f6c0f564f7c3e053a74bf82713c73882ec2c00ef9737605
6
+ metadata.gz: f65c332e6b8124872674ee477733e7243b777f4a80b642ecac99bbed183e15a9a8a15a8a8a40f1c7652cc1ec7f1bf7acc61871a4af8e85d2bbcc82b82c4a1771
7
+ data.tar.gz: ff9ca548aa836cdf585d1ef2d931b8a3e980f90b6b951f9bef4d57286fef76ad887aad2bf7f30d59976637b5d42e3465cd61ba9ce8a768b53036678849549c64
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.1.3 - 2026-11-10
6
+
7
+ - Support Ruby 2.1 and RSpec 3.6 ([5afb73d](https://github.com/cosgroveb/rspec-osc7501/commit/5afb73d1ededebcafbcb81096e6bb024f791a46c))
8
+ - Require concise PR descriptions ([feea21a](https://github.com/cosgroveb/rspec-osc7501/commit/feea21a985b7c59e1e5a1ee34b546ba58f049c69))
9
+
5
10
  ## 0.1.2 - 2026-11-09
6
11
 
7
12
  - Bump actions/checkout from 4.4.0 to 7.0.1 ([c19db3a](https://github.com/cosgroveb/rspec-osc7501/commit/c19db3a1a8c5bb41ab4db2eb0bc8740ce0a66bd0))
data/CONTRIBUTING.md CHANGED
@@ -9,7 +9,7 @@ and reports. State what you tested and what remains uncertain. Be prepared to
9
9
  explain your choices and address feedback. When using an agent to help answer
10
10
  a reviewer, check the answer and send only what is relevant.
11
11
 
12
- Use MRI Ruby 3.3 or newer. Install actionlint 1.7.12 on your PATH, then run all checks:
12
+ Use MRI Ruby 3.3 or newer for development tooling. Install actionlint 1.7.12 on your PATH, then run all checks:
13
13
 
14
14
  ```sh
15
15
  bundle install
@@ -18,8 +18,8 @@ bundle exec rake
18
18
 
19
19
  The default task runs RuboCop with rubocop-rspec, bundler-audit, actionlint,
20
20
  specs, installed-gem smoke tests and RDoc. Run `bundle exec rake lint`, `audit`, `workflows`,
21
- or `spec` for individual checks. Keep RuboCop's default rules and fix violations
22
- without adding exclusions or a TODO baseline. Dependency auditing checks the
21
+ or `spec` for individual checks. Keep RuboCop's default rules, except the scoped Ruby 2.1 compatibility
22
+ exclusions in `.rubocop.yml`. Do not add a TODO baseline. Dependency auditing checks the
23
23
  lockfile generated by `bundle install`. Keep that lockfile out of commits.
24
24
 
25
25
  Specs run in random order and report their seed. Reproduce an ordering failure
@@ -28,7 +28,7 @@ with `bundle exec rspec --seed <seed>` and narrow it with
28
28
  defined order because their interrupt and fail-fast cases depend on sequence.
29
29
 
30
30
  Keep runtime dependencies limited to `rspec-core`. Cover formatter behavior with
31
- specs and lifecycle changes with real RSpec subprocesses. Check RSpec 3.12 and
31
+ specs and lifecycle changes with real RSpec subprocesses. Check RSpec 3.6 through
32
32
  3.13 when changing early-stop detection.
33
33
 
34
34
  Build the gem and documentation:
@@ -44,6 +44,35 @@ rendered documentation. Keep generated files out of commits.
44
44
  The smoke task builds and installs the gem in a temporary directory, then checks
45
45
  passing and failing suites without loading the checkout's library.
46
46
 
47
+ ## Runtime compatibility
48
+
49
+ The gem supports MRI Ruby 2.1 or newer and RSpec Core 3.6 through 3.x.
50
+ Use `Gemfile.compat` to test the formatter without modern lint, release or RDoc
51
+ dependencies. On Ruby 2.1, install Bundler 1.17.3 first. Set the RSpec version
52
+ before resolving dependencies:
53
+
54
+ ```sh
55
+ export BUNDLE_GEMFILE=Gemfile.compat
56
+ export RSPEC_MINOR=3.6
57
+ export RSPEC_CORE_VERSION=3.6.0
58
+ bundle install
59
+ bundle exec rspec spec/rspec
60
+ bundle exec gem build rspec-osc7501.gemspec
61
+ bundle exec ruby script/smoke.rb rspec-osc7501-*.gem
62
+ ```
63
+
64
+ Remove `Gemfile.compat.lock` before changing RSpec versions. Keep it out of commits.
65
+ The compatibility bundle pins diff-lcs 1.3 so test dependencies install on Ruby 2.1.
66
+ CI checks the oldest Ruby against both RSpec endpoints, the oldest RSpec on modern
67
+ Ruby, and the Debian Bullseye and Bookworm version families. These jobs run the
68
+ formatter suite and installed-gem smoke checks. Modern jobs also test release
69
+ automation, lint and documentation.
70
+
71
+ Compatibility checks use available patch releases within each Ruby series.
72
+ Supporting an older runtime does not extend its upstream security maintenance.
73
+ Unset `BUNDLE_GEMFILE`, `RSPEC_MINOR` and `RSPEC_CORE_VERSION` before returning to
74
+ the modern development bundle.
75
+
47
76
  Update usage or behavior documentation for user-visible changes. Write commit
48
77
  subjects that describe the change, because release notes use those subjects.
49
78
  Do not maintain `Unreleased` entries by hand. Preserve the Apache-2.0 license text.
data/README.md CHANGED
@@ -4,7 +4,7 @@ Report RSpec suite activity, progress and results to terminals that support
4
4
  [OSC 7501](https://www.superlogical.com/rex/docs/build/program-status).
5
5
  Use the formatter alongside RSpec's progress or documentation formatter.
6
6
 
7
- Requires MRI Ruby 3.3 or newer and `rspec-core >= 3.12, < 4`.
7
+ Requires MRI Ruby 2.1 or newer and `rspec-core >= 3.6, < 4`.
8
8
 
9
9
  ## Install
10
10
 
data/doc/behavior.rdoc CHANGED
@@ -90,5 +90,7 @@ instance. Other exceptions propagate.
90
90
 
91
91
  == Compatibility
92
92
 
93
- The gem requires Ruby >= 3.3 and <tt>rspec-core</tt> >= 3.12, < 4. MRI is the
94
- supported Ruby engine. Other engines and RSpec 4 are unverified.
93
+ The gem requires Ruby >= 2.1 and <tt>rspec-core</tt> >= 3.6, < 4. MRI is the
94
+ supported Ruby engine. Other engines and RSpec 4 are unverified. Runtime
95
+ compatibility does not extend upstream security maintenance for older Ruby versions.
96
+ Development tools use modern Ruby, as described in CONTRIBUTING.md.
@@ -89,8 +89,8 @@ module RSpec
89
89
  return if now - @last_update < 0.1
90
90
 
91
91
  message = "#{@completed}/#{@total} examples"
92
- message += ", #{@failed} failures" if @failed.positive?
93
- message += ", #{@pending} pending" if @pending.positive?
92
+ message += ", #{@failed} failures" if @failed > 0
93
+ message += ", #{@pending} pending" if @pending > 0
94
94
  message += ": #{@current}" if @current
95
95
  @writer.emit(state: 'working', msg: message, progress: progress)
96
96
  @last_update = now
@@ -99,20 +99,20 @@ module RSpec
99
99
  def progress
100
100
  return if @total.zero?
101
101
 
102
- ((@completed * 100) / @total).clamp(0, 100)
102
+ [[(@completed * 100) / @total, 0].max, 100].min
103
103
  end
104
104
 
105
105
  def final_state(summary, active_exception)
106
106
  return 'idle' if active_exception.is_a?(Interrupt)
107
107
  return exit_state(summary, active_exception) if active_exception.is_a?(SystemExit)
108
- return 'error' if active_exception || summary.errors_outside_of_examples_count.positive?
108
+ return 'error' if active_exception || summary.errors_outside_of_examples_count > 0
109
109
  return stopped_state(summary) if early_stop?
110
110
 
111
111
  unsuccessful_summary?(summary) ? 'error' : 'done'
112
112
  end
113
113
 
114
114
  def exit_state(summary, exception)
115
- failed = summary.failure_count.positive? || summary.errors_outside_of_examples_count.positive?
115
+ failed = summary.failure_count > 0 || summary.errors_outside_of_examples_count > 0
116
116
  exception.status.zero? && !failed ? 'idle' : 'error'
117
117
  end
118
118
 
@@ -121,10 +121,10 @@ module RSpec
121
121
  end
122
122
 
123
123
  def unsuccessful_summary?(summary)
124
- summary.failure_count.positive? || (summary.example_count.zero? && RSpec.configuration.fail_if_no_examples)
124
+ summary.failure_count > 0 || (summary.example_count.zero? && RSpec.configuration.fail_if_no_examples)
125
125
  end
126
126
 
127
- # RSpec has no public early-stop event in 3.12 or 3.13.
127
+ # RSpec has no public early-stop event in supported 3.x versions.
128
128
  def early_stop?
129
129
  RSpec.world.wants_to_quit
130
130
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RSpec
4
4
  module OSC7501
5
- VERSION = '0.1.2'
5
+ VERSION = '0.1.3'
6
6
  end
7
7
  end
@@ -17,7 +17,7 @@ module RSpec
17
17
  return unless @enabled
18
18
 
19
19
  fields = ['app=rspec', "title=#{@title}", "state=#{state}", "msg=#{encode(msg, 2048)}"]
20
- fields << "progress=#{progress.to_i.clamp(0, 100)}" if state == 'working' && !progress.nil?
20
+ fields << "progress=#{[[progress.to_i, 0].max, 100].min}" if state == 'working' && !progress.nil?
21
21
  @output.write("\e]7501;#{fields.join(':')}\e\\")
22
22
  @output.flush if @output.respond_to?(:flush)
23
23
  rescue IOError, SystemCallError
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-osc7501
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Cosgrove
@@ -15,7 +15,7 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '3.12'
18
+ version: '3.6'
19
19
  - - "<"
20
20
  - !ruby/object:Gem::Version
21
21
  version: '4'
@@ -25,7 +25,7 @@ dependencies:
25
25
  requirements:
26
26
  - - ">="
27
27
  - !ruby/object:Gem::Version
28
- version: '3.12'
28
+ version: '3.6'
29
29
  - - "<"
30
30
  - !ruby/object:Gem::Version
31
31
  version: '4'
@@ -63,7 +63,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
63
63
  requirements:
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
- version: '3.3'
66
+ version: '2.1'
67
67
  required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - ">="