everylog_wrapper 0.1.0 → 0.1.1

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: 2f54b4151ae02d886315ebaebc4cd4f25f01905f7ab82bb2ad599dac78370dba
4
- data.tar.gz: 996f1afad9933b4601be34fb17f15dc2f684e15aeeaf52500dc7695e4a46dfe0
3
+ metadata.gz: db01c3fb2289f7524cc5f34d0f41fd3a724a26ae4480916584866d30af239481
4
+ data.tar.gz: 036de3cf5d009228d06c6a307bf71bc9d3740a09298e4b65ca3a63edb93167c4
5
5
  SHA512:
6
- metadata.gz: d0f8a9d8d8be3b19ce16d58d62ac583da3dfb4aa7a3624b76a767679edcee2660c4488aea03f648509e894d431ad4c023153f3ff368cc00163c1ad6485c14cb2
7
- data.tar.gz: 2ac5a1d99361a14068cc0e8963df04e93e307986e916368010d298f8a6930457ec6bb32864c27ac1bc3b29bb900d028e07e0c5891d90a4f142a02923be0e0113
6
+ metadata.gz: 017e76e6e9993e412dea53c790cd954109a43895797c5d1d8e6c6d694cb02564bbe8b3f93bd623c2220deb22008910f72bc57fedcdd2d787477f91ab1ab38449
7
+ data.tar.gz: caff821872e3671421d8b6456a159e92e5b3eb891811c742ba3973ee77929acb6abc9600b5c701413e632d7e1b265bbfd9260397b8caf4410c90d682026d3413
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module EverylogWrapper
4
- VERSION = "0.1.0"
3
+ class EverylogWrapper
4
+ VERSION = "0.1.1"
5
5
  end
@@ -7,42 +7,30 @@ require "httparty"
7
7
  require "pry"
8
8
  Dotenv.load
9
9
 
10
- module EverylogWrapper
11
- class Error < StandardError; end
12
- class Notification
13
- attr_accessor :title, :summary, :body, :tags, :link, :push
14
-
15
- def initialize(title:, summary:, body:, tags: [], link: "", push: false)
16
- @title = title
17
- @summary = summary
18
- @body = body
19
- @tags = tags
20
- @link = link
21
- @push = push
22
- end
23
-
24
- def send_notification
25
- api_key = ENV["EVERYLOG_KEY"]
26
- everylog_url = "https://api.everylog.io/api/v1/log-entries"
27
- body = {
28
- projectId: "menuclick24",
29
- title: @title,
30
- summary: @summary,
31
- body: @body,
32
- tags: @tags,
33
- link: @link,
34
- push: @push
35
- }
36
- response = HTTParty.post(everylog_url,
37
- {
38
- body: body.to_json,
39
- headers: {
40
- "Content-Type": "application/json",
41
- "Authorization": "Bearer #{api_key}"
42
- }
43
- })
44
- response
45
- end
10
+ class EverylogWrapper
11
+ def self.send_notification(title:, summary:, body:, tags: [], link: "", push: false)
12
+ api_key = ENV["EVERYLOG_KEY"]
13
+ everylog_url = "https://api.everylog.io/api/v1/log-entries"
14
+ body = {
15
+ projectId: "menuclick24",
16
+ title: title,
17
+ summary: summary,
18
+ body: body,
19
+ tags: tags,
20
+ link: link,
21
+ push: push
22
+ }
23
+ response = HTTParty.post(everylog_url,
24
+ {
25
+ body: body.to_json,
26
+ headers: {
27
+ "Content-Type": "application/json",
28
+ "Authorization": "Bearer #{api_key}"
29
+ }
30
+ })
31
+ response
46
32
  end
47
33
  end
48
34
 
35
+
36
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: everylog_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Dindi