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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 531554ca91ac8ad1b4763f63cbf1a37928ced185e45074d65f6962a5c9fa818e
4
- data.tar.gz: 7cd0440c1f54178efdf300dabb9ba8186611ef9ce81ef35fbd089c2b05d8d25e
3
+ metadata.gz: a8a4fdd00e3596c2d269767217f49222a335e87577667bdd4fa36b0f89aa80fc
4
+ data.tar.gz: bae24312ae1abda389f35a5a87f09376f4ff96e62019214a8369e602ac729b6e
5
5
  SHA512:
6
- metadata.gz: 7630e2f420da0abda493b789a6bd04f56a0581bef5c700d45b87da560c84bfc3289d8e9fa3bdbb9b7c69c97de2b53160b0fc499933da5cf0a0f4813116bc47b0
7
- data.tar.gz: 30de872358419a9adeb12de14cf40d9843aa7cee2bb51985eeaf0fce4a819cb9ddfee8d398cb3edcf9d71f667c8cc0abfce432a6ab65c0123b3274bcc0950423
6
+ metadata.gz: c0b60aafc37c0dd8432408eda1d20224e9e72eec40790a9d0a15a775abe5393dd82a9057707470b9e0e23226a7fb0f76ea9429bd214cabf4d13661c3e72a5278
7
+ data.tar.gz: 3edb6e5e487e818bbf1cdf43d23382ba3430df2adbc726589b0bb9715405ad5bc5895fcafe94071b8ab37b945d85c215e662d3206e73ac499e6325af76836892
@@ -1,29 +1,33 @@
1
- name: Tests
1
+ name: CI
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ "main" ]
5
+ branches:
6
+ - main
6
7
  pull_request:
7
- branches: [ "main" ]
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: ['3.1', '3.2', '3.3', '3.4']
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 git user name, email
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
- [![Build](https://img.shields.io/github/actions/workflow/status/lolcommits/lolcommits-tranzlate/build.yml?branch=main&style=flat)](https://github.com/lolcommits/lolcommits-tranzlate/actions/workflows/build.yml)
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 and generate a
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/build.yml)
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lolcommits
4
4
  module Tranzlate
5
- VERSION = "0.5.0".freeze
5
+ VERSION = "0.5.1".freeze
6
6
  end
7
7
  end
@@ -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 -z`.split("\x0").reject { |f| f.match(%r{^(assets|test|features)/}) }
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
@@ -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.0
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-09-23 00:00:00.000000000 Z
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/build.yml"
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.16
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