cronjob_service 2.0.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: dca50c1c7a352428086b15367baac1a8a61ff5bd
4
+ data.tar.gz: f69071f0b2749976d61d39a4bf3be49a308af9d4
5
+ SHA512:
6
+ metadata.gz: 55e4a9f6c988ee3efb060b867dc1011cf0f6684c0b521b67d54a542e1c542c2b822e236d1dbeed571b14bee30142fd95ac78e6516f37c91e5cdf16170315a915
7
+ data.tar.gz: 6f6ddb4e9c50e73845c474602455c23edae526801de45c11eda3959b1ce119316bdfb40d21c19079e04ee9fcb139cf7ed75b3d3e82f3f2db12781aac504e9fd7
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in cronjob_service.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,20 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ cronjob_service (2.0.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ rake (10.5.0)
10
+
11
+ PLATFORMS
12
+ ruby
13
+
14
+ DEPENDENCIES
15
+ bundler (~> 1.7)
16
+ cronjob_service!
17
+ rake (~> 10.0)
18
+
19
+ BUNDLED WITH
20
+ 1.17.1
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Marco Metz
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # CronjobService
2
+
3
+ Pushes a Notification to the DashboardApp to notify that a chronjob occured
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'cronjob_service', git: "ssh://git@git.ikusei.de:7999/ik/cronjobnotificationtodashboard.git"
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ ## Usage
18
+
19
+ ```ruby
20
+ CronjobService::Notifier.push("project_id", "cronjob_tilte")
21
+ ```
22
+
23
+ ```ruby
24
+ CronjobService::Notifier.push("project_id", "cronjob_tilte", description: "My Description", foo: "bar")
25
+ ```
26
+
27
+
28
+ ## Develop
29
+ ```ruby
30
+ rake console
31
+ ```
data/Rakefile ADDED
@@ -0,0 +1,5 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ task :console do
4
+ exec "irb -r cronjob_service -I ./lib"
5
+ end
@@ -0,0 +1,24 @@
1
+ # encoding: utf-8
2
+
3
+ # coding: utf-8
4
+ lib = File.expand_path('../lib', __FILE__)
5
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
+ require 'cronjob_service/version'
7
+
8
+ Gem::Specification.new do |spec|
9
+ spec.name = "cronjob_service"
10
+ spec.version = CronjobService::VERSION
11
+ spec.authors = ["Marco Metz"]
12
+ spec.email = ["marco.metz@gmail.com"]
13
+ spec.summary = %q{Push a Notification to dashboard app}
14
+ spec.description = %q{Push a Notification to dashboard app at https://dashboard.smart-village.app/cronjobs}
15
+ spec.homepage = "https://git.ikusei.de/projects/IK/repos/cronjobnotificationtodashboard/browse"
16
+ spec.license = "MIT"
17
+
18
+ spec.files = `git ls-files -z`.split("\x0")
19
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
+ spec.require_paths = ["lib"]
22
+ spec.add_development_dependency "bundler", "~> 1.7"
23
+ spec.add_development_dependency "rake", "~> 10.0"
24
+ end
@@ -0,0 +1,24 @@
1
+ # encoding: utf-8
2
+
3
+ require "open-uri"
4
+ require "cronjob_service/version"
5
+
6
+ module CronjobService
7
+ class Notifier
8
+ def self.push(project_id, cron_identifier, options = {})
9
+ raise "project_id missing" if project_id.nil?
10
+ raise "cron_identifier missing" if cron_identifier.nil?
11
+
12
+ base_url = "https://dashboard.smart-village.app/api/v1/cronjob"
13
+ parameterized_options = options.map { |key, value| "&#{key}=#{value}"}.join
14
+ post_url = ["#{base_url}/#{project_id}?title=#{cron_identifier}", parameterized_options].join("&")
15
+
16
+ begin
17
+ open(post_url).read
18
+ rescue
19
+ puts "https://dashboard.smart-village.app ist nicht erreichbar"
20
+ end
21
+ end
22
+
23
+ end
24
+ end
@@ -0,0 +1,5 @@
1
+ # encoding: utf-8
2
+
3
+ module CronjobService
4
+ VERSION = "2.0.0"
5
+ end
metadata ADDED
@@ -0,0 +1,80 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cronjob_service
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Marco Metz
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-05-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description: Push a Notification to dashboard app at https://dashboard.smart-village.app/cronjobs
42
+ email:
43
+ - marco.metz@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - Gemfile
49
+ - Gemfile.lock
50
+ - LICENSE.txt
51
+ - README.md
52
+ - Rakefile
53
+ - cronjob_service.gemspec
54
+ - lib/cronjob_service.rb
55
+ - lib/cronjob_service/version.rb
56
+ homepage: https://git.ikusei.de/projects/IK/repos/cronjobnotificationtodashboard/browse
57
+ licenses:
58
+ - MIT
59
+ metadata: {}
60
+ post_install_message:
61
+ rdoc_options: []
62
+ require_paths:
63
+ - lib
64
+ required_ruby_version: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ requirements: []
75
+ rubyforge_project:
76
+ rubygems_version: 2.4.5
77
+ signing_key:
78
+ specification_version: 4
79
+ summary: Push a Notification to dashboard app
80
+ test_files: []