howzit 2.0.11 → 2.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -0
- data/.travis.yml +4 -1
- data/CHANGELOG.md +24 -0
- data/Rakefile +41 -0
- data/bin/howzit +1 -1
- data/docker/Dockerfile +11 -0
- data/docker/Dockerfile-2.6 +11 -0
- data/docker/Dockerfile-2.7 +11 -0
- data/docker/Dockerfile-3.0 +11 -0
- data/docker/bash_profile +13 -0
- data/docker/inputrc +57 -0
- data/howzit.gemspec +1 -0
- data/lib/howzit/topic.rb +8 -2
- data/lib/howzit/version.rb +1 -1
- data/scripts/runtests.sh +4 -0
- metadata +22 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4ce43666235573b6b74c77d0dcb6e1f4c1a45fb8b9cd516747698f56cc3723d
|
4
|
+
data.tar.gz: c13702a3d4b7b2ad707890d3f9d8c2a75e92fba1c732689f1930b511254db742
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 586fcb6d9e5bfd901a3e4d33ff9044c57ae50a97cb0a19e8c2d9e5b57dec6771b432e0dc83e28a924824cc04a758ce4397d0f74b7efb2d343181c262f92c636b
|
7
|
+
data.tar.gz: 5f0eac9f6e53ed64ea159630e0f979f9cc8d8734b95186316b924e1e75e752b7a189d02eb1c178c15050676988356b391cfbc19f3da9eacb61d21051b474188e
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -4,10 +4,13 @@ sudo: required
|
|
4
4
|
dist: trusty
|
5
5
|
cache: bundler
|
6
6
|
rvm:
|
7
|
+
- ruby-2.6.4
|
7
8
|
- ruby-2.7.0
|
8
9
|
- ruby-3.0.1
|
9
10
|
install:
|
10
|
-
- gem uninstall bundler
|
11
11
|
- gem install bundler --version '2.2.29'
|
12
12
|
- bundle install
|
13
13
|
script: "bundle exec rspec spec --exclude-pattern 'cli*'"
|
14
|
+
branches:
|
15
|
+
only:
|
16
|
+
- master
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,27 @@
|
|
1
|
+
### 2.0.14
|
2
|
+
|
3
|
+
2022-08-05 13:24
|
4
|
+
|
5
|
+
#### FIXED
|
6
|
+
|
7
|
+
- Travis CI fixes
|
8
|
+
|
9
|
+
### 2.0.13
|
10
|
+
|
11
|
+
2022-08-05 13:19
|
12
|
+
|
13
|
+
#### IMPROVED
|
14
|
+
|
15
|
+
- Add tests for more ruby versions via Docker
|
16
|
+
|
17
|
+
### 2.0.12
|
18
|
+
|
19
|
+
2022-08-05 11:27
|
20
|
+
|
21
|
+
#### IMPROVED
|
22
|
+
|
23
|
+
- Show how many tasks will be included when requesting confirmation for an include? directive
|
24
|
+
|
1
25
|
### 2.0.11
|
2
26
|
|
3
27
|
2022-08-05 11:21
|
data/Rakefile
CHANGED
@@ -5,6 +5,7 @@ require 'bundler/gem_tasks'
|
|
5
5
|
require 'rspec/core/rake_task'
|
6
6
|
require 'rubocop/rake_task'
|
7
7
|
require 'yard'
|
8
|
+
require 'tty-spinner'
|
8
9
|
|
9
10
|
task default: %i[test yard]
|
10
11
|
|
@@ -34,3 +35,43 @@ desc 'Changelog version check'
|
|
34
35
|
task :cver do
|
35
36
|
puts IO.read(File.join(File.dirname(__FILE__), 'CHANGELOG.md')).match(/^#+ (\d+\.\d+\.\d+(\w+)?)/)[1]
|
36
37
|
end
|
38
|
+
|
39
|
+
desc 'Run tests in Docker'
|
40
|
+
task :dockertest, :version, :login do |_, args|
|
41
|
+
args.with_defaults(version: 'all', login: false)
|
42
|
+
case args[:version]
|
43
|
+
when /^a/
|
44
|
+
%w[6 7 3].each do |v|
|
45
|
+
Rake::Task['dockertest'].reenable
|
46
|
+
Rake::Task['dockertest'].invoke(v, false)
|
47
|
+
end
|
48
|
+
Process.exit 0
|
49
|
+
when /^3/
|
50
|
+
img = 'howzittest3'
|
51
|
+
file = 'docker/Dockerfile-3.0'
|
52
|
+
when /6$/
|
53
|
+
img = 'howzittest26'
|
54
|
+
file = 'docker/Dockerfile-2.6'
|
55
|
+
when /(^2|7$)/
|
56
|
+
img = 'howzittest27'
|
57
|
+
file = 'docker/Dockerfile-2.7'
|
58
|
+
else
|
59
|
+
img = 'howzittest'
|
60
|
+
file = 'docker/Dockerfile'
|
61
|
+
end
|
62
|
+
|
63
|
+
puts `docker build . --file #{file} -t #{img}`
|
64
|
+
|
65
|
+
exec "docker run -v #{File.dirname(__FILE__)}:/howzit -it #{img} /bin/bash -l" if args[:login]
|
66
|
+
|
67
|
+
spinner = TTY::Spinner.new('[:spinner] Running tests ...', hide_cursor: true)
|
68
|
+
|
69
|
+
spinner.auto_spin
|
70
|
+
res = `docker run --rm -v #{File.dirname(__FILE__)}:/howzit -it #{img}`
|
71
|
+
# commit = puts `bash -c "docker commit $(docker ps -a|grep #{img}|awk '{print $1}'|head -n 1) #{img}"`.strip
|
72
|
+
spinner.success
|
73
|
+
spinner.stop
|
74
|
+
|
75
|
+
puts res
|
76
|
+
# puts commit&.empty? ? "Error commiting Docker tag #{img}" : "Committed Docker tag #{img}"
|
77
|
+
end
|
data/bin/howzit
CHANGED
data/docker/Dockerfile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
FROM ruby:3.0.1
|
2
|
+
# RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
3
|
+
RUN mkdir /howzit
|
4
|
+
WORKDIR /howzit
|
5
|
+
# COPY ./ /howzit/
|
6
|
+
RUN gem install bundler:2.2.17
|
7
|
+
RUN apt-get update -y
|
8
|
+
RUN apt-get install -y less vim
|
9
|
+
COPY ./docker/inputrc /root/.inputrc
|
10
|
+
COPY ./docker/bash_profile /root/.bash_profile
|
11
|
+
CMD ["scripts/runtests.sh"]
|
@@ -0,0 +1,11 @@
|
|
1
|
+
FROM ruby:2.6
|
2
|
+
# RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
3
|
+
RUN mkdir /howzit
|
4
|
+
WORKDIR /howzit
|
5
|
+
# COPY ./ /howzit/
|
6
|
+
RUN gem install bundler:2.2.17
|
7
|
+
RUN apt-get update -y
|
8
|
+
RUN apt-get install -y less vim
|
9
|
+
COPY ./docker/inputrc /root/.inputrc
|
10
|
+
COPY ./docker/bash_profile /root/.bash_profile
|
11
|
+
CMD ["scripts/runtests.sh"]
|
@@ -0,0 +1,11 @@
|
|
1
|
+
FROM ruby:2.7
|
2
|
+
# RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
3
|
+
RUN mkdir /howzit
|
4
|
+
WORKDIR /howzit
|
5
|
+
# COPY ./ /howzit/
|
6
|
+
RUN gem install bundler:2.2.17
|
7
|
+
RUN apt-get update -y
|
8
|
+
RUN apt-get install -y less vim
|
9
|
+
COPY ./docker/inputrc /root/.inputrc
|
10
|
+
COPY ./docker/bash_profile /root/.bash_profile
|
11
|
+
CMD ["scripts/runtests.sh"]
|
@@ -0,0 +1,11 @@
|
|
1
|
+
FROM ruby:3.0.0
|
2
|
+
# RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
3
|
+
RUN mkdir /howzit
|
4
|
+
WORKDIR /howzit
|
5
|
+
# COPY ./ /howzit/
|
6
|
+
RUN gem install bundler:2.2.17
|
7
|
+
RUN apt-get update -y
|
8
|
+
RUN apt-get install -y less vim
|
9
|
+
COPY ./docker/inputrc /root/.inputrc
|
10
|
+
COPY ./docker/bash_profile /root/.bash_profile
|
11
|
+
CMD ["scripts/runtests.sh"]
|
data/docker/bash_profile
ADDED
data/docker/inputrc
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
"\e[3~": delete-char
|
2
|
+
"\ex": 'cd !$ \015ls\015'
|
3
|
+
"\ez": 'cd -\015'
|
4
|
+
"\e\C-m": '\C-a "$(\C-e|fzf)"\C-a'
|
5
|
+
"\e/": '"$(!!|fzf)"\C-a \C-m\C-m'
|
6
|
+
# these allow you to use alt+left/right arrow keys
|
7
|
+
# to jump the cursor over words
|
8
|
+
"\e[1;5C": forward-word
|
9
|
+
"\e[1;5D": backward-word
|
10
|
+
# "\e[D": backward-word
|
11
|
+
# "\e[C": forward-word
|
12
|
+
"\ea": menu-complete
|
13
|
+
# TAB: menu-complete
|
14
|
+
# "\e[Z": "\e-1\C-i"
|
15
|
+
|
16
|
+
"\e\C-l": history-and-alias-expand-line
|
17
|
+
|
18
|
+
# these allow you to start typing a command and
|
19
|
+
# use the up/down arrow to auto complete from
|
20
|
+
# commands in your history
|
21
|
+
"\e[B": history-search-forward
|
22
|
+
"\e[A": history-search-backward
|
23
|
+
"\ew": history-search-backward
|
24
|
+
"\es": history-search-forward
|
25
|
+
# this lets you hit tab to auto-complete a file or
|
26
|
+
# directory name ignoring case
|
27
|
+
set completion-ignore-case On
|
28
|
+
set mark-symlinked-directories On
|
29
|
+
set completion-prefix-display-length 2
|
30
|
+
set bell-style none
|
31
|
+
# set bell-style visible
|
32
|
+
set meta-flag on
|
33
|
+
set convert-meta off
|
34
|
+
set input-meta on
|
35
|
+
set output-meta on
|
36
|
+
set show-all-if-ambiguous on
|
37
|
+
set show-all-if-unmodified on
|
38
|
+
set completion-map-case on
|
39
|
+
set visible-stats on
|
40
|
+
|
41
|
+
# Do history expansion when space entered?
|
42
|
+
$if bash
|
43
|
+
Space: magic-space
|
44
|
+
$endif
|
45
|
+
|
46
|
+
# Show extra file information when completing, like `ls -F` does
|
47
|
+
set visible-stats on
|
48
|
+
|
49
|
+
# Be more intelligent when autocompleting by also looking at the text after
|
50
|
+
# the cursor. For example, when the current line is "cd ~/src/mozil", and
|
51
|
+
# the cursor is on the "z", pressing Tab will not autocomplete it to "cd
|
52
|
+
# ~/src/mozillail", but to "cd ~/src/mozilla". (This is supported by the
|
53
|
+
# Readline used by Bash 4.)
|
54
|
+
set skip-completed-text on
|
55
|
+
|
56
|
+
# Use Alt/Meta + Delete to delete the preceding word
|
57
|
+
"\e[3;3~": kill-word
|
data/howzit.gemspec
CHANGED
@@ -38,6 +38,7 @@ Gem::Specification.new do |spec|
|
|
38
38
|
spec.add_development_dependency 'yard', '~> 0.9.5'
|
39
39
|
spec.add_development_dependency 'redcarpet', '~> 3.2'
|
40
40
|
spec.add_development_dependency 'github-markup', '~> 1.3'
|
41
|
+
spec.add_development_dependency 'tty-spinner', '~> 0.9'
|
41
42
|
|
42
43
|
spec.add_runtime_dependency 'mdless', '~> 1.0', '>= 1.0.28'
|
43
44
|
spec.add_runtime_dependency 'tty-screen', '~> 0.8'
|
data/lib/howzit/topic.rb
CHANGED
@@ -52,7 +52,13 @@ module Howzit
|
|
52
52
|
|
53
53
|
@tasks.each do |task|
|
54
54
|
if task.optional
|
55
|
-
|
55
|
+
note = if task.type == :include
|
56
|
+
task_count = Howzit.buildnote.find_topic(task.action)[0].tasks.count
|
57
|
+
" (#{task_count} tasks)"
|
58
|
+
else
|
59
|
+
""
|
60
|
+
end
|
61
|
+
q = %({bg}#{task.type.to_s.capitalize} {xw}"{bw}#{task.title}{xw}"#{note}{x}).c
|
56
62
|
res = Prompt.yn(q, default: task.default)
|
57
63
|
next unless res
|
58
64
|
|
@@ -81,7 +87,7 @@ module Howzit
|
|
81
87
|
|
82
88
|
$stderr.puts "{by}Running tasks from {bw}#{matches[0].title}{x}".c if Howzit.options[:log_level] < 2
|
83
89
|
output.push(matches[0].run(nested: true))
|
84
|
-
$stderr.puts "{by}End include: #{matches[0].tasks.count} tasks".c if Howzit.options[:log_level] < 2
|
90
|
+
$stderr.puts "{by}End include: #{matches[0].tasks.count} tasks{x}".c if Howzit.options[:log_level] < 2
|
85
91
|
tasks += matches[0].tasks.count
|
86
92
|
when :run
|
87
93
|
$stderr.puts "{bg}Running {bw}#{title}{x}".c if Howzit.options[:log_level] < 2
|
data/lib/howzit/version.rb
CHANGED
data/scripts/runtests.sh
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: howzit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Terpstra
|
@@ -220,6 +220,20 @@ dependencies:
|
|
220
220
|
- - "~>"
|
221
221
|
- !ruby/object:Gem::Version
|
222
222
|
version: '1.3'
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: tty-spinner
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - "~>"
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0.9'
|
230
|
+
type: :development
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - "~>"
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '0.9'
|
223
237
|
- !ruby/object:Gem::Dependency
|
224
238
|
name: mdless
|
225
239
|
requirement: !ruby/object:Gem::Requirement
|
@@ -289,6 +303,12 @@ files:
|
|
289
303
|
- README.md
|
290
304
|
- Rakefile
|
291
305
|
- bin/howzit
|
306
|
+
- docker/Dockerfile
|
307
|
+
- docker/Dockerfile-2.6
|
308
|
+
- docker/Dockerfile-2.7
|
309
|
+
- docker/Dockerfile-3.0
|
310
|
+
- docker/bash_profile
|
311
|
+
- docker/inputrc
|
292
312
|
- fish/completions/bld.fish
|
293
313
|
- fish/completions/fisher.fish
|
294
314
|
- fish/completions/howzit.fish
|
@@ -307,6 +327,7 @@ files:
|
|
307
327
|
- lib/howzit/topic.rb
|
308
328
|
- lib/howzit/util.rb
|
309
329
|
- lib/howzit/version.rb
|
330
|
+
- scripts/runtests.sh
|
310
331
|
- spec/.rubocop.yml
|
311
332
|
- spec/buildnote_spec.rb
|
312
333
|
- spec/cli_spec.rb
|