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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db01c3fb2289f7524cc5f34d0f41fd3a724a26ae4480916584866d30af239481
4
- data.tar.gz: 036de3cf5d009228d06c6a307bf71bc9d3740a09298e4b65ca3a63edb93167c4
3
+ metadata.gz: cb7281cdf13fe8dd20c0036f525ad702b410321d372883610ccb3c59add18625
4
+ data.tar.gz: 9acd105a3e53f679b5a44ed5d0f058f48f2a092520ac096d406c61827598373e
5
5
  SHA512:
6
- metadata.gz: 017e76e6e9993e412dea53c790cd954109a43895797c5d1d8e6c6d694cb02564bbe8b3f93bd623c2220deb22008910f72bc57fedcdd2d787477f91ab1ab38449
7
- data.tar.gz: caff821872e3671421d8b6456a159e92e5b3eb891811c742ba3973ee77929acb6abc9600b5c701413e632d7e1b265bbfd9260397b8caf4410c90d682026d3413
6
+ metadata.gz: 9bdc8ed7783ab594a455c6f1fe1173a04d8bbaf52236e1595f4aa4a251357ca794e6d2f4db44c7b59065d1ced1796bcb203f9a1bebdcce496200846f97d2dd66
7
+ data.tar.gz: 2a536537155a5d79b7d2c9614285413c3d4dbdf52485c8a626365cea0d3dbe04a471727a6e19754d24d304d8464045548d81bb604bce143c51df55081387725a
data/Gemfile CHANGED
@@ -5,7 +5,6 @@ source "https://rubygems.org"
5
5
  # Specify your gem's dependencies in everylog_wrapper.gemspec
6
6
  gemspec
7
7
 
8
- gem "dotenv", "~> 2.1"
9
8
  gem "httparty", "~> 0.20.0"
10
9
  gem "rake", "~> 13.0"
11
10
  gem "rubocop", "~> 1.21"
data/Gemfile.lock CHANGED
@@ -1,8 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- everylog_wrapper (0.1.0)
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
- TODO: Write usage instructions here
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/[USERNAME]/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).
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class EverylogWrapper
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
@@ -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
- projectId: "menuclick24",
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
- 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
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.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-12 00:00:00.000000000 Z
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