tldr 0.9.3 → 0.9.4
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 +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +2 -2
- data/lib/tldr/path_util.rb +8 -0
- data/lib/tldr/sorbet_compatibility.rb +7 -1
- data/lib/tldr/value/config.rb +6 -0
- data/lib/tldr/version.rb +1 -1
- data/lib/tldr.rb +3 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 661e0ea905baa7122eba59c8f5954a3228698a2972a3567447bca5d8e7478f7e
|
4
|
+
data.tar.gz: 15ca7a5c88ee2406952f760bfbb58143b37a2ba929d34183722a4eb2cb05d7ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62b464ca2538db776cc6d8f3b664f465c230c1faff70196342ef48b04b98b5419bc4a43718cad80b159887c64f840816caaf79f8451baa8adea05f5424e2ab98
|
7
|
+
data.tar.gz: 1c7b685b900c2b47de3750c6e5ae4706853d9d1b8758cd514373e56dcfca580a40e9ca0bc7c391a52286acee9d25a1147673d86bdf4b95d14ae67e808146c4a9
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -8,12 +8,12 @@ We initially meant this as a joke [while
|
|
8
8
|
pairin'](https://www.youtube.com/live/bmi-SWeH4MA?si=p5g1j1FQZrbYEOCg&t=63), but
|
9
9
|
in addition to being funny, it was also a pretty good idea. So we fleshed out
|
10
10
|
`tldr` to be a full-featured, mostly
|
11
|
-
[Minitest-compatible](#minitest-compatibility), and
|
11
|
+
[Minitest-compatible](#minitest-compatibility), and dare-we-say pleasant test
|
12
12
|
framework for Ruby.
|
13
13
|
|
14
14
|
The "big idea" here is TLDR is designed for users to run the `tldr` command
|
15
15
|
repeatedly as they work—as opposed to only running the tests for whatever is
|
16
|
-
being worked on. Even if the suite
|
16
|
+
being worked on. Even if the suite runs over the 1.8 second time limit. Because
|
17
17
|
TLDR shuffles and runs in parallel and is guaranteed to take less than two
|
18
18
|
seconds,
|
19
19
|
**you'll actually wind up running _all_ of your tests quite often as you work**,
|
data/lib/tldr/path_util.rb
CHANGED
@@ -3,7 +3,13 @@ class TLDR
|
|
3
3
|
def self.unwrap_method method
|
4
4
|
return method unless defined? ::T::Private::Methods
|
5
5
|
|
6
|
-
T::Private::Methods.signature_for_method(method)
|
6
|
+
sig_or_method = ::T::Private::Methods.signature_for_method(method) || method
|
7
|
+
|
8
|
+
if sig_or_method.is_a?(Method) || sig_or_method.is_a?(UnboundMethod)
|
9
|
+
sig_or_method
|
10
|
+
else # it's a T::Private::Methods::Signature
|
11
|
+
sig_or_method.method
|
12
|
+
end
|
7
13
|
end
|
8
14
|
end
|
9
15
|
end
|
data/lib/tldr/value/config.rb
CHANGED
@@ -36,6 +36,7 @@ class TLDR
|
|
36
36
|
|
37
37
|
Config = Struct.new(*CONFIG_ATTRIBUTES, keyword_init: true) do
|
38
38
|
def initialize(**args)
|
39
|
+
original_base_path = Dir.pwd
|
39
40
|
unless args[:config_intended_for_merge_only]
|
40
41
|
change_working_directory_because_i_am_bad_and_i_should_feel_bad!(args[:base_path])
|
41
42
|
args = merge_dotfile_args(args) unless args[:no_dotfile]
|
@@ -43,6 +44,7 @@ class TLDR
|
|
43
44
|
args = undefault_parallel_if_seed_set(args)
|
44
45
|
unless args[:config_intended_for_merge_only]
|
45
46
|
args = merge_defaults(args)
|
47
|
+
revert_working_directory_change_because_itll_ruin_everything!(original_base_path)
|
46
48
|
end
|
47
49
|
|
48
50
|
super(**args)
|
@@ -239,6 +241,10 @@ class TLDR
|
|
239
241
|
Dir.chdir(base_path) unless base_path.nil?
|
240
242
|
end
|
241
243
|
|
244
|
+
def revert_working_directory_change_because_itll_ruin_everything! original_base_path
|
245
|
+
Dir.chdir(original_base_path) unless Dir.pwd == original_base_path
|
246
|
+
end
|
247
|
+
|
242
248
|
def merge_dotfile_args args
|
243
249
|
return args if args[:no_dotfile]
|
244
250
|
|
data/lib/tldr/version.rb
CHANGED
data/lib/tldr.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tldr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Searls
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-10-
|
12
|
+
date: 2023-10-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: super_diff
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
112
|
requirements: []
|
113
|
-
rubygems_version: 3.
|
113
|
+
rubygems_version: 3.4.6
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: TLDR will run your tests, but only for 1.8 seconds.
|