lolcommits-dotcom 0.4.0 → 0.5.1
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 +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 +15 -1
- data/Gemfile +5 -1
- data/README.md +30 -39
- data/Rakefile +1 -11
- data/bin/rubocop +5 -0
- data/lib/lolcommits/dotcom/version.rb +1 -1
- data/lib/lolcommits/dotcom.rb +2 -2
- data/lib/lolcommits/plugin/dotcom.rb +6 -7
- data/lolcommits-dotcom.gemspec +7 -6
- data/test/lolcommits/plugin/dotcom_test.rb +21 -23
- data/test/test_helper.rb +7 -10
- metadata +14 -12
- 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: 51e3cce7da2059b19a8e08867b394802c57a00083a9bea8d2fe818ca4836254c
|
4
|
+
data.tar.gz: 7041ad1e9623add50590de7e4c8690299ec625de9f47828012b4a1b25d9cbed7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '00419a289dfb0a20abcd367b93bcf14e38c6ab346c47c8f340a7a02608a8fb93768fd7682a4890dc61f32a6780c8c83e7d6f28df77745f422461279f1c698b1f'
|
7
|
+
data.tar.gz: cd09b937ccdf29891849d9e651cd070428806db730cf8d6798dea9c4f5711067e894888774cdf90bc4f6dcb07fa4496f0c493f50d380211129e9327e5f487ba0
|
@@ -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,18 @@ project adheres to [Semantic Versioning][Semver].
|
|
9
9
|
|
10
10
|
- Your contribution here!
|
11
11
|
|
12
|
+
## [0.5.1] - 2024-12-29
|
13
|
+
### Changed
|
14
|
+
- Push gems with bundler (not GitHub actions)
|
15
|
+
- Updated documentation links
|
16
|
+
|
17
|
+
### Removed
|
18
|
+
- Support for Ruby < 3.1 (older rubies no longer supported)
|
19
|
+
|
20
|
+
## [0.5.0] - 2020-01-23
|
21
|
+
### Removed
|
22
|
+
- Support for Ruby < 2.4 (older rubies no longer supported)
|
23
|
+
|
12
24
|
## [0.4.0] - 2019-08-25
|
13
25
|
### Changed
|
14
26
|
- Require an up-to-date `rest-client` (`>= 2.1.0`)
|
@@ -72,7 +84,9 @@ project adheres to [Semantic Versioning][Semver].
|
|
72
84
|
### Changed
|
73
85
|
- Initial release
|
74
86
|
|
75
|
-
[Unreleased]: https://github.com/lolcommits/lolcommits-dotcom/compare/v0.
|
87
|
+
[Unreleased]: https://github.com/lolcommits/lolcommits-dotcom/compare/v0.5.1...HEAD
|
88
|
+
[0.5.1]: https://github.com/lolcommits/lolcommits-dotcom/compare/v0.5.0...v0.5.1
|
89
|
+
[0.5.0]: https://github.com/lolcommits/lolcommits-dotcom/compare/v0.4.0...v0.5.0
|
76
90
|
[0.4.0]: https://github.com/lolcommits/lolcommits-dotcom/compare/v0.3.2...v0.4.0
|
77
91
|
[0.3.2]: https://github.com/lolcommits/lolcommits-dotcom/compare/v0.3.1...v0.3.2
|
78
92
|
[0.3.1]: https://github.com/lolcommits/lolcommits-dotcom/compare/v0.3.0...v0.3.1
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,25 +1,23 @@
|
|
1
1
|
# Lolcommits Dotcom
|
2
2
|
|
3
|
+
[](https://github.com/lolcommits/lolcommits-dotcom/actions/workflows/ci.yml)
|
3
4
|
[](http://rubygems.org/gems/lolcommits-dotcom)
|
4
|
-
[](https://travis-ci.com/lolcommits/lolcommits-dotcom)
|
5
5
|
[](https://depfu.com/github/lolcommits/lolcommits-dotcom)
|
6
|
-
[](https://codeclimate.com/github/lolcommits/lolcommits-dotcom/maintainability)
|
7
|
-
[](https://codeclimate.com/github/lolcommits/lolcommits-dotcom/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
|
-
[lolcommits.com](https://lolcommits.com) is web app hosting lolcommits
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
[GitHub](https://github.com/lolcommits/lolcommits-dot-com),
|
18
|
-
|
11
|
+
[lolcommits.com](https://lolcommits.com) is web app hosting lolcommits for
|
12
|
+
multiple repositories! You can signup for free via GitHub. This plugin
|
13
|
+
integrates your lolcommits gem with the website. The app itself has been
|
14
|
+
open-sourced and lives on
|
15
|
+
[GitHub](https://github.com/lolcommits/lolcommits-dot-com), pull-requests are
|
16
|
+
welcome!
|
19
17
|
|
20
18
|
## Requirements
|
21
19
|
|
22
|
-
* Ruby >=
|
20
|
+
* Ruby >= 3.1
|
23
21
|
* A webcam
|
24
22
|
* [ImageMagick](http://www.imagemagick.org)
|
25
23
|
* [ffmpeg](https://www.ffmpeg.org) (optional) for animated gif capturing
|
@@ -32,9 +30,9 @@ After installing the lolcommits gem, install this plugin with:
|
|
32
30
|
|
33
31
|
Sign up (for free) [here](https://lolcommits.com) (via GitHub).
|
34
32
|
|
35
|
-
From the top menu, click 'New Repo' (give your repository a name). Then
|
36
|
-
|
37
|
-
|
33
|
+
From the top menu, click 'New Repo' (give your repository a name). Then click
|
34
|
+
'[Account Info](https://lolcommits.com/users/account)' to see the keys you'll
|
35
|
+
need to configure the gem.
|
38
36
|
|
39
37
|
Then configure to enable and set these keys:
|
40
38
|
|
@@ -50,12 +48,11 @@ That's it! Your next lolcommit will be sent to
|
|
50
48
|
|
51
49
|
## Development
|
52
50
|
|
53
|
-
Check out this repo and run `bin/setup`, this will install all
|
54
|
-
|
55
|
-
and generate a coverage report.
|
51
|
+
Check out this repo and run `bin/setup`, this will install all dependencies and
|
52
|
+
generate docs. Use `bundle exec rake` to run all tests.
|
56
53
|
|
57
|
-
You can also run `bin/console` for an interactive prompt that will allow
|
58
|
-
|
54
|
+
You can also run `bin/console` for an interactive prompt that will allow you to
|
55
|
+
experiment with the gem code.
|
59
56
|
|
60
57
|
After capturing every lolcommit is uploaded to the `/git_commits.json`
|
61
58
|
endpoint with the following multi-part POST body params (JSON encoded):
|
@@ -83,27 +80,23 @@ Generate docs for this gem with:
|
|
83
80
|
## Troubles?
|
84
81
|
|
85
82
|
If you think something is broken or missing, please raise a new
|
86
|
-
[issue](https://github.com/lolcommits/lolcommits-dotcom/issues). Take a
|
87
|
-
|
83
|
+
[issue](https://github.com/lolcommits/lolcommits-dotcom/issues). Take a moment
|
84
|
+
to check it hasn't been raised in the past (and possibly closed).
|
88
85
|
|
89
86
|
## Contributing
|
90
87
|
|
91
|
-
Bug [reports](https://github.com/lolcommits/lolcommits-dotcom/issues)
|
92
|
-
|
93
|
-
|
94
|
-
welcome on GitHub.
|
88
|
+
Bug [reports](https://github.com/lolcommits/lolcommits-dotcom/issues) and [pull
|
89
|
+
requests](https://github.com/lolcommits/lolcommits-dotcom/pulls) are welcome on
|
90
|
+
GitHub.
|
95
91
|
|
96
|
-
When submitting pull requests, remember to add tests covering any new
|
97
|
-
|
98
|
-
CI](https://travis-ci.com/lolcommits/lolcommits-dotcom). Read the
|
99
|
-
[contributing
|
92
|
+
When submitting pull requests, remember to add tests covering any new behaviour,
|
93
|
+
and ensure all tests are passing on CI. Read the [contributing
|
100
94
|
guidelines](https://github.com/lolcommits/lolcommits-dotcom/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-dotcom/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-dotcom/test_coverage)
|
120
|
-
* [RDoc](http://rdoc.info/projects/lolcommits/lolcommits-dotcom)
|
110
|
+
* [CI](https://github.com/lolcommits/lolcommits-dotcom/actions/workflows/ci.yml)
|
111
|
+
* [RDoc](https://www.rubydoc.info/gems/lolcommits-dotcom)
|
121
112
|
* [Issues](http://github.com/lolcommits/lolcommits-dotcom/issues)
|
122
113
|
* [Report a bug](http://github.com/lolcommits/lolcommits-dotcom/issues/new)
|
123
114
|
* [Gem](http://rubygems.org/gems/lolcommits-dotcom)
|
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/dotcom.rb
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "rest-client"
|
4
|
+
require "lolcommits/plugin/base"
|
5
5
|
|
6
6
|
module Lolcommits
|
7
7
|
module Plugin
|
8
8
|
class Dotcom < Base
|
9
|
-
|
10
|
-
BASE_URL = 'https://lolcommits.com'.freeze
|
9
|
+
BASE_URL = "https://lolcommits.com".freeze
|
11
10
|
|
12
11
|
##
|
13
12
|
# Initialize plugin with runner, config and set all configurable options.
|
@@ -57,7 +56,7 @@ module Lolcommits
|
|
57
56
|
git_commit: {
|
58
57
|
sha: runner.sha,
|
59
58
|
repo_external_id: configuration[:repo_id],
|
60
|
-
image: File.open(runner.lolcommit_path)
|
59
|
+
image: File.open(runner.lolcommit_path)
|
61
60
|
},
|
62
61
|
key: configuration[:api_key],
|
63
62
|
t: t,
|
@@ -66,7 +65,7 @@ module Lolcommits
|
|
66
65
|
)
|
67
66
|
rescue => e
|
68
67
|
log_error(e, "ERROR: HTTParty POST FAILED #{e.class} - #{e.message}")
|
69
|
-
|
68
|
+
nil
|
70
69
|
end
|
71
70
|
|
72
71
|
|
@@ -78,7 +77,7 @@ module Lolcommits
|
|
78
77
|
# @return [Array] the option names
|
79
78
|
#
|
80
79
|
def plugin_options
|
81
|
-
[:api_key, :api_secret, :repo_id]
|
80
|
+
[ :api_key, :api_secret, :repo_id ]
|
82
81
|
end
|
83
82
|
end
|
84
83
|
end
|
data/lolcommits-dotcom.gemspec
CHANGED
@@ -5,9 +5,9 @@ require 'lolcommits/dotcom/version'
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "lolcommits-dotcom"
|
7
7
|
spec.version = Lolcommits::Dotcom::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(Uploads lolcommits to a remote server)
|
11
11
|
spec.homepage = "https://github.com/lolcommits/lolcommits-dotcom"
|
12
12
|
spec.license = "LGPL-3.0"
|
13
13
|
|
@@ -18,6 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
|
19
19
|
spec.metadata = {
|
20
20
|
"homepage_uri" => "https://github.com/lolcommits/lolcommits-dotcom",
|
21
|
+
"documentation_uri" => "https://rubydoc.info/gems/lolcommits-dotcom",
|
21
22
|
"changelog_uri" => "https://github.com/lolcommits/lolcommits-dotcom/blob/master/CHANGELOG.md",
|
22
23
|
"source_code_uri" => "https://github.com/lolcommits/lolcommits-dotcom",
|
23
24
|
"bug_tracker_uri" => "https://github.com/lolcommits/lolcommits-dotcom/issues",
|
@@ -28,12 +29,12 @@ Gem::Specification.new do |spec|
|
|
28
29
|
spec.test_files = `git ls-files -- {test,features}/*`.split("\n")
|
29
30
|
spec.bindir = "bin"
|
30
31
|
spec.executables = []
|
31
|
-
spec.require_paths = ["lib"]
|
32
|
+
spec.require_paths = [ "lib" ]
|
32
33
|
|
33
|
-
spec.required_ruby_version = ">=
|
34
|
+
spec.required_ruby_version = ">= 3.1"
|
34
35
|
|
35
36
|
spec.add_runtime_dependency "rest-client", ">= 2.1.0"
|
36
|
-
spec.add_runtime_dependency "lolcommits", ">= 0.
|
37
|
+
spec.add_runtime_dependency "lolcommits", ">= 0.17.2"
|
37
38
|
|
38
39
|
spec.add_development_dependency "bundler"
|
39
40
|
spec.add_development_dependency "webmock"
|
@@ -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::Dotcom do
|
7
|
-
|
8
6
|
include Lolcommits::TestHelpers::GitRepo
|
9
7
|
include Lolcommits::TestHelpers::FakeIO
|
10
8
|
|
@@ -12,7 +10,7 @@ describe Lolcommits::Plugin::Dotcom 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(
|
13
|
+
lolcommit_path: Tempfile.new("lolcommit.jpg"),
|
16
14
|
)
|
17
15
|
end
|
18
16
|
|
@@ -23,27 +21,27 @@ describe Lolcommits::Plugin::Dotcom do
|
|
23
21
|
def valid_enabled_config
|
24
22
|
{
|
25
23
|
enabled: true,
|
26
|
-
api_key:
|
27
|
-
api_secret:
|
24
|
+
api_key: "aaa8e2404ef6013556db5a9828apikey",
|
25
|
+
api_secret: "aaa8e2404ef6013556db5a9apisecret",
|
28
26
|
repo_id: "aaa8e2404ef6013556db5a9828repoid"
|
29
27
|
}
|
30
28
|
end
|
31
29
|
|
32
30
|
describe "initalizing" do
|
33
31
|
it "assigns runner and all plugin options" do
|
34
|
-
plugin.runner.must_equal runner
|
35
|
-
plugin.options.must_equal [:enabled, :api_key, :api_secret, :repo_id]
|
32
|
+
_(plugin.runner).must_equal runner
|
33
|
+
_(plugin.options).must_equal [ :enabled, :api_key, :api_secret, :repo_id ]
|
36
34
|
end
|
37
35
|
end
|
38
36
|
|
39
37
|
describe "#enabled?" do
|
40
38
|
it "is false by default" do
|
41
|
-
plugin.enabled
|
39
|
+
_(plugin.enabled?).must_equal false
|
42
40
|
end
|
43
41
|
|
44
42
|
it "is true when configured" do
|
45
43
|
plugin.configuration = valid_enabled_config
|
46
|
-
plugin.enabled
|
44
|
+
_(plugin.enabled?).must_equal true
|
47
45
|
end
|
48
46
|
end
|
49
47
|
|
@@ -61,15 +59,15 @@ describe Lolcommits::Plugin::Dotcom do
|
|
61
59
|
assert_requested :post,
|
62
60
|
"https://lolcommits.com/git_commits.json",
|
63
61
|
times: 1,
|
64
|
-
headers: {
|
65
|
-
req.body.must_match 'name="git_commit[sha]"'
|
66
|
-
req.body.must_match 'name="git_commit[repo_external_id]"'
|
67
|
-
req.body.must_match(/Content-Disposition: form-data;.+name="git_commit\[image\]"; filename="lolcommit.jpg.+"/)
|
68
|
-
req.body.must_match 'name="key"'
|
69
|
-
req.body.must_match 'name="t"'
|
70
|
-
req.body.must_match 'name="token"'
|
71
|
-
req.body.must_match
|
72
|
-
req.body.must_match
|
62
|
+
headers: { "Content-Type" => /multipart\/form-data/ } do |req|
|
63
|
+
_(req.body).must_match 'name="git_commit[sha]"'
|
64
|
+
_(req.body).must_match 'name="git_commit[repo_external_id]"'
|
65
|
+
_(req.body).must_match(/Content-Disposition: form-data;.+name="git_commit\[image\]"; filename="lolcommit.jpg.+"/)
|
66
|
+
_(req.body).must_match 'name="key"'
|
67
|
+
_(req.body).must_match 'name="t"'
|
68
|
+
_(req.body).must_match 'name="token"'
|
69
|
+
_(req.body).must_match "aaa8e2404ef6013556db5a9828apikey"
|
70
|
+
_(req.body).must_match "aaa8e2404ef6013556db5a9828repoid"
|
73
71
|
end
|
74
72
|
end
|
75
73
|
end
|
@@ -78,19 +76,19 @@ describe Lolcommits::Plugin::Dotcom do
|
|
78
76
|
describe "configuration" do
|
79
77
|
it "allows plugin options to be configured" do
|
80
78
|
# enabled, api_key, api_secret repo_id
|
81
|
-
inputs = %w
|
79
|
+
inputs = %w[
|
82
80
|
true
|
83
81
|
aaa8e2404ef6013556db5a9828apikey
|
84
82
|
aaa8e2404ef6013556db5a9apisecret
|
85
83
|
aaa8e2404ef6013556db5a9828repoid
|
86
|
-
|
84
|
+
]
|
87
85
|
configured_plugin_options = {}
|
88
86
|
|
89
87
|
fake_io_capture(inputs: inputs) do
|
90
88
|
configured_plugin_options = plugin.configure_options!
|
91
89
|
end
|
92
90
|
|
93
|
-
configured_plugin_options.must_equal({
|
91
|
+
_(configured_plugin_options).must_equal({
|
94
92
|
enabled: true,
|
95
93
|
api_key: "aaa8e2404ef6013556db5a9828apikey",
|
96
94
|
api_secret: "aaa8e2404ef6013556db5a9apisecret",
|
@@ -101,12 +99,12 @@ describe Lolcommits::Plugin::Dotcom do
|
|
101
99
|
describe "#valid_configuration?" do
|
102
100
|
it "returns false for an invalid configuration" do
|
103
101
|
plugin.configuration = { repo_id: "gibberish" }
|
104
|
-
plugin.valid_configuration
|
102
|
+
_(plugin.valid_configuration?).must_equal false
|
105
103
|
end
|
106
104
|
|
107
105
|
it "returns true with a valid configuration" do
|
108
106
|
plugin.configuration = valid_enabled_config
|
109
|
-
plugin.valid_configuration
|
107
|
+
_(plugin.valid_configuration?).must_equal true
|
110
108
|
end
|
111
109
|
end
|
112
110
|
end
|
data/test/test_helper.rb
CHANGED
@@ -1,21 +1,18 @@
|
|
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/dotcom"
|
14
|
+
require "webmock/minitest"
|
15
|
+
require "minitest/autorun"
|
19
16
|
|
20
17
|
# swallow all debug output during test runs
|
21
18
|
def debug(msg); end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lolcommits-dotcom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.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
|
@@ -131,18 +131,19 @@ executables: []
|
|
131
131
|
extensions: []
|
132
132
|
extra_rdoc_files: []
|
133
133
|
files:
|
134
|
+
- ".github/workflows/ci.yml"
|
134
135
|
- ".gitignore"
|
135
|
-
- ".
|
136
|
-
- ".
|
136
|
+
- ".quickhook/pre-commit/ruby-lint"
|
137
|
+
- ".rubocop.yml"
|
137
138
|
- CHANGELOG.md
|
138
139
|
- CODE_OF_CONDUCT.md
|
139
140
|
- CONTRIBUTING.md
|
140
141
|
- Gemfile
|
141
142
|
- LICENSE
|
142
|
-
- PULL_REQUEST_TEMPLATE.md
|
143
143
|
- README.md
|
144
144
|
- Rakefile
|
145
145
|
- bin/console
|
146
|
+
- bin/rubocop
|
146
147
|
- bin/setup
|
147
148
|
- lib/lolcommits/dotcom.rb
|
148
149
|
- lib/lolcommits/dotcom/version.rb
|
@@ -155,11 +156,12 @@ licenses:
|
|
155
156
|
- LGPL-3.0
|
156
157
|
metadata:
|
157
158
|
homepage_uri: https://github.com/lolcommits/lolcommits-dotcom
|
159
|
+
documentation_uri: https://rubydoc.info/gems/lolcommits-dotcom
|
158
160
|
changelog_uri: https://github.com/lolcommits/lolcommits-dotcom/blob/master/CHANGELOG.md
|
159
161
|
source_code_uri: https://github.com/lolcommits/lolcommits-dotcom
|
160
162
|
bug_tracker_uri: https://github.com/lolcommits/lolcommits-dotcom/issues
|
161
163
|
allowed_push_host: https://rubygems.org
|
162
|
-
post_install_message:
|
164
|
+
post_install_message:
|
163
165
|
rdoc_options: []
|
164
166
|
require_paths:
|
165
167
|
- lib
|
@@ -167,15 +169,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
167
169
|
requirements:
|
168
170
|
- - ">="
|
169
171
|
- !ruby/object:Gem::Version
|
170
|
-
version: '
|
172
|
+
version: '3.1'
|
171
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
172
174
|
requirements:
|
173
175
|
- - ">="
|
174
176
|
- !ruby/object:Gem::Version
|
175
177
|
version: '0'
|
176
178
|
requirements: []
|
177
|
-
rubygems_version: 3.
|
178
|
-
signing_key:
|
179
|
+
rubygems_version: 3.5.22
|
180
|
+
signing_key:
|
179
181
|
specification_version: 4
|
180
182
|
summary: Uploads lolcommits to a remote server
|
181
183
|
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.3.8
|
6
|
-
- 2.4.6
|
7
|
-
- 2.5.5
|
8
|
-
- 2.6.3
|
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=532a74c750c62a8be219553f20773cb091b721dd05b5d7064b506160a0f9c76f
|
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.
|