hilight 0.3.0 → 0.4.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 +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- data/Gemfile +11 -3
- data/Gemfile.lock +2 -2
- data/README.md +19 -18
- data/_config.yml +1 -0
- data/bin/convert_vscode +1 -1
- data/hilight.gemspec +1 -0
- data/lib/hilight.rb +0 -1
- data/lib/hilight/fabric.rb +22 -20
- data/lib/hilight/pair.rb +1 -1
- data/lib/hilight/quilts/ruby.rb +1 -1
- data/lib/hilight/version.rb +1 -1
- metadata +20 -4
- data/lib/hilight/quilts.rb +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d736a7509a700e30a1e2909c9d48f6b2ddb1427294829d2a5e585b5576c890f4
|
4
|
+
data.tar.gz: 396a4c18e2e7988bbc2be4047385df1e7e7b2e7ffb7273eddf7fc40301ed0ef2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7672e10724d584fd27d7ae86a7f94e9b0f041414690d7c796964358f2bdd967940f59f1edcff6d5274dd4ec136626dd204edb36a36d688503aa77246a73bbcbf
|
7
|
+
data.tar.gz: ad6cbaad3a10760905228870f2e4865736ff6550e3b688c6e4e5eae045a79baa70e2f481f3ac6897f051ab8193364be42af4a4fb7af072ef1882e6025a9651c0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
name: Bug report
|
3
|
+
about: Create a report to help us improve
|
4
|
+
title: ''
|
5
|
+
labels: ''
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Describe the bug**
|
11
|
+
A clear and concise description of what the bug is.
|
12
|
+
|
13
|
+
**To Reproduce**
|
14
|
+
Steps to reproduce the behavior:
|
15
|
+
1. Go to '...'
|
16
|
+
2. Click on '....'
|
17
|
+
3. Scroll down to '....'
|
18
|
+
4. See error
|
19
|
+
|
20
|
+
**Expected behavior**
|
21
|
+
A clear and concise description of what you expected to happen.
|
22
|
+
|
23
|
+
**Screenshots**
|
24
|
+
If applicable, add screenshots to help explain your problem.
|
25
|
+
|
26
|
+
**Desktop (please complete the following information):**
|
27
|
+
- OS: [e.g. iOS]
|
28
|
+
- Browser [e.g. chrome, safari]
|
29
|
+
- Version [e.g. 22]
|
30
|
+
|
31
|
+
**Smartphone (please complete the following information):**
|
32
|
+
- Device: [e.g. iPhone6]
|
33
|
+
- OS: [e.g. iOS8.1]
|
34
|
+
- Browser [e.g. stock browser, safari]
|
35
|
+
- Version [e.g. 22]
|
36
|
+
|
37
|
+
**Additional context**
|
38
|
+
Add any other context about the problem here.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
name: Feature request
|
3
|
+
about: Suggest an idea for this project
|
4
|
+
title: ''
|
5
|
+
labels: ''
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
12
|
+
|
13
|
+
**Describe the solution you'd like**
|
14
|
+
A clear and concise description of what you want to happen.
|
15
|
+
|
16
|
+
**Describe alternatives you've considered**
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
18
|
+
|
19
|
+
**Additional context**
|
20
|
+
Add any other context or screenshots about the feature request here.
|
data/Gemfile
CHANGED
@@ -9,12 +9,12 @@ group :development do
|
|
9
9
|
gem "rspec"
|
10
10
|
gem 'rubocop'
|
11
11
|
gem 'rubocop-rspec'
|
12
|
-
gem 'simplecov'
|
13
|
-
gem 'simplecov-console'
|
14
|
-
gem 'yard'
|
15
12
|
end
|
16
13
|
|
17
14
|
group :development, optional: true do
|
15
|
+
gem 'simplecov'
|
16
|
+
gem 'simplecov-console'
|
17
|
+
gem 'yard'
|
18
18
|
gem 'guard'
|
19
19
|
gem 'guard-bundler'
|
20
20
|
gem 'guard-rspec'
|
@@ -26,3 +26,11 @@ group :development, optional: true do
|
|
26
26
|
gem 'pry-debundle'
|
27
27
|
gem 'solargraph'
|
28
28
|
end
|
29
|
+
|
30
|
+
group :test do
|
31
|
+
gem "bundler"
|
32
|
+
gem "rake"
|
33
|
+
gem "rspec"
|
34
|
+
gem 'rubocop'
|
35
|
+
gem 'rubocop-rspec'
|
36
|
+
end
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,39 +1,40 @@
|
|
1
1
|
# Hilight
|
2
2
|
|
3
|
-
|
3
|
+
Hilight will highlight CLI based applications based on regular expressions.
|
4
4
|
|
5
|
-
|
5
|
+
Ever wanted colors in an app that doesn't support them?
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
Add this line to your application's Gemfile:
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem 'hilight'
|
13
|
-
```
|
14
|
-
|
15
|
-
And then execute:
|
7
|
+
hilight git -h
|
16
8
|
|
17
|
-
|
9
|
+
- Supports regexp for the command, as well as strings.
|
10
|
+
- No outside dependencies.
|
11
|
+
- Can add syntaxes via serializable JSON or ruby.
|
18
12
|
|
19
|
-
|
13
|
+
## Installation
|
20
14
|
|
21
|
-
|
15
|
+
gem install hilight
|
22
16
|
|
23
17
|
## Usage
|
24
18
|
|
25
|
-
|
19
|
+
Basic highlighting can be done with:
|
26
20
|
|
27
|
-
|
21
|
+
hilight command
|
28
22
|
|
29
|
-
|
23
|
+
It can be used in a piped expression.
|
30
24
|
|
31
|
-
|
25
|
+
git -h | hilight
|
32
26
|
|
33
27
|
## Contributing
|
34
28
|
|
35
29
|
Bug reports and pull requests are welcome on GitHub at https://github.com/erniebrodeur/hilight. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
30
|
|
31
|
+
## Pull Requests
|
32
|
+
|
33
|
+
Pull requests that do not pass current rspecs or do not contain coverage of the code in the pull request are, most likely, going to be rejected.
|
34
|
+
|
35
|
+
If you want to add a theme/change an existing one, please submit all updates
|
36
|
+
in the JSON form of the quilt.
|
37
|
+
|
37
38
|
## Code of Conduct
|
38
39
|
|
39
40
|
Everyone interacting in the Hilight project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/erniebrodeur/hilight/blob/master/CODE_OF_CONDUCT.md).
|
data/_config.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
theme: jekyll-theme-hacker
|
data/bin/convert_vscode
CHANGED
@@ -10,7 +10,7 @@ monokai_hex_colors = colors.map { |e| [e['name'], e['settings']['foreground']] }
|
|
10
10
|
monokai_hex_colors.delete_if { |k, v| k.nil? || v.nil? }
|
11
11
|
|
12
12
|
String.define_method(:to_rgb) { [self[1..2], self[2..3], self[4..5]].map { |s| s.to_i(16) }.join(";") }
|
13
|
-
output = monokai_hex_colors.map { |k,v| [k,v.to_rgb] }.to_h
|
13
|
+
output = monokai_hex_colors.map { |k, v| [k, v.to_rgb] }.to_h
|
14
14
|
|
15
15
|
puts Oj.dump output, indent: 2
|
16
16
|
|
data/hilight.gemspec
CHANGED
data/lib/hilight.rb
CHANGED
data/lib/hilight/fabric.rb
CHANGED
@@ -1,28 +1,30 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
module Hilight
|
2
|
+
class Fabric
|
3
|
+
attr_accessor :regexps
|
4
|
+
attr_accessor :match_pattern
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
def initialize(match_pattern, regexps)
|
7
|
+
@regexps = regexps
|
8
|
+
@match_pattern = match_pattern
|
9
|
+
end
|
9
10
|
|
10
|
-
|
11
|
-
|
11
|
+
def match?(string)
|
12
|
+
raise ArgumentError, "#{string} is not a kind of String" unless string.is_a? String
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
case match_pattern
|
15
|
+
when Symbol then (match_pattern.to_s == string)
|
16
|
+
when String then (match_pattern == string)
|
17
|
+
when Regexp then (match_pattern.match? string.to_s)
|
18
|
+
else false
|
19
|
+
end
|
18
20
|
end
|
19
|
-
end
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
22
|
+
def transform(string)
|
23
|
+
Hilight.transform string, regexps
|
24
|
+
end
|
24
25
|
|
25
|
-
|
26
|
-
|
26
|
+
def to_h
|
27
|
+
{ match_pattern: match_pattern, regexps: regexps.map(&:to_s) }
|
28
|
+
end
|
27
29
|
end
|
28
30
|
end
|
data/lib/hilight/pair.rb
CHANGED
data/lib/hilight/quilts/ruby.rb
CHANGED
data/lib/hilight/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hilight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ernie Brodeur
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
description: hilight all the things.
|
28
42
|
email:
|
29
43
|
- ebrodeur@ujami.net
|
@@ -32,6 +46,8 @@ executables:
|
|
32
46
|
extensions: []
|
33
47
|
extra_rdoc_files: []
|
34
48
|
files:
|
49
|
+
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
50
|
+
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
35
51
|
- ".gitignore"
|
36
52
|
- ".rspec"
|
37
53
|
- ".rubocop.yml"
|
@@ -42,6 +58,7 @@ files:
|
|
42
58
|
- Guardfile
|
43
59
|
- README.md
|
44
60
|
- Rakefile
|
61
|
+
- _config.yml
|
45
62
|
- bin/add
|
46
63
|
- bin/add_theme
|
47
64
|
- bin/console
|
@@ -55,7 +72,6 @@ files:
|
|
55
72
|
- lib/hilight/pair.rb
|
56
73
|
- lib/hilight/pattern.rb
|
57
74
|
- lib/hilight/quilt.rb
|
58
|
-
- lib/hilight/quilts.rb
|
59
75
|
- lib/hilight/quilts/default.rb
|
60
76
|
- lib/hilight/quilts/help.rb
|
61
77
|
- lib/hilight/quilts/rspec.rb
|
@@ -79,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
95
|
- !ruby/object:Gem::Version
|
80
96
|
version: '0'
|
81
97
|
requirements: []
|
82
|
-
rubygems_version: 3.0.
|
98
|
+
rubygems_version: 3.0.3
|
83
99
|
signing_key:
|
84
100
|
specification_version: 4
|
85
101
|
summary: hilight
|
data/lib/hilight/quilts.rb
DELETED