lolcommits-loltext 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +27 -0
- data/.github/workflows/push_gem.yml +25 -0
- data/.travis.yml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +6 -11
- data/Rakefile +1 -11
- data/lib/lolcommits/loltext/version.rb +1 -1
- data/lolcommits-loltext.gemspec +2 -3
- metadata +9 -25
- data/test/lolcommits/plugin/loltext_test.rb +0 -114
- data/test/test_helper.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa7c7d74d63445e8c531b40fa367644a343528bbd16793842d99af48e4cf67db
|
4
|
+
data.tar.gz: c01bb1dff82afad74fbd41f6d85f39b3dbe8800ca3e7d59d09a4a17d17f6936b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aec0209eb5bf5cbe7dbe8b1dd4a4a099ca95cb61c196525ffaaa452bf119a4a3d7ee7baa7c2b8623fdb491f5d209a7dbfd05acc8d636bfbaffca834b4375300a
|
7
|
+
data.tar.gz: 561bb1ba4246e9d0ba48c387a395f966242e4d93c058c77d67c94b3cc9626f8589743ffb851edc3ccadc6a6f14ed706c48aeac048ab6da82f12adb7b804bb786
|
@@ -0,0 +1,27 @@
|
|
1
|
+
name: Tests
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ "main" ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ "main" ]
|
8
|
+
|
9
|
+
permissions:
|
10
|
+
contents: read
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
test:
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
strategy:
|
16
|
+
fail-fast: false
|
17
|
+
matrix:
|
18
|
+
ruby-version: ['3.1', '3.2', '3.3', '3.4']
|
19
|
+
steps:
|
20
|
+
- uses: actions/checkout@v4
|
21
|
+
- name: Set up Ruby
|
22
|
+
uses: ruby/setup-ruby@v1
|
23
|
+
with:
|
24
|
+
ruby-version: ${{ matrix.ruby-version }}
|
25
|
+
bundler-cache: true
|
26
|
+
- name: Run tests
|
27
|
+
run: bundle exec rake test
|
@@ -0,0 +1,25 @@
|
|
1
|
+
name: Publish gem to RubyGems.org
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- v*
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
push:
|
10
|
+
name: Push gem to RubyGems.org
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
|
13
|
+
permissions:
|
14
|
+
id-token: write
|
15
|
+
contents: write
|
16
|
+
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v4
|
19
|
+
- name: Set up Ruby
|
20
|
+
uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
bundler-cache: true
|
23
|
+
ruby-version: ruby
|
24
|
+
|
25
|
+
- uses: rubygems/release-gem@v1
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -9,6 +9,10 @@ project adheres to [Semantic Versioning][Semver].
|
|
9
9
|
|
10
10
|
- Your contribution here!
|
11
11
|
|
12
|
+
## [0.5.0] - 2024-09-20
|
13
|
+
### Removed
|
14
|
+
- Support for Ruby < 3.1 (older rubies no longer supported)
|
15
|
+
|
12
16
|
## [0.4.0] - 2020-01-24
|
13
17
|
### Removed
|
14
18
|
- Support for Ruby < 2.4 (older rubies no longer supported)
|
data/README.md
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
# Lolcommits Loltext
|
2
2
|
|
3
|
+
[![Build](https://img.shields.io/github/actions/workflow/status/lolcommits/lolcommits-loltext/build.yml?branch=main&style=flat)](https://github.com/lolcommits/lolcommits-loltext/actions/workflows/build.yml)
|
3
4
|
[![Gem](https://img.shields.io/gem/v/lolcommits-loltext.svg?style=flat)](http://rubygems.org/gems/lolcommits-loltext)
|
4
|
-
[![Travis](https://img.shields.io/travis/com/lolcommits/lolcommits-loltext/master.svg?style=flat)](https://travis-ci.com/lolcommits/lolcommits-loltext)
|
5
5
|
[![Depfu](https://img.shields.io/depfu/lolcommits/lolcommits-loltext.svg?style=flat)](https://depfu.com/github/lolcommits/lolcommits-loltext)
|
6
|
-
[![Maintainability](https://api.codeclimate.com/v1/badges/2e0fa03867952572c5db/maintainability)](https://codeclimate.com/github/lolcommits/lolcommits-loltext/maintainability)
|
7
|
-
[![Test Coverage](https://api.codeclimate.com/v1/badges/2e0fa03867952572c5db/test_coverage)](https://codeclimate.com/github/lolcommits/lolcommits-loltext/test_coverage)
|
8
6
|
|
9
7
|
[lolcommits](https://lolcommits.github.io/) takes a snapshot with your
|
10
8
|
webcam every time you git commit code, and archives a lolcat style image
|
@@ -18,19 +16,19 @@ By default your lolcommit will look something like this (maybe without the
|
|
18
16
|
horse):
|
19
17
|
|
20
18
|
![horse
|
21
|
-
commit](https://github.com/lolcommits/lolcommits-loltext/
|
19
|
+
commit](https://github.com/lolcommits/lolcommits-loltext/blob/main/assets/images/horse.jpg)
|
22
20
|
|
23
21
|
You can easily change the plugin options to achieve something like this:
|
24
22
|
|
25
23
|
![hipster
|
26
|
-
commit](https://github.com/lolcommits/lolcommits-loltext/
|
24
|
+
commit](https://github.com/lolcommits/lolcommits-loltext/blob/main/assets/images/hipster.jpg)
|
27
25
|
|
28
26
|
See [below](https://github.com/lolcommits/lolcommits-loltext#configuration) for
|
29
27
|
more information on the options available.
|
30
28
|
|
31
29
|
## Requirements
|
32
30
|
|
33
|
-
* Ruby >=
|
31
|
+
* Ruby >= 3.1
|
34
32
|
* A webcam
|
35
33
|
* [ImageMagick](http://www.imagemagick.org)
|
36
34
|
* [ffmpeg](https://www.ffmpeg.org) (optional) for animated gif capturing
|
@@ -143,8 +141,7 @@ requests](https://github.com/lolcommits/lolcommits-loltext/pulls) are
|
|
143
141
|
welcome on GitHub.
|
144
142
|
|
145
143
|
When submitting pull requests, remember to add tests covering any new
|
146
|
-
behaviour, and ensure all tests are passing
|
147
|
-
CI](https://travis-ci.com/lolcommits/lolcommits-loltext). Read the
|
144
|
+
behaviour, and ensure all tests are passing. Read the
|
148
145
|
[contributing
|
149
146
|
guidelines](https://github.com/lolcommits/lolcommits-loltext/blob/master/CONTRIBUTING.md)
|
150
147
|
for more details.
|
@@ -163,9 +160,7 @@ The gem is available as open source under the terms of
|
|
163
160
|
|
164
161
|
## Links
|
165
162
|
|
166
|
-
* [
|
167
|
-
* [Test Coverage](https://codeclimate.com/github/lolcommits/lolcommits-loltext/test_coverage)
|
168
|
-
* [Code Climate](https://codeclimate.com/github/lolcommits/lolcommits-loltext)
|
163
|
+
* [CI](https://github.com/lolcommits/lolcommits-loltext/actions/workflows/build.yml)
|
169
164
|
* [RDoc](http://rdoc.info/projects/lolcommits/lolcommits-loltext)
|
170
165
|
* [Issues](http://github.com/lolcommits/lolcommits-loltext/issues)
|
171
166
|
* [Report a bug](http://github.com/lolcommits/lolcommits-loltext/issues/new)
|
data/Rakefile
CHANGED
@@ -18,14 +18,4 @@ Rake::TestTask.new(:test) do |t|
|
|
18
18
|
t.test_files = FileList["test/**/*_test.rb"]
|
19
19
|
end
|
20
20
|
|
21
|
-
|
22
|
-
namespace :test do
|
23
|
-
desc "Run all tests and features and generate a code coverage report"
|
24
|
-
task :coverage do
|
25
|
-
ENV['COVERAGE'] = 'true'
|
26
|
-
Rake::Task['test'].execute
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
|
31
|
-
task :default => ['test:coverage']
|
21
|
+
task :default => ['test']
|
data/lolcommits-loltext.gemspec
CHANGED
@@ -30,11 +30,10 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.executables = []
|
31
31
|
spec.require_paths = ["lib"]
|
32
32
|
|
33
|
-
spec.required_ruby_version = ">=
|
33
|
+
spec.required_ruby_version = ">= 3.1"
|
34
34
|
|
35
|
-
spec.add_development_dependency "lolcommits", ">= 0.
|
35
|
+
spec.add_development_dependency "lolcommits", ">= 0.17.0"
|
36
36
|
spec.add_development_dependency "bundler"
|
37
37
|
spec.add_development_dependency "rake"
|
38
38
|
spec.add_development_dependency "minitest"
|
39
|
-
spec.add_development_dependency "simplecov"
|
40
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lolcommits-loltext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Hutchinson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lolcommits
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.17.0
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.17.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: simplecov
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
69
|
description: |2
|
84
70
|
Overlay the commit message and sha on your lolcommit. Configure text
|
85
71
|
style, positioning, border and coloured overlay.
|
@@ -89,6 +75,8 @@ executables: []
|
|
89
75
|
extensions: []
|
90
76
|
extra_rdoc_files: []
|
91
77
|
files:
|
78
|
+
- ".github/workflows/build.yml"
|
79
|
+
- ".github/workflows/push_gem.yml"
|
92
80
|
- ".gitignore"
|
93
81
|
- ".simplecov"
|
94
82
|
- ".travis.yml"
|
@@ -106,8 +94,6 @@ files:
|
|
106
94
|
- lib/lolcommits/loltext/version.rb
|
107
95
|
- lib/lolcommits/plugin/loltext.rb
|
108
96
|
- lolcommits-loltext.gemspec
|
109
|
-
- test/lolcommits/plugin/loltext_test.rb
|
110
|
-
- test/test_helper.rb
|
111
97
|
- vendor/fonts/Impact.ttf
|
112
98
|
homepage: https://github.com/lolcommits/lolcommits-loltext
|
113
99
|
licenses:
|
@@ -126,17 +112,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
126
112
|
requirements:
|
127
113
|
- - ">="
|
128
114
|
- !ruby/object:Gem::Version
|
129
|
-
version: '
|
115
|
+
version: '3.1'
|
130
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
117
|
requirements:
|
132
118
|
- - ">="
|
133
119
|
- !ruby/object:Gem::Version
|
134
120
|
version: '0'
|
135
121
|
requirements: []
|
136
|
-
rubygems_version: 3.
|
122
|
+
rubygems_version: 3.5.16
|
137
123
|
signing_key:
|
138
124
|
specification_version: 4
|
139
125
|
summary: lolcommits commit message annotation plugin
|
140
|
-
test_files:
|
141
|
-
- test/lolcommits/plugin/loltext_test.rb
|
142
|
-
- test/test_helper.rb
|
126
|
+
test_files: []
|
@@ -1,114 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'test_helper'
|
4
|
-
|
5
|
-
describe Lolcommits::Plugin::Loltext do
|
6
|
-
|
7
|
-
include Lolcommits::TestHelpers::FakeIO
|
8
|
-
|
9
|
-
it 'should run on post capturing' do
|
10
|
-
_(::Lolcommits::Plugin::Loltext.runner_order).must_equal [:post_capture]
|
11
|
-
end
|
12
|
-
|
13
|
-
describe 'with a runner' do
|
14
|
-
def runner
|
15
|
-
# a simple lolcommits runner with an empty configuration Hash
|
16
|
-
@runner ||= Lolcommits::Runner.new
|
17
|
-
end
|
18
|
-
|
19
|
-
def plugin
|
20
|
-
@plugin ||= Lolcommits::Plugin::Loltext.new(runner: runner)
|
21
|
-
end
|
22
|
-
|
23
|
-
def valid_enabled_config
|
24
|
-
{ enabled: true }
|
25
|
-
end
|
26
|
-
|
27
|
-
describe 'initalizing' do
|
28
|
-
it 'should assign runner and an enabled option' do
|
29
|
-
_(plugin.runner).must_equal runner
|
30
|
-
_(plugin.options).must_equal [:enabled]
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
describe '#enabled?' do
|
35
|
-
it 'should be true by default' do
|
36
|
-
_(plugin.enabled?).must_equal true
|
37
|
-
end
|
38
|
-
|
39
|
-
it 'should true when configured' do
|
40
|
-
plugin.configuration = valid_enabled_config
|
41
|
-
_(plugin.enabled?).must_equal true
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
describe 'configuration' do
|
46
|
-
it 'should allow plugin options to be configured' do
|
47
|
-
# enabled
|
48
|
-
inputs = ['true']
|
49
|
-
|
50
|
-
# styling message and sha
|
51
|
-
inputs += %w(
|
52
|
-
red
|
53
|
-
myfont.ttf
|
54
|
-
SE
|
55
|
-
38
|
56
|
-
orange
|
57
|
-
true
|
58
|
-
) * 2
|
59
|
-
|
60
|
-
# styling overlay
|
61
|
-
inputs += %w(true #2884ae,#7e231f 40)
|
62
|
-
|
63
|
-
# border options
|
64
|
-
inputs += %w(true #e96d46 23)
|
65
|
-
|
66
|
-
configured_plugin_options = {}
|
67
|
-
fake_io_capture(inputs: inputs) do
|
68
|
-
configured_plugin_options = plugin.configure_options!
|
69
|
-
end
|
70
|
-
|
71
|
-
_(configured_plugin_options).must_equal( {
|
72
|
-
enabled: true,
|
73
|
-
message: {
|
74
|
-
color: 'red',
|
75
|
-
font: 'myfont.ttf',
|
76
|
-
position: 'SE',
|
77
|
-
size: 38,
|
78
|
-
stroke_color: 'orange',
|
79
|
-
uppercase: true
|
80
|
-
},
|
81
|
-
sha: {
|
82
|
-
color: 'red',
|
83
|
-
font: 'myfont.ttf',
|
84
|
-
position: 'SE',
|
85
|
-
size: 38,
|
86
|
-
stroke_color: 'orange',
|
87
|
-
uppercase: true
|
88
|
-
},
|
89
|
-
overlay: {
|
90
|
-
enabled: true,
|
91
|
-
overlay_colors: "#2884ae,#7e231f",
|
92
|
-
overlay_percent: 40
|
93
|
-
},
|
94
|
-
border: {
|
95
|
-
enabled: true,
|
96
|
-
color: '#e96d46',
|
97
|
-
size: 23,
|
98
|
-
}
|
99
|
-
})
|
100
|
-
end
|
101
|
-
|
102
|
-
describe '#valid_configuration?' do
|
103
|
-
it 'should be trye even if config is not set' do
|
104
|
-
_(plugin.valid_configuration?).must_equal(true)
|
105
|
-
end
|
106
|
-
|
107
|
-
it 'should be true for a valid configuration' do
|
108
|
-
plugin.configuration = valid_enabled_config
|
109
|
-
_(plugin.valid_configuration?).must_equal true
|
110
|
-
end
|
111
|
-
end
|
112
|
-
end
|
113
|
-
end
|
114
|
-
end
|
data/test/test_helper.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
4
|
-
|
5
|
-
# lolcommits gem
|
6
|
-
require 'lolcommits'
|
7
|
-
|
8
|
-
# lolcommit test helpers
|
9
|
-
require 'lolcommits/test_helpers/git_repo'
|
10
|
-
require 'lolcommits/test_helpers/fake_io'
|
11
|
-
|
12
|
-
if ENV['COVERAGE']
|
13
|
-
require 'simplecov'
|
14
|
-
end
|
15
|
-
|
16
|
-
# plugin gem test libs
|
17
|
-
require 'lolcommits/loltext'
|
18
|
-
require 'minitest/autorun'
|
19
|
-
|
20
|
-
# swallow all debug output during test runs
|
21
|
-
def debug(msg); end
|