everylog_wrapper 0.1.1 → 0.1.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 +4 -4
- data/Gemfile +0 -1
- data/Gemfile.lock +1 -4
- data/README.md +22 -2
- data/lib/everylog_wrapper/version.rb +1 -1
- data/lib/everylog_wrapper.rb +10 -16
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb7281cdf13fe8dd20c0036f525ad702b410321d372883610ccb3c59add18625
|
4
|
+
data.tar.gz: 9acd105a3e53f679b5a44ed5d0f058f48f2a092520ac096d406c61827598373e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bdc8ed7783ab594a455c6f1fe1173a04d8bbaf52236e1595f4aa4a251357ca794e6d2f4db44c7b59065d1ced1796bcb203f9a1bebdcce496200846f97d2dd66
|
7
|
+
data.tar.gz: 2a536537155a5d79b7d2c9614285413c3d4dbdf52485c8a626365cea0d3dbe04a471727a6e19754d24d304d8464045548d81bb604bce143c51df55081387725a
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
everylog_wrapper (0.1.
|
5
|
-
dotenv (~> 2.1)
|
4
|
+
everylog_wrapper (0.1.1)
|
6
5
|
httparty (~> 0.20.0)
|
7
6
|
|
8
7
|
GEM
|
@@ -11,7 +10,6 @@ GEM
|
|
11
10
|
ast (2.4.2)
|
12
11
|
coderay (1.1.3)
|
13
12
|
diff-lcs (1.5.0)
|
14
|
-
dotenv (2.7.6)
|
15
13
|
httparty (0.20.0)
|
16
14
|
mime-types (~> 3.0)
|
17
15
|
multi_xml (>= 0.5.2)
|
@@ -61,7 +59,6 @@ PLATFORMS
|
|
61
59
|
x86_64-darwin-21
|
62
60
|
|
63
61
|
DEPENDENCIES
|
64
|
-
dotenv (~> 2.1)
|
65
62
|
everylog_wrapper!
|
66
63
|
httparty (~> 0.20.0)
|
67
64
|
pry (~> 0.13.1)
|
data/README.md
CHANGED
@@ -14,9 +14,29 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
14
14
|
|
15
15
|
$ gem install everylog_wrapper
|
16
16
|
|
17
|
+
Set an environment variable called `EVERYLOG_KEY` which should contain your Everylog API key.
|
18
|
+
|
17
19
|
## Usage
|
18
20
|
|
19
|
-
|
21
|
+
The `project_id`, `title`, `summary` and `body` are mandatory fields, while `tags`, `link` and `push` are optional.
|
22
|
+
|
23
|
+
```
|
24
|
+
EverylogWrapper.send_notification(
|
25
|
+
project_id: 'myProject'
|
26
|
+
title: 'Lorem',
|
27
|
+
summary: 'Lorem ipsum',
|
28
|
+
body: 'Lorem ipsum dolor sit amet'
|
29
|
+
)
|
30
|
+
```
|
31
|
+
|
32
|
+
### Fields and their data types:
|
33
|
+
- project_id - String
|
34
|
+
- title - String
|
35
|
+
- summary - String
|
36
|
+
- body - String
|
37
|
+
- tags - Array
|
38
|
+
- link - String
|
39
|
+
- push - Boolean
|
20
40
|
|
21
41
|
## Development
|
22
42
|
|
@@ -26,7 +46,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
26
46
|
|
27
47
|
## Contributing
|
28
48
|
|
29
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
49
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/daktari01/everylog_wrapper. 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/[USERNAME]/everylog_wrapper/blob/main/CODE_OF_CONDUCT.md).
|
30
50
|
|
31
51
|
## License
|
32
52
|
|
data/lib/everylog_wrapper.rb
CHANGED
@@ -1,18 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "everylog_wrapper/version"
|
4
|
-
require "dotenv"
|
5
4
|
require "json"
|
6
5
|
require "httparty"
|
7
6
|
require "pry"
|
8
|
-
Dotenv.load
|
9
7
|
|
10
8
|
class EverylogWrapper
|
11
|
-
def self.send_notification(title:, summary:, body:, tags: [], link: "", push: false)
|
9
|
+
def self.send_notification(project_id:, title:, summary:, body:, tags: [], link: "", push: false)
|
12
10
|
api_key = ENV["EVERYLOG_KEY"]
|
13
11
|
everylog_url = "https://api.everylog.io/api/v1/log-entries"
|
14
12
|
body = {
|
15
|
-
|
13
|
+
project_id: project_id,
|
16
14
|
title: title,
|
17
15
|
summary: summary,
|
18
16
|
body: body,
|
@@ -20,17 +18,13 @@ class EverylogWrapper
|
|
20
18
|
link: link,
|
21
19
|
push: push
|
22
20
|
}
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
response
|
21
|
+
HTTParty.post(everylog_url,
|
22
|
+
{
|
23
|
+
body: body.to_json,
|
24
|
+
headers: {
|
25
|
+
"Content-Type": "application/json",
|
26
|
+
"Authorization": "Bearer #{api_key}"
|
27
|
+
}
|
28
|
+
})
|
32
29
|
end
|
33
30
|
end
|
34
|
-
|
35
|
-
|
36
|
-
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: everylog_wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Dindi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: dotenv
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '2.1'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '2.1'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: httparty
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|