lolcommits-twitter 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: 19972629f8a661669c7ab25899eab5d3091fb48997634beeef854a9729c3b5ea
4
- data.tar.gz: 952c38f31cb81af9c8602dfefea18a368915a96421fbbc6edc80ac1607504927
3
+ metadata.gz: '0934b1f71d7c43ee3a6a7845834abaf8e7130e8de8f69df6a865b557178b57df'
4
+ data.tar.gz: bf80e1907e3969a372fdf929b53554c2b9a422de69e8fd75a77205ba15756960
5
5
  SHA512:
6
- metadata.gz: f0966cd6a608c45ec1af1221ad09916682c590e8134fb5bca182ce52a093f9cddb1be26ca3ec5820da489d591c11890b11d03036e690aa21cf91b7b93d227934
7
- data.tar.gz: b798641a76345f4b75cb3fe04bfa9828824b4ac4e6a0ebc58ced33458575ec067bd762a35c94e8c2841357472172bf79c9a4fc74ac1a3d5738d2db2b6ec2c81d
6
+ metadata.gz: 425be8c41761c04b8141cd7218eaa948fccc84fb761a6bec1076cccdbcfecf5f2b8e7169f5929e3c421bcd74e9c63314f715a18b12bee4eb273a555615dff3da
7
+ data.tar.gz: c9f946d9c620c863b3a9c09acd72e545076abe880bfc3c2c484d353382138d0a7eaf2173ab96b59ff4438d59bfaa535f8b2d5e6c57dadfbbaf80e6c8c6f8882b
@@ -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
+ - Updated 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)
@@ -53,7 +63,8 @@ adheres to [Semantic Versioning][Semver].
53
63
  ### Changed
54
64
  - Initial release
55
65
 
56
- [Unreleased]: https://github.com/lolcommits/lolcommits-twitter/compare/v0.2.0...HEAD
66
+ [Unreleased]: https://github.com/lolcommits/lolcommits-twitter/compare/v0.3.0...HEAD
67
+ [0.3.0]: https://github.com/lolcommits/lolcommits-twitter/compare/v0.2.0...v0.3.0
57
68
  [0.2.0]: https://github.com/lolcommits/lolcommits-twitter/compare/v0.1.1...v0.2.0
58
69
  [0.1.1]: https://github.com/lolcommits/lolcommits-twitter/compare/v0.1.0...v0.1.1
59
70
  [0.1.0]: https://github.com/lolcommits/lolcommits-twitter/compare/v0.0.6...v0.1.0
data/README.md CHANGED
@@ -1,20 +1,21 @@
1
1
  # Lolcommits Twitter
2
2
 
3
3
  [![Gem](https://img.shields.io/gem/v/lolcommits-twitter.svg?style=flat)](http://rubygems.org/gems/lolcommits-twitter)
4
- [![Travis](https://travis-ci.org/lolcommits/lolcommits-twitter.svg?branch=master)](https://travis-ci.org/lolcommits/lolcommits-twitter)
4
+ [![Travis](https://img.shields.io/travis/com/lolcommits/lolcommits-twitter/master.svg?style=flat)](https://travis-ci.com/lolcommits/lolcommits-twitter)
5
5
  [![Depfu](https://img.shields.io/depfu/lolcommits/lolcommits-twitter.svg?style=flat)](https://depfu.com/github/lolcommits/lolcommits-twitter)
6
6
  [![Maintainability](https://api.codeclimate.com/v1/badges/e6c4f22b17de9df4e3da/maintainability)](https://codeclimate.com/github/lolcommits/lolcommits-twitter/maintainability)
7
7
  [![Test Coverage](https://api.codeclimate.com/v1/badges/e6c4f22b17de9df4e3da/test_coverage)](https://codeclimate.com/github/lolcommits/lolcommits-twitter/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 automatically posts your Lolcommit to Twitter. The tweet features
14
- your commit message (shortened, with some optional surrounding text) and the
15
- captured image. See the [#lolcommits](https://twitter.com/hashtag/lolcommits)
16
- hash tag for some examples in the wild. You can also configure the plugin to
17
- auto-open the tweet in your default browser.
13
+ This plugin automatically posts your Lolcommit to Twitter. The tweet
14
+ features your commit message (shortened, with some optional surrounding
15
+ text) and the captured image. See the
16
+ [#lolcommits](https://twitter.com/hashtag/lolcommits) hash tag for some
17
+ examples in the wild. You can also configure the plugin to auto-open the
18
+ tweet in your default browser.
18
19
 
19
20
  ## Requirements
20
21
 
@@ -34,9 +35,9 @@ The configure the plugin to enable it and auth with Twitter
34
35
  $ lolcommits --config -p twitter
35
36
  # set enabled to `true` (then set your own options or choose the defaults)
36
37
 
37
- *NOTE*: if you enable this plugin on another repository you may want to copy the
38
- credentials from `~/.lolcommits/{your-repo}/config.yml` (so Twitter does not
39
- de-authorize the connection).
38
+ *NOTE*: if you enable this plugin on another repository you may want to
39
+ copy the credentials from `~/.lolcommits/{your-repo}/config.yml` (so
40
+ Twitter does not de-authorize the connection).
40
41
 
41
42
  ### Configuration
42
43
 
@@ -46,22 +47,22 @@ The following options are available:
46
47
  * suffix (default: #lolcommits)
47
48
  * auto-open tweet url?
48
49
 
49
- You can always reconfigure the plugin later, to change these options without
50
- having to re-authenicate with Twitter.
50
+ You can always reconfigure the plugin later, to change these options
51
+ without having to re-authenicate with Twitter.
51
52
 
52
- To disable - set `enabled: false` and revoke plugin access to your twitter
53
- account [here](https://twitter.com/settings/applications).
53
+ To disable - set `enabled: false` and revoke plugin access to your
54
+ twitter account [here](https://twitter.com/settings/applications).
54
55
 
55
56
 
56
57
 
57
58
  ## Development
58
59
 
59
60
  Check out this repo and run `bin/setup`, to install all dependencies and
60
- generate docs. Run `bundle exec rake` to run all tests and generate a coverage
61
- report.
61
+ generate docs. Run `bundle exec rake` to run all tests and generate a
62
+ coverage report.
62
63
 
63
- You can also run `bin/console` for an interactive prompt that will allow you to
64
- experiment with the gem code.
64
+ You can also run `bin/console` for an interactive prompt that will allow
65
+ you to experiment with the gem code.
65
66
 
66
67
  ## Tests
67
68
 
@@ -78,30 +79,33 @@ Generate docs for this gem with:
78
79
  ## Troubles?
79
80
 
80
81
  If you think something is broken or missing, please raise a new
81
- [issue](https://github.com/lolcommits/lolcommits-twitter/issues). Take
82
- a moment to check it hasn't been raised in the past (and possibly closed).
82
+ [issue](https://github.com/lolcommits/lolcommits-twitter/issues). Take a
83
+ moment to check it hasn't been raised in the past (and possibly closed).
83
84
 
84
85
  ## Contributing
85
86
 
86
- Bug [reports](https://github.com/lolcommits/lolcommits-twitter/issues) and [pull
87
- requests](https://github.com/lolcommits/lolcommits-twitter/pulls) are welcome on
88
- GitHub.
87
+ Bug [reports](https://github.com/lolcommits/lolcommits-twitter/issues)
88
+ and [pull
89
+ requests](https://github.com/lolcommits/lolcommits-twitter/pulls) are
90
+ welcome on GitHub.
89
91
 
90
- When submitting pull requests, remember to add tests covering any new behaviour,
91
- and ensure all tests are passing on [Travis
92
- CI](https://travis-ci.org/lolcommits/lolcommits-twitter). Read the
92
+ When submitting pull requests, remember to add tests covering any new
93
+ behaviour, and ensure all tests are passing on [Travis
94
+ CI](https://travis-ci.com/lolcommits/lolcommits-twitter). Read the
93
95
  [contributing
94
96
  guidelines](https://github.com/lolcommits/lolcommits-twitter/blob/master/CONTRIBUTING.md)
95
97
  for more details.
96
98
 
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
99
+ This project is intended to be a safe, welcoming space for
100
+ collaboration, and contributors are expected to adhere to the
101
+ [Contributor Covenant](http://contributor-covenant.org) code of conduct.
102
+ See
100
103
  [here](https://github.com/lolcommits/lolcommits-twitter/blob/master/CODE_OF_CONDUCT.md)
101
104
  for more details.
102
105
 
103
106
  ## TODO
104
107
 
108
+ - [ ] Support uploading lolcommit videos
105
109
  - [ ] Refactor Client to include Request/Response classes (see twitter gem approach)
106
110
  - [ ] Tests for Client lib classes
107
111
  - [ ] Tests for Plugin class (port tests from lolcommits)
@@ -117,7 +121,7 @@ The gem is available as open source under the terms of
117
121
 
118
122
  ## Links
119
123
 
120
- * [Travis CI](https://travis-ci.org/lolcommits/lolcommits-twitter)
124
+ * [Travis CI](https://travis-ci.com/lolcommits/lolcommits-twitter)
121
125
  * [Test Coverage](https://codeclimate.com/github/lolcommits/lolcommits-twitter/test_coverage)
122
126
  * [Code Climate](https://codeclimate.com/github/lolcommits/lolcommits-twitter)
123
127
  * [RDoc](http://rdoc.info/projects/lolcommits/lolcommits-twitter)
@@ -21,7 +21,8 @@ module Lolcommits
21
21
 
22
22
  ##
23
23
  # Prompts the user to configure plugin options.
24
- # Options are enabled (true/false), Twitter auth, and prefix/suffix text.
24
+ # Options are enabled (true/false), Twitter auth, and
25
+ # prefix/suffix text.
25
26
  #
26
27
  # @return [Hash] a hash of configured plugin options
27
28
  #
@@ -42,15 +43,20 @@ module Lolcommits
42
43
  end
43
44
 
44
45
  ##
45
- # Capture ready hook, runs after lolcommits captures a snapshot and image
46
- # processing has completed.
46
+ # Capture ready hook, runs after lolcommits captures a snapshot
47
+ # and image processing has completed.
47
48
  #
48
- # Posts the lolcommit to Twitter, first uploading the capture media, then
49
- # posting a new Tweet with the media_id attached.
49
+ # Posts the lolcommit to Twitter, first uploading the capture
50
+ # media, then posting a new Tweet with the media_id attached.
50
51
  #
51
52
  def run_capture_ready
53
+ if runner.capture_video && !runner.capture_gif
54
+ debug "unable to post lolcommit videos, (gif's and jpgs only)"
55
+ return
56
+ end
57
+
52
58
  status = build_tweet(runner.message)
53
- file = File.open(runner.main_image, 'rb')
59
+ file = File.open(image_path, 'rb')
54
60
 
55
61
  print "Tweeting ... "
56
62
 
@@ -75,6 +81,10 @@ module Lolcommits
75
81
 
76
82
  private
77
83
 
84
+ def image_path
85
+ runner.capture_image? ? runner.lolcommit_path : runner.lolcommit_gif_path
86
+ end
87
+
78
88
  def twitter_client
79
89
  Lolcommits::Twitter::Client
80
90
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lolcommits
4
4
  module Twitter
5
- VERSION = "0.2.0".freeze
5
+ VERSION = "0.3.0".freeze
6
6
  end
7
7
  end
@@ -9,25 +9,17 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ["matt@hiddenloop.com"]
10
10
  spec.summary = %q{Post lolcommits to Twitter}
11
11
  spec.homepage = "https://github.com/lolcommits/lolcommits-twitter"
12
- spec.license = "LGPL-3"
12
+ spec.license = "LGPL-3.0"
13
13
  spec.description = %q{Automatically tweet your lolcommits}
14
14
 
15
15
  spec.metadata = {
16
- "homepage_uri" => "https://github.com/lolcommits/lolcommits-twitter",
17
- "changelog_uri" => "https://github.com/lolcommits/lolcommits-twitter/blob/master/CHANGELOG.md",
18
- "source_code_uri" => "https://github.com/lolcommits/lolcommits-twitter",
19
- "bug_tracker_uri" => "https://github.com/lolcommits/lolcommits-twitter/issues",
16
+ "homepage_uri" => "https://github.com/lolcommits/lolcommits-twitter",
17
+ "changelog_uri" => "https://github.com/lolcommits/lolcommits-twitter/blob/master/CHANGELOG.md",
18
+ "source_code_uri" => "https://github.com/lolcommits/lolcommits-twitter",
19
+ "bug_tracker_uri" => "https://github.com/lolcommits/lolcommits-twitter/issues",
20
+ "allowed_push_host" => "https://rubygems.org"
20
21
  }
21
22
 
22
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
23
- # to allow pushing to a single host or delete this section to allow pushing to any host.
24
- if spec.respond_to?(:metadata)
25
- spec.metadata['allowed_push_host'] = "https://rubygems.org"
26
- else
27
- raise "RubyGems 2.0 or newer is required to protect against " \
28
- "public gem pushes."
29
- end
30
-
31
23
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(assets|test|features)/}) }
32
24
  spec.test_files = `git ls-files -- {test,features}/*`.split("\n")
33
25
  spec.bindir = "bin"
@@ -40,8 +32,8 @@ Gem::Specification.new do |spec|
40
32
  spec.add_runtime_dependency "oauth"
41
33
  spec.add_runtime_dependency "simple_oauth"
42
34
  spec.add_runtime_dependency "addressable"
35
+ spec.add_runtime_dependency "lolcommits", ">= 0.14.2"
43
36
 
44
- spec.add_development_dependency "lolcommits", ">= 0.12.0"
45
37
  spec.add_development_dependency "bundler"
46
38
  spec.add_development_dependency "rake"
47
39
  spec.add_development_dependency "minitest"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lolcommits-twitter
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
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 0.12.0
76
- type: :development
75
+ version: 0.14.2
76
+ type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 0.12.0
82
+ version: 0.14.2
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -193,7 +193,7 @@ files:
193
193
  - test/test_helper.rb
194
194
  homepage: https://github.com/lolcommits/lolcommits-twitter
195
195
  licenses:
196
- - LGPL-3
196
+ - LGPL-3.0
197
197
  metadata:
198
198
  homepage_uri: https://github.com/lolcommits/lolcommits-twitter
199
199
  changelog_uri: https://github.com/lolcommits/lolcommits-twitter/blob/master/CHANGELOG.md