howzit 2.1.18 → 2.1.22

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.
data/spec/cli_spec.rb CHANGED
@@ -15,7 +15,7 @@ describe 'CLI' do
15
15
  execute_script('bin/howzit', use_bundler: true, args: %w[-L])
16
16
  expect(last_execution).to be_successful
17
17
  expect(last_execution.stdout).to match(/Topic Balogna/)
18
- expect(last_execution.stdout.split(/\n/).count).to eq 4
18
+ expect(last_execution.stdout.split(/\n/).count).to eq 7
19
19
  end
20
20
 
21
21
  it 'lists available tasks' do
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Howzit::RunReport do
6
+ before do
7
+ Howzit.run_log = []
8
+ Howzit.multi_topic_run = false
9
+ end
10
+
11
+ after do
12
+ Howzit::RunReport.reset
13
+ Howzit.multi_topic_run = false
14
+ end
15
+
16
+ it 'renders a bordered summary for single topic runs' do
17
+ Howzit::RunReport.log({ topic: 'Git: Config', task: 'Run Git Origin', success: true, exit_status: 0 })
18
+ plain = Howzit::RunReport.format.uncolor
19
+ expect(plain).to include('- [✓] Run Git Origin')
20
+ expect(plain).not_to include('Git: Config:')
21
+ top, line, bottom = plain.split("\n")
22
+ expect(top).to eq('=' * line.length)
23
+ expect(bottom).to eq('-' * line.length)
24
+ end
25
+
26
+ it 'prefixes topic titles and shows failures when multiple topics run' do
27
+ Howzit.multi_topic_run = true
28
+ Howzit::RunReport.log({ topic: 'Git: Config', task: 'Run Git Origin', success: true, exit_status: 0 })
29
+ Howzit::RunReport.log({ topic: 'Git: Clean Repo', task: 'Clean Git Repo', success: false, exit_status: 12 })
30
+ plain = Howzit::RunReport.format.uncolor
31
+ expect(plain).to include('- [✓] Git: Config: Run Git Origin')
32
+ expect(plain).to include('- [X] Git: Clean Repo: Clean Git Repo (Failed: exit code 12)')
33
+ end
34
+ end
35
+
data/spec/spec_helper.rb CHANGED
@@ -18,6 +18,8 @@ RSpec.configure do |c|
18
18
  save_buildnote
19
19
  Howzit.options[:include_upstream] = false
20
20
  Howzit.options[:default] = true
21
+ Howzit.options[:matching] = 'partial'
22
+ Howzit.options[:multiple_matches] = 'choose'
21
23
  @hz = Howzit.buildnote
22
24
  end
23
25
 
@@ -67,6 +69,18 @@ def save_buildnote
67
69
  ## Happy Bgagngagnga
68
70
 
69
71
  This one is just to throw things off
72
+
73
+ ## Git: Clean Repo
74
+
75
+ Keep Git projects tidy.
76
+
77
+ ## Blog: Update Post
78
+
79
+ Publish the latest article updates.
80
+
81
+ ## Release, Deploy
82
+
83
+ Prep and deploy the latest release.
70
84
  EONOTE
71
85
  File.open('builda.md', 'w') { |f| f.puts note }
72
86
  # puts "Saved to builda.md: #{File.exist?('builda.md')}"
data/spec/topic_spec.rb CHANGED
@@ -82,8 +82,11 @@ describe Howzit::Topic do
82
82
  end
83
83
 
84
84
  describe '.print_out' do
85
- Howzit.options[:header_format] = :block
86
- Howzit.options[:color] = false
85
+ before do
86
+ Howzit.options[:header_format] = :block
87
+ Howzit.options[:color] = false
88
+ Howzit.options[:show_all_code] = false
89
+ end
87
90
 
88
91
  it 'prints the topic title' do
89
92
  expect(topic.print_out({ single: true, header: true }).join("\n").uncolor).to match(/▌Topic Balogna/)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: howzit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.18
4
+ version: 2.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-01 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bundler
@@ -275,15 +275,6 @@ executables:
275
275
  extensions: []
276
276
  extra_rdoc_files: []
277
277
  files:
278
- - ".editorconfig"
279
- - ".github/FUNDING.yml"
280
- - ".gitignore"
281
- - ".howzit.taskpaper.bak"
282
- - ".irbrc"
283
- - ".rspec"
284
- - ".rubocop.yml"
285
- - ".travis.yml"
286
- - ".yardopts"
287
278
  - CHANGELOG.md
288
279
  - Gemfile
289
280
  - Guardfile
@@ -304,7 +295,6 @@ files:
304
295
  - fish/completions/howzit.fish
305
296
  - fish/functions/bld.fish
306
297
  - howzit.gemspec
307
- - lib/.rubocop.yml
308
298
  - lib/howzit.rb
309
299
  - lib/howzit/buildnote.rb
310
300
  - lib/howzit/colors.rb
@@ -312,17 +302,18 @@ files:
312
302
  - lib/howzit/console_logger.rb
313
303
  - lib/howzit/hash.rb
314
304
  - lib/howzit/prompt.rb
305
+ - lib/howzit/run_report.rb
315
306
  - lib/howzit/stringutils.rb
316
307
  - lib/howzit/task.rb
317
308
  - lib/howzit/topic.rb
318
309
  - lib/howzit/util.rb
319
310
  - lib/howzit/version.rb
320
311
  - scripts/runtests.sh
321
- - spec/.rubocop.yml
322
312
  - spec/buildnote_spec.rb
323
313
  - spec/cli_spec.rb
324
314
  - spec/prompt_spec.rb
325
315
  - spec/ruby_gem_spec.rb
316
+ - spec/run_report_spec.rb
326
317
  - spec/spec_helper.rb
327
318
  - spec/task_spec.rb
328
319
  - spec/topic_spec.rb
@@ -347,16 +338,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
347
338
  - !ruby/object:Gem::Version
348
339
  version: '0'
349
340
  requirements: []
350
- rubygems_version: 3.6.2
341
+ rubygems_version: 3.6.7
351
342
  specification_version: 4
352
343
  summary: Provides a way to access Markdown project notes by topic with query capabilities
353
344
  and the ability to execute the tasks it describes.
354
345
  test_files:
355
- - spec/.rubocop.yml
356
346
  - spec/buildnote_spec.rb
357
347
  - spec/cli_spec.rb
358
348
  - spec/prompt_spec.rb
359
349
  - spec/ruby_gem_spec.rb
350
+ - spec/run_report_spec.rb
360
351
  - spec/spec_helper.rb
361
352
  - spec/task_spec.rb
362
353
  - spec/topic_spec.rb
data/.editorconfig DELETED
@@ -1,9 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- charset = utf-8
5
- end_of_line = lf
6
- insert_final_newline = true
7
- trim_trailing_whitespace = true
8
- indent_style = space
9
- indent_size = 2
data/.github/FUNDING.yml DELETED
@@ -1,2 +0,0 @@
1
- github: [ttscoff]
2
- custom: ['https://brettterpstra.com/support/', 'https://brettterpstra.com/donate/']
data/.gitignore DELETED
@@ -1,45 +0,0 @@
1
- # Parts of this file were adapted from
2
- # GitHub’s collection of .gitignore file templates
3
- # which are Copyright (c) 2016 GitHub, Inc.
4
- # and released under the MIT License.
5
- # For more details, visit the project page:
6
- # https://github.com/github/gitignore
7
-
8
- *.gem
9
- *.rbc
10
- /.config
11
- /coverage/
12
- /InstalledFiles
13
- /pkg/
14
- /spec/reports/
15
- /spec/examples.txt
16
- /test/tmp/
17
- /test/version_tmp/
18
- /tmp/
19
-
20
- ## Specific to RubyMotion:
21
- .dat*
22
- .repl_history
23
- build/
24
-
25
- ## Documentation cache and generated files:
26
- /.yardoc/
27
- /_yardoc/
28
- /doc/
29
- /rdoc/
30
-
31
- ## Environment normalization:
32
- /.bundle/
33
- /vendor/bundle
34
- /lib/bundler/man/
35
-
36
- # for a library or gem, you might want to ignore these files since the code is
37
- # intended to run in multiple environments; otherwise, check them in:
38
- Gemfile.lock
39
- .ruby-version
40
- .ruby-gemset
41
-
42
- # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
43
- .rvmrc
44
- results.log
45
- html
@@ -1,27 +0,0 @@
1
- Inbox:
2
- - Topic summaries @na
3
- Maybe in square brackets on line after topic title, or as a blockquote. When doing a list of available topics, include its summary in the output. Ignore or specially style summary when viewing full topic.
4
- - Named positional arguments for topics @na
5
- Parenthesis after title like a function (arg1, arg2). Variables can have default values (arg1 = testing) and are available as [%var1] replacements in scripts
6
- howzit:
7
- New Features:
8
- Ideas:
9
- - Nested topics @maybe @na
10
- Allow increased header levels to nest topics within a parent
11
- Running/viewing a parent includes all nested subtopics
12
- All topics still available via search
13
- When reading file, set a base level from first header, then test each additional topic title to see whether it's greater than the current level. If so, change current level and begin collecting subtopics at the same level
14
- Howzit::Topic has a subtopic attribute, consisting of an array of Topics. Each of these Topics also has a subtopics attr. These are collected and assigned during initila reading of note file
15
- When read in, a topic is added to the top level build notes topic, as well as appended to its parent's subtopics if it's a higher level than the base
16
- just need methods to determine base level (first # match) and check the current headers level when discovering a topic (count #)
17
-
18
- no, wait. topics should read in their own children. Determine base header level, split topics at that level, then recurse each topic the same way
19
- include statements will need to be adjusted to allow includes as children. Multiple at symbols could indicate the level to nest at, two symbols would indicate that the include belonged to the last parent. When importing, adjust base header levels appropriately (increase 1).
20
- Bugs:
21
- Archive:
22
- - Add a preview when selecting topic with fzf @priority(3) @na @done(2022-08-06) @project(Inbox)
23
- Search Definitions:
24
- Top Priority @search(@priority = 5 and not @done)
25
- High Priority @search(@priority > 3 and not @done)
26
- Maybe @search(@maybe)
27
- Next @search(@na and not @done and not project = "Archive")
data/.irbrc DELETED
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
- IRB.conf[:AUTO_INDENT] = true
3
-
4
- require "irb/completion"
5
- require_relative "lib/conductor"
6
-
7
- # rubocop:disable Style/MixinUsage
8
- include Howzit # standard:disable all
9
- # rubocop:enable Style/MixinUsage
10
-
11
- require "awesome_print"
12
- AwesomePrint.irb!
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --format documentation
2
- --color
data/.rubocop.yml DELETED
@@ -1,48 +0,0 @@
1
- require:
2
- - rubocop-rspec
3
- - rubocop-rake
4
-
5
- AllCops:
6
- Include:
7
- - Gemfile
8
- - Guardfile
9
- - Rakefile
10
- - bin/howzit
11
- - lib/**/*.rb
12
-
13
- Style/StringLiterals:
14
- Enabled: true
15
- EnforcedStyle: single_quotes
16
-
17
- Style/StringLiteralsInInterpolation:
18
- Enabled: true
19
- EnforcedStyle: single_quotes
20
-
21
- Layout/LineLength:
22
- Max: 120
23
-
24
- Metrics/MethodLength:
25
- Max: 45
26
-
27
- Metrics/BlockLength:
28
- Max: 45
29
- Exclude:
30
- - Rakefile
31
- - bin/howzit
32
- - lib/*.rb
33
-
34
- Metrics/ClassLength:
35
- Max: 300
36
-
37
- Metrics/PerceivedComplexity:
38
- Max: 30
39
-
40
- Metrics/AbcSize:
41
- Max: 45
42
-
43
- Metrics/CyclomaticComplexity:
44
- Max: 20
45
-
46
- Style/RegexpLiteral:
47
- Exclude:
48
- - Guardfile
data/.travis.yml DELETED
@@ -1,17 +0,0 @@
1
- ---
2
- language: ruby
3
- sudo: required
4
- dist: trusty
5
- cache: bundler
6
- rvm:
7
- - ruby-2.6.4
8
- - ruby-2.7.0
9
- - ruby-3.0.1
10
- install:
11
- - gem install bundler --version '2.2.29'
12
- - bundle install
13
- script: "bundle exec rspec spec --exclude-pattern 'cli*'"
14
- branches:
15
- only:
16
- - main
17
- - develop
data/.yardopts DELETED
@@ -1,6 +0,0 @@
1
- --markup=markdown
2
- lib/**/*.rb
3
- -
4
- README.md
5
- CHANGELOG.md
6
- LICENSE.txt
data/lib/.rubocop.yml DELETED
@@ -1 +0,0 @@
1
- inherit_from: ../.rubocop.yml
data/spec/.rubocop.yml DELETED
@@ -1,4 +0,0 @@
1
- inherit_from: ../.rubocop.yml
2
-
3
- Style/StringLiterals:
4
- Enabled: false