huginn_agent 0.6.2 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbf31ce876fc5932b67910ad88cddc5b671ff71f1f26f1c8309e0b4ee06865a1
4
- data.tar.gz: 47ea4315bf9f7cc204767fef2f4de3fba555e2276500b974be210bdbb8fdaefa
3
+ metadata.gz: ff01c359c18a7262e7e5ae3e860f4dbf91dc1674e38153f9fdce89697189b823
4
+ data.tar.gz: dd76eac597d165beb77930df9eb84d1d179ad5b099d8ab456b0b06d03165960d
5
5
  SHA512:
6
- metadata.gz: ff4b1d1a560a395feaca0112467c31b6f58c82546569154d969f7346ac4a58bf2e189dd9bd0db26997ff7b66df3ba69ba76082bebeb165c283f39f4a2fbf5516
7
- data.tar.gz: 4e509923c31c4a7170044041d6c77c3a80c291a1a0c57dbb71026332dd723df51df2f7c22ab4e396535de39a195d62bdd3fc698fb4f03df3cea27d4d98f519ff
6
+ metadata.gz: f9eeb5262cca23d22c08c07195460d1769b5a324479b2b74db69986ca2b1b1447e19686be9aaef3324209eebcfec8e7561f624e3b68effe43a9d8bc4259e25dc
7
+ data.tar.gz: 1903c328c30a797ad0470840c7c82e1c1a89f5e3ad806166a5c922d6183bf3c9bd50074dfbe3a2c38aca48e69a4b5bda9478fc4b243e84235263e9c36c753e08
data/CHANGELOG.md CHANGED
@@ -2,25 +2,43 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## Unreleased
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
+
9
11
  ### Changed
10
12
 
13
+ - Replace the generated Travis CI config with GitHub Actions
14
+
11
15
  ### Fixed
12
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
+
13
21
  ## [0.6.2] - 2026-04-05
14
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
+
15
28
  ### Changed
16
29
 
17
- - Use shallow clone (`--depth 1`) when cloning and fetching the Huginn source for running specs
18
- - Replace deprecated `Bundler.with_clean_env` with `Bundler.with_unbundled_env`
19
30
  - Remove Rails classic loader fallback in favor of Zeitwerk only
31
+ - Replace deprecated `Bundler.with_clean_env` with `Bundler.with_unbundled_env`
20
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
21
36
 
22
37
  ### Fixed
23
38
 
39
+ - Fix invalid argument for `default_schedule` (@sfischer13)
40
+ - Update URLs (@sfischer13)
41
+ - Fix typo in README (@pacharanero)
24
42
  - Replace deprecated `File.exists?` with `File.exist?`
25
43
 
26
44
  ## [0.6.1] - 2017-09-22
@@ -96,7 +114,8 @@ All notable changes to this project will be documented in this file.
96
114
  - First official and working release
97
115
 
98
116
 
99
- [Unreleased]: https://github.com/huginn/huginn_agent/compare/v0.6.2...HEAD
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
100
119
  [0.6.2]: https://github.com/huginn/huginn_agent/compare/v0.6.1...v0.6.2
101
120
  [0.6.1]: https://github.com/huginn/huginn_agent/compare/v0.6.0...v0.6.1
102
121
  [0.6.0]: https://github.com/huginn/huginn_agent/compare/v0.5.0...v0.6.0
@@ -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
- "travis.yml.tt" => ".travis.yml"
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
- require 'coveralls'
5
- module Coveralls
6
- module Configuration
7
- def self.root
8
- File.expand_path(File.join(Dir.pwd, '../..'))
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
 
@@ -37,13 +37,15 @@ class HuginnAgent
37
37
  if !File.exist?('.env')
38
38
  shell_out "cp .env.example .env"
39
39
  end
40
- shell_out "bundle install --without development production -j 4", 'Installing ruby gems ...'
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
@@ -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,3 +1,3 @@
1
1
  class HuginnAgent
2
- VERSION = '0.6.2'
2
+ VERSION = "0.6.3"
3
3
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: huginn_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Cantino
@@ -115,12 +115,12 @@ files:
115
115
  - lib/huginn_agent/templates/newagent/LICENSE.txt.tt
116
116
  - lib/huginn_agent/templates/newagent/README.md.tt
117
117
  - lib/huginn_agent/templates/newagent/Rakefile.tt
118
+ - lib/huginn_agent/templates/newagent/github/workflows/ci.yml.tt
118
119
  - lib/huginn_agent/templates/newagent/gitignore.tt
119
120
  - lib/huginn_agent/templates/newagent/lib/new_agent.rb.tt
120
121
  - lib/huginn_agent/templates/newagent/lib/new_agent/new_agent.rb.tt
121
122
  - lib/huginn_agent/templates/newagent/newagent.gemspec.tt
122
123
  - lib/huginn_agent/templates/newagent/spec/new_agent_spec.rb.tt
123
- - lib/huginn_agent/templates/newagent/travis.yml.tt
124
124
  - lib/huginn_agent/version.rb
125
125
  - lib/tasks/spec.rake
126
126
  - spec/lib/huginn_agent/cli/new_spec.rb
@@ -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