dev_orbit 0.1.0 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/Gemfile +2 -0
- data/Gemfile.lock +26 -9
- data/README.md +4 -1
- data/bin/dev_orbit +1 -0
- data/dev_orbit.gemspec +1 -0
- data/lib/dev_orbit.rb +2 -0
- data/lib/dev_orbit/interactions/comment.rb +8 -17
- data/lib/dev_orbit/interactions/follower.rb +1 -0
- data/lib/dev_orbit/version.rb +1 -1
- data/readme-images/new-comment-screenshot.png +0 -0
- data/readme-images/ways-to-use.png +0 -0
- metadata +18 -4
- data/bin/console +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d171db649e66e6a5c982a44e8188b40526f0d0714c2bc1910587ba892d44e2b7
|
4
|
+
data.tar.gz: dccbdb226266f0cad7551aa765cad38f75cc21b226de4dfd13f2ee4b07dc27fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3479322756252837970a5fd3baaf07d7dbc55333a640969fa8f814a320f10763497df0b673fe811dfe420b5f7f2c11447ec435d6d590f3cede3bf729e4756fb
|
7
|
+
data.tar.gz: 294b99070ad389f7abe9f031a4a52c8f6c3e4d52b2b0beec29b742767fe53830f203cd51827c3f08d976e9a4774faad4ae4ca2576ba515ee4f33e7fa3e86b05b
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,24 +1,25 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dev_orbit (0.
|
4
|
+
dev_orbit (0.1.3)
|
5
5
|
actionview (~> 6.1)
|
6
6
|
activesupport (~> 6.1)
|
7
7
|
http (~> 4.4)
|
8
8
|
json (~> 2.5)
|
9
|
+
orbit_activities (~> 0.1)
|
9
10
|
thor (~> 1.1)
|
10
11
|
zeitwerk (~> 2.4)
|
11
12
|
|
12
13
|
GEM
|
13
14
|
remote: https://rubygems.org/
|
14
15
|
specs:
|
15
|
-
actionview (6.1.3)
|
16
|
-
activesupport (= 6.1.3)
|
16
|
+
actionview (6.1.3.2)
|
17
|
+
activesupport (= 6.1.3.2)
|
17
18
|
builder (~> 3.1)
|
18
19
|
erubi (~> 1.4)
|
19
20
|
rails-dom-testing (~> 2.0)
|
20
21
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
21
|
-
activesupport (6.1.3)
|
22
|
+
activesupport (6.1.3.2)
|
22
23
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
23
24
|
i18n (>= 1.6, < 2)
|
24
25
|
minitest (>= 5.1)
|
@@ -52,15 +53,28 @@ GEM
|
|
52
53
|
http-form_data (2.3.0)
|
53
54
|
http-parser (1.2.3)
|
54
55
|
ffi-compiler (>= 1.0, < 2.0)
|
55
|
-
i18n (1.8.
|
56
|
+
i18n (1.8.10)
|
56
57
|
concurrent-ruby (~> 1.0)
|
57
58
|
json (2.5.1)
|
58
|
-
loofah (2.9.
|
59
|
+
loofah (2.9.1)
|
59
60
|
crass (~> 1.0.2)
|
60
61
|
nokogiri (>= 1.5.9)
|
61
62
|
minitest (5.14.4)
|
62
|
-
nokogiri (1.11.
|
63
|
+
nokogiri (1.11.5-arm64-darwin)
|
63
64
|
racc (~> 1.4)
|
65
|
+
nokogiri (1.11.5-x86_64-darwin)
|
66
|
+
racc (~> 1.4)
|
67
|
+
nokogiri (1.11.5-x86_64-linux)
|
68
|
+
racc (~> 1.4)
|
69
|
+
nokogiri (1.11.3-x86_64-darwin)
|
70
|
+
racc (~> 1.4)
|
71
|
+
nokogiri (1.11.3-x86_64-linux)
|
72
|
+
racc (~> 1.4)
|
73
|
+
orbit_activities (0.1.0)
|
74
|
+
http (~> 4.4)
|
75
|
+
json (~> 2.5)
|
76
|
+
rake (~> 13.0)
|
77
|
+
zeitwerk (~> 2.4)
|
64
78
|
parallel (1.20.1)
|
65
79
|
parser (3.0.0.0)
|
66
80
|
ast (~> 2.4.1)
|
@@ -74,7 +88,7 @@ GEM
|
|
74
88
|
rainbow (3.0.0)
|
75
89
|
rake (13.0.3)
|
76
90
|
regexp_parser (2.1.1)
|
77
|
-
rexml (3.2.
|
91
|
+
rexml (3.2.5)
|
78
92
|
rspec (3.10.0)
|
79
93
|
rspec-core (~> 3.10.0)
|
80
94
|
rspec-expectations (~> 3.10.0)
|
@@ -114,15 +128,18 @@ GEM
|
|
114
128
|
zeitwerk (2.4.2)
|
115
129
|
|
116
130
|
PLATFORMS
|
131
|
+
arm64-darwin-20
|
117
132
|
x86_64-darwin-19
|
133
|
+
x86_64-linux
|
118
134
|
|
119
135
|
DEPENDENCIES
|
120
136
|
byebug
|
121
137
|
dev_orbit!
|
138
|
+
orbit_activities
|
122
139
|
rake (~> 13.0)
|
123
140
|
rspec (~> 3.4)
|
124
141
|
rubocop (~> 1.7)
|
125
142
|
webmock (~> 3.12)
|
126
143
|
|
127
144
|
BUNDLED WITH
|
128
|
-
2.2.
|
145
|
+
2.2.16
|
data/README.md
CHANGED
@@ -4,11 +4,14 @@
|
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/dev_orbit.svg)](https://badge.fury.io/rb/dev_orbit)
|
5
5
|
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](code_of_conduct.md)
|
6
6
|
|
7
|
-
|
7
|
+
Add your DEV interactions into your Orbit workspace with this community-built integration.
|
8
|
+
|
9
|
+
![New DEV blog post comment in Orbit screenshot](readme-images/new-comment-screenshot.png)
|
8
10
|
|
9
11
|
|<p align="left">:sparkles:</p> This is a *community project*. The Orbit team does its best to maintain it and keep it up to date with any recent API changes.<br/><br/>We welcome community contributions to make sure that it stays current. <p align="right">:sparkles:</p>|
|
10
12
|
|-----------------------------------------|
|
11
13
|
|
14
|
+
![There are three ways to use this integration. Install package - build and run your own applications. Run the CLI - run on-demand directly from your terminal. Schedule an automation with GitHub - get started in minutes - no coding required](readme-images/ways-to-use.png)
|
12
15
|
## Installation
|
13
16
|
|
14
17
|
Add this line to your application's Gemfile:
|
data/bin/dev_orbit
CHANGED
@@ -23,6 +23,7 @@ $LOAD_PATH.unshift(File.expand_path('../lib/dev_orbit', __dir__))
|
|
23
23
|
|
24
24
|
require_relative '../lib/dev_orbit'
|
25
25
|
require_relative '../scripts/check_comments'
|
26
|
+
require_relative '../scripts/check_followers'
|
26
27
|
|
27
28
|
if check_comments
|
28
29
|
puts "Checking for new DEV comments within the past day and posting them to your Orbit workspace..."
|
data/dev_orbit.gemspec
CHANGED
@@ -35,6 +35,7 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.add_dependency "json", "~> 2.5"
|
36
36
|
spec.add_dependency "zeitwerk", "~> 2.4"
|
37
37
|
spec.add_dependency "thor", "~> 1.1"
|
38
|
+
spec.add_dependency "orbit_activities", "~> 0.1"
|
38
39
|
spec.add_development_dependency "rspec", "~> 3.4"
|
39
40
|
spec.add_development_dependency "webmock", "~> 3.12"
|
40
41
|
|
data/lib/dev_orbit.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "net/http"
|
4
3
|
require "json"
|
5
4
|
require "action_view"
|
6
5
|
require_relative "../utils"
|
@@ -22,28 +21,20 @@ module DevOrbit
|
|
22
21
|
end
|
23
22
|
|
24
23
|
def after_initialize!
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
req["Authorization"] = "Bearer #{@api_key}"
|
33
|
-
|
34
|
-
req.body = construct_body
|
35
|
-
|
36
|
-
req.body = req.body.to_json
|
37
|
-
|
38
|
-
response = http.request(req)
|
39
|
-
|
40
|
-
JSON.parse(response.body) if DevOrbit::Utils.valid_json?(response.body)
|
24
|
+
OrbitActivities::Request.new(
|
25
|
+
api_key: @api_key,
|
26
|
+
workspace_id: @workspace_id,
|
27
|
+
user_agent: "community-ruby-dev-orbit/#{DevOrbit::VERSION}",
|
28
|
+
action: "new_activity",
|
29
|
+
body: construct_body.to_json
|
30
|
+
)
|
41
31
|
end
|
42
32
|
|
43
33
|
def construct_body
|
44
34
|
hash = {
|
45
35
|
activity: {
|
46
36
|
activity_type: "dev:comment",
|
37
|
+
tags: ["channel:dev"],
|
47
38
|
key: "dev-comment-#{@id}",
|
48
39
|
title: "Commented on the DEV blog post: #{@article_title}",
|
49
40
|
description: @body,
|
data/lib/dev_orbit/version.rb
CHANGED
Binary file
|
Binary file
|
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.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Orbit DevRel
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-05-
|
12
|
+
date: 2021-05-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -95,6 +95,20 @@ dependencies:
|
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '1.1'
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: orbit_activities
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - "~>"
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0.1'
|
105
|
+
type: :runtime
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - "~>"
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0.1'
|
98
112
|
- !ruby/object:Gem::Dependency
|
99
113
|
name: rspec
|
100
114
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,7 +142,6 @@ description: This gem integrates DEV blog interactions like comments, etc. into
|
|
128
142
|
email:
|
129
143
|
- devrel@orbit.love
|
130
144
|
executables:
|
131
|
-
- console
|
132
145
|
- dev_orbit
|
133
146
|
- setup
|
134
147
|
extensions: []
|
@@ -146,7 +159,6 @@ files:
|
|
146
159
|
- LICENSE.txt
|
147
160
|
- README.md
|
148
161
|
- Rakefile
|
149
|
-
- bin/console
|
150
162
|
- bin/dev_orbit
|
151
163
|
- bin/setup
|
152
164
|
- dev_orbit.gemspec
|
@@ -158,6 +170,8 @@ files:
|
|
158
170
|
- lib/dev_orbit/orbit.rb
|
159
171
|
- lib/dev_orbit/utils.rb
|
160
172
|
- lib/dev_orbit/version.rb
|
173
|
+
- readme-images/new-comment-screenshot.png
|
174
|
+
- readme-images/ways-to-use.png
|
161
175
|
- scripts/check_comments.rb
|
162
176
|
- scripts/check_followers.rb
|
163
177
|
homepage: https://github.com/orbit-love/community-ruby-dev-orbit
|
data/bin/console
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require "bundler/setup"
|
5
|
-
require "dev_orbit"
|
6
|
-
|
7
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
-
# with your gem easier. You can also use a different console, if you like.
|
9
|
-
|
10
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
-
# require "pry"
|
12
|
-
# Pry.start
|
13
|
-
|
14
|
-
require "irb"
|
15
|
-
IRB.start(__FILE__)
|