lolcommits-term_output 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b8a17ac462d1361f72a7a5ba9df016bc956ce5b485f79a21b7ebbe217af9823
4
- data.tar.gz: ba2cceef9dd8da7129f01634a9f34a1688b13ea9cb47ad2bd57a97a3fa09e0a1
3
+ metadata.gz: 7611cd3a65922c390b7ac263411258f60687cf60b01dc8c54558bda51857f04c
4
+ data.tar.gz: 9e07314a55e7b099b64353e2a7d7fdbf7da11b30753b922aa53a1385e2bbf13b
5
5
  SHA512:
6
- metadata.gz: b3bd86eddbe73db77882cf1d5b802c362e2f31d9e2270f7467ae33ae2d30158232c03d3e7fd0864442f3e29c1178ed3d91e7643514f52e8210a008fa92411f00
7
- data.tar.gz: c584556ab5a7121b13e9eb8a7045d8aa84787e3ee30ad2aa58ac291f57b2b748b6ec81dceb21655fa156ce7d0af962bda49e72aef419226d143c01af15e14bc1
6
+ metadata.gz: '055786580484e7bd27f99e45811b8c2ad521908837c1ebe47bc2f5e0eb213126e6deca912d000778bfe1eaa3956add524bfe381e17294b3bbf3405d3c69b3d44'
7
+ data.tar.gz: 65764fc66ee33b82238a7ce0ced9a9b87eb0e1b5e92d7da77d5fcc7d630600f734a044abc841d5834b9f41d55bddcc29cd24f7a693b4b0d55c7cf0009a7e4aa3
@@ -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-24
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)
@@ -64,7 +68,8 @@ project adheres to [Semantic Versioning][Semver].
64
68
  ### Changed
65
69
  - Initial release
66
70
 
67
- [Unreleased]: https://github.com/lolcommits/lolcommits-term_output/compare/v0.4.0...HEAD
71
+ [Unreleased]: https://github.com/lolcommits/lolcommits-term_output/compare/v0.5.0...HEAD
72
+ [0.5.0]: https://github.com/lolcommits/lolcommits-term_output/compare/v0.4.0...v0.5.0
68
73
  [0.4.0]: https://github.com/lolcommits/lolcommits-term_output/compare/v0.3.0...v0.4.0
69
74
  [0.3.0]: https://github.com/lolcommits/lolcommits-term_output/compare/v0.2.0...v0.3.0
70
75
  [0.2.0]: https://github.com/lolcommits/lolcommits-term_output/compare/v0.1.1...v0.2.0
data/README.md CHANGED
@@ -1,10 +1,8 @@
1
1
  # Lolcommits Term Output
2
2
 
3
+ [![Build](https://img.shields.io/github/actions/workflow/status/lolcommits/lolcommits-term_output/build.yml?branch=main&style=flat)](https://github.com/lolcommits/lolcommits-term_output/actions/workflows/build.yml)
3
4
  [![Gem](https://img.shields.io/gem/v/lolcommits-term_output.svg?style=flat)](http://rubygems.org/gems/lolcommits-term_output)
4
- [![Travis](https://img.shields.io/travis/com/lolcommits/lolcommits-term_output/master.svg?style=flat)](https://travis-ci.com/lolcommits/lolcommits-term_output)
5
5
  [![Depfu](https://img.shields.io/depfu/lolcommits/lolcommits-term_output.svg?style=flat)](https://depfu.com/github/lolcommits/lolcommits-term_output)
6
- [![Maintainability](https://api.codeclimate.com/v1/badges/3f2a468adb10524add39/maintainability)](https://codeclimate.com/github/lolcommits/lolcommits-term_output/maintainability)
7
- [![Test Coverage](https://api.codeclimate.com/v1/badges/3f2a468adb10524add39/test_coverage)](https://codeclimate.com/github/lolcommits/lolcommits-term_output/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
@@ -19,7 +17,7 @@ only) in your terminal (after committing). For example:
19
17
 
20
18
  ## Requirements
21
19
 
22
- * Ruby >= 2.4
20
+ * Ruby >= 3.1
23
21
  * A webcam
24
22
  * [iTerm2](http://iterm2.com/index.html)
25
23
  * [ImageMagick](http://www.imagemagick.org)
@@ -78,17 +76,14 @@ and [pull
78
76
  requests](https://github.com/lolcommits/lolcommits-term_output/pulls)
79
77
  are welcome on GitHub.
80
78
 
81
- When submitting pull requests, remember to add tests covering any new
82
- behaviour, and ensure all tests are passing on [Travis
83
- CI](https://travis-ci.com/lolcommits/lolcommits-term_output). Read the
84
- [contributing
79
+ When submitting pull requests, remember to add tests covering any new behaviour,
80
+ and ensure all tests are passing on CI. Read the [contributing
85
81
  guidelines](https://github.com/lolcommits/lolcommits-term_output/blob/master/CONTRIBUTING.md)
86
82
  for more details.
87
83
 
88
- This project is intended to be a safe, welcoming space for
89
- collaboration, and contributors are expected to adhere to the
90
- [Contributor Covenant](http://contributor-covenant.org) code of conduct.
91
- See
84
+ This project is intended to be a safe, welcoming space for collaboration, and
85
+ contributors are expected to adhere to the [Contributor
86
+ Covenant](http://contributor-covenant.org) code of conduct. See
92
87
  [here](https://github.com/lolcommits/lolcommits-term_output/blob/master/CODE_OF_CONDUCT.md)
93
88
  for more details.
94
89
 
@@ -99,9 +94,7 @@ The gem is available as open source under the terms of
99
94
 
100
95
  ## Links
101
96
 
102
- * [Travis CI](https://travis-ci.com/lolcommits/lolcommits-term_output)
103
- * [Code Climate](https://codeclimate.com/github/lolcommits/lolcommits-term_output)
104
- * [Test Coverage](https://codeclimate.com/github/lolcommits/lolcommits-term_output/coverage)
97
+ * [CI](https://github.com/lolcommits/lolcommits-term_output/actions/workflows/build.yml)
105
98
  * [RDoc](http://rdoc.info/projects/lolcommits/lolcommits-term_output)
106
99
  * [Issues](http://github.com/lolcommits/lolcommits-term_output/issues)
107
100
  * [Report a bug](http://github.com/lolcommits/lolcommits-term_output/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 TermOutput
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
- spec.add_development_dependency "pry"
35
34
  spec.add_development_dependency "rake"
36
35
  spec.add_development_dependency "minitest"
37
- spec.add_development_dependency "simplecov"
38
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lolcommits-term_output
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-24 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
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: pry
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: rake
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -80,20 +66,6 @@ dependencies:
80
66
  - - ">="
81
67
  - !ruby/object:Gem::Version
82
68
  version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: simplecov
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: Display lolcommits within your iTerm terminal
98
70
  email:
99
71
  - matt@hiddenloop.com
@@ -101,6 +73,8 @@ executables: []
101
73
  extensions: []
102
74
  extra_rdoc_files: []
103
75
  files:
76
+ - ".github/workflows/build.yml"
77
+ - ".github/workflows/push_gem.yml"
104
78
  - ".gitignore"
105
79
  - ".simplecov"
106
80
  - ".travis.yml"
@@ -118,8 +92,6 @@ files:
118
92
  - lib/lolcommits/term_output.rb
119
93
  - lib/lolcommits/term_output/version.rb
120
94
  - lolcommits-term_output.gemspec
121
- - test/lolcommits/plugin/term_output_test.rb
122
- - test/test_helper.rb
123
95
  homepage: https://github.com/lolcommits/lolcommits-term_output
124
96
  licenses:
125
97
  - LGPL-3.0
@@ -137,17 +109,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
137
109
  requirements:
138
110
  - - ">="
139
111
  - !ruby/object:Gem::Version
140
- version: '2.4'
112
+ version: '3.1'
141
113
  required_rubygems_version: !ruby/object:Gem::Requirement
142
114
  requirements:
143
115
  - - ">="
144
116
  - !ruby/object:Gem::Version
145
117
  version: '0'
146
118
  requirements: []
147
- rubygems_version: 3.1.2
119
+ rubygems_version: 3.5.16
148
120
  signing_key:
149
121
  specification_version: 4
150
122
  summary: Display lolcommits within your iTerm terminal
151
- test_files:
152
- - test/lolcommits/plugin/term_output_test.rb
153
- - test/test_helper.rb
123
+ test_files: []
@@ -1,118 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "test_helper"
4
-
5
- describe Lolcommits::Plugin::TermOutput do
6
-
7
- include Lolcommits::TestHelpers::GitRepo
8
- include Lolcommits::TestHelpers::FakeIO
9
-
10
- # initialize and reset env vars before tests run
11
- before do
12
- @old_tmux = ENV['TMUX']
13
- @old_term_program = ENV['TERM_PROGRAM']
14
- ENV['TERM_PROGRAM'] = "iTerm"
15
- ENV['TMUX'] = nil
16
- end
17
-
18
- after do
19
- ENV['TERM_PROGRAM'] = @old_term_program
20
- ENV['TMUX'] = @old_tmux
21
- end
22
-
23
- describe "with a runner" do
24
- def runner
25
- # a simple lolcommits runner with an empty configuration Hash
26
- @runner ||= Lolcommits::Runner.new(
27
- lolcommit_path: Tempfile.new('lolcommit.jpg')
28
- )
29
- end
30
-
31
- def plugin
32
- @plugin ||= Lolcommits::Plugin::TermOutput.new(runner: runner)
33
- end
34
-
35
- def valid_enabled_config
36
- { enabled: true }
37
- end
38
-
39
- describe "#enabled?" do
40
- it "is false by default" do
41
- _(plugin.enabled?).must_equal false
42
- end
43
-
44
- it "is true when configured" do
45
- plugin.configuration = valid_enabled_config
46
- _(plugin.enabled?).must_equal true
47
- end
48
- end
49
-
50
- describe "run_capture_ready" do
51
- before { commit_repo_with_message("first commit!") }
52
- after { teardown_repo }
53
-
54
- def check_plugin_output(matching_regex)
55
- in_repo do
56
- plugin.configuration = valid_enabled_config
57
- output = fake_io_capture { plugin.run_capture_ready }
58
- _(output).must_match matching_regex
59
- end
60
- end
61
-
62
- it "outputs lolcommits image inline to terminal" do
63
- check_plugin_output(/^\e\]1337;File=inline=1\:.*\n;alt=first commit!;\a\n$/)
64
- end
65
-
66
- describe "when running in a Tmux session" do
67
- before do
68
- ENV['TMUX'] = 'true'
69
- end
70
-
71
- it "outputs lolcommits image inline to terminal with Tmux escape sequence" do
72
- check_plugin_output(/^\ePtmux;\e\e\]1337;File=inline=1\:.*\n;alt=first commit!;\a\e\\\n$/)
73
- end
74
- end
75
-
76
- describe "when using an unsupported terminal" do
77
- before do
78
- ENV['TERM_PROGRAM'] = "konsole"
79
- end
80
-
81
- it "outputs nothing to the terminal" do
82
- check_plugin_output ""
83
- end
84
- end
85
- end
86
-
87
- describe "configuration" do
88
- it "allows plugin options to be configured" do
89
- inputs = %w( true ) # enabled option
90
- configured_plugin_options = {}
91
-
92
- fake_io_capture(inputs: inputs) do
93
- configured_plugin_options = plugin.configure_options!
94
- end
95
-
96
- _(configured_plugin_options).must_equal({ enabled: true })
97
- end
98
-
99
- describe "when terminal not supported" do
100
- before do
101
- ENV['TERM_PROGRAM'] = "konsole"
102
- end
103
-
104
- it "does not allow options to be configured" do
105
- inputs = %w( true ) # enabled option
106
- configured_plugin_options = {}
107
-
108
- output = fake_io_capture(inputs: inputs) do
109
- configured_plugin_options = plugin.configure_options!
110
- end
111
-
112
- assert_equal configured_plugin_options, {}
113
- _(output).must_match(/Sorry, this terminal does not support this plugin/)
114
- end
115
- end
116
- end
117
- end
118
- 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/term_output'
18
- require 'minitest/autorun'
19
-
20
- # swallow all debug output during test runs
21
- def debug(msg); end