Skip to content

Commit

Permalink
use latest lolcommits, prep new version, add GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
matthutchinson committed Sep 24, 2024
1 parent 3d7cf45 commit 8d10672
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 31 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Tests

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby-version: ['3.1', '3.2', '3.3', '3.4']
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Configure git user name, email
run: |
git config --global user.name $NAME
git config --global user.email $EMAIL
env:
NAME: "George Costanza"
EMAIL: "[email protected]"
- name: Run tests
run: bundle exec rake test
25 changes: 25 additions & 0 deletions .github/workflows/push_gem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish gem to RubyGems.org

on:
push:
tags:
- v*

jobs:
push:
name: Push gem to RubyGems.org
runs-on: ubuntu-latest

permissions:
id-token: write
contents: write

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ruby

- uses: rubygems/release-gem@v1
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ adheres to [Semantic Versioning][Semver].

- Your contribution here!

## [0.6.0] - 2024-09-24
### Removed
- Support for Ruby < 3.1 (older rubies no longer supported)

## [0.5.0] - 2020-01-24
### Removed
- Support for Ruby < 2.4 (older rubies no longer supported)
Expand Down Expand Up @@ -66,7 +70,8 @@ adheres to [Semantic Versioning][Semver].
### Changed
- Initial release

[Unreleased]: https://github.com/lolcommits/lolcommits-uploldz/compare/v0.5.0...HEAD
[Unreleased]: https://github.com/lolcommits/lolcommits-uploldz/compare/v0.6.0...HEAD
[0.6.0]: https://github.com/lolcommits/lolcommits-uploldz/compare/v0.5.0...v0.6.0
[0.5.0]: https://github.com/lolcommits/lolcommits-uploldz/compare/v0.4.0...v0.5.0
[0.4.0]: https://github.com/lolcommits/lolcommits-uploldz/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/lolcommits/lolcommits-uploldz/compare/v0.2.0...v0.3.0
Expand All @@ -78,4 +83,3 @@ adheres to [Semantic Versioning][Semver].
[0.0.2]: https://github.com/lolcommits/lolcommits-uploldz/compare/v0.0.1...v0.0.2
[0.0.1]: https://github.com/lolcommits/lolcommits-uploldz/compare/11529d5...v0.0.1
[KeepAChangelog]: http://keepachangelog.com/en/1.0.0/
[Semver]: http://semver.org/spec/v2.0.0.html
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# Lolcommits Uploldz

[![Build](https://img.shields.io/github/actions/workflow/status/lolcommits/lolcommits-uploldz/build.yml?branch=main&style=flat)](https://github.com/lolcommits/lolcommits-uploldz/actions/workflows/build.yml)
[![Gem](https://img.shields.io/gem/v/lolcommits-uploldz.svg?style=flat)](http://rubygems.org/gems/lolcommits-uploldz)
[![Travis](https://img.shields.io/travis/com/lolcommits/lolcommits-uploldz/master.svg?style=flat)](https://travis-ci.com/lolcommits/lolcommits-uploldz)
[![Depfu](https://img.shields.io/depfu/lolcommits/lolcommits-uploldz.svg?style=flat)](https://depfu.com/github/lolcommits/lolcommits-uploldz)
[![Maintainability](https://api.codeclimate.com/v1/badges/adb505198ff0e8e8e170/maintainability)](https://codeclimate.com/github/lolcommits/lolcommits-uploldz/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/adb505198ff0e8e8e170/test_coverage)](https://codeclimate.com/github/lolcommits/lolcommits-uploldz/test_coverage)

[lolcommits](https://lolcommits.github.io/) takes a snapshot with your
webcam every time you git commit code, and archives a lolcat style image
Expand All @@ -27,7 +25,7 @@ password).

## Requirements

* Ruby >= 2.4
* Ruby >= 3.1
* A webcam
* [ImageMagick](http://www.imagemagick.org)
* [ffmpeg](https://www.ffmpeg.org) (optional) for animated gif capturing
Expand All @@ -54,8 +52,7 @@ will be uploaded to it. To disable use:
## Development

Check out this repo and run `bin/setup`, this will install all
dependencies and generate docs. Use `bundle exec rake` to run all tests
and generate a coverage report.
dependencies and generate docs. Use `bundle exec rake` to run all tests.

You can also run `bin/console` for an interactive prompt that will allow
you to experiment with the gem code.
Expand Down Expand Up @@ -106,9 +103,7 @@ The gem is available as open source under the terms of

## Links

* [Travis CI](https://travis-ci.com/lolcommits/lolcommits-uploldz)
* [Code Climate](https://codeclimate.com/github/lolcommits/lolcommits-uploldz)
* [Test Coverage](https://codeclimate.com/github/lolcommits/lolcommits-uploldz/coverage)
* [CI](https://github.com/lolcommits/lolcommits-uploldz/actions/workflows/build.yml)
* [RDoc](http://rdoc.info/projects/lolcommits/lolcommits-uploldz)
* [Issues](http://github.com/lolcommits/lolcommits-uploldz/issues)
* [Report a bug](http://github.com/lolcommits/lolcommits-uploldz/issues/new)
Expand Down
12 changes: 1 addition & 11 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,4 @@ Rake::TestTask.new(:test) do |t|
t.test_files = FileList["test/**/*_test.rb"]
end

# run tests with code coverage (default)
namespace :test do
desc "Run all tests and features and generate a code coverage report"
task :coverage do
ENV['COVERAGE'] = 'true'
Rake::Task['test'].execute
end
end


task :default => ['test:coverage']
task :default => ['test']
2 changes: 1 addition & 1 deletion lib/lolcommits/uploldz/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Lolcommits
module Uploldz
VERSION = "0.5.0".freeze
VERSION = "0.6.0".freeze
end
end
6 changes: 2 additions & 4 deletions lolcommits-uploldz.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,13 @@ Gem::Specification.new do |spec|
spec.executables = []
spec.require_paths = ["lib"]

spec.required_ruby_version = ">= 2.4"
spec.required_ruby_version = ">= 3.1"

spec.add_runtime_dependency "rest-client", ">= 2.1.0"
spec.add_runtime_dependency "lolcommits", ">= 0.14.2"
spec.add_runtime_dependency "lolcommits", ">= 0.17.2"

spec.add_development_dependency "bundler"
spec.add_development_dependency "webmock"
spec.add_development_dependency "pry"
spec.add_development_dependency "rake"
spec.add_development_dependency "minitest"
spec.add_development_dependency "simplecov"
end
4 changes: 0 additions & 4 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
require 'lolcommits/test_helpers/git_repo'
require 'lolcommits/test_helpers/fake_io'

if ENV['COVERAGE']
require 'simplecov'
end

# plugin gem test libs
require 'lolcommits/uploldz'
require 'minitest/autorun'
Expand Down

0 comments on commit 8d10672

Please sign in to comment.