howzit 2.0.12 → 2.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 700c444e11477c62c6de0f06b81b3029b21f3363f507c5a6cab927f2365d2be5
4
- data.tar.gz: be862c2c31427abae2428a024009aea0f73885a5dc9652c5d2b5f308c181ca3b
3
+ metadata.gz: e269532605e044c35e2a0ebe322fe51ba5199d690a57385a358a3bad4fc2921f
4
+ data.tar.gz: 4ca045a0c3c2d1627b04a47363beb8e2de6718f5c708e1f4bf96285af96e09d4
5
5
  SHA512:
6
- metadata.gz: d07c309680eef72f5edb3b41d40354aa9cefa1b6efebd1c0dfbaa59f7cbfc95c6211433f081b6f21afa069cd5ae30f79dc42f1a4a08c96680b533b16519ca25b
7
- data.tar.gz: '08ca9d51ec3793c1750d70f500bde1e68c1f327cd41d0b92839c317d6a421f96cbb8ef2f03204ab6cfe1ddb1d83a497084aa9590233d6ceb860921fdb473267e'
6
+ metadata.gz: 803b06d4a85632357eb1e61a898f88c39971df388107a62f67479e34788346f1824f78a3b3473cf5ee45dc445a494e7a144590d5df33ffd1b73d2114ba19049d
7
+ data.tar.gz: 51c6ec7213c4b7c531e53c32140dc485d897f40ee79d242ee8ec446804ad0edac8a9bac61d3b68189bf60884a3dbee28fe6d5f5f3040dae23ec8cb7ddb24903c
data/.rubocop.yml CHANGED
@@ -6,6 +6,7 @@ AllCops:
6
6
 
7
7
  Metrics/BlockLength:
8
8
  Exclude:
9
+ - Rakefile
9
10
  - bin/howzit
10
11
  - lib/*.rb
11
12
 
data/.travis.yml CHANGED
@@ -4,10 +4,10 @@ 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*'"
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 2.0.13
2
+
3
+ 2022-08-05 13:19
4
+
5
+ #### IMPROVED
6
+
7
+ - Add tests for more ruby versions via Docker
8
+
1
9
  ### 2.0.12
2
10
 
3
11
  2022-08-05 11:27
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
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env ruby -W1
1
+ #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
4
  $LOAD_PATH.unshift File.join(__dir__, '..', 'lib')
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"]
@@ -0,0 +1,13 @@
1
+ #!/bin/bash
2
+ export GLI_DEBUG=true
3
+ export EDITOR="/usr/bin/vim"
4
+ alias b="bundle exec bin/howzit"
5
+
6
+ shopt -s nocaseglob
7
+ shopt -s histappend
8
+ shopt -s histreedit
9
+ shopt -s histverify
10
+ shopt -s cmdhist
11
+
12
+ cd /howzit
13
+ bundle install
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'
@@ -3,5 +3,5 @@
3
3
  # Primary module for this gem.
4
4
  module Howzit
5
5
  # Current Howzit version.
6
- VERSION = '2.0.12'
6
+ VERSION = '2.0.13'
7
7
  end
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+
3
+ bundle install
4
+ rake test
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.12
4
+ version: 2.0.13
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