huginn_agent 0.6.1 → 0.6.3
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 +5 -5
- data/CHANGELOG.md +54 -8
- data/lib/huginn_agent/cli/new.rb +1 -1
- data/lib/huginn_agent/patches/coverage.rb +8 -5
- data/lib/huginn_agent/spec_runner.rb +14 -7
- data/lib/huginn_agent/templates/newagent/Rakefile.tt +1 -1
- data/lib/huginn_agent/templates/newagent/github/workflows/ci.yml.tt +80 -0
- data/lib/huginn_agent/templates/newagent/lib/new_agent/new_agent.rb.tt +1 -1
- data/lib/huginn_agent/templates/newagent/lib/new_agent.rb.tt +3 -0
- data/lib/huginn_agent/version.rb +1 -1
- data/lib/huginn_agent.rb +14 -2
- data/spec/lib/huginn_agent/cli/new_spec.rb +8 -8
- data/spec/lib/huginn_agent/spec_runner_spec.rb +34 -1
- data/spec/lib/huginn_agent_spec.rb +4 -4
- metadata +21 -40
- data/lib/huginn_agent/templates/newagent/travis.yml.tt +0 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: ff01c359c18a7262e7e5ae3e860f4dbf91dc1674e38153f9fdce89697189b823
|
|
4
|
+
data.tar.gz: dd76eac597d165beb77930df9eb84d1d179ad5b099d8ab456b0b06d03165960d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f9eeb5262cca23d22c08c07195460d1769b5a324479b2b74db69986ca2b1b1447e19686be9aaef3324209eebcfec8e7561f624e3b68effe43a9d8bc4259e25dc
|
|
7
|
+
data.tar.gz: 1903c328c30a797ad0470840c7c82e1c1a89f5e3ad806166a5c922d6183bf3c9bd50074dfbe3a2c38aca48e69a4b5bda9478fc4b243e84235263e9c36c753e08
|
data/CHANGELOG.md
CHANGED
|
@@ -2,12 +2,55 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## [0.6.3] - 2026-04-05
|
|
6
6
|
|
|
7
7
|
### Added
|
|
8
8
|
|
|
9
|
+
- Generate a GitHub Actions CI workflow for new Agent gems
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Replace the generated Travis CI config with GitHub Actions
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- Make `SpecRunner` compatible with current Bundler behavior in CI
|
|
18
|
+
- Remove stale `spec/huginn/db/schema.rb` before running database setup
|
|
19
|
+
- Skip Coveralls initialization when the gem is unavailable
|
|
20
|
+
|
|
21
|
+
## [0.6.2] - 2026-04-05
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Define `Rails::Engine` in generated Agent gems (@alessio-signorini)
|
|
26
|
+
- Make compatible with Rails 6 & 7 Zeitwerk loader (@overhacked)
|
|
27
|
+
|
|
9
28
|
### Changed
|
|
10
29
|
|
|
30
|
+
- Remove Rails classic loader fallback in favor of Zeitwerk only
|
|
31
|
+
- Replace deprecated `Bundler.with_clean_env` with `Bundler.with_unbundled_env`
|
|
32
|
+
- Loosen development dependency version constraints
|
|
33
|
+
- Use shallow clone (`--depth 1`) when cloning and fetching the Huginn source for running specs
|
|
34
|
+
- Migrate CI from Travis to GitHub Actions
|
|
35
|
+
- Add RubyGems trusted publishing workflow
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- Fix invalid argument for `default_schedule` (@sfischer13)
|
|
40
|
+
- Update URLs (@sfischer13)
|
|
41
|
+
- Fix typo in README (@pacharanero)
|
|
42
|
+
- Replace deprecated `File.exists?` with `File.exist?`
|
|
43
|
+
|
|
44
|
+
## [0.6.1] - 2017-09-22
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
|
|
48
|
+
- Example code for the `working` method when generating a new Agent gem
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
- Use `.env.example` file from Huginn when running the specs and no custom `.env` file is found, allows to run the specs as long as all Huginn dependencies are installed
|
|
53
|
+
|
|
11
54
|
### Fixed
|
|
12
55
|
|
|
13
56
|
## [0.6.0] - 2017-04-12
|
|
@@ -71,10 +114,13 @@ All notable changes to this project will be documented in this file.
|
|
|
71
114
|
- First official and working release
|
|
72
115
|
|
|
73
116
|
|
|
74
|
-
[Unreleased]: https://github.com/
|
|
75
|
-
[0.6.
|
|
76
|
-
[0.
|
|
77
|
-
[0.
|
|
78
|
-
[0.
|
|
79
|
-
[0.
|
|
80
|
-
[0.4.
|
|
117
|
+
[Unreleased]: https://github.com/huginn/huginn_agent/compare/v0.6.3...HEAD
|
|
118
|
+
[0.6.3]: https://github.com/huginn/huginn_agent/compare/v0.6.2...v0.6.3
|
|
119
|
+
[0.6.2]: https://github.com/huginn/huginn_agent/compare/v0.6.1...v0.6.2
|
|
120
|
+
[0.6.1]: https://github.com/huginn/huginn_agent/compare/v0.6.0...v0.6.1
|
|
121
|
+
[0.6.0]: https://github.com/huginn/huginn_agent/compare/v0.5.0...v0.6.0
|
|
122
|
+
[0.5.0]: https://github.com/huginn/huginn_agent/compare/v0.4.3...v0.5.0
|
|
123
|
+
[0.4.3]: https://github.com/huginn/huginn_agent/compare/v0.4.2...v0.4.3
|
|
124
|
+
[0.4.2]: https://github.com/huginn/huginn_agent/compare/v0.4.1...v0.4.2
|
|
125
|
+
[0.4.1]: https://github.com/huginn/huginn_agent/compare/v0.4.0...v0.4.1
|
|
126
|
+
[0.4.0]: https://github.com/huginn/huginn_agent/compare/f6e307e2ec1679367ecc43ab265b8f68d6fe12f2...v0.4.0
|
data/lib/huginn_agent/cli/new.rb
CHANGED
|
@@ -48,7 +48,7 @@ class HuginnAgent
|
|
|
48
48
|
"newagent.gemspec.tt" => "#{gem_name}.gemspec",
|
|
49
49
|
"Rakefile.tt" => "Rakefile",
|
|
50
50
|
"README.md.tt" => "README.md",
|
|
51
|
-
"
|
|
51
|
+
"github/workflows/ci.yml.tt" => ".github/workflows/ci.yml"
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
if thor.yes?(MIT_QUESTION)
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
require 'simplecov'
|
|
2
2
|
|
|
3
3
|
if !ENV['COVERAGE']
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
module
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
begin
|
|
5
|
+
require 'coveralls'
|
|
6
|
+
module Coveralls
|
|
7
|
+
module Configuration
|
|
8
|
+
def self.root
|
|
9
|
+
File.expand_path(File.join(Dir.pwd, '../..'))
|
|
10
|
+
end
|
|
9
11
|
end
|
|
10
12
|
end
|
|
13
|
+
rescue LoadError
|
|
11
14
|
end
|
|
12
15
|
end
|
|
13
16
|
|
|
@@ -10,14 +10,14 @@ class HuginnAgent
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def clone
|
|
13
|
-
unless File.
|
|
14
|
-
shell_out "git clone #{HuginnAgent.remote} -b #{HuginnAgent.branch} spec/huginn", 'Cloning huginn source ...'
|
|
13
|
+
unless File.exist?('spec/huginn/.git')
|
|
14
|
+
shell_out "git clone --depth 1 #{HuginnAgent.remote} -b #{HuginnAgent.branch} spec/huginn", 'Cloning huginn source ...'
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
def reset
|
|
19
19
|
Dir.chdir('spec/huginn') do
|
|
20
|
-
shell_out "git fetch && git reset --hard origin/#{HuginnAgent.branch}", 'Resetting Huginn source ...'
|
|
20
|
+
shell_out "git fetch --depth 1 && git reset --hard origin/#{HuginnAgent.branch}", 'Resetting Huginn source ...'
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
23
|
|
|
@@ -30,20 +30,22 @@ class HuginnAgent
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
def bundle
|
|
33
|
-
if File.
|
|
33
|
+
if File.exist?('.env')
|
|
34
34
|
shell_out "cp .env spec/huginn"
|
|
35
35
|
end
|
|
36
36
|
Dir.chdir('spec/huginn') do
|
|
37
|
-
if !File.
|
|
37
|
+
if !File.exist?('.env')
|
|
38
38
|
shell_out "cp .env.example .env"
|
|
39
39
|
end
|
|
40
|
-
shell_out "bundle
|
|
40
|
+
shell_out "bundle config set --local without 'development production'"
|
|
41
|
+
shell_out 'bundle install -j 4', 'Installing ruby gems ...'
|
|
41
42
|
end
|
|
42
43
|
|
|
43
44
|
end
|
|
44
45
|
|
|
45
46
|
def database
|
|
46
47
|
Dir.chdir('spec/huginn') do
|
|
48
|
+
remove_schema
|
|
47
49
|
shell_out('bundle exec rake db:create db:migrate', 'Creating database ...')
|
|
48
50
|
end
|
|
49
51
|
end
|
|
@@ -57,7 +59,7 @@ class HuginnAgent
|
|
|
57
59
|
def shell_out(command, message = nil, streaming_output = false)
|
|
58
60
|
print message if message
|
|
59
61
|
|
|
60
|
-
(status, output) = Bundler.
|
|
62
|
+
(status, output) = Bundler.with_unbundled_env do
|
|
61
63
|
ENV['ADDITIONAL_GEMS'] = "#{gem_name}(path: ../../)"
|
|
62
64
|
ENV['RAILS_ENV'] = 'test'
|
|
63
65
|
if streaming_output
|
|
@@ -76,5 +78,10 @@ class HuginnAgent
|
|
|
76
78
|
fail
|
|
77
79
|
end
|
|
78
80
|
end
|
|
81
|
+
|
|
82
|
+
private
|
|
83
|
+
def remove_schema
|
|
84
|
+
File.delete('db/schema.rb') if File.exist?('db/schema.rb')
|
|
85
|
+
end
|
|
79
86
|
end
|
|
80
87
|
end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test-postgresql:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
services:
|
|
13
|
+
postgres:
|
|
14
|
+
image: postgres:17
|
|
15
|
+
env:
|
|
16
|
+
POSTGRES_USER: huginn
|
|
17
|
+
POSTGRES_PASSWORD: huginn
|
|
18
|
+
POSTGRES_DB: huginn_test
|
|
19
|
+
ports:
|
|
20
|
+
- 5432:5432
|
|
21
|
+
options: >-
|
|
22
|
+
--health-cmd="pg_isready"
|
|
23
|
+
--health-interval=10s
|
|
24
|
+
--health-timeout=5s
|
|
25
|
+
--health-retries=5
|
|
26
|
+
|
|
27
|
+
env:
|
|
28
|
+
DATABASE_ADAPTER: postgresql
|
|
29
|
+
DATABASE_HOST: 127.0.0.1
|
|
30
|
+
DATABASE_USERNAME: huginn
|
|
31
|
+
DATABASE_PASSWORD: huginn
|
|
32
|
+
DATABASE_NAME: huginn_test
|
|
33
|
+
APP_SECRET_TOKEN: 0b4a2a529a3bb09cc39561e117c13d6e04288e144c322b8d577b0e4589435dce8f512a0e0d7e17c54802a5575c92e1e68550cd18
|
|
34
|
+
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v4
|
|
37
|
+
|
|
38
|
+
- uses: ruby/setup-ruby@v1
|
|
39
|
+
with:
|
|
40
|
+
ruby-version: "3.4"
|
|
41
|
+
bundler-cache: true
|
|
42
|
+
|
|
43
|
+
- name: Run tests
|
|
44
|
+
run: bundle exec rake
|
|
45
|
+
|
|
46
|
+
test-mysql:
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
|
|
49
|
+
services:
|
|
50
|
+
mysql:
|
|
51
|
+
image: mysql:8.0
|
|
52
|
+
env:
|
|
53
|
+
MYSQL_ROOT_PASSWORD: huginn
|
|
54
|
+
MYSQL_DATABASE: huginn_test
|
|
55
|
+
ports:
|
|
56
|
+
- 3306:3306
|
|
57
|
+
options: >-
|
|
58
|
+
--health-cmd="mysqladmin ping -h 127.0.0.1"
|
|
59
|
+
--health-interval=10s
|
|
60
|
+
--health-timeout=5s
|
|
61
|
+
--health-retries=5
|
|
62
|
+
|
|
63
|
+
env:
|
|
64
|
+
DATABASE_ADAPTER: mysql2
|
|
65
|
+
DATABASE_HOST: 127.0.0.1
|
|
66
|
+
DATABASE_USERNAME: root
|
|
67
|
+
DATABASE_PASSWORD: huginn
|
|
68
|
+
DATABASE_NAME: huginn_test
|
|
69
|
+
APP_SECRET_TOKEN: 0b4a2a529a3bb09cc39561e117c13d6e04288e144c322b8d577b0e4589435dce8f512a0e0d7e17c54802a5575c92e1e68550cd18
|
|
70
|
+
|
|
71
|
+
steps:
|
|
72
|
+
- uses: actions/checkout@v4
|
|
73
|
+
|
|
74
|
+
- uses: ruby/setup-ruby@v1
|
|
75
|
+
with:
|
|
76
|
+
ruby-version: "3.4"
|
|
77
|
+
bundler-cache: true
|
|
78
|
+
|
|
79
|
+
- name: Run tests
|
|
80
|
+
run: bundle exec rake
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
require 'huginn_agent'
|
|
2
2
|
|
|
3
|
+
# Allow to add views, controller, routes, etc...
|
|
4
|
+
class Engine < ::Rails::Engine; end
|
|
5
|
+
|
|
3
6
|
#HuginnAgent.load '<%= config[:gem_name] %>/concerns/my_agent_concern'
|
|
4
7
|
HuginnAgent.register '<%= config[:gem_name] %>/<%= config[:agent_file_name] %>'
|
data/lib/huginn_agent/version.rb
CHANGED
data/lib/huginn_agent.rb
CHANGED
|
@@ -6,7 +6,7 @@ class HuginnAgent
|
|
|
6
6
|
|
|
7
7
|
def load_tasks(options = {})
|
|
8
8
|
@branch = options[:branch] || 'master'
|
|
9
|
-
@remote = options[:remote] || 'https://github.com/
|
|
9
|
+
@remote = options[:remote] || 'https://github.com/huginn/huginn.git'
|
|
10
10
|
Rake.add_rakelib File.join(File.expand_path('../', __FILE__), 'tasks')
|
|
11
11
|
end
|
|
12
12
|
|
|
@@ -27,7 +27,7 @@ class HuginnAgent
|
|
|
27
27
|
require path
|
|
28
28
|
end
|
|
29
29
|
agent_paths.each do |path|
|
|
30
|
-
|
|
30
|
+
setup_zeitwerk_loader path
|
|
31
31
|
Agent::TYPES << "Agents::#{File.basename(path.to_s).camelize}"
|
|
32
32
|
end
|
|
33
33
|
end
|
|
@@ -41,5 +41,17 @@ class HuginnAgent
|
|
|
41
41
|
def agent_paths
|
|
42
42
|
@agent_paths ||= []
|
|
43
43
|
end
|
|
44
|
+
|
|
45
|
+
def setup_zeitwerk_loader(gem_path)
|
|
46
|
+
gem, _, mod_path = gem_path.partition('/')
|
|
47
|
+
gemspec = Gem::Specification.find_by_name(gem)
|
|
48
|
+
gem_dir = Pathname.new(gemspec.gem_dir)
|
|
49
|
+
module_dir = gem_dir + gemspec.require_paths[0] + gem
|
|
50
|
+
|
|
51
|
+
loader = Zeitwerk::Loader.new
|
|
52
|
+
loader.tag = gem
|
|
53
|
+
loader.push_dir(module_dir, namespace: Agents)
|
|
54
|
+
loader.setup
|
|
55
|
+
end
|
|
44
56
|
end
|
|
45
57
|
end
|
|
@@ -18,8 +18,8 @@ describe HuginnAgent::CLI::New do
|
|
|
18
18
|
expect(cli).to receive(:yes?).with(HuginnAgent::CLI::New::PREFIX_QUESTION) { true }
|
|
19
19
|
expect(cli).to receive(:yes?).with(HuginnAgent::CLI::New::MIT_QUESTION) { true }
|
|
20
20
|
capture(:stdout) { cli.new('test') }
|
|
21
|
-
expect(File.
|
|
22
|
-
expect(File.
|
|
21
|
+
expect(File.exist?(File.join(sandbox, 'huginn_test'))).to be_truthy
|
|
22
|
+
expect(File.exist?(File.join(sandbox, 'huginn_test', 'LICENSE.txt'))).to be_truthy
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
it "does not prefix the gem name and does notcopies the MIT license when told" do
|
|
@@ -27,9 +27,9 @@ describe HuginnAgent::CLI::New do
|
|
|
27
27
|
expect(cli).to receive(:yes?).with(HuginnAgent::CLI::New::MIT_QUESTION) { false }
|
|
28
28
|
|
|
29
29
|
capture(:stdout) { cli.new('test') }
|
|
30
|
-
expect(File.
|
|
31
|
-
expect(File.
|
|
32
|
-
expect(File.
|
|
30
|
+
expect(File.exist?(File.join(sandbox, 'huginn_test'))).to be_falsy
|
|
31
|
+
expect(File.exist?(File.join(sandbox, 'test'))).to be_truthy
|
|
32
|
+
expect(File.exist?(File.join(sandbox, 'test', 'LICENSE.txt'))).to be_falsy
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
it "asks to use a .env file" do
|
|
@@ -39,8 +39,8 @@ describe HuginnAgent::CLI::New do
|
|
|
39
39
|
FileUtils.touch('.env')
|
|
40
40
|
capture(:stdout) { cli.new('test') }
|
|
41
41
|
FileUtils.rm('.env')
|
|
42
|
-
expect(File.
|
|
43
|
-
expect(File.
|
|
44
|
-
expect(File.
|
|
42
|
+
expect(File.exist?(File.join(sandbox, 'huginn_test'))).to be_falsy
|
|
43
|
+
expect(File.exist?(File.join(sandbox, 'test'))).to be_truthy
|
|
44
|
+
expect(File.exist?(File.join(sandbox, 'test', '.env'))).to be_truthy
|
|
45
45
|
end
|
|
46
46
|
end
|
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
|
2
2
|
|
|
3
3
|
describe HuginnAgent::SpecRunner do
|
|
4
4
|
unless defined?(Bundler)
|
|
5
|
-
class Bundler; def self.
|
|
5
|
+
class Bundler; def self.with_unbundled_env; yield end end
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
let(:runner) {HuginnAgent::SpecRunner.new }
|
|
@@ -34,4 +34,37 @@ describe HuginnAgent::SpecRunner do
|
|
|
34
34
|
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
|
+
|
|
38
|
+
context '#bundle' do
|
|
39
|
+
before do
|
|
40
|
+
allow(Dir).to receive(:chdir).with('spec/huginn').and_yield
|
|
41
|
+
allow(File).to receive(:exist?).and_call_original
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
it 'uses bundle config instead of --without' do
|
|
45
|
+
allow(File).to receive(:exist?).with('.env').and_return(false)
|
|
46
|
+
|
|
47
|
+
expect(runner).to receive(:shell_out).with("cp .env.example .env").ordered
|
|
48
|
+
expect(runner).to receive(:shell_out).with("bundle config set --local without 'development production'").ordered
|
|
49
|
+
expect(runner).to receive(:shell_out).with('bundle install -j 4', 'Installing ruby gems ...').ordered
|
|
50
|
+
|
|
51
|
+
runner.bundle
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
context '#database' do
|
|
56
|
+
before do
|
|
57
|
+
allow(Dir).to receive(:chdir).with('spec/huginn').and_yield
|
|
58
|
+
allow(File).to receive(:exist?).and_call_original
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
it 'removes a generated schema before migrating' do
|
|
62
|
+
allow(File).to receive(:exist?).with('db/schema.rb').and_return(true)
|
|
63
|
+
|
|
64
|
+
expect(File).to receive(:delete).with('db/schema.rb').ordered
|
|
65
|
+
expect(runner).to receive(:shell_out).with('bundle exec rake db:create db:migrate', 'Creating database ...').ordered
|
|
66
|
+
|
|
67
|
+
runner.database
|
|
68
|
+
end
|
|
69
|
+
end
|
|
37
70
|
end
|
|
@@ -15,7 +15,7 @@ describe HuginnAgent do
|
|
|
15
15
|
it 'sets default values for branch and remote' do
|
|
16
16
|
HuginnAgent.load_tasks
|
|
17
17
|
expect(HuginnAgent.branch).to eq('master')
|
|
18
|
-
expect(HuginnAgent.remote).to eq('https://github.com/
|
|
18
|
+
expect(HuginnAgent.remote).to eq('https://github.com/huginn/huginn.git')
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
it "sets branch and remote based on the passed options" do
|
|
@@ -37,12 +37,12 @@ describe HuginnAgent do
|
|
|
37
37
|
HuginnAgent.require!
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
-
it '
|
|
40
|
+
it 'sets up Zeitwerk loader for registered paths and adds the class name to Agent::TYPES' do
|
|
41
41
|
class Agent; TYPES = []; end
|
|
42
|
-
string_double= double('test_agent.rb', camelize: 'TestAgent')
|
|
42
|
+
string_double = double('test_agent.rb', camelize: 'TestAgent')
|
|
43
43
|
expect(File).to receive(:basename).and_return(string_double)
|
|
44
44
|
HuginnAgent.register('/tmp/test_agent.rb')
|
|
45
|
-
expect(HuginnAgent).to receive(:
|
|
45
|
+
expect(HuginnAgent).to receive(:setup_zeitwerk_loader).with('/tmp/test_agent.rb')
|
|
46
46
|
HuginnAgent.require!
|
|
47
47
|
expect(Agent::TYPES).to eq(['Agents::TestAgent'])
|
|
48
48
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: huginn_agent
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew Cantino
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: thor
|
|
@@ -24,34 +23,20 @@ dependencies:
|
|
|
24
23
|
- - ">="
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
25
|
version: '0'
|
|
27
|
-
- !ruby/object:Gem::Dependency
|
|
28
|
-
name: bundler
|
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
|
30
|
-
requirements:
|
|
31
|
-
- - "~>"
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: '1.7'
|
|
34
|
-
type: :development
|
|
35
|
-
prerelease: false
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - "~>"
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: '1.7'
|
|
41
26
|
- !ruby/object:Gem::Dependency
|
|
42
27
|
name: rake
|
|
43
28
|
requirement: !ruby/object:Gem::Requirement
|
|
44
29
|
requirements:
|
|
45
|
-
- - "
|
|
30
|
+
- - ">="
|
|
46
31
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: '
|
|
32
|
+
version: '0'
|
|
48
33
|
type: :development
|
|
49
34
|
prerelease: false
|
|
50
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
36
|
requirements:
|
|
52
|
-
- - "
|
|
37
|
+
- - ">="
|
|
53
38
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: '
|
|
39
|
+
version: '0'
|
|
55
40
|
- !ruby/object:Gem::Dependency
|
|
56
41
|
name: rspec
|
|
57
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -70,45 +55,44 @@ dependencies:
|
|
|
70
55
|
name: simplecov
|
|
71
56
|
requirement: !ruby/object:Gem::Requirement
|
|
72
57
|
requirements:
|
|
73
|
-
- - "
|
|
58
|
+
- - ">="
|
|
74
59
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: 0
|
|
60
|
+
version: '0'
|
|
76
61
|
type: :development
|
|
77
62
|
prerelease: false
|
|
78
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
64
|
requirements:
|
|
80
|
-
- - "
|
|
65
|
+
- - ">="
|
|
81
66
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: 0
|
|
67
|
+
version: '0'
|
|
83
68
|
- !ruby/object:Gem::Dependency
|
|
84
69
|
name: guard
|
|
85
70
|
requirement: !ruby/object:Gem::Requirement
|
|
86
71
|
requirements:
|
|
87
|
-
- - "
|
|
72
|
+
- - ">="
|
|
88
73
|
- !ruby/object:Gem::Version
|
|
89
|
-
version:
|
|
74
|
+
version: '0'
|
|
90
75
|
type: :development
|
|
91
76
|
prerelease: false
|
|
92
77
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
78
|
requirements:
|
|
94
|
-
- - "
|
|
79
|
+
- - ">="
|
|
95
80
|
- !ruby/object:Gem::Version
|
|
96
|
-
version:
|
|
81
|
+
version: '0'
|
|
97
82
|
- !ruby/object:Gem::Dependency
|
|
98
83
|
name: guard-rspec
|
|
99
84
|
requirement: !ruby/object:Gem::Requirement
|
|
100
85
|
requirements:
|
|
101
|
-
- - "
|
|
86
|
+
- - ">="
|
|
102
87
|
- !ruby/object:Gem::Version
|
|
103
|
-
version:
|
|
88
|
+
version: '0'
|
|
104
89
|
type: :development
|
|
105
90
|
prerelease: false
|
|
106
91
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
92
|
requirements:
|
|
108
|
-
- - "
|
|
93
|
+
- - ">="
|
|
109
94
|
- !ruby/object:Gem::Version
|
|
110
|
-
version:
|
|
111
|
-
description:
|
|
95
|
+
version: '0'
|
|
112
96
|
email:
|
|
113
97
|
- cantino@gmail.com
|
|
114
98
|
executables:
|
|
@@ -131,12 +115,12 @@ files:
|
|
|
131
115
|
- lib/huginn_agent/templates/newagent/LICENSE.txt.tt
|
|
132
116
|
- lib/huginn_agent/templates/newagent/README.md.tt
|
|
133
117
|
- lib/huginn_agent/templates/newagent/Rakefile.tt
|
|
118
|
+
- lib/huginn_agent/templates/newagent/github/workflows/ci.yml.tt
|
|
134
119
|
- lib/huginn_agent/templates/newagent/gitignore.tt
|
|
135
120
|
- lib/huginn_agent/templates/newagent/lib/new_agent.rb.tt
|
|
136
121
|
- lib/huginn_agent/templates/newagent/lib/new_agent/new_agent.rb.tt
|
|
137
122
|
- lib/huginn_agent/templates/newagent/newagent.gemspec.tt
|
|
138
123
|
- lib/huginn_agent/templates/newagent/spec/new_agent_spec.rb.tt
|
|
139
|
-
- lib/huginn_agent/templates/newagent/travis.yml.tt
|
|
140
124
|
- lib/huginn_agent/version.rb
|
|
141
125
|
- lib/tasks/spec.rake
|
|
142
126
|
- spec/lib/huginn_agent/cli/new_spec.rb
|
|
@@ -144,11 +128,10 @@ files:
|
|
|
144
128
|
- spec/lib/huginn_agent/spec_runner_spec.rb
|
|
145
129
|
- spec/lib/huginn_agent_spec.rb
|
|
146
130
|
- spec/spec_helper.rb
|
|
147
|
-
homepage: https://github.com/
|
|
131
|
+
homepage: https://github.com/huginn/huginn
|
|
148
132
|
licenses:
|
|
149
133
|
- MIT
|
|
150
134
|
metadata: {}
|
|
151
|
-
post_install_message:
|
|
152
135
|
rdoc_options: []
|
|
153
136
|
require_paths:
|
|
154
137
|
- lib
|
|
@@ -163,9 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
163
146
|
- !ruby/object:Gem::Version
|
|
164
147
|
version: '0'
|
|
165
148
|
requirements: []
|
|
166
|
-
|
|
167
|
-
rubygems_version: 2.6.13
|
|
168
|
-
signing_key:
|
|
149
|
+
rubygems_version: 4.0.6
|
|
169
150
|
specification_version: 4
|
|
170
151
|
summary: Helpers for making new Huginn Agents
|
|
171
152
|
test_files:
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
sudo: false
|
|
2
|
-
language: ruby
|
|
3
|
-
env:
|
|
4
|
-
global:
|
|
5
|
-
- APP_SECRET_TOKEN=b2724973fd81c2f4ac0f92ac48eb3f0152c4a11824c122bcf783419a4c51d8b9bba81c8ba6a66c7de599677c7f486242cf819775c433908e77c739c5c8ae118d
|
|
6
|
-
matrix:
|
|
7
|
-
- DATABASE_ADAPTER=mysql2
|
|
8
|
-
- DATABASE_ADAPTER=postgresql DATABASE_USERNAME=postgres
|
|
9
|
-
rvm:
|
|
10
|
-
- 2.2.2
|
|
11
|
-
- 2.3.0
|
|
12
|
-
cache: bundler
|
|
13
|
-
script: bundle exec rake
|