huginn_ruby_agent 0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/huginn_ruby_agent/ruby_agent.rb +29 -0
- data/lib/huginn_ruby_agent.rb +6 -0
- data/spec/ruby_agent_spec.rb +15 -0
- metadata +102 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 46786fbef6ebd0f956499b17915fa8970f4285795073e3f55a9f6d026e8f9597
|
4
|
+
data.tar.gz: 21cf1e531eb5652e34eecf0a8b0151458902f4bee65fe69b5c4110cfe5b2c0f5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2a5c0ebee329f780bdc08637a03803de430cf16753f27f14456380c4cedd598b85a8398a4eb94c1c4355e75a9fc095279e0be90c4032872d8c3159ba934f879b
|
7
|
+
data.tar.gz: 2ecc2518b29ef5f6edfc432325670f8ad09d7f29bb70cd25bc0d09329a87dae0cf9f8053714fd1a335772ce06fd3e106533d9d273ac29034f607aa6399ed433d
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Agents
|
4
|
+
class RubyAgent < Agent
|
5
|
+
default_schedule '12h'
|
6
|
+
|
7
|
+
description <<-MD
|
8
|
+
Add a Agent description here
|
9
|
+
MD
|
10
|
+
|
11
|
+
def default_options
|
12
|
+
{}
|
13
|
+
end
|
14
|
+
|
15
|
+
def validate_options; end
|
16
|
+
|
17
|
+
def working?
|
18
|
+
# Implement me! Maybe one of these next two lines would be a good fit?
|
19
|
+
# checked_without_error?
|
20
|
+
# received_event_without_error?
|
21
|
+
end
|
22
|
+
|
23
|
+
# def check
|
24
|
+
# end
|
25
|
+
|
26
|
+
# def receive(incoming_events)
|
27
|
+
# end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rails_helper'
|
4
|
+
require 'huginn_agent/spec_helper'
|
5
|
+
|
6
|
+
describe Agents::RubyAgent do
|
7
|
+
before(:each) do
|
8
|
+
@valid_options = Agents::RubyAgent.new.default_options
|
9
|
+
@checker = Agents::RubyAgent.new(name: 'RubyAgent', options: @valid_options)
|
10
|
+
@checker.user = users(:bob)
|
11
|
+
@checker.save!
|
12
|
+
end
|
13
|
+
|
14
|
+
pending 'add specs here'
|
15
|
+
end
|
metadata
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: huginn_ruby_agent
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '0.1'
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Sergei O. Udalov
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-12-26 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: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rubocop
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: huginn_agent
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: Now you can write agent with Ruby-code
|
70
|
+
email:
|
71
|
+
- sergei@udalovs.ru
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- lib/huginn_ruby_agent.rb
|
77
|
+
- lib/huginn_ruby_agent/ruby_agent.rb
|
78
|
+
- spec/ruby_agent_spec.rb
|
79
|
+
homepage: https://github.com/sergio-fry/huginn_ruby_agent
|
80
|
+
licenses: []
|
81
|
+
metadata: {}
|
82
|
+
post_install_message:
|
83
|
+
rdoc_options: []
|
84
|
+
require_paths:
|
85
|
+
- lib
|
86
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
requirements: []
|
97
|
+
rubygems_version: 3.3.7
|
98
|
+
signing_key:
|
99
|
+
specification_version: 4
|
100
|
+
summary: Ruby Agent for Huginn automation platform
|
101
|
+
test_files:
|
102
|
+
- spec/ruby_agent_spec.rb
|