lolcommits-uploldz 0.2.0 → 0.3.0

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: b9fa74007371399d41dde256f0011775b80c1f5b0f2001e06c44e111a3e40411
4
- data.tar.gz: 0f27514b43e426302effe7344cac1b6a2e4db335e5131d22be6d86a5e2649ef1
3
+ metadata.gz: 7bc6af04c743c1334f2e1c21dec852d1a0781f0d7745d9adc6d70e9a2e96340f
4
+ data.tar.gz: 397fbc8e7d982b0a81fbf2e107f3f8b867b6e4418f2d40ba926b014fec0a0ba4
5
5
  SHA512:
6
- metadata.gz: 521c33f340484a4a9320991b08dcd8f255ac83a374b04fff80524eb46eb49afcd55197a1eadec4418412537b2b078e6da27269e651f00f5ced70ade70f44d334
7
- data.tar.gz: fe49416426fb77fb357cceedd9741e3a98d67dddac1bdfdc5b0324d993b01a58d033f50fc1efae075f1e66a1f73effde72bdc3b1f4ceb521f2c45dd5fc7b389f
6
+ metadata.gz: f604670b7df915cd1d08ee76d8ef0b7d1a3d147dca1fc28da2908ad58229dd3c781112afde1c156fc1983502e6819966386b27d4916479529a832fafcde0cb4c
7
+ data.tar.gz: c00b78dfe3a3b5fd0008e815ac2b4bd738a66b0e1e49fd37c986adc03f09add26a08de427699c964fc43c6b3571a58be10a33a4f24ed8ab815faecc0e08e9c97
data/CHANGELOG.md CHANGED
@@ -2,13 +2,23 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- The format is based on [Keep a Changelog][KeepAChangelog] and this project
6
- adheres to [Semantic Versioning][Semver].
5
+ The format is based on [Keep a Changelog][KeepAChangelog] and this
6
+ project adheres to [Semantic Versioning][Semver].
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
10
  - Your contribution here!
11
11
 
12
+ ## [0.3.0] - 2019-05-20
13
+ ### Changed
14
+ - lolcommits gem is a runtime dependency
15
+ - Use `lolcommit_path` (instead of `main_image`)
16
+ - Requires at least lolcommits >= `0.14.2`
17
+ - Update README and gemspec
18
+
19
+ ### Removed
20
+ - Support for lolcommits < `0.14.2`
21
+
12
22
  ## [0.2.0] - 2019-04-24
13
23
  ### Removed
14
24
  - Support for Ruby < 2.3 (older rubies no longer supported)
@@ -48,7 +58,8 @@ adheres to [Semantic Versioning][Semver].
48
58
  ### Changed
49
59
  - Initial release
50
60
 
51
- [Unreleased]: https://github.com/lolcommits/lolcommits-uploldz/compare/v0.2.0...HEAD
61
+ [Unreleased]: https://github.com/lolcommits/lolcommits-uploldz/compare/v0.3.0...HEAD
62
+ [0.3.0]: https://github.com/lolcommits/lolcommits-uploldz/compare/v0.2.0...v0.3.0
52
63
  [0.2.0]: https://github.com/lolcommits/lolcommits-uploldz/compare/v0.1.1...v0.2.0
53
64
  [0.1.1]: https://github.com/lolcommits/lolcommits-uploldz/compare/v0.1.0...v0.1.1
54
65
  [0.1.0]: https://github.com/lolcommits/lolcommits-uploldz/compare/v0.0.4...v0.1.0
data/README.md CHANGED
@@ -1,28 +1,29 @@
1
1
  # Lolcommits Uploldz
2
2
 
3
3
  [![Gem](https://img.shields.io/gem/v/lolcommits-uploldz.svg?style=flat)](http://rubygems.org/gems/lolcommits-uploldz)
4
- [![Travis](https://travis-ci.org/lolcommits/lolcommits-uploldz.svg?branch=master)](https://travis-ci.org/lolcommits/lolcommits-uploldz)
4
+ [![Travis](https://img.shields.io/travis/com/lolcommits/lolcommits-uploldz/master.svg?style=flat)](https://travis-ci.com/lolcommits/lolcommits-uploldz)
5
5
  [![Depfu](https://img.shields.io/depfu/lolcommits/lolcommits-uploldz.svg?style=flat)](https://depfu.com/github/lolcommits/lolcommits-uploldz)
6
6
  [![Maintainability](https://api.codeclimate.com/v1/badges/adb505198ff0e8e8e170/maintainability)](https://codeclimate.com/github/lolcommits/lolcommits-uploldz/maintainability)
7
7
  [![Test Coverage](https://api.codeclimate.com/v1/badges/adb505198ff0e8e8e170/test_coverage)](https://codeclimate.com/github/lolcommits/lolcommits-uploldz/test_coverage)
8
8
 
9
- [lolcommits](https://lolcommits.github.io/) takes a snapshot with your webcam
10
- every time you git commit code, and archives a lolcat style image with it. Git
11
- blame has never been so much fun!
9
+ [lolcommits](https://lolcommits.github.io/) takes a snapshot with your
10
+ webcam every time you git commit code, and archives a lolcat style image
11
+ with it. Git blame has never been so much fun!
12
12
 
13
- This plugin uploads each lolcommit to a remote server after capturing. You
14
- configure the plugin by setting a remote endpoint to handle the HTTP post
15
- request. The following params will be sent:
13
+ This plugin uploads each lolcommit to a remote server after capturing.
14
+ You configure the plugin by setting a remote endpoint to handle the HTTP
15
+ post request. The following params will be sent:
16
16
 
17
- * `file` - captured lolcommit image file
17
+ * `file` - captured lolcommit file
18
18
  * `message` - the commit message
19
- * `repo` - repository name e.g. mroth/lolcommits
19
+ * `repo` - repository name e.g. lolcommits/lolcommits
20
20
  * `sha` - commit SHA
21
21
  * `author_name` - the commit author name
22
22
  * `author_email` - the commit author email address
23
23
  * `key` - optional key (string) from plugin config
24
24
 
25
- You can also set an optional HTTP Basic Auth header (username and/or password).
25
+ You can also set an optional HTTP Basic Auth header (username and/or
26
+ password).
26
27
 
27
28
  ## Requirements
28
29
 
@@ -44,20 +45,20 @@ Then configure to enable and set the remote endpoint:
44
45
  # set the remote endpoint (must begin with http(s)://)
45
46
  # optionally set a key (sent in params) and/or HTTP Basic Auth credentials
46
47
 
47
- That's it! Provided the endpoint responds correctly, your next lolcommit will be
48
- uploaded to it. To disable use:
48
+ That's it! Provided the endpoint responds correctly, your next lolcommit
49
+ will be uploaded to it. To disable use:
49
50
 
50
51
  $ lolcommits --config -p uploldz
51
52
  # and set enabled to `false`
52
53
 
53
54
  ## Development
54
55
 
55
- Check out this repo and run `bin/setup`, this will install all dependencies and
56
- generate docs. Use `bundle exec rake` to run all tests and generate a coverage
57
- report.
56
+ Check out this repo and run `bin/setup`, this will install all
57
+ dependencies and generate docs. Use `bundle exec rake` to run all tests
58
+ and generate a coverage report.
58
59
 
59
- You can also run `bin/console` for an interactive prompt that will allow you to
60
- experiment with the gem code.
60
+ You can also run `bin/console` for an interactive prompt that will allow
61
+ you to experiment with the gem code.
61
62
 
62
63
  ## Tests
63
64
 
@@ -74,25 +75,27 @@ Generate docs for this gem with:
74
75
  ## Troubles?
75
76
 
76
77
  If you think something is broken or missing, please raise a new
77
- [issue](https://github.com/lolcommits/lolcommits-uploldz/issues). Take
78
- a moment to check it hasn't been raised in the past (and possibly closed).
78
+ [issue](https://github.com/lolcommits/lolcommits-uploldz/issues). Take a
79
+ moment to check it hasn't been raised in the past (and possibly closed).
79
80
 
80
81
  ## Contributing
81
82
 
82
- Bug [reports](https://github.com/lolcommits/lolcommits-uploldz/issues) and [pull
83
- requests](https://github.com/lolcommits/lolcommits-uploldz/pulls) are welcome on
84
- GitHub.
83
+ Bug [reports](https://github.com/lolcommits/lolcommits-uploldz/issues)
84
+ and [pull
85
+ requests](https://github.com/lolcommits/lolcommits-uploldz/pulls) are
86
+ welcome on GitHub.
85
87
 
86
- When submitting pull requests, remember to add tests covering any new behaviour,
87
- and ensure all tests are passing on [Travis
88
- CI](https://travis-ci.org/lolcommits/lolcommits-uploldz). Read the
88
+ When submitting pull requests, remember to add tests covering any new
89
+ behaviour, and ensure all tests are passing on [Travis
90
+ CI](https://travis-ci.com/lolcommits/lolcommits-uploldz). Read the
89
91
  [contributing
90
92
  guidelines](https://github.com/lolcommits/lolcommits-uploldz/blob/master/CONTRIBUTING.md)
91
93
  for more details.
92
94
 
93
- This project is intended to be a safe, welcoming space for collaboration, and
94
- contributors are expected to adhere to the [Contributor
95
- Covenant](http://contributor-covenant.org) code of conduct. See
95
+ This project is intended to be a safe, welcoming space for
96
+ collaboration, and contributors are expected to adhere to the
97
+ [Contributor Covenant](http://contributor-covenant.org) code of conduct.
98
+ See
96
99
  [here](https://github.com/lolcommits/lolcommits-uploldz/blob/master/CODE_OF_CONDUCT.md)
97
100
  for more details.
98
101
 
@@ -103,7 +106,7 @@ The gem is available as open source under the terms of
103
106
 
104
107
  ## Links
105
108
 
106
- * [Travis CI](https://travis-ci.org/lolcommits/lolcommits-uploldz)
109
+ * [Travis CI](https://travis-ci.com/lolcommits/lolcommits-uploldz)
107
110
  * [Code Climate](https://codeclimate.com/github/lolcommits/lolcommits-uploldz)
108
111
  * [Test Coverage](https://codeclimate.com/github/lolcommits/lolcommits-uploldz/coverage)
109
112
  * [RDoc](http://rdoc.info/projects/lolcommits/lolcommits-uploldz)
@@ -11,7 +11,8 @@ module Lolcommits
11
11
  attr_accessor :endpoint
12
12
 
13
13
  ##
14
- # Initialize plugin with runner, config and set all configurable options.
14
+ # Initialize plugin with runner, config and set all configurable
15
+ # options.
15
16
  #
16
17
  def initialize(runner: nil, config: nil, name: nil)
17
18
  super
@@ -20,8 +21,8 @@ module Lolcommits
20
21
 
21
22
  ##
22
23
  # Returns true/false indicating if the plugin has been correctly
23
- # configured. The `endpoint` option must be set with a URL beginning with
24
- # http(s)://
24
+ # configured. The `endpoint` option must be set with a URL
25
+ # beginning with http(s)://
25
26
  #
26
27
  # @return [Boolean] true/false indicating if plugin is correctly
27
28
  # configured
@@ -31,13 +32,13 @@ module Lolcommits
31
32
  end
32
33
 
33
34
  ##
34
- # Post-capture hook, runs after lolcommits captures a snapshot. Uploads
35
- # the lolcommit image to the remote server with an optional Authorization
36
- # header and the following request params.
35
+ # Post-capture hook, runs after lolcommits captures a snapshot.
36
+ # Uploads # the lolcommit to the remote server with an optional
37
+ # Authorization header and the following request params.
37
38
  #
38
- # `file` - captured lolcommit image file
39
+ # `file` - captured lolcommit file
39
40
  # `message` - the commit message
40
- # `repo` - repository name e.g. mroth/lolcommits
41
+ # `repo` - repository name e.g. lolcommits/lolcommits
41
42
  # `sha` - commit SHA
42
43
  # `key` - key (string) from plugin configuration (optional)
43
44
  # `author_name` - the commit author name
@@ -51,7 +52,7 @@ module Lolcommits
51
52
  RestClient.post(
52
53
  configuration[:endpoint],
53
54
  {
54
- file: File.new(runner.main_image),
55
+ file: File.new(runner.lolcommit_path),
55
56
  message: runner.message,
56
57
  repo: runner.vcs_info.repo,
57
58
  author_name: runner.vcs_info.author_name,
@@ -83,10 +84,10 @@ module Lolcommits
83
84
  end
84
85
 
85
86
  ##
86
- # Builds an HTTP basic auth header from plugin options. If both the
87
- # username and password options are empty nil is returned.
87
+ # Builds an HTTP basic auth header from plugin options. If both
88
+ # the username and password options are empty nil is returned.
88
89
  #
89
- # @return [String] the HTTP basic auth header string (Base64 encoded u:p)
90
+ # @return [String] the HTTP basic auth header string (Base64 encoded)
90
91
  # @return [Nil] if no username or password option set
91
92
  #
92
93
  def authorization_header
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lolcommits
4
4
  module Uploldz
5
- VERSION = "0.2.0".freeze
5
+ VERSION = "0.3.0".freeze
6
6
  end
7
7
  end
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ["matt@hiddenloop.com"]
10
10
  spec.summary = %q{Uploads lolcommits to a remote server}
11
11
  spec.homepage = "https://github.com/lolcommits/lolcommits-uploldz"
12
- spec.license = "LGPL-3"
12
+ spec.license = "LGPL-3.0"
13
13
 
14
14
  spec.description = <<-DESC
15
15
  Uploads lolcommits to a remote server, with optional key or HTTP based
@@ -17,21 +17,13 @@ Gem::Specification.new do |spec|
17
17
  DESC
18
18
 
19
19
  spec.metadata = {
20
- "homepage_uri" => "https://github.com/lolcommits/lolcommits-uploldz",
21
- "changelog_uri" => "https://github.com/lolcommits/lolcommits-uploldz/blob/master/CHANGELOG.md",
22
- "source_code_uri" => "https://github.com/lolcommits/lolcommits-uploldz",
23
- "bug_tracker_uri" => "https://github.com/lolcommits/lolcommits-uploldz/issues",
20
+ "homepage_uri" => "https://github.com/lolcommits/lolcommits-uploldz",
21
+ "changelog_uri" => "https://github.com/lolcommits/lolcommits-uploldz/blob/master/CHANGELOG.md",
22
+ "source_code_uri" => "https://github.com/lolcommits/lolcommits-uploldz",
23
+ "bug_tracker_uri" => "https://github.com/lolcommits/lolcommits-uploldz/issues",
24
+ "allowed_push_host" => "https://rubygems.org"
24
25
  }
25
26
 
26
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
27
- # to allow pushing to a single host or delete this section to allow pushing to any host.
28
- if spec.respond_to?(:metadata)
29
- spec.metadata['allowed_push_host'] = "https://rubygems.org"
30
- else
31
- raise "RubyGems 2.0 or newer is required to protect against " \
32
- "public gem pushes."
33
- end
34
-
35
27
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(assets|test|features)/}) }
36
28
  spec.test_files = `git ls-files -- {test,features}/*`.split("\n")
37
29
  spec.bindir = "bin"
@@ -41,8 +33,8 @@ Gem::Specification.new do |spec|
41
33
  spec.required_ruby_version = ">= 2.3"
42
34
 
43
35
  spec.add_runtime_dependency "rest-client"
36
+ spec.add_runtime_dependency "lolcommits", ">= 0.14.2"
44
37
 
45
- spec.add_development_dependency "lolcommits", ">= 0.12.0"
46
38
  spec.add_development_dependency "bundler"
47
39
  spec.add_development_dependency "webmock"
48
40
  spec.add_development_dependency "pry"
@@ -12,7 +12,7 @@ describe Lolcommits::Plugin::Uploldz do
12
12
  def runner
13
13
  # a simple lolcommits runner with an empty configuration Hash
14
14
  @runner ||= Lolcommits::Runner.new(
15
- main_image: Tempfile.new('main_image.jpg')
15
+ lolcommit_path: Tempfile.new('lolcommit.jpg').path
16
16
  )
17
17
  end
18
18
 
@@ -67,7 +67,7 @@ describe Lolcommits::Plugin::Uploldz do
67
67
 
68
68
  assert_requested :post, "https://uploldz.com/uplol", times: 1,
69
69
  headers: {'Content-Type' => /multipart\/form-data/ } do |req|
70
- req.body.must_match(/Content-Disposition: form-data;.+name="file"; filename="main_image.jpg.+"/)
70
+ req.body.must_match(/Content-Disposition: form-data;.+name="file"; filename="lolcommit.jpg.+"/)
71
71
  req.body.must_match 'name="repo"'
72
72
  req.body.must_match 'name="author_name"'
73
73
  req.body.must_match 'name="author_email"'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lolcommits-uploldz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.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: 2019-04-24 00:00:00.000000000 Z
11
+ date: 2019-05-20 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.12.0
34
- type: :development
33
+ version: 0.14.2
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.12.0
40
+ version: 0.14.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -152,7 +152,7 @@ files:
152
152
  - test/test_helper.rb
153
153
  homepage: https://github.com/lolcommits/lolcommits-uploldz
154
154
  licenses:
155
- - LGPL-3
155
+ - LGPL-3.0
156
156
  metadata:
157
157
  homepage_uri: https://github.com/lolcommits/lolcommits-uploldz
158
158
  changelog_uri: https://github.com/lolcommits/lolcommits-uploldz/blob/master/CHANGELOG.md