dev_orbit 0.0.1 → 0.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 80bcc5826d4088f33048db1adc6cc22029b8739e5affd5154f1af496b7f63e04
4
- data.tar.gz: 714dc5857e7c11820068f67e004a203cc905c1fcb28c154ebc9f3065a5340561
3
+ metadata.gz: 36450d6b5b14037522d0c711ad89d7ffb7f184054910f0b75913372647b448d2
4
+ data.tar.gz: 10965b3d98928c4c0a5da6f1417bb5503276726f876202688100c744e6d3936a
5
5
  SHA512:
6
- metadata.gz: ae17e17441b221b7a2b9cbf104517c8a3fc36d568549764ffb6670318cb5187be0e9460bf4e59ae6e3d653f40ff27ccf0bdce1deeb2b6d71e3ca6a6edbc44ee3
7
- data.tar.gz: 85d4c3d19eb02499608dd140c36f2190ca94470086cd17a881c3c51626665c36eb6d013543f705a6a651673c74ce1879d5d430debbf8a7cf8e5fd595d2e6ce28
6
+ metadata.gz: bef3e7efafbf38944a2c3b89a366502527a1263ef523748a28a01b3fe7e330f08335f5b2845d847c9996b7d99bc222e71841b04257846f1270008a393fa7d191
7
+ data.tar.gz: de5fe855a40bce77bd853d9a61b933a708b96f1eb7eadbac27305ef34e815a50983428b8eaff59e1618cb4e36d213772115cc37d4ad8d01a1ee698002e9caf28
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
1
  ## [0.0.1] - 2021-03-06
2
2
 
3
3
  - Initial release
4
+
5
+ ## [0.0.2] - 2021-03-09
6
+
7
+ - Add a CLI to the gem to run the gem's operations
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # DEV.to Interactions to Orbit Workspace
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/dev_orbit.svg)](https://badge.fury.io/rb/dev_orbit)
4
+ [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](code_of_conduct.md)
5
+
3
6
  This is a Ruby gem that can be used to integrate your DEV interactions, like DEV comments on blog posts, into your organization's Orbit workspace.
4
7
 
5
8
  ## Installation
@@ -45,6 +48,16 @@ This method will fetch all your articles from DEV, gather their respective comme
45
48
 
46
49
  You can run this a daily cron job, for example, to add your newest DEV comments as activities in your Orbit workspace.
47
50
 
51
+ ### CLI
52
+
53
+ You can also use the built-in CLI to perform the following operations:
54
+
55
+ * Check for new DEV comments and post them to Orbit
56
+
57
+ ```bash
58
+ $ ORBIT_API_KEY='...' ORBIT_WORKSPACE='...' DEV_API_KEY='...' DEV_USERNAME='...' bundle exec dev_orbit --check-comments
59
+ ```
60
+
48
61
  ## Contributing
49
62
 
50
63
  Bug reports and pull requests are welcome on GitHub at https://github.com/bencgreenberg/dev_orbit. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/bencgreenberg/dev_orbit/blob/master/CODE_OF_CONDUCT.md).
data/bin/dev_orbit ADDED
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env ruby
2
+ require 'optparse'
3
+
4
+ check_comments = false
5
+
6
+ options = {}
7
+ choices = OptionParser.new do |opts|
8
+ opts.banner = "Usage: dev_orbit --check-comments"
9
+ opts.on("-h", "--help", "Prints help instructions") do
10
+ puts opts
11
+ exit
12
+ end
13
+ opts.on("--check-comments", "Check for new DEV comments") do
14
+ check_comments = true
15
+ end
16
+ end.parse!
17
+
18
+ $LOAD_PATH.unshift(File.expand_path('../lib/dev_orbit', __dir__))
19
+
20
+ require_relative '../lib/dev_orbit'
21
+ require_relative '../scripts/check_comments'
22
+
23
+ if check_comments
24
+ puts "Checking for new DEV comments within the past day and posting them to your Orbit workspace..."
25
+ %x[ ruby scripts/check_comments.rb ]
26
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DevOrbit
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "dev_orbit"
5
+
6
+ client = DevOrbit::Client.new
7
+
8
+ response = client.comments
9
+
10
+ puts response
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev_orbit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Greenberg
@@ -113,6 +113,7 @@ files:
113
113
  - README.md
114
114
  - Rakefile
115
115
  - bin/console
116
+ - bin/dev_orbit
116
117
  - bin/setup
117
118
  - dev_orbit.gemspec
118
119
  - lib/dev_orbit.rb
@@ -121,6 +122,7 @@ files:
121
122
  - lib/dev_orbit/interactions/comment.rb
122
123
  - lib/dev_orbit/orbit.rb
123
124
  - lib/dev_orbit/version.rb
125
+ - scripts/check_comments.rb
124
126
  homepage: https://github.com/bencgreenberg/dev_orbit
125
127
  licenses:
126
128
  - MIT