scout-essentials 1.9.0 → 1.9.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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.vimproject +18 -1
  3. data/Rakefile +9 -0
  4. data/VERSION +1 -1
  5. data/doc/Improvements.md +20 -0
  6. data/doc/StartHere.md +7 -4
  7. data/doc/developer/AnnotationSystem.md +10 -15
  8. data/doc/developer/Configuration.md +20 -30
  9. data/doc/developer/CoreUtilities.md +52 -22
  10. data/doc/developer/DesignPrinciples.md +7 -9
  11. data/doc/developer/DocumentationPractices.md +476 -0
  12. data/doc/developer/ErrorHandling.md +11 -20
  13. data/doc/developer/LockingAndConcurrency.md +20 -13
  14. data/doc/developer/StreamingModel.md +13 -14
  15. data/doc/developer/Testing.md +389 -0
  16. data/doc/user/AnnotatingData.md +9 -13
  17. data/doc/user/CommandLineOptions.md +9 -12
  18. data/doc/user/Cookbook.md +7 -10
  19. data/doc/user/HandlingStreams.md +22 -29
  20. data/doc/user/LoggingAndProgress.md +9 -11
  21. data/doc/user/ProducingResources.md +0 -1
  22. data/doc/user/RemoteData.md +10 -13
  23. data/doc/user/RunningCommands.md +12 -17
  24. data/doc/user/WorkingWithFiles.md +10 -2
  25. data/lib/scout/config.rb +1 -0
  26. data/lib/scout/indiferent_hash.rb +8 -2
  27. data/lib/scout/log/fingerprint.rb +1 -1
  28. data/lib/scout/misc/filesystem.rb +2 -2
  29. data/lib/scout/named_array.rb +4 -0
  30. data/lib/scout/open/final.rb +1 -1
  31. data/lib/scout/open/stream.rb +14 -13
  32. data/lib/scout/path/util.rb +1 -1
  33. data/lib/scout/testing/availability.rb +264 -0
  34. data/lib/scout/testing/scout_state.rb +193 -0
  35. data/lib/scout/testing.rb +82 -0
  36. data/research/doc-audit-findings.md +7 -5
  37. data/research/doc-structure.md +89 -0
  38. data/research/lock-namespace-blindness.md +73 -0
  39. data/research/probing-guide.md +311 -0
  40. data/research/testing-availability-scout-ai-handoff.md +235 -0
  41. data/research/testing-availability-scout-rig-handoff.md +355 -0
  42. data/scout-essentials.gemspec +24 -3
  43. data/test/scout/annotation/test_dup_clone.rb +31 -0
  44. data/test/scout/indiferent_hash/test_case_insensitive_staleness.rb +27 -0
  45. data/test/scout/indiferent_hash/test_string2hash_false.rb +13 -0
  46. data/test/scout/misc/test_filesystem.rb +10 -0
  47. data/test/scout/misc/test_timespan.rb +30 -0
  48. data/test/scout/open/test_compression_detection.rb +32 -0
  49. data/test/scout/open/test_forced_gzip_broken.rb +25 -0
  50. data/test/scout/test_named_array_resolution.rb +49 -0
  51. data/test/scout/test_testing.rb +195 -0
  52. data/test/scout/test_tmpfile_cleanup.rb +23 -0
  53. data/test/scout/testing/test_availability.rb +222 -0
  54. data/test/scout/testing/test_state_bindings.rb +163 -0
  55. data/test/test_helper.rb +26 -12
  56. metadata +23 -2
data/test/test_helper.rb CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  require 'simplecov'
3
2
 
4
3
  module SimpleCov::Configuration
@@ -25,26 +24,41 @@ require 'scout/tmpfile'
25
24
  require 'scout/log'
26
25
  require 'scout/open'
27
26
  require 'scout/persist'
27
+ require 'scout/testing'
28
+ require 'scout/testing/scout_state'
28
29
 
29
30
  class Test::Unit::TestCase
30
-
31
- def assert_equal_path(path1, path2)
32
- assert_equal File.expand_path(path1), File.expand_path(path2)
33
- end
31
+ include Scout::Testing::Assertions
34
32
 
35
33
  def tmpdir
36
- @tmpdir ||= Path.setup('tmp/test_tmpdir').find
34
+ @tmpdir ||= Path.setup(Scout::Testing.create_tmpdir(
35
+ parent: File.expand_path('../tmp/test-runs', __dir__),
36
+ prefix: "#{self.class.name}-"
37
+ ))
37
38
  end
38
39
 
39
40
  setup do
40
- TmpFile.tmpdir = tmpdir.tmpfiles
41
+ @scout_testing_state = Scout::Testing::State.new(tmpdir).activate
42
+ @saved_progress_severity = [
43
+ Log::ProgressBar.instance_variable_defined?(:@default_severity),
44
+ Log::ProgressBar.instance_variable_get(:@default_severity)
45
+ ]
41
46
  Log::ProgressBar.default_severity = 0
42
- Persist.cache_dir = tmpdir.var.cache
43
- Persist::MEMORY_CACHE.clear
44
- Open.remote_cache_dir = tmpdir.var.cache
45
47
  end
46
-
48
+
47
49
  teardown do
48
- Open.rm_rf tmpdir
50
+ begin
51
+ @scout_testing_state.restore if @scout_testing_state
52
+ ensure
53
+ if @saved_progress_severity
54
+ existed, value = @saved_progress_severity
55
+ if existed
56
+ Log::ProgressBar.instance_variable_set(:@default_severity, value)
57
+ elsif Log::ProgressBar.instance_variable_defined?(:@default_severity)
58
+ Log::ProgressBar.remove_instance_variable(:@default_severity)
59
+ end
60
+ end
61
+ Scout::Testing.remove_tmpdir(@tmpdir) if @tmpdir
62
+ end
49
63
  end
50
64
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout-essentials
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
@@ -157,11 +157,13 @@ files:
157
157
  - doc/developer/Configuration.md
158
158
  - doc/developer/CoreUtilities.md
159
159
  - doc/developer/DesignPrinciples.md
160
+ - doc/developer/DocumentationPractices.md
160
161
  - doc/developer/ErrorHandling.md
161
162
  - doc/developer/LockingAndConcurrency.md
162
163
  - doc/developer/PathResolution.md
163
164
  - doc/developer/PersistenceAndResources.md
164
165
  - doc/developer/StreamingModel.md
166
+ - doc/developer/Testing.md
165
167
  - doc/user/AnnotatingData.md
166
168
  - doc/user/CachingResults.md
167
169
  - doc/user/CommandLineOptions.md
@@ -237,26 +239,37 @@ files:
237
239
  - lib/scout/simple_opt/get.rb
238
240
  - lib/scout/simple_opt/parse.rb
239
241
  - lib/scout/simple_opt/setup.rb
242
+ - lib/scout/testing.rb
243
+ - lib/scout/testing/availability.rb
244
+ - lib/scout/testing/scout_state.rb
240
245
  - lib/scout/tmpfile.rb
241
246
  - research/annotations-data-analysis.md
242
247
  - research/behavior-probes.md
243
248
  - research/commands-streaming-analysis.md
244
249
  - research/design-philosophy-analysis.md
245
250
  - research/doc-audit-findings.md
251
+ - research/doc-structure.md
246
252
  - research/ecosystem-attribution.md
247
253
  - research/implementation-inventory-core.md
248
254
  - research/implementation-inventory-open.md
249
255
  - research/implementation-inventory-path-persist-resource.md
250
256
  - research/io-paths-analysis.md
257
+ - research/lock-namespace-blindness.md
251
258
  - research/persistence-resources-analysis.md
259
+ - research/probing-guide.md
252
260
  - research/synthesis-report.md
261
+ - research/testing-availability-scout-ai-handoff.md
262
+ - research/testing-availability-scout-rig-handoff.md
253
263
  - scout-essentials.gemspec
254
264
  - share/color/color_names
255
265
  - share/color/diverging_colors.hex
256
266
  - share/software/install_helpers
257
267
  - test/scout/annotation/test_array.rb
268
+ - test/scout/annotation/test_dup_clone.rb
258
269
  - test/scout/indiferent_hash/test_case_insensitive.rb
270
+ - test/scout/indiferent_hash/test_case_insensitive_staleness.rb
259
271
  - test/scout/indiferent_hash/test_options.rb
272
+ - test/scout/indiferent_hash/test_string2hash_false.rb
260
273
  - test/scout/log/test_color.rb
261
274
  - test/scout/log/test_fingerprint.rb
262
275
  - test/scout/log/test_progress.rb
@@ -268,6 +281,9 @@ files:
268
281
  - test/scout/misc/test_matching.rb
269
282
  - test/scout/misc/test_math.rb
270
283
  - test/scout/misc/test_system.rb
284
+ - test/scout/misc/test_timespan.rb
285
+ - test/scout/open/test_compression_detection.rb
286
+ - test/scout/open/test_forced_gzip_broken.rb
271
287
  - test/scout/open/test_lock.rb
272
288
  - test/scout/open/test_remote.rb
273
289
  - test/scout/open/test_stream.rb
@@ -296,11 +312,16 @@ files:
296
312
  - test/scout/test_log.rb
297
313
  - test/scout/test_misc.rb
298
314
  - test/scout/test_named_array.rb
315
+ - test/scout/test_named_array_resolution.rb
299
316
  - test/scout/test_open.rb
300
317
  - test/scout/test_path.rb
301
318
  - test/scout/test_persist.rb
302
319
  - test/scout/test_resource.rb
320
+ - test/scout/test_testing.rb
303
321
  - test/scout/test_tmpfile.rb
322
+ - test/scout/test_tmpfile_cleanup.rb
323
+ - test/scout/testing/test_availability.rb
324
+ - test/scout/testing/test_state_bindings.rb
304
325
  - test/test_helper.rb
305
326
  homepage: http://github.com/mikisvaz/scout-essentials
306
327
  licenses:
@@ -320,7 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
320
341
  - !ruby/object:Gem::Version
321
342
  version: '0'
322
343
  requirements: []
323
- rubygems_version: 3.7.2
344
+ rubygems_version: 4.0.23
324
345
  specification_version: 4
325
346
  summary: Scout essential tools
326
347
  test_files: []