lolcommits-tranzlate 0.5.0 → 0.5.2

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: 74aff45c56a3b9d6c994c8475338b5002d56004def057fc748a469d2bce13ed5
4
+ data.tar.gz: 5e9f14126f437b35830fa0f0a6532fc9e40b6979f7ead8931c534bd2bcc7104f
5
5
  SHA512:
6
- metadata.gz: 7630e2f420da0abda493b789a6bd04f56a0581bef5c700d45b87da560c84bfc3289d8e9fa3bdbb9b7c69c97de2b53160b0fc499933da5cf0a0f4813116bc47b0
7
- data.tar.gz: 30de872358419a9adeb12de14cf40d9843aa7cee2bb51985eeaf0fce4a819cb9ddfee8d398cb3edcf9d71f667c8cc0abfce432a6ab65c0123b3274bcc0950423
6
+ metadata.gz: 5a709cc1c93cb741c130c1e758fd1aff66c9f1807b56ec2e2c520f77f385015cc762f72263db57ec5e31923efdd5f0bb9035710c30f6aa845cd228d7569d6525
7
+ data.tar.gz: 4621676ef39f271a8bf92d135fb0a4b417e39db44d9d4fc36505e01ef7572d3d93e5aaf387f691fc236ad86271b4c2e59202647f9b9ab59021870719800a111a
@@ -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,11 @@ project adheres to [Semantic Versioning][Semver].
9
9
 
10
10
  - Your contribution here!
11
11
 
12
+ ## [0.5.2] - 2024-12-27
13
+ ### Changed
14
+ - Push gems with bundler (not GitHub actions)
15
+ - Updated documentation links
16
+
12
17
  ## [0.5.0] - 2024-09-23
13
18
  ### Removed
14
19
  - Support for Ruby < 3.1 (older rubies no longer supported)
@@ -77,7 +82,8 @@ project adheres to [Semantic Versioning][Semver].
77
82
  ### Changed
78
83
  - Initial release
79
84
 
80
- [Unreleased]: https://github.com/lolcommits/lolcommits-tranzlate/compare/v0.5.0...HEAD
85
+ [Unreleased]: https://github.com/lolcommits/lolcommits-tranzlate/compare/v0.5.2...HEAD
86
+ [0.5.2]: https://github.com/lolcommits/lolcommits-tranzlate/compare/v0.5.0...v0.5.2
81
87
  [0.5.0]: https://github.com/lolcommits/lolcommits-tranzlate/compare/v0.4.0...v0.5.0
82
88
  [0.4.0]: https://github.com/lolcommits/lolcommits-tranzlate/compare/v0.3.0...v0.4.0
83
89
  [0.3.0]: https://github.com/lolcommits/lolcommits-tranzlate/compare/v0.2.0...v0.3.0
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,8 +88,8 @@ 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)
93
- * [RDoc](http://rdoc.info/projects/lolcommits/lolcommits-tranzlate)
91
+ * [CI](https://github.com/lolcommits/lolcommits-tranzlate/actions/workflows/ci.yml)
92
+ * [RDoc](https://gemdocs.org/gems/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)
96
95
  * [Gem](http://rubygems.org/gems/lolcommits-tranzlate)
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.2".freeze
6
6
  end
7
7
  end
@@ -14,13 +14,14 @@ Gem::Specification.new do |spec|
14
14
 
15
15
  spec.metadata = {
16
16
  "homepage_uri" => "https://github.com/lolcommits/lolcommits-tranzlate",
17
+ "documentation_uri" => "https://gemdocs.org/gems/lolcommits-tranzlate",
17
18
  "changelog_uri" => "https://github.com/lolcommits/lolcommits-tranzlate/blob/master/CHANGELOG.md",
18
19
  "source_code_uri" => "https://github.com/lolcommits/lolcommits-tranzlate",
19
20
  "bug_tracker_uri" => "https://github.com/lolcommits/lolcommits-tranzlate/issues",
20
21
  "allowed_push_host" => "https://rubygems.org"
21
22
  }
22
23
 
23
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(assets|test|features)/}) }
24
+ spec.files = `git ls-files`.split("\n")
24
25
  spec.test_files = `git ls-files -- {test,features}/*`.split("\n")
25
26
  spec.bindir = "bin"
26
27
  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.2
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,16 +93,19 @@ 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
99
101
  metadata:
100
102
  homepage_uri: https://github.com/lolcommits/lolcommits-tranzlate
103
+ documentation_uri: https://gemdocs.org/gems/lolcommits-tranzlate
101
104
  changelog_uri: https://github.com/lolcommits/lolcommits-tranzlate/blob/master/CHANGELOG.md
102
105
  source_code_uri: https://github.com/lolcommits/lolcommits-tranzlate
103
106
  bug_tracker_uri: https://github.com/lolcommits/lolcommits-tranzlate/issues
104
107
  allowed_push_host: https://rubygems.org
105
- post_install_message:
108
+ post_install_message:
106
109
  rdoc_options: []
107
110
  require_paths:
108
111
  - lib
@@ -117,8 +120,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
120
  - !ruby/object:Gem::Version
118
121
  version: '0'
119
122
  requirements: []
120
- rubygems_version: 3.5.16
121
- signing_key:
123
+ rubygems_version: 3.5.22
124
+ signing_key:
122
125
  specification_version: 4
123
126
  summary: lolcommits lolspekk tranzlation plugin
124
- test_files: []
127
+ test_files:
128
+ - test/lolcommits/plugin/tranzlate_test.rb
129
+ - 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