lolcommits-tranzlate 0.5.0 → 0.5.1
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 → ci.yml} +14 -10
- data/CHANGELOG.md +4 -0
- data/README.md +3 -4
- data/assets/images/lolz.jpg +0 -0
- data/lib/lolcommits/tranzlate/version.rb +1 -1
- data/lolcommits-tranzlate.gemspec +1 -1
- data/test/lolcommits/plugin/tranzlate_test.rb +41 -0
- data/test/test_helper.rb +17 -0
- metadata +13 -9
- data/.github/workflows/push_gem.yml +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8a4fdd00e3596c2d269767217f49222a335e87577667bdd4fa36b0f89aa80fc
|
4
|
+
data.tar.gz: bae24312ae1abda389f35a5a87f09376f4ff96e62019214a8369e602ac729b6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0b60aafc37c0dd8432408eda1d20224e9e72eec40790a9d0a15a775abe5393dd82a9057707470b9e0e23226a7fb0f76ea9429bd214cabf4d13661c3e72a5278
|
7
|
+
data.tar.gz: 3edb6e5e487e818bbf1cdf43d23382ba3430df2adbc726589b0bb9715405ad5bc5895fcafe94071b8ab37b945d85c215e662d3206e73ac499e6325af76836892
|
@@ -1,29 +1,33 @@
|
|
1
|
-
name:
|
1
|
+
name: CI
|
2
2
|
|
3
3
|
on:
|
4
4
|
push:
|
5
|
-
branches:
|
5
|
+
branches:
|
6
|
+
- main
|
6
7
|
pull_request:
|
7
|
-
branches:
|
8
|
-
|
9
|
-
permissions:
|
10
|
-
contents: read
|
8
|
+
branches:
|
9
|
+
- main
|
11
10
|
|
12
11
|
jobs:
|
13
12
|
test:
|
13
|
+
name: ${{ format('Unit tests (Ruby {0})', matrix.ruby-version) }}
|
14
14
|
runs-on: ubuntu-latest
|
15
15
|
strategy:
|
16
|
-
fail-fast: false
|
17
16
|
matrix:
|
18
|
-
ruby-version:
|
17
|
+
ruby-version:
|
18
|
+
- "3.1"
|
19
|
+
- "3.2"
|
20
|
+
- "3.3"
|
21
|
+
- "3.4"
|
22
|
+
continue-on-error: true
|
19
23
|
steps:
|
20
24
|
- uses: actions/checkout@v4
|
21
|
-
- name: Set up Ruby
|
25
|
+
- name: Set up Ruby and install gems
|
22
26
|
uses: ruby/setup-ruby@v1
|
23
27
|
with:
|
24
28
|
ruby-version: ${{ matrix.ruby-version }}
|
25
29
|
bundler-cache: true
|
26
|
-
- name: Configure
|
30
|
+
- name: Configure Git
|
27
31
|
run: |
|
28
32
|
git config --global user.name $NAME
|
29
33
|
git config --global user.email $EMAIL
|
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.1] - 2024-12-27
|
13
|
+
### Changed
|
14
|
+
- Push gems with bundler (not GitHub actions)
|
15
|
+
|
12
16
|
## [0.5.0] - 2024-09-23
|
13
17
|
### Removed
|
14
18
|
- Support for Ruby < 3.1 (older rubies no longer supported)
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Lolcommits Tranzlate
|
2
2
|
|
3
|
-
[![
|
3
|
+
[![CI](https://img.shields.io/github/actions/workflow/status/lolcommits/lolcommits-tranzlate/ci.yml?branch=main&style=flat&label=CI)](https://github.com/lolcommits/lolcommits-tranzlate/actions/workflows/ci.yml)
|
4
4
|
[![Gem](https://img.shields.io/gem/v/lolcommits-tranzlate.svg?style=flat)](http://rubygems.org/gems/lolcommits-tranzlate)
|
5
5
|
[![Depfu](https://img.shields.io/depfu/lolcommits/lolcommits-tranzlate.svg?style=flat)](https://depfu.com/github/lolcommits/lolcommits-tranzlate)
|
6
6
|
|
@@ -38,8 +38,7 @@ Thats it! Your lolcommit messages will now be tranzlated!
|
|
38
38
|
## Development
|
39
39
|
|
40
40
|
Check out this repo and run `bin/setup`, to install all dependencies and
|
41
|
-
generate docs. Run `bundle exec rake` to run all tests
|
42
|
-
coverage report.
|
41
|
+
generate docs. Run `bundle exec rake` to run all tests.
|
43
42
|
|
44
43
|
You can also run `bin/console` for an interactive prompt that will allow
|
45
44
|
you to experiment with the gem code.
|
@@ -89,7 +88,7 @@ The gem is available as open source under the terms of
|
|
89
88
|
|
90
89
|
## Links
|
91
90
|
|
92
|
-
* [CI](https://github.com/lolcommits/lolcommits-tranzlate/actions/workflows/
|
91
|
+
* [CI](https://github.com/lolcommits/lolcommits-tranzlate/actions/workflows/ci.yml)
|
93
92
|
* [RDoc](http://rdoc.info/projects/lolcommits/lolcommits-tranzlate)
|
94
93
|
* [Issues](http://github.com/lolcommits/lolcommits-tranzlate/issues)
|
95
94
|
* [Report a bug](http://github.com/lolcommits/lolcommits-tranzlate/issues/new)
|
Binary file
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
"allowed_push_host" => "https://rubygems.org"
|
21
21
|
}
|
22
22
|
|
23
|
-
spec.files = `git ls-files
|
23
|
+
spec.files = `git ls-files`.split("\n")
|
24
24
|
spec.test_files = `git ls-files -- {test,features}/*`.split("\n")
|
25
25
|
spec.bindir = "bin"
|
26
26
|
spec.executables = []
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
describe Lolcommits::Plugin::Tranzlate do
|
6
|
+
|
7
|
+
include Lolcommits::TestHelpers::GitRepo
|
8
|
+
include Lolcommits::TestHelpers::FakeIO
|
9
|
+
|
10
|
+
describe 'with a runner' do
|
11
|
+
def runner
|
12
|
+
@runner ||= Lolcommits::Runner.new
|
13
|
+
end
|
14
|
+
|
15
|
+
def plugin
|
16
|
+
@plugin ||= Lolcommits::Plugin::Tranzlate.new(runner: runner)
|
17
|
+
end
|
18
|
+
|
19
|
+
describe '#enabled?' do
|
20
|
+
it 'returns false by default' do
|
21
|
+
_(plugin.enabled?).must_equal false
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'returns true when configured' do
|
25
|
+
plugin.configuration = { enabled: true }
|
26
|
+
_(plugin.enabled?).must_equal true
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe '#run_pre_capture' do
|
31
|
+
before { commit_repo_with_message('my awesome commit') }
|
32
|
+
|
33
|
+
it 'tranzlates the commit message' do
|
34
|
+
in_repo { plugin.run_pre_capture }
|
35
|
+
_(runner.message).must_match(/AWESUM COMMIT/)
|
36
|
+
end
|
37
|
+
|
38
|
+
after { teardown_repo }
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,17 @@
|
|
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
|
+
# plugin gem test libs
|
13
|
+
require 'lolcommits/tranzlate'
|
14
|
+
require 'minitest/autorun'
|
15
|
+
|
16
|
+
# swallow all debug output during test runs
|
17
|
+
def debug(msg); end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lolcommits-tranzlate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Hutchinson
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lolcommits
|
@@ -73,8 +73,7 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
-
- ".github/workflows/
|
77
|
-
- ".github/workflows/push_gem.yml"
|
76
|
+
- ".github/workflows/ci.yml"
|
78
77
|
- ".gitignore"
|
79
78
|
- ".simplecov"
|
80
79
|
- ".travis.yml"
|
@@ -86,6 +85,7 @@ files:
|
|
86
85
|
- PULL_REQUEST_TEMPLATE.md
|
87
86
|
- README.md
|
88
87
|
- Rakefile
|
88
|
+
- assets/images/lolz.jpg
|
89
89
|
- bin/console
|
90
90
|
- bin/setup
|
91
91
|
- lib/lolcommits/plugin/tranzlate.rb
|
@@ -93,6 +93,8 @@ files:
|
|
93
93
|
- lib/lolcommits/tranzlate/lolspeak.rb
|
94
94
|
- lib/lolcommits/tranzlate/version.rb
|
95
95
|
- lolcommits-tranzlate.gemspec
|
96
|
+
- test/lolcommits/plugin/tranzlate_test.rb
|
97
|
+
- test/test_helper.rb
|
96
98
|
homepage: https://github.com/lolcommits/lolcommits-tranzlate
|
97
99
|
licenses:
|
98
100
|
- LGPL-3.0
|
@@ -102,7 +104,7 @@ metadata:
|
|
102
104
|
source_code_uri: https://github.com/lolcommits/lolcommits-tranzlate
|
103
105
|
bug_tracker_uri: https://github.com/lolcommits/lolcommits-tranzlate/issues
|
104
106
|
allowed_push_host: https://rubygems.org
|
105
|
-
post_install_message:
|
107
|
+
post_install_message:
|
106
108
|
rdoc_options: []
|
107
109
|
require_paths:
|
108
110
|
- lib
|
@@ -117,8 +119,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
119
|
- !ruby/object:Gem::Version
|
118
120
|
version: '0'
|
119
121
|
requirements: []
|
120
|
-
rubygems_version: 3.5.
|
121
|
-
signing_key:
|
122
|
+
rubygems_version: 3.5.22
|
123
|
+
signing_key:
|
122
124
|
specification_version: 4
|
123
125
|
summary: lolcommits lolspekk tranzlation plugin
|
124
|
-
test_files:
|
126
|
+
test_files:
|
127
|
+
- test/lolcommits/plugin/tranzlate_test.rb
|
128
|
+
- test/test_helper.rb
|
@@ -1,25 +0,0 @@
|
|
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
|