cronjob_service 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dca50c1c7a352428086b15367baac1a8a61ff5bd
4
- data.tar.gz: f69071f0b2749976d61d39a4bf3be49a308af9d4
3
+ metadata.gz: b7dbd0e2e3892ff18428b830d033d2b1672660e1
4
+ data.tar.gz: a46909e8a2a5b45a4c6e241ff3759cc3934910fd
5
5
  SHA512:
6
- metadata.gz: 55e4a9f6c988ee3efb060b867dc1011cf0f6684c0b521b67d54a542e1c542c2b822e236d1dbeed571b14bee30142fd95ac78e6516f37c91e5cdf16170315a915
7
- data.tar.gz: 6f6ddb4e9c50e73845c474602455c23edae526801de45c11eda3959b1ce119316bdfb40d21c19079e04ee9fcb139cf7ed75b3d3e82f3f2db12781aac504e9fd7
6
+ metadata.gz: 1c9fb1eaa5760691493443e0f28048402042ec8c7cae7117f7ed374186b0e15ed620218934d88392133fffbbb8fddd6e98143d4eac5c7174a77bd23d5ac3bf42
7
+ data.tar.gz: 8488e9fbc46b987adc2f73151aa7734366eeee6c58a54464c5f521cd0bcc8b661ba00a60daf983e88319e507c81506993aa2f46431e010ce3cf9b218b4e00046
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cronjob_service (2.0.0)
4
+ cronjob_service (2.0.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -2,6 +2,9 @@
2
2
 
3
3
  require "open-uri"
4
4
  require "cronjob_service/version"
5
+ require 'net/http'
6
+ require 'uri'
7
+ require 'json'
5
8
 
6
9
  module CronjobService
7
10
  class Notifier
@@ -14,11 +17,17 @@ module CronjobService
14
17
  post_url = ["#{base_url}/#{project_id}?title=#{cron_identifier}", parameterized_options].join("&")
15
18
 
16
19
  begin
17
- open(post_url).read
18
- rescue
19
- puts "https://dashboard.smart-village.app ist nicht erreichbar"
20
+ uri = URI.parse(post_url)
21
+ http = Net::HTTP.new(uri.host, uri.port)
22
+ http.use_ssl = true
23
+ request = Net::HTTP::Post.new(uri.request_uri, {})
24
+ request.body = ({ title: cron_identifier }.merge(options)).to_json
25
+
26
+ # Send the request
27
+ response = http.request(request)
28
+ rescue => e
29
+ puts "https://dashboard.smart-village.app Error: #{e.inspect}"
20
30
  end
21
31
  end
22
-
23
32
  end
24
33
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module CronjobService
4
- VERSION = "2.0.0"
4
+ VERSION = "2.0.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cronjob_service
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Metz