with_clues 1.0.0 → 1.1.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: a9250314165c2529d8ac1a12ccc085a2abf2098f057b5778b1544c34dff21f9c
4
- data.tar.gz: 9f737b4264d64955b17174ac44c9336d8dfa8fe79152b00cf96447b48ac15208
3
+ metadata.gz: 2e8a1a2ede55c2de31c9a7a7e53a576b4a52dd08001b87a9406e8b9a16fa5495
4
+ data.tar.gz: 7e75e12ebe1d192c74813521f4800d2e70dd2641e1c8e70f5cda563fea700100
5
5
  SHA512:
6
- metadata.gz: 9bf1631b167e606916d8d7e87bba3236bf829c0614c722b05fc5ac99c103cd96fb44f4c1e548bbcdbfcc71205e3661ba9d9d58f0a844cf7c004dc618174ab253
7
- data.tar.gz: cdb5e7836e91a48764ad70afeeed9f1aeaf872b3cf748c4663431e522cfc7f4006a00045ab7a03b7fa905d9865f5442dba5621b0e47172fa3c18b4738d1022fe
6
+ metadata.gz: 2c3722af382010534c4020a70b17ff7c6907c101fc0f6159758193a8152b30850a0b208dcfd6a94d1128275b8026c524bad9a2e4cac55bd292cb4c4bc9dc0645
7
+ data.tar.gz: c90b2558520118f6617db83b2a3a48317ee51a03bfd01fc3eec9a726f6e4b5aea34fccc03cae5d74c03aed117eefdf8b39942084f59eed2ecadcb3784954907a
data/.circleci/config.yml CHANGED
@@ -1,35 +1,98 @@
1
- version: 2.1
2
- orbs:
3
- # See https://circleci.com/developer/orbs/orb/circleci/ruby
4
- ruby: circleci/ruby@1.1.2
5
- jobs: # keyword
6
- test: # my name for the job
7
- parameters: # keyword
8
- ruby-version: # my parameter name
9
- type: string # type is a keyword
10
- docker: # keyword
11
- - image: cimg/base:stable
12
- steps: # keyword
13
- - checkout # magic name
14
- - ruby/install: # ruby/ is from the orb name, install is a command in that orb
15
- version: << parameters.ruby-version >> # magic nonsense for param subst
16
- - run:
17
- command: "bin/setup"
18
- - run:
19
- name: "Create the test results directory because you can't just store_test_results with a file and if you do you do not get any sort of error because wtf is with this platform?"
20
- command: mkdir -p /tmp/test-results
21
- - run:
22
- command: bin/ci /tmp/test-results/rspec_results.xml
23
- - store_test_results: # store_test_results is magic from circle
24
- path: /tmp/test-results # path is a param to store_test_results and it must be a directory not a file
25
- - store_artifacts: # store_artifacts is magic from circle
26
- path: /tmp/test-results # path is the param to store_artifacts
27
- workflows: # keyword
28
- all-rubies: # my name for the workflow
29
- jobs: # keyword
30
- - test: # my name for the job
31
- matrix: # keyword
32
- parameters: # keyword
33
- # All rubies being maintained per this page:
34
- # https://www.ruby-lang.org/en/downloads/branches/
35
- ruby-version: [ "2.5", "2.6", "2.7", "3.0" ]
1
+ # THIS IS GENERATED - DO NOT EDIT
2
+ # regenerate with bin/mk_circle_config
3
+ # You are very welcome
4
+ ---
5
+ version: '2.1'
6
+ jobs:
7
+ ruby__2_6:
8
+ docker:
9
+ - image: cimg/ruby:2.6
10
+ steps:
11
+ - checkout
12
+ - run:
13
+ name: Setup for build
14
+ command: bin/setup
15
+ - run:
16
+ name: Ensure bin/setup is idempotent
17
+ command: bin/setup
18
+ - run:
19
+ name: Create the test results dir
20
+ command: mkdir -p /tmp/test-results/2.6
21
+ - run:
22
+ name: Run all tests
23
+ command: bin/ci /tmp/test-results/2.6/rspec_results.xml
24
+ - store_test_results:
25
+ path: "/tmp/test-results/2.6"
26
+ - store_artifacts:
27
+ path: "/tmp/test-results/2.6"
28
+ ruby__2_7:
29
+ docker:
30
+ - image: cimg/ruby:2.7
31
+ steps:
32
+ - checkout
33
+ - run:
34
+ name: Setup for build
35
+ command: bin/setup
36
+ - run:
37
+ name: Ensure bin/setup is idempotent
38
+ command: bin/setup
39
+ - run:
40
+ name: Create the test results dir
41
+ command: mkdir -p /tmp/test-results/2.7
42
+ - run:
43
+ name: Run all tests
44
+ command: bin/ci /tmp/test-results/2.7/rspec_results.xml
45
+ - store_test_results:
46
+ path: "/tmp/test-results/2.7"
47
+ - store_artifacts:
48
+ path: "/tmp/test-results/2.7"
49
+ ruby__3_0:
50
+ docker:
51
+ - image: cimg/ruby:3.0
52
+ steps:
53
+ - checkout
54
+ - run:
55
+ name: Setup for build
56
+ command: bin/setup
57
+ - run:
58
+ name: Ensure bin/setup is idempotent
59
+ command: bin/setup
60
+ - run:
61
+ name: Create the test results dir
62
+ command: mkdir -p /tmp/test-results/3.0
63
+ - run:
64
+ name: Run all tests
65
+ command: bin/ci /tmp/test-results/3.0/rspec_results.xml
66
+ - store_test_results:
67
+ path: "/tmp/test-results/3.0"
68
+ - store_artifacts:
69
+ path: "/tmp/test-results/3.0"
70
+ ruby__3_1:
71
+ docker:
72
+ - image: cimg/ruby:3.1
73
+ steps:
74
+ - checkout
75
+ - run:
76
+ name: Setup for build
77
+ command: bin/setup
78
+ - run:
79
+ name: Ensure bin/setup is idempotent
80
+ command: bin/setup
81
+ - run:
82
+ name: Create the test results dir
83
+ command: mkdir -p /tmp/test-results/3.1
84
+ - run:
85
+ name: Run all tests
86
+ command: bin/ci /tmp/test-results/3.1/rspec_results.xml
87
+ - store_test_results:
88
+ path: "/tmp/test-results/3.1"
89
+ - store_artifacts:
90
+ path: "/tmp/test-results/3.1"
91
+ workflows:
92
+ version: 2
93
+ all_rubies:
94
+ jobs:
95
+ - ruby__2_6
96
+ - ruby__2_7
97
+ - ruby__3_0
98
+ - ruby__3_1
data/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ ruby 3.1.0
@@ -0,0 +1,84 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "yaml"
4
+ require "pathname"
5
+
6
+ circle_config = {
7
+ "version" => "2.1",
8
+ "jobs" => {},
9
+ "workflows" => {
10
+ "version" => 2,
11
+ "all_rubies" => {
12
+ "jobs" => [
13
+ ],
14
+ },
15
+ }
16
+ }
17
+
18
+ supported_rubies = [
19
+ "2.6",
20
+ "2.7",
21
+ "3.0",
22
+ "3.1",
23
+ ]
24
+
25
+ supported_rubies.each do |ruby_verison|
26
+
27
+ test_results_dir = "/tmp/test-results/#{ruby_verison}"
28
+ job_name = "ruby__#{ruby_verison.gsub(/\./,"_")}"
29
+
30
+ job = {
31
+ "docker" => [
32
+ {
33
+ "image" => "cimg/ruby:#{ruby_verison}",
34
+ }
35
+ ],
36
+ "steps" => [
37
+ "checkout",
38
+ {
39
+ "run" => {
40
+ "name" => "Setup for build",
41
+ "command" => "bin/setup",
42
+ }
43
+ },
44
+ {
45
+ "run" => {
46
+ "name" => "Ensure bin/setup is idempotent",
47
+ "command" => "bin/setup",
48
+ }
49
+ },
50
+ {
51
+ "run" => {
52
+ "name" => "Create the test results dir",
53
+ "command" => "mkdir -p #{test_results_dir}",
54
+ }
55
+ },
56
+ {
57
+ "run" => {
58
+ "name" => "Run all tests",
59
+ "command" => "bin/ci #{test_results_dir}/rspec_results.xml",
60
+ }
61
+ },
62
+ {
63
+ "store_test_results" => {
64
+ "path" => test_results_dir,
65
+ }
66
+ },
67
+ {
68
+ "store_artifacts" => {
69
+ "path" => test_results_dir,
70
+ }
71
+ },
72
+ ]
73
+ }
74
+ circle_config["jobs"][job_name] = job
75
+ circle_config["workflows"]["all_rubies"]["jobs"] << job_name
76
+ end
77
+
78
+ circle_config_file = (Pathname(__FILE__).dirname / ".." / ".circleci" / "config.yml").expand_path
79
+ File.open(circle_config_file,"w") do |file|
80
+ file.puts "# THIS IS GENERATED - DO NOT EDIT"
81
+ file.puts "# regenerate with bin/mk_circle_config"
82
+ file.puts "# You are very welcome"
83
+ file.puts circle_config.to_yaml
84
+ end
@@ -1,14 +1,16 @@
1
1
  module WithClues
2
2
  class Html
3
3
  def dump(notifier, page:, context:)
4
- if !page.respond_to?(:html)
5
- notifier.notify "Something may be wrong. page (#{page.class}) does not respond to #html"
6
- return
7
- end
8
4
  notifier.blank_line
9
5
  notifier.notify "HTML {"
10
6
  notifier.blank_line
11
- notifier.notify_raw page.html
7
+ if page.respond_to?(:html)
8
+ notifier.notify_raw page.html
9
+ elsif page.respond_to?(:native)
10
+ notifier.notify_raw page.native
11
+ else
12
+ notifier.notify "[!] Something may be wrong. page (#{page.class}) does not respond to #html or #native"
13
+ end
12
14
  notifier.blank_line
13
15
  notifier.notify "} END HTML"
14
16
  end
@@ -1,3 +1,3 @@
1
1
  module WithClues
2
- VERSION="1.0.0"
2
+ VERSION="1.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: with_clues
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Copeland
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-20 00:00:00.000000000 Z
11
+ date: 2022-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -76,6 +76,7 @@ files:
76
76
  - ".circleci/config.yml"
77
77
  - ".gitignore"
78
78
  - ".rspec"
79
+ - ".tool-versions"
79
80
  - CODE_OF_CONDUCT.md
80
81
  - CONTRIBUTING.md
81
82
  - Gemfile
@@ -84,6 +85,7 @@ files:
84
85
  - Rakefile
85
86
  - bin/ci
86
87
  - bin/console
88
+ - bin/mk_circle_config
87
89
  - bin/mk_gem
88
90
  - bin/rake
89
91
  - bin/rspec
@@ -117,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
119
  - !ruby/object:Gem::Version
118
120
  version: '0'
119
121
  requirements: []
120
- rubygems_version: 3.1.2
122
+ rubygems_version: 3.3.3
121
123
  signing_key:
122
124
  specification_version: 4
123
125
  summary: WTF does this do?