lolcommits-lolsrv 0.5.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +56 -0
- data/.quickhook/pre-commit/ruby-lint +3 -0
- data/.rubocop.yml +2 -0
- data/CHANGELOG.md +12 -1
- data/Gemfile +5 -1
- data/README.md +29 -38
- data/Rakefile +1 -11
- data/bin/rubocop +5 -0
- data/lib/lolcommits/lolsrv/version.rb +1 -1
- data/lib/lolcommits/lolsrv.rb +2 -2
- data/lib/lolcommits/plugin/lolsrv.rb +24 -26
- data/lolcommits-lolsrv.gemspec +8 -8
- data/test/lolcommits/plugin/lolsrv_test.rb +3 -6
- data/test/test_helper.rb +8 -10
- metadata +16 -28
- data/.simplecov +0 -9
- data/.travis.yml +0 -29
- data/PULL_REQUEST_TEMPLATE.md +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee7425ba8ac9bb6c57463a97876d305bde6e31be2c342affc7836675cecdb2d1
|
4
|
+
data.tar.gz: 3f590b91c4ba5ffe90e67d32e021d409adeec214ed2fb64c761876c2b460721b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d34fba7f530270c255c46c9f685726662ef59fcaed53f8ed07c60f047d593a7e4693eeb1e96456e9d353e01abaac7bd08bb94d514cf70fa8136773b3a1eb247d
|
7
|
+
data.tar.gz: 8d2504c28908b0f1a24406199c11e8d6476d279cb9448228418f9f100b237f12ffbd45abf8d06cc5650385a14a3b44d58a5ee89efd9ea10451dce106aff6cb3c
|
@@ -0,0 +1,56 @@
|
|
1
|
+
name: CI
|
2
|
+
permissions:
|
3
|
+
contents: read
|
4
|
+
|
5
|
+
on:
|
6
|
+
push:
|
7
|
+
branches:
|
8
|
+
- main
|
9
|
+
pull_request:
|
10
|
+
branches:
|
11
|
+
- main
|
12
|
+
|
13
|
+
jobs:
|
14
|
+
rubocop:
|
15
|
+
name: RuboCop
|
16
|
+
runs-on: ubuntu-latest
|
17
|
+
env:
|
18
|
+
BUNDLE_ONLY: rubocop
|
19
|
+
steps:
|
20
|
+
- name: Checkout code
|
21
|
+
uses: actions/checkout@v4
|
22
|
+
- name: Setup Ruby and install gems
|
23
|
+
uses: ruby/setup-ruby@v1
|
24
|
+
with:
|
25
|
+
ruby-version: 3.3.0
|
26
|
+
bundler-cache: true
|
27
|
+
- name: Run Rubocop
|
28
|
+
run: bundle exec rubocop --parallel
|
29
|
+
test:
|
30
|
+
name: ${{ format('Unit tests (Ruby {0})', matrix.ruby-version) }}
|
31
|
+
runs-on: ubuntu-latest
|
32
|
+
strategy:
|
33
|
+
matrix:
|
34
|
+
ruby-version:
|
35
|
+
- "3.1"
|
36
|
+
- "3.2"
|
37
|
+
- "3.3"
|
38
|
+
- "3.4"
|
39
|
+
continue-on-error: true
|
40
|
+
steps:
|
41
|
+
- name: Checkout code
|
42
|
+
uses: actions/checkout@v4
|
43
|
+
- name: Setup Ruby and install gems
|
44
|
+
uses: ruby/setup-ruby@v1
|
45
|
+
with:
|
46
|
+
ruby-version: ${{ matrix.ruby-version }}
|
47
|
+
bundler-cache: true
|
48
|
+
- name: Configure Git
|
49
|
+
run: |
|
50
|
+
git config --global user.name $NAME
|
51
|
+
git config --global user.email $EMAIL
|
52
|
+
env:
|
53
|
+
NAME: "George Costanza"
|
54
|
+
EMAIL: "george.costanza@vandelay.com"
|
55
|
+
- name: Run tests
|
56
|
+
run: bundle exec rake test
|
data/.rubocop.yml
ADDED
data/CHANGELOG.md
CHANGED
@@ -9,6 +9,15 @@ project adheres to [Semantic Versioning][Semver].
|
|
9
9
|
|
10
10
|
- Your contribution here!
|
11
11
|
|
12
|
+
## [0.6.1] - 2024-12-29
|
13
|
+
### Changed
|
14
|
+
- Push gems with bundler (not GitHub actions)
|
15
|
+
- Updated documentation links
|
16
|
+
|
17
|
+
## [0.6.0] - 2024-28-09
|
18
|
+
### Removed
|
19
|
+
- Support for Ruby < 3.1 (older rubies no longer supported)
|
20
|
+
|
12
21
|
## [0.5.0] - 2020-01-24
|
13
22
|
### Removed
|
14
23
|
- Support for Ruby < 2.4 (older rubies no longer supported)
|
@@ -80,7 +89,9 @@ project adheres to [Semantic Versioning][Semver].
|
|
80
89
|
### Changed
|
81
90
|
- Initial release
|
82
91
|
|
83
|
-
[Unreleased]: https://github.com/lolcommits/lolcommits-lolsrv/compare/v0.
|
92
|
+
[Unreleased]: https://github.com/lolcommits/lolcommits-lolsrv/compare/v0.6.1...HEAD
|
93
|
+
[0.6.1]: https://github.com/lolcommits/lolcommits-lolsrv/compare/v0.6.0...v0.6.1
|
94
|
+
[0.6.0]: https://github.com/lolcommits/lolcommits-lolsrv/compare/v0.5.0...v0.6.0
|
84
95
|
[0.5.0]: https://github.com/lolcommits/lolcommits-lolsrv/compare/v0.4.0...v0.5.0
|
85
96
|
[0.4.0]: https://github.com/lolcommits/lolcommits-lolsrv/compare/v0.3.0...v0.4.0
|
86
97
|
[0.3.0]: https://github.com/lolcommits/lolcommits-lolsrv/compare/v0.2.0...v0.3.0
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,28 +1,25 @@
|
|
1
1
|
# Lolcommits Lolsrv
|
2
2
|
|
3
|
+
[![CI](https://img.shields.io/github/actions/workflow/status/lolcommits/lolcommits-lolsrv/ci.yml?branch=main&style=flat&label=CI)](https://github.com/lolcommits/lolcommits-lolsrv/actions/workflows/ci.yml)
|
3
4
|
[![Gem](https://img.shields.io/gem/v/lolcommits-lolsrv.svg?style=flat)](http://rubygems.org/gems/lolcommits-lolsrv)
|
4
|
-
[![Travis](https://img.shields.io/travis/com/lolcommits/lolcommits-lolsrv/master.svg?style=flat)](https://travis-ci.com/lolcommits/lolcommits-lolsrv)
|
5
5
|
[![Depfu](https://img.shields.io/depfu/lolcommits/lolcommits-lolsrv.svg?style=flat)](https://depfu.com/github/lolcommits/lolcommits-lolsrv)
|
6
|
-
[![Maintainability](https://api.codeclimate.com/v1/badges/309c4d765a49dddebbc9/maintainability)](https://codeclimate.com/github/lolcommits/lolcommits-lolsrv/maintainability)
|
7
|
-
[![Test Coverage](https://api.codeclimate.com/v1/badges/309c4d765a49dddebbc9/test_coverage)](https://codeclimate.com/github/lolcommits/lolcommits-lolsrv/test_coverage)
|
8
6
|
|
9
|
-
[lolcommits](https://lolcommits.github.io/) takes a snapshot with your
|
10
|
-
|
11
|
-
|
7
|
+
[lolcommits](https://lolcommits.github.io/) takes a snapshot with your webcam
|
8
|
+
every time you git commit code, and archives a lolcat style image with it. Git
|
9
|
+
blame has never been so much fun!
|
12
10
|
|
13
|
-
This plugin syncs lolcommits to a remote server. After enabling, your
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
This plugin syncs lolcommits to a remote server. After enabling, your next
|
12
|
+
lolcommit will be uploaded, along with all existing lolcommits that you've
|
13
|
+
already captured. Syncing is then performed after each commit, only uploading
|
14
|
+
files that have not already been synced.
|
17
15
|
|
18
|
-
You configure the plugin by setting the base url of the remote server.
|
19
|
-
|
16
|
+
You configure the plugin by setting the base url of the remote server. The
|
17
|
+
server must respond at these paths:
|
20
18
|
|
21
19
|
**GET /lols**
|
22
20
|
|
23
|
-
Returns a JSON array of all lolcommits already synced. The commit `sha`
|
24
|
-
|
25
|
-
lolcommit).
|
21
|
+
Returns a JSON array of all lolcommits already synced. The commit `sha` is the
|
22
|
+
only required JSON attribute (used to identify the already synced lolcommit).
|
26
23
|
|
27
24
|
**POST /uplol**
|
28
25
|
|
@@ -36,7 +33,7 @@ The following upload params are `multipart/form-data` encoded:
|
|
36
33
|
|
37
34
|
## Requirements
|
38
35
|
|
39
|
-
* Ruby >=
|
36
|
+
* Ruby >= 3.1
|
40
37
|
* A webcam
|
41
38
|
* [ImageMagick](http://www.imagemagick.org)
|
42
39
|
* [ffmpeg](https://www.ffmpeg.org) (optional) for animated gif capturing
|
@@ -53,20 +50,19 @@ Then configure to enable it and set the server url:
|
|
53
50
|
# set enabled to `true`
|
54
51
|
# set the server base url (must begin with http(s)://)
|
55
52
|
|
56
|
-
That's it! Provided the endpoints are responding correctly, your
|
57
|
-
|
53
|
+
That's it! Provided the endpoints are responding correctly, your lolcommits will
|
54
|
+
be synced to the remote server. To disable use:
|
58
55
|
|
59
56
|
$ lolcommits --config -p lolsrv
|
60
57
|
# and set enabled to `false`
|
61
58
|
|
62
59
|
## Development
|
63
60
|
|
64
|
-
Check out this repo and run `bin/setup`, this will install all
|
65
|
-
|
66
|
-
and generate a coverage report.
|
61
|
+
Check out this repo and run `bin/setup`, this will install all dependencies and
|
62
|
+
generate docs. Run `bundle exec rake` to run all tests.
|
67
63
|
|
68
|
-
You can also run `bin/console` for an interactive prompt that will allow
|
69
|
-
|
64
|
+
You can also run `bin/console` for an interactive prompt that will allow you to
|
65
|
+
experiment with the gem code.
|
70
66
|
|
71
67
|
## Tests
|
72
68
|
|
@@ -83,8 +79,8 @@ Generate docs for this gem with:
|
|
83
79
|
## Troubles?
|
84
80
|
|
85
81
|
If you think something is broken or missing, please raise a new
|
86
|
-
[issue](https://github.com/lolcommits/lolcommits-lolsrv/issues). Take
|
87
|
-
|
82
|
+
[issue](https://github.com/lolcommits/lolcommits-lolsrv/issues). Take a moment
|
83
|
+
to check it hasn't been raised in the past (and possibly closed).
|
88
84
|
|
89
85
|
## Contributing
|
90
86
|
|
@@ -93,17 +89,14 @@ and [pull
|
|
93
89
|
requests](https://github.com/lolcommits/lolcommits-lolsrv/pulls) are
|
94
90
|
welcome on GitHub.
|
95
91
|
|
96
|
-
When submitting pull requests, remember to add tests covering any new
|
97
|
-
|
98
|
-
|
99
|
-
[contributing
|
100
|
-
guidelines](https://github.com/lolcommits/lolcommits-lolsrv/blob/master/CONTRIBUTING.md)
|
92
|
+
When submitting pull requests, remember to add tests covering any new behaviour,
|
93
|
+
and ensure all tests are passing. Read the [contributing
|
94
|
+
guidelines](https://github.com/lolcommits/lolcommits-loltext/blob/master/CONTRIBUTING.md)
|
101
95
|
for more details.
|
102
96
|
|
103
|
-
This project is intended to be a safe, welcoming space for
|
104
|
-
|
105
|
-
|
106
|
-
See
|
97
|
+
This project is intended to be a safe, welcoming space for collaboration, and
|
98
|
+
contributors are expected to adhere to the [Contributor
|
99
|
+
Covenant](http://contributor-covenant.org) code of conduct. See
|
107
100
|
[here](https://github.com/lolcommits/lolcommits-lolsrv/blob/master/CODE_OF_CONDUCT.md)
|
108
101
|
for more details.
|
109
102
|
|
@@ -114,10 +107,8 @@ The gem is available as open source under the terms of
|
|
114
107
|
|
115
108
|
## Links
|
116
109
|
|
117
|
-
* [
|
118
|
-
* [
|
119
|
-
* [Test Coverage](https://codeclimate.com/github/lolcommits/lolcommits-lolsrv/coverage)
|
120
|
-
* [RDoc](http://rdoc.info/projects/lolcommits/lolcommits-lolsrv)
|
110
|
+
* [CI](https://github.com/lolcommits/lolcommits-lolsrv/actions/workflows/ci.yml)
|
111
|
+
* [RDoc](https://rubydoc.info/gems/lolcommits-lolsrv)
|
121
112
|
* [Issues](http://github.com/lolcommits/lolcommits-lolsrv/issues)
|
122
113
|
* [Report a bug](http://github.com/lolcommits/lolcommits-lolsrv/issues/new)
|
123
114
|
* [Gem](http://rubygems.org/gems/lolcommits-lolsrv)
|
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
|
-
|
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" ]
|
data/bin/rubocop
ADDED
data/lib/lolcommits/lolsrv.rb
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require 'lolcommits/plugin/base'
|
3
|
+
require "rest-client"
|
5
4
|
|
6
5
|
module Lolcommits
|
7
6
|
module Plugin
|
8
7
|
class Lolsrv < Base
|
9
|
-
|
10
8
|
##
|
11
9
|
# Returns true/false indicating if the plugin has been correctly
|
12
10
|
# configured. The `server` option must be set with a URL beginning
|
@@ -29,23 +27,23 @@ module Lolcommits
|
|
29
27
|
if options[:enabled]
|
30
28
|
print "server: "
|
31
29
|
options.merge!(server: parse_user_input(gets.strip))
|
32
|
-
puts
|
33
|
-
puts
|
34
|
-
puts
|
35
|
-
puts
|
36
|
-
puts
|
37
|
-
puts
|
38
|
-
puts
|
39
|
-
puts
|
40
|
-
puts
|
41
|
-
puts
|
42
|
-
puts
|
43
|
-
puts
|
44
|
-
puts
|
45
|
-
puts
|
46
|
-
puts
|
47
|
-
puts
|
48
|
-
puts
|
30
|
+
puts "---------------------------------------------------------------"
|
31
|
+
puts " Lolsrv - Sync lolcommits to a remote server"
|
32
|
+
puts ""
|
33
|
+
puts " Handle POST /uplol with these request params"
|
34
|
+
puts ""
|
35
|
+
puts " `lol` - captured lolcommit file"
|
36
|
+
puts " `url` - remote repository URL (with commit SHA appended)"
|
37
|
+
puts " `repo` - repository name e.g. lolcommits/lolcommits"
|
38
|
+
puts " `date` - UTC date time for the commit (ISO8601)"
|
39
|
+
puts " `sha` - commit SHA"
|
40
|
+
puts ""
|
41
|
+
puts " Handle GET /lols with JSON response"
|
42
|
+
puts ""
|
43
|
+
puts " * Must return a JSON array of all lols already uploaded."
|
44
|
+
puts " The commit `sha` is the only required JSON attribute."
|
45
|
+
puts ""
|
46
|
+
puts "---------------------------------------------------------------"
|
49
47
|
end
|
50
48
|
options
|
51
49
|
end
|
@@ -82,12 +80,12 @@ module Lolcommits
|
|
82
80
|
#
|
83
81
|
def sync
|
84
82
|
print "Syncing lols ... "
|
85
|
-
raise
|
83
|
+
raise "failed fetching existing lols" unless existing_shas
|
86
84
|
|
87
85
|
# puts runner.config.loldir
|
88
86
|
|
89
|
-
Dir[runner.config.loldir +
|
90
|
-
sha = File.basename(lolcommit,
|
87
|
+
Dir[runner.config.loldir + "/*.{jpg,mp4,gif}"].each do |lolcommit|
|
88
|
+
sha = File.basename(lolcommit, ".*")
|
91
89
|
unless existing_shas.include?(sha)
|
92
90
|
response = upload(lolcommit, sha)
|
93
91
|
raise "failed uploading #{lolcommit}" if response.nil?
|
@@ -112,7 +110,7 @@ module Lolcommits
|
|
112
110
|
def existing_shas
|
113
111
|
@existing_shas ||= begin
|
114
112
|
lols = JSON.parse(RestClient.get(lols_endpoint))
|
115
|
-
lols.map { |lol| lol[
|
113
|
+
lols.map { |lol| lol["sha"] }
|
116
114
|
rescue JSON::ParserError, SocketError, RestClient::RequestFailed => e
|
117
115
|
log_error(e, "ERROR: existing lols could not be retrieved #{e.class} - #{e.message}")
|
118
116
|
nil
|
@@ -168,7 +166,7 @@ module Lolcommits
|
|
168
166
|
# @return [String] `server` config option + '/uplol'
|
169
167
|
#
|
170
168
|
def upload_endpoint
|
171
|
-
configuration[:server] +
|
169
|
+
configuration[:server] + "/uplol"
|
172
170
|
end
|
173
171
|
|
174
172
|
##
|
@@ -180,7 +178,7 @@ module Lolcommits
|
|
180
178
|
# @return [String] `server` config option + '/lols'
|
181
179
|
#
|
182
180
|
def lols_endpoint
|
183
|
-
configuration[:server] +
|
181
|
+
configuration[:server] + "/lols"
|
184
182
|
end
|
185
183
|
end
|
186
184
|
end
|
data/lolcommits-lolsrv.gemspec
CHANGED
@@ -5,9 +5,9 @@ require 'lolcommits/lolsrv/version'
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "lolcommits-lolsrv"
|
7
7
|
spec.version = Lolcommits::Lolsrv::VERSION
|
8
|
-
spec.authors = ["Matthew Hutchinson"]
|
9
|
-
spec.email = ["matt@hiddenloop.com"]
|
10
|
-
spec.summary = %q
|
8
|
+
spec.authors = [ "Matthew Hutchinson" ]
|
9
|
+
spec.email = [ "matt@hiddenloop.com" ]
|
10
|
+
spec.summary = %q(Sync lolcommits to a remote server)
|
11
11
|
spec.homepage = "https://github.com/lolcommits/lolcommits-lolsrv"
|
12
12
|
spec.license = "LGPL-3.0"
|
13
13
|
|
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.metadata = {
|
22
22
|
"homepage_uri" => "https://github.com/lolcommits/lolcommits-lolsrv",
|
23
|
+
"documentation_uri" => "https://rubydoc.info/gems/lolcommits-lolsrv",
|
23
24
|
"changelog_uri" => "https://github.com/lolcommits/lolcommits-lolsrv/blob/master/CHANGELOG.md",
|
24
25
|
"source_code_uri" => "https://github.com/lolcommits/lolcommits-lolsrv",
|
25
26
|
"bug_tracker_uri" => "https://github.com/lolcommits/lolcommits-lolsrv/issues",
|
@@ -30,17 +31,16 @@ Gem::Specification.new do |spec|
|
|
30
31
|
spec.test_files = `git ls-files -- {test,features}/*`.split("\n")
|
31
32
|
spec.bindir = "bin"
|
32
33
|
spec.executables = []
|
33
|
-
spec.require_paths = ["lib"]
|
34
|
+
spec.require_paths = [ "lib" ]
|
34
35
|
|
35
|
-
spec.required_ruby_version = ">=
|
36
|
+
spec.required_ruby_version = ">= 3.1"
|
36
37
|
|
37
38
|
spec.add_runtime_dependency "rest-client", ">= 2.1.0"
|
38
|
-
spec.add_runtime_dependency "lolcommits", ">= 0.
|
39
|
+
spec.add_runtime_dependency "lolcommits", ">= 0.17.2"
|
39
40
|
|
40
41
|
spec.add_development_dependency "bundler"
|
41
42
|
spec.add_development_dependency "webmock"
|
42
|
-
spec.add_development_dependency "pry"
|
43
43
|
spec.add_development_dependency "rake"
|
44
|
+
spec.add_development_dependency "ostruct"
|
44
45
|
spec.add_development_dependency "minitest"
|
45
|
-
spec.add_development_dependency "simplecov"
|
46
46
|
end
|
@@ -1,10 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "test_helper"
|
4
|
-
require 'webmock/minitest'
|
5
4
|
|
6
5
|
describe Lolcommits::Plugin::Lolsrv do
|
7
|
-
|
8
6
|
include Lolcommits::TestHelpers::GitRepo
|
9
7
|
include Lolcommits::TestHelpers::FakeIO
|
10
8
|
|
@@ -12,7 +10,6 @@ describe Lolcommits::Plugin::Lolsrv do
|
|
12
10
|
def runner
|
13
11
|
# a simple lolcommits runner with an empty configuration Hash
|
14
12
|
@runner ||= Lolcommits::Runner.new(
|
15
|
-
lolcommit_path: Tempfile.new('lolcommit.jpg'),
|
16
13
|
config: TestConfiguration.new(OpenStruct.new)
|
17
14
|
)
|
18
15
|
end
|
@@ -52,7 +49,7 @@ describe Lolcommits::Plugin::Lolsrv do
|
|
52
49
|
existing_sha = "sha123"
|
53
50
|
|
54
51
|
stub_request(:get, "https://lolsrv.com/lols").
|
55
|
-
to_return(status: 200, body: [{ sha: existing_sha }].to_json)
|
52
|
+
to_return(status: 200, body: [ { sha: existing_sha } ].to_json)
|
56
53
|
|
57
54
|
stub_request(:post, "https://lolsrv.com/uplol").
|
58
55
|
to_return(status: 200)
|
@@ -64,7 +61,7 @@ describe Lolcommits::Plugin::Lolsrv do
|
|
64
61
|
assert_equal output, "Syncing lols ... done!\n"
|
65
62
|
assert_requested :get, "https://lolsrv.com/lols", times: 1
|
66
63
|
assert_requested :post, "https://lolsrv.com/uplol", times: 1,
|
67
|
-
headers: {
|
64
|
+
headers: { "Content-Type" => /multipart\/form-data/ } do |req|
|
68
65
|
_(req.body).must_match "sha456"
|
69
66
|
_(req.body).must_match "plugin-test-repo"
|
70
67
|
_(req.body).must_match "name=\"lol\"; filename="
|
@@ -90,7 +87,7 @@ describe Lolcommits::Plugin::Lolsrv do
|
|
90
87
|
describe "configuration" do
|
91
88
|
it "allows plugin options to be configured" do
|
92
89
|
# enabled and server option
|
93
|
-
inputs = ["true", "https://my-lolsrv.com"]
|
90
|
+
inputs = [ "true", "https://my-lolsrv.com" ]
|
94
91
|
configured_plugin_options = {}
|
95
92
|
|
96
93
|
fake_io_capture(inputs: inputs) do
|
data/test/test_helper.rb
CHANGED
@@ -1,21 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
$LOAD_PATH.unshift File.expand_path(
|
3
|
+
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
|
4
4
|
|
5
5
|
# lolcommits gem
|
6
|
-
require
|
6
|
+
require "lolcommits"
|
7
7
|
|
8
8
|
# lolcommit test helpers
|
9
|
-
require
|
10
|
-
require
|
11
|
-
|
12
|
-
if ENV['COVERAGE']
|
13
|
-
require 'simplecov'
|
14
|
-
end
|
9
|
+
require "lolcommits/test_helpers/git_repo"
|
10
|
+
require "lolcommits/test_helpers/fake_io"
|
15
11
|
|
16
12
|
# plugin gem test libs
|
17
|
-
require
|
18
|
-
require
|
13
|
+
require "lolcommits/lolsrv"
|
14
|
+
require "webmock/minitest"
|
15
|
+
require "minitest/autorun"
|
16
|
+
require "ostruct"
|
19
17
|
|
20
18
|
# swallow all debug output during test runs
|
21
19
|
def debug(msg); end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lolcommits-lolsrv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.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:
|
11
|
+
date: 2024-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.17.2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.17.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: pry
|
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
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: rake
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,7 +81,7 @@ dependencies:
|
|
95
81
|
- !ruby/object:Gem::Version
|
96
82
|
version: '0'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
84
|
+
name: ostruct
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
100
86
|
requirements:
|
101
87
|
- - ">="
|
@@ -109,7 +95,7 @@ dependencies:
|
|
109
95
|
- !ruby/object:Gem::Version
|
110
96
|
version: '0'
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
98
|
+
name: minitest
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
114
100
|
requirements:
|
115
101
|
- - ">="
|
@@ -133,18 +119,19 @@ executables: []
|
|
133
119
|
extensions: []
|
134
120
|
extra_rdoc_files: []
|
135
121
|
files:
|
122
|
+
- ".github/workflows/ci.yml"
|
136
123
|
- ".gitignore"
|
137
|
-
- ".
|
138
|
-
- ".
|
124
|
+
- ".quickhook/pre-commit/ruby-lint"
|
125
|
+
- ".rubocop.yml"
|
139
126
|
- CHANGELOG.md
|
140
127
|
- CODE_OF_CONDUCT.md
|
141
128
|
- CONTRIBUTING.md
|
142
129
|
- Gemfile
|
143
130
|
- LICENSE
|
144
|
-
- PULL_REQUEST_TEMPLATE.md
|
145
131
|
- README.md
|
146
132
|
- Rakefile
|
147
133
|
- bin/console
|
134
|
+
- bin/rubocop
|
148
135
|
- bin/setup
|
149
136
|
- lib/lolcommits/lolsrv.rb
|
150
137
|
- lib/lolcommits/lolsrv/version.rb
|
@@ -159,11 +146,12 @@ licenses:
|
|
159
146
|
- LGPL-3.0
|
160
147
|
metadata:
|
161
148
|
homepage_uri: https://github.com/lolcommits/lolcommits-lolsrv
|
149
|
+
documentation_uri: https://rubydoc.info/gems/lolcommits-lolsrv
|
162
150
|
changelog_uri: https://github.com/lolcommits/lolcommits-lolsrv/blob/master/CHANGELOG.md
|
163
151
|
source_code_uri: https://github.com/lolcommits/lolcommits-lolsrv
|
164
152
|
bug_tracker_uri: https://github.com/lolcommits/lolcommits-lolsrv/issues
|
165
153
|
allowed_push_host: https://rubygems.org
|
166
|
-
post_install_message:
|
154
|
+
post_install_message:
|
167
155
|
rdoc_options: []
|
168
156
|
require_paths:
|
169
157
|
- lib
|
@@ -171,15 +159,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
171
159
|
requirements:
|
172
160
|
- - ">="
|
173
161
|
- !ruby/object:Gem::Version
|
174
|
-
version: '
|
162
|
+
version: '3.1'
|
175
163
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
164
|
requirements:
|
177
165
|
- - ">="
|
178
166
|
- !ruby/object:Gem::Version
|
179
167
|
version: '0'
|
180
168
|
requirements: []
|
181
|
-
rubygems_version: 3.
|
182
|
-
signing_key:
|
169
|
+
rubygems_version: 3.5.22
|
170
|
+
signing_key:
|
183
171
|
specification_version: 4
|
184
172
|
summary: Sync lolcommits to a remote server
|
185
173
|
test_files:
|
data/.simplecov
DELETED
data/.travis.yml
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
sudo: false
|
2
|
-
language: ruby
|
3
|
-
cache: bundler
|
4
|
-
rvm:
|
5
|
-
- 2.4.9
|
6
|
-
- 2.5.7
|
7
|
-
- 2.6.5
|
8
|
-
- 2.7.0
|
9
|
-
- ruby-head
|
10
|
-
|
11
|
-
before_install:
|
12
|
-
- git --version
|
13
|
-
- git config --global user.email "lol@commits.org"
|
14
|
-
- git config --global user.name "Lolcommits"
|
15
|
-
|
16
|
-
matrix:
|
17
|
-
allow_failures:
|
18
|
-
- rvm: ruby-head
|
19
|
-
|
20
|
-
env:
|
21
|
-
global:
|
22
|
-
- CC_TEST_REPORTER_ID=bd4ff902b7510abdab3aacd57ceb51a5b2e054fed4100019fcd21e2324a69090
|
23
|
-
- GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)
|
24
|
-
before_script:
|
25
|
-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
26
|
-
- chmod +x ./cc-test-reporter
|
27
|
-
- ./cc-test-reporter before-build - GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)
|
28
|
-
after_script:
|
29
|
-
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
data/PULL_REQUEST_TEMPLATE.md
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
|
2
|
-
Explain what you're changing and why here.
|
3
|
-
|
4
|
-
---
|
5
|
-
#### :memo: Checklist
|
6
|
-
|
7
|
-
Please check this list and leave it intact for the reviewer. Thanks! :heart:
|
8
|
-
|
9
|
-
- [ ] Commit messages provide context (why not just what, some tips [here](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)).
|
10
|
-
- [ ] If relevant, mention GitHub issue number above and include in a commit message.
|
11
|
-
- [ ] Latest code from master merged.
|
12
|
-
- [ ] New behaviour has test coverage.
|
13
|
-
- [ ] Avoid duplicating code.
|
14
|
-
- [ ] No commented out code.
|
15
|
-
- [ ] Avoid comments for your code, write code that explains itself.
|
16
|
-
- [ ] Changes are simple, useful, clear and brief.
|