lolcommits-sample_plugin 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0ffe9fd14e59f028f2881574a9c751c7f7a30eef2389ed4b318764af767788c
4
- data.tar.gz: f178c6cd63b5eb23dfd5099018d24172802a8f799bce8d25e876af3d5ba68402
3
+ metadata.gz: 4963638d9fb2e82c3d6668cc04840305be43caf5082685cf664888915ce3964e
4
+ data.tar.gz: afce17712fcd4941780a77589510408a9dca0d84154a8149d4966521c203eb7a
5
5
  SHA512:
6
- metadata.gz: e5624a9283d099d28f88c409a82eeda9080149dbdcdbf885e15431540701080a8aff37f3fdac522c8c9132bdfe7238bd36d6a8d76c3e9a0f9e8b6832c7633b76
7
- data.tar.gz: 7fd9f771eb7479ecc947f12b5d9dd25e0b88bffe802e1eb611a8700e8efda57249d528d186c70aebdc950a132a96ddfac1be24933811f97f144eb43bee7448e6
6
+ metadata.gz: f094d34b8a5e41d19918514e4eec00dac5ce45ff6d5741d5c634899ad4464ac1460b03be1f44a8bd8c319c9371fd1aaa75ed8429769d9dc26dd1148930ca76dd
7
+ data.tar.gz: cca703fa294bd230bb015bf67cb06bc657382f5bdc90083bdfad8c8b2c1cf79baf2489fe23e59bcc3d20ef0c780f16729ce5e41eaa4b8bfb45521f258da33203
@@ -0,0 +1,34 @@
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: Configure git user name, email
27
+ run: |
28
+ git config --global user.name $NAME
29
+ git config --global user.email $EMAIL
30
+ env:
31
+ NAME: "George Costanza"
32
+ EMAIL: "george.costanza@vandelay.com"
33
+ - name: Run tests
34
+ 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
@@ -2,10 +2,10 @@ sudo: false
2
2
  language: ruby
3
3
  cache: bundler
4
4
  rvm:
5
- - 2.4.9
6
- - 2.5.7
7
- - 2.6.5
8
- - 2.7.0
5
+ - 2.5.8
6
+ - 2.6.6
7
+ - 2.7.2
8
+ - 3.0.0
9
9
  - ruby-head
10
10
 
11
11
  before_install:
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-22
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)
@@ -58,7 +62,8 @@ project adheres to [Semantic Versioning][Semver].
58
62
  ### Changed
59
63
  - Initial release
60
64
 
61
- [Unreleased]: https://github.com/lolcommits/lolcommits-sample_plugin/compare/v0.4.0...HEAD
65
+ [Unreleased]: https://github.com/lolcommits/lolcommits-sample_plugin/compare/v0.5.0...HEAD
66
+ [0.5.0]: https://github.com/lolcommits/lolcommits-sample_plugin/compare/v0.4.0...v0.5.0
62
67
  [0.4.0]: https://github.com/lolcommits/lolcommits-sample_plugin/compare/v0.3.0...v0.4.0
63
68
  [0.3.0]: https://github.com/lolcommits/lolcommits-sample_plugin/compare/v0.2.0...v0.3.0
64
69
  [0.2.0]: https://github.com/lolcommits/lolcommits-sample_plugin/compare/v0.1.2...v0.2.0
data/README.md CHANGED
@@ -1,10 +1,8 @@
1
1
  # Lolcommits Sample Plugin
2
2
 
3
+ [![Build](https://img.shields.io/github/actions/workflow/status/lolcommits/lolcommits-sample_plugin/build.yml?branch=main&style=flat)](https://github.com/lolcommits/lolcommits-sample_plugin/actions/workflows/build.yml)
3
4
  [![Gem](https://img.shields.io/gem/v/lolcommits-sample_plugin.svg?style=flat)](http://rubygems.org/gems/lolcommits-sample_plugin)
4
- [![Travis](https://img.shields.io/travis/com/lolcommits/lolcommits-sample_plugin/master.svg?style=flat)](https://travis-ci.com/lolcommits/lolcommits-sample_plugin)
5
5
  [![Depfu](https://img.shields.io/depfu/lolcommits/lolcommits-sample_plugin.svg?style=flat)](https://depfu.com/github/lolcommits/lolcommits-sample_plugin)
6
- [![Maintainability](https://api.codeclimate.com/v1/badges/ce34ea41c79820a2fc75/maintainability)](https://codeclimate.com/github/lolcommits/lolcommits-sample_plugin/maintainability)
7
- [![Test Coverage](https://api.codeclimate.com/v1/badges/ce34ea41c79820a2fc75/test_coverage)](https://codeclimate.com/github/lolcommits/lolcommits-sample_plugin/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
@@ -25,7 +23,7 @@ be enabled, you'll see something like this for a capture:
25
23
  (it was an image!)
26
24
 
27
25
  Use this repo to jump-start development on your own plugin. It has
28
- tests, docs and hooks with useful tools; Travis, CodeClimate, Rdoc etc.
26
+ tests, docs and hooks with useful tools; CI, Rdoc etc.
29
27
 
30
28
  ## Developing your own plugin
31
29
 
@@ -284,10 +282,8 @@ and [pull
284
282
  requests](https://github.com/lolcommits/lolcommits-sample_plugin/pulls)
285
283
  are welcome on GitHub.
286
284
 
287
- When submitting pull requests, remember to add tests covering any new
288
- behaviour, and ensure all tests are passing on [Travis
289
- CI](https://travis-ci.com/lolcommits/lolcommits-sample_plugin). Read the
290
- [contributing
285
+ When submitting pull requests, remember to add tests covering any new behaviour,
286
+ and ensure all tests are passing on CI. Read the [contributing
291
287
  guidelines](https://github.com/lolcommits/lolcommits-sample_plugin/blob/master/CONTRIBUTING.md)
292
288
  for more details.
293
289
 
@@ -305,9 +301,7 @@ The gem is available as open source under the terms of
305
301
 
306
302
  ## Links
307
303
 
308
- * [Travis CI](https://travis-ci.com/lolcommits/lolcommits-sample_plugin)
309
- * [Test Coverage](https://codeclimate.com/github/lolcommits/lolcommits-sample_plugin/test_coverage)
310
- * [Code Climate](https://codeclimate.com/github/lolcommits/lolcommits-sample_plugin)
304
+ * [CI](https://github.com/lolcommits/lolcommits-sample_plugin/actions/workflows/build.yml)
311
305
  * [RDoc](http://rdoc.info/projects/lolcommits/lolcommits-sample_plugin)
312
306
  * [Issues](http://github.com/lolcommits/lolcommits-sample_plugin/issues)
313
307
  * [Report a bug](http://github.com/lolcommits/lolcommits-sample_plugin/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
- # run tests with code coverage (default)
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']
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lolcommits
4
4
  module SamplePlugin
5
- VERSION = "0.4.0".freeze
5
+ VERSION = "0.5.0".freeze
6
6
  end
7
7
  end
@@ -26,13 +26,11 @@ Gem::Specification.new do |spec|
26
26
  spec.executables = []
27
27
  spec.require_paths = ["lib"]
28
28
 
29
- spec.required_ruby_version = ">= 2.4"
29
+ spec.required_ruby_version = ">= 3.1"
30
30
 
31
- spec.add_runtime_dependency "lolcommits", ">= 0.14.2"
31
+ spec.add_runtime_dependency "lolcommits", ">= 0.17.2"
32
32
 
33
33
  spec.add_development_dependency "bundler"
34
34
  spec.add_development_dependency "rake"
35
35
  spec.add_development_dependency "minitest"
36
- spec.add_development_dependency "simplecov"
37
- spec.add_development_dependency "pry"
38
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lolcommits-sample_plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.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: 2020-01-24 00:00:00.000000000 Z
11
+ date: 2024-09-22 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.14.2
19
+ version: 0.17.2
20
20
  type: :runtime
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.14.2
26
+ version: 0.17.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -66,34 +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
- - !ruby/object:Gem::Dependency
84
- name: pry
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
69
  description: Use this gem as a guide or template to get started with lolcommits plugin
98
70
  development
99
71
  email:
@@ -102,6 +74,8 @@ executables: []
102
74
  extensions: []
103
75
  extra_rdoc_files: []
104
76
  files:
77
+ - ".github/workflows/build.yml"
78
+ - ".github/workflows/push_gem.yml"
105
79
  - ".gitignore"
106
80
  - ".simplecov"
107
81
  - ".travis.yml"
@@ -119,8 +93,6 @@ files:
119
93
  - lib/lolcommits/sample_plugin.rb
120
94
  - lib/lolcommits/sample_plugin/version.rb
121
95
  - lolcommits-plugin-sample.gemspec
122
- - test/lolcommits/plugin/sample_plugin_test.rb
123
- - test/test_helper.rb
124
96
  homepage: https://github.com/lolcommits/lolcommits-sample_plugin
125
97
  licenses:
126
98
  - LGPL-3.0
@@ -138,17 +110,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
110
  requirements:
139
111
  - - ">="
140
112
  - !ruby/object:Gem::Version
141
- version: '2.4'
113
+ version: '3.1'
142
114
  required_rubygems_version: !ruby/object:Gem::Requirement
143
115
  requirements:
144
116
  - - ">="
145
117
  - !ruby/object:Gem::Version
146
118
  version: '0'
147
119
  requirements: []
148
- rubygems_version: 3.1.2
120
+ rubygems_version: 3.5.16
149
121
  signing_key:
150
122
  specification_version: 4
151
123
  summary: Example gem for lolcommits plugin development
152
- test_files:
153
- - test/lolcommits/plugin/sample_plugin_test.rb
154
- - test/test_helper.rb
124
+ test_files: []
@@ -1,109 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'test_helper'
4
-
5
- describe Lolcommits::Plugin::SamplePlugin do
6
-
7
- include Lolcommits::TestHelpers::GitRepo
8
- include Lolcommits::TestHelpers::FakeIO
9
-
10
- describe 'with a runner' do
11
- def runner
12
- # a simple lolcommits runner with an empty configuration Hash
13
- @runner ||= Lolcommits::Runner.new(
14
- lolcommit_path: "/path/to/lolcommit.jpg"
15
- )
16
- end
17
-
18
- def plugin
19
- @plugin ||= Lolcommits::Plugin::SamplePlugin.new(runner: runner)
20
- end
21
-
22
- def valid_enabled_config
23
- {
24
- enabled: true,
25
- ask_for_cheese: false,
26
- always_a_great_commit?: true,
27
- camera_emoji: {
28
- enabled: true,
29
- emoji_multiplier: 5
30
- }
31
- }
32
- end
33
-
34
- describe '#run_pre_capture' do
35
- before { commit_repo_with_message }
36
-
37
- it 'outputs a message to stdout' do
38
- in_repo do
39
- _(Proc.new { plugin.run_pre_capture }).
40
- must_output "✨ Say cheese 😁 !\n"
41
- end
42
- end
43
-
44
- after { teardown_repo }
45
- end
46
-
47
- describe '#run_post_capture' do
48
- before { commit_repo_with_message }
49
-
50
- it 'outputs a message to stdout' do
51
- plugin.configuration = valid_enabled_config
52
- in_repo do
53
- _(Proc.new { plugin.run_post_capture }).
54
- must_output "📸 📸 📸 📸 📸 Snap!\n"
55
- end
56
- end
57
-
58
- after { teardown_repo }
59
- end
60
-
61
- describe '#run_capture_ready' do
62
-
63
- before { commit_repo_with_message }
64
-
65
- it 'outputs a message to stdout' do
66
- in_repo do
67
- _(Proc.new { plugin.run_capture_ready }).
68
- must_output "wow! #{last_commit.sha[0..10]} at /path/to/lolcommit.jpg is your best looking commit yet!\n(it was an image!)\n"
69
- end
70
- end
71
-
72
- after { teardown_repo }
73
- end
74
-
75
- describe '#enabled?' do
76
- it 'returns be false by default' do
77
- _(plugin.enabled?).must_equal false
78
- end
79
-
80
- it 'returns true when configured' do
81
- plugin.configuration = valid_enabled_config
82
- _(plugin.enabled?).must_equal true
83
- end
84
- end
85
-
86
- describe 'configuration' do
87
- it 'allows plugin options to be configured' do
88
- configured_plugin_options = {}
89
-
90
- fake_io_capture(inputs: %w(true false true true 5)) do
91
- configured_plugin_options = plugin.configure_options!
92
- end
93
-
94
- _(configured_plugin_options).must_equal(valid_enabled_config)
95
- end
96
-
97
- describe '#valid_configuration?' do
98
- it 'returns false without config set' do
99
- _(plugin.valid_configuration?).must_equal(false)
100
- end
101
-
102
- it 'returns true for a valid configuration' do
103
- plugin.configuration = valid_enabled_config
104
- _(plugin.valid_configuration?).must_equal true
105
- end
106
- end
107
- end
108
- end
109
- 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/sample_plugin'
18
- require 'minitest/autorun'
19
-
20
- # swallow all debug output during test runs
21
- def debug(msg); end