lolcommits-lolsrv 0.6.0 → 0.6.1

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: c7db7b5a140299bdcebf6dcb79213b954c39ce8855a0ebcaeffb64521ce9902e
4
- data.tar.gz: 3a07525a02d973ec73b0fbda941c9f8df27db756bf1aec0855132a6c017ee276
3
+ metadata.gz: ee7425ba8ac9bb6c57463a97876d305bde6e31be2c342affc7836675cecdb2d1
4
+ data.tar.gz: 3f590b91c4ba5ffe90e67d32e021d409adeec214ed2fb64c761876c2b460721b
5
5
  SHA512:
6
- metadata.gz: 1e4d7dba7ca425b5caafa2342c8d4190ee072f1f213e510813ede0009dd0af884c1e760447b908ecebfe2f9f151af8b120575572e9323dcb6b6b00588104e21c
7
- data.tar.gz: cc2d07992a228bf2d8c5c79dbdb50ef991db4e4172a4d0c957257acd25c4feb51257a45acf3a6c3755cbf67200c87063d8b38706a3658a14434ee072555694d4
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
@@ -0,0 +1,3 @@
1
+ #!/bin/sh
2
+ set -e
3
+ grep -E "\.rb$|Rakefile|Gemfile" | xargs ./bin/rubocop --config .rubocop.yml --force-exclusion
data/.rubocop.yml ADDED
@@ -0,0 +1,2 @@
1
+ inherit_gem:
2
+ rubocop-rails-omakase: rubocop.yml
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.6.1] - 2024-12-29
13
+ ### Changed
14
+ - Push gems with bundler (not GitHub actions)
15
+ - Updated documentation links
16
+
12
17
  ## [0.6.0] - 2024-28-09
13
18
  ### Removed
14
19
  - Support for Ruby < 3.1 (older rubies no longer supported)
@@ -84,7 +89,8 @@ project adheres to [Semantic Versioning][Semver].
84
89
  ### Changed
85
90
  - Initial release
86
91
 
87
- [Unreleased]: https://github.com/lolcommits/lolcommits-lolsrv/compare/v0.6.0...HEAD
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
88
94
  [0.6.0]: https://github.com/lolcommits/lolcommits-lolsrv/compare/v0.5.0...v0.6.0
89
95
  [0.5.0]: https://github.com/lolcommits/lolcommits-lolsrv/compare/v0.4.0...v0.5.0
90
96
  [0.4.0]: https://github.com/lolcommits/lolcommits-lolsrv/compare/v0.3.0...v0.4.0
data/Gemfile CHANGED
@@ -1,2 +1,6 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
  gemspec
3
+
4
+ group :rubocop do
5
+ gem "rubocop-rails-omakase", require: false
6
+ end
data/README.md CHANGED
@@ -1,26 +1,25 @@
1
1
  # Lolcommits Lolsrv
2
2
 
3
- [![Build](https://img.shields.io/github/actions/workflow/status/lolcommits/lolcommits-lolsrv/build.yml?branch=main&style=flat)](https://github.com/lolcommits/lolcommits-lolsrv/actions/workflows/build.yml)
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)
4
4
  [![Gem](https://img.shields.io/gem/v/lolcommits-lolsrv.svg?style=flat)](http://rubygems.org/gems/lolcommits-lolsrv)
5
5
  [![Depfu](https://img.shields.io/depfu/lolcommits/lolcommits-lolsrv.svg?style=flat)](https://depfu.com/github/lolcommits/lolcommits-lolsrv)
6
6
 
7
- [lolcommits](https://lolcommits.github.io/) takes a snapshot with your
8
- webcam every time you git commit code, and archives a lolcat style image
9
- with it. Git blame has never been so much fun!
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!
10
10
 
11
- This plugin syncs lolcommits to a remote server. After enabling, your
12
- next lolcommit will be uploaded, along with all existing lolcommits that
13
- you've already captured. Syncing is then performed after each commit,
14
- only uploading files that have not already been synced.
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.
15
15
 
16
- You configure the plugin by setting the base url of the remote server.
17
- The server must respond at these paths:
16
+ You configure the plugin by setting the base url of the remote server. The
17
+ server must respond at these paths:
18
18
 
19
19
  **GET /lols**
20
20
 
21
- Returns a JSON array of all lolcommits already synced. The commit `sha`
22
- is the only required JSON attribute (used to identify the already synced
23
- 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).
24
23
 
25
24
  **POST /uplol**
26
25
 
@@ -51,19 +50,19 @@ Then configure to enable it and set the server url:
51
50
  # set enabled to `true`
52
51
  # set the server base url (must begin with http(s)://)
53
52
 
54
- That's it! Provided the endpoints are responding correctly, your
55
- lolcommits will be synced to the remote server. To disable use:
53
+ That's it! Provided the endpoints are responding correctly, your lolcommits will
54
+ be synced to the remote server. To disable use:
56
55
 
57
56
  $ lolcommits --config -p lolsrv
58
57
  # and set enabled to `false`
59
58
 
60
59
  ## Development
61
60
 
62
- Check out this repo and run `bin/setup`, this will install all
63
- dependencies and generate docs. Run `bundle exec rake` to run all tests.
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.
64
63
 
65
- You can also run `bin/console` for an interactive prompt that will allow
66
- you to experiment with the gem code.
64
+ You can also run `bin/console` for an interactive prompt that will allow you to
65
+ experiment with the gem code.
67
66
 
68
67
  ## Tests
69
68
 
@@ -80,8 +79,8 @@ Generate docs for this gem with:
80
79
  ## Troubles?
81
80
 
82
81
  If you think something is broken or missing, please raise a new
83
- [issue](https://github.com/lolcommits/lolcommits-lolsrv/issues). Take
84
- a moment to check it hasn't been raised in the past (and possibly closed).
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).
85
84
 
86
85
  ## Contributing
87
86
 
@@ -90,17 +89,14 @@ and [pull
90
89
  requests](https://github.com/lolcommits/lolcommits-lolsrv/pulls) are
91
90
  welcome on GitHub.
92
91
 
93
- When submitting pull requests, remember to add tests covering any new
94
- behaviour, and ensure all tests are passing on [Travis
95
- CI](https://travis-ci.com/lolcommits/lolcommits-lolsrv). Read the
96
- [contributing
97
- 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)
98
95
  for more details.
99
96
 
100
- This project is intended to be a safe, welcoming space for
101
- collaboration, and contributors are expected to adhere to the
102
- [Contributor Covenant](http://contributor-covenant.org) code of conduct.
103
- 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
104
100
  [here](https://github.com/lolcommits/lolcommits-lolsrv/blob/master/CODE_OF_CONDUCT.md)
105
101
  for more details.
106
102
 
@@ -111,8 +107,8 @@ The gem is available as open source under the terms of
111
107
 
112
108
  ## Links
113
109
 
114
- * [CI](https://github.com/lolcommits/lolcommits-lolsrv/actions/workflows/build.yml)
115
- * [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)
116
112
  * [Issues](http://github.com/lolcommits/lolcommits-lolsrv/issues)
117
113
  * [Report a bug](http://github.com/lolcommits/lolcommits-lolsrv/issues/new)
118
114
  * [Gem](http://rubygems.org/gems/lolcommits-lolsrv)
data/Rakefile CHANGED
@@ -18,4 +18,4 @@ Rake::TestTask.new(:test) do |t|
18
18
  t.test_files = FileList["test/**/*_test.rb"]
19
19
  end
20
20
 
21
- task :default => ['test']
21
+ task default: [ "test" ]
data/bin/rubocop ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ load Gem.bin_path("rubocop", "rubocop")
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lolcommits
4
4
  module Lolsrv
5
- VERSION = "0.6.0".freeze
5
+ VERSION = "0.6.1".freeze
6
6
  end
7
7
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'lolcommits/lolsrv/version'
4
- require 'lolcommits/plugin/lolsrv'
3
+ require "lolcommits/lolsrv/version"
4
+ require "lolcommits/plugin/lolsrv"
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rest_client'
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 ' Lolsrv - Sync lolcommits to a remote server'
34
- puts ''
35
- puts ' Handle POST /uplol with these request params'
36
- puts ''
37
- puts ' `lol` - captured lolcommit file'
38
- puts ' `url` - remote repository URL (with commit SHA appended)'
39
- puts ' `repo` - repository name e.g. lolcommits/lolcommits'
40
- puts ' `date` - UTC date time for the commit (ISO8601)'
41
- puts ' `sha` - commit SHA'
42
- puts ''
43
- puts ' Handle GET /lols with JSON response'
44
- puts ''
45
- puts ' * Must return a JSON array of all lols already uploaded.'
46
- puts ' The commit `sha` is the only required JSON attribute.'
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 'failed fetching existing lols' unless existing_shas
83
+ raise "failed fetching existing lols" unless existing_shas
86
84
 
87
85
  # puts runner.config.loldir
88
86
 
89
- Dir[runner.config.loldir + '/*.{jpg,mp4,gif}'].each do |lolcommit|
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['sha'] }
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] + '/uplol'
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] + '/lols'
181
+ configuration[:server] + "/lols"
184
182
  end
185
183
  end
186
184
  end
@@ -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{Sync lolcommits to a remote server}
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,7 +31,7 @@ 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
36
  spec.required_ruby_version = ">= 3.1"
36
37
 
Binary file
Binary file
@@ -0,0 +1,122 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "test_helper"
4
+
5
+ describe Lolcommits::Plugin::Lolsrv do
6
+ include Lolcommits::TestHelpers::GitRepo
7
+ include Lolcommits::TestHelpers::FakeIO
8
+
9
+ describe "with a runner" do
10
+ def runner
11
+ # a simple lolcommits runner with an empty configuration Hash
12
+ @runner ||= Lolcommits::Runner.new(
13
+ config: TestConfiguration.new(OpenStruct.new)
14
+ )
15
+ end
16
+
17
+ def plugin
18
+ @plugin ||= Lolcommits::Plugin::Lolsrv.new(runner: runner)
19
+ end
20
+
21
+ def valid_enabled_config
22
+ {
23
+ enabled: true,
24
+ server: "https://lolsrv.com"
25
+ }
26
+ end
27
+
28
+ describe "#enabled?" do
29
+ it "it is disabled by default" do
30
+ _(plugin.enabled?).must_equal false
31
+ end
32
+
33
+ it "is true when configured" do
34
+ plugin.configuration = valid_enabled_config
35
+ _(plugin.enabled?).must_equal true
36
+ end
37
+ end
38
+
39
+ describe "run_capture_ready" do
40
+ before do
41
+ commit_repo_with_message
42
+ end
43
+
44
+ after { teardown_repo }
45
+
46
+ it "syncs lolcommits" do
47
+ in_repo do
48
+ plugin.configuration = valid_enabled_config
49
+ existing_sha = "sha123"
50
+
51
+ stub_request(:get, "https://lolsrv.com/lols").
52
+ to_return(status: 200, body: [ { sha: existing_sha } ].to_json)
53
+
54
+ stub_request(:post, "https://lolsrv.com/uplol").
55
+ to_return(status: 200)
56
+
57
+ output = fake_io_capture do
58
+ plugin.run_capture_ready(do_fork: false)
59
+ end
60
+
61
+ assert_equal output, "Syncing lols ... done!\n"
62
+ assert_requested :get, "https://lolsrv.com/lols", times: 1
63
+ assert_requested :post, "https://lolsrv.com/uplol", times: 1,
64
+ headers: { "Content-Type" => /multipart\/form-data/ } do |req|
65
+ _(req.body).must_match "sha456"
66
+ _(req.body).must_match "plugin-test-repo"
67
+ _(req.body).must_match "name=\"lol\"; filename="
68
+ end
69
+ end
70
+ end
71
+
72
+ it "shows error and aborts on failed lols endpoint" do
73
+ in_repo do
74
+ plugin.configuration = valid_enabled_config
75
+ stub_request(:get, "https://lolsrv.com/lols").to_return(status: 404)
76
+
77
+ output = fake_io_capture do
78
+ plugin.run_capture_ready(do_fork: false)
79
+ end
80
+
81
+ assert_equal output, "Syncing lols ... failed fetching existing lols (try again with --debug)\n"
82
+ assert_not_requested :post, "https://lolsrv.com/uplol"
83
+ end
84
+ end
85
+ end
86
+
87
+ describe "configuration" do
88
+ it "allows plugin options to be configured" do
89
+ # enabled and server option
90
+ inputs = [ "true", "https://my-lolsrv.com" ]
91
+ configured_plugin_options = {}
92
+
93
+ fake_io_capture(inputs: inputs) do
94
+ configured_plugin_options = plugin.configure_options!
95
+ end
96
+
97
+ _(configured_plugin_options).must_equal({
98
+ enabled: true,
99
+ server: "https://my-lolsrv.com"
100
+ })
101
+ end
102
+
103
+ describe "#valid_configuration?" do
104
+ it "returns false for an invalid configuration" do
105
+ plugin.configuration = { server: "gibberish" }
106
+ _(plugin.valid_configuration?).must_equal false
107
+ end
108
+
109
+ it "returns true with a valid configuration" do
110
+ plugin.configuration = valid_enabled_config
111
+ _(plugin.valid_configuration?).must_equal true
112
+ end
113
+ end
114
+ end
115
+ end
116
+ end
117
+
118
+ class TestConfiguration < Lolcommits::Configuration
119
+ def loldir
120
+ @loldir ||= File.expand_path("#{__dir__}../../../images")
121
+ end
122
+ end
@@ -0,0 +1,19 @@
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/lolsrv"
14
+ require "webmock/minitest"
15
+ require "minitest/autorun"
16
+ require "ostruct"
17
+
18
+ # swallow all debug output during test runs
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.6.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: 2024-09-28 00:00:00.000000000 Z
11
+ date: 2024-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -119,35 +119,39 @@ executables: []
119
119
  extensions: []
120
120
  extra_rdoc_files: []
121
121
  files:
122
- - ".github/workflows/build.yml"
123
- - ".github/workflows/push_gem.yml"
122
+ - ".github/workflows/ci.yml"
124
123
  - ".gitignore"
125
- - ".simplecov"
126
- - ".travis.yml"
124
+ - ".quickhook/pre-commit/ruby-lint"
125
+ - ".rubocop.yml"
127
126
  - CHANGELOG.md
128
127
  - CODE_OF_CONDUCT.md
129
128
  - CONTRIBUTING.md
130
129
  - Gemfile
131
130
  - LICENSE
132
- - PULL_REQUEST_TEMPLATE.md
133
131
  - README.md
134
132
  - Rakefile
135
133
  - bin/console
134
+ - bin/rubocop
136
135
  - bin/setup
137
136
  - lib/lolcommits/lolsrv.rb
138
137
  - lib/lolcommits/lolsrv/version.rb
139
138
  - lib/lolcommits/plugin/lolsrv.rb
140
139
  - lolcommits-lolsrv.gemspec
140
+ - test/images/sha123.jpg
141
+ - test/images/sha456.jpg
142
+ - test/lolcommits/plugin/lolsrv_test.rb
143
+ - test/test_helper.rb
141
144
  homepage: https://github.com/lolcommits/lolcommits-lolsrv
142
145
  licenses:
143
146
  - LGPL-3.0
144
147
  metadata:
145
148
  homepage_uri: https://github.com/lolcommits/lolcommits-lolsrv
149
+ documentation_uri: https://rubydoc.info/gems/lolcommits-lolsrv
146
150
  changelog_uri: https://github.com/lolcommits/lolcommits-lolsrv/blob/master/CHANGELOG.md
147
151
  source_code_uri: https://github.com/lolcommits/lolcommits-lolsrv
148
152
  bug_tracker_uri: https://github.com/lolcommits/lolcommits-lolsrv/issues
149
153
  allowed_push_host: https://rubygems.org
150
- post_install_message:
154
+ post_install_message:
151
155
  rdoc_options: []
152
156
  require_paths:
153
157
  - lib
@@ -162,8 +166,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
166
  - !ruby/object:Gem::Version
163
167
  version: '0'
164
168
  requirements: []
165
- rubygems_version: 3.5.16
166
- signing_key:
169
+ rubygems_version: 3.5.22
170
+ signing_key:
167
171
  specification_version: 4
168
172
  summary: Sync lolcommits to a remote server
169
- test_files: []
173
+ test_files:
174
+ - test/images/sha123.jpg
175
+ - test/images/sha456.jpg
176
+ - test/lolcommits/plugin/lolsrv_test.rb
177
+ - test/test_helper.rb
@@ -1,34 +0,0 @@
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
@@ -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
data/.simplecov DELETED
@@ -1,9 +0,0 @@
1
- SimpleCov.start do
2
- add_filter '/test/'
3
- add_filter '/vendor/'
4
- end
5
-
6
- SimpleCov.at_exit do
7
- SimpleCov.result.format!
8
- `open ./coverage/index.html` if RUBY_PLATFORM =~ /darwin/
9
- end
data/.travis.yml DELETED
@@ -1,29 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - 2.5.8
6
- - 2.6.6
7
- - 2.7.2
8
- - 3.0.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
@@ -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.