by 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +4 -0
  3. data/MIT-LICENSE +1 -1
  4. data/lib/by/worker.rb +16 -0
  5. metadata +31 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24eb5316c698a47210046042dac2cd9912b3517fc88e88b0efed5da5f35d1fde
4
- data.tar.gz: 77da0597a3214bdec5d90cc8fd5bcb5b746b7dfc606b80f2460f338ddbb3fbed
3
+ metadata.gz: d622dede047f1dcb4f5b49be636d08ce0099b1338a70c46f17d6f3153a00f26f
4
+ data.tar.gz: 95390f53bd32c5269b2d6082d984f2864daca6bb08e0c2c0d07d060f8d706aa6
5
5
  SHA512:
6
- metadata.gz: 65774c8520ea887f2cd0c11bfe71787ef39a00441648170b03b09825267a248443c5678ba8371a4d58963a557d60b150d77c06aad1cbf88fa5e7ba27357af28d
7
- data.tar.gz: 84a86908dd443d71cb42a1150856df38f571ed6f199d9aedeee7bbc6f6dc738d7e0910339ec6151fa3202fc3e98c5b4c6339eb808d70b39daf8d73d16884fe68
6
+ metadata.gz: 76b61b4369e401138a16f71dc4e769eec6845d3aab3ddec019335f53684d6fad7d9a0260300015385845a4869ad820a49c4fed8886306f476cf275dcd9a4c8f6
7
+ data.tar.gz: 2a4b6efe40f06cb1912957eedfa1d15a83cfb82e9a801faae06b14cb235f0408bda93443e4e72321897353d22ed543d55acc119baa11d3ccf3ede561fd9c4806
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ === 1.1.0 (2024-11-06)
2
+
3
+ * Support rspec as first argument to by, to run rspec with by (jeremyevans)
4
+
1
5
  === 1.0.1 (2023-02-09)
2
6
 
3
7
  * Make by-server stop more reliable by using SIGKILL if server does not stop with SIGQUIT (jeremyevans)
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2023 Jeremy Evans
1
+ Copyright (c) 2023-2024 Jeremy Evans
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to
data/lib/by/worker.rb CHANGED
@@ -136,6 +136,22 @@ module By
136
136
  super(exit_code)
137
137
  end
138
138
  M.run(args)
139
+ when 'rspec'
140
+ args.shift
141
+ ARGV.replace(args)
142
+ require 'rspec/core'
143
+ RSpec.configure do |c|
144
+ # Fix start_time to be accurate if rspec was required by by-server
145
+ c.instance_variable_set(:@start_time, Time.now)
146
+ end
147
+ # invoke exits non-zero if there are failures
148
+ RSpec::Core::Runner.define_singleton_method(:exit) do |exit_code|
149
+ worker.normal_exit = exit_code == 0
150
+ cleanup.call
151
+ super(exit_code)
152
+ end
153
+ RSpec::Core::Runner.invoke
154
+ at_exit(&cleanup)
139
155
  when 'irb'
140
156
  at_exit(&cleanup)
141
157
  args.shift
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: by
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Evans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-09 00:00:00.000000000 Z
11
+ date: 2024-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest-global_expectations
@@ -38,6 +38,34 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec-core
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec-expectations
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
41
69
  description: |
42
70
  by is a library preloader for ruby designed to speed up process startup.
43
71
  It uses a client/server approach, where the server loads the libraries and
@@ -97,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
125
  - !ruby/object:Gem::Version
98
126
  version: '0'
99
127
  requirements: []
100
- rubygems_version: 3.4.1
128
+ rubygems_version: 3.5.22
101
129
  signing_key:
102
130
  specification_version: 4
103
131
  summary: Ruby library preloader