Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/VERSIONS
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ v26.08 (Release Date: TBD)
- Support Ruby 3.3 through 4.0 and modernize the codebase for current Ruby and maintained library APIs, validating representative versions in CI.
- Harden Recipe loading with safe YAML parsing, structural validation and framework-specific errors.
- Restructure the CLI with help and version options, predictable error reporting and documented exit statuses.
- Report a clear CLI error when feed inspection discovers no feed instead of raising an internal exception.
- Verify TLS certificates when publishing to Instapaper instead of accepting an unverified connection.
- Modernize gem packaging and dependency policy, separating core requirements from optional plugin dependencies so that an installation can be minimal, complete or extended one plugin at a time, and excluding development and generated files.
- Classify every shipped plugin by its current support status rather than simulating obsolete services in tests.
Expand Down
4 changes: 3 additions & 1 deletion lib/automatic/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# License:: The GPL version 3, or LGPL version 3 (Dual License).
# Contact:: idnanashi@gmail.com
# Created:: Aug 14, 2026
# Updated:: Aug 14, 2026
# Updated:: Aug 19, 2026
# Copyright:: Copyright (c) 2012-2026 Automatic Ruby Developers.
#
# Everything that belongs to being a command: option parsing, the subcommands,
Expand Down Expand Up @@ -218,6 +218,8 @@ def inspect_url(argv)
require 'pp'
url = argv.shift || missing_argument('inspect')
feeds = Feedbag.find(url)
raise Automatic::Error, "no feed found at #{url}" if feeds.empty?

@stdout.puts feeds.pretty_inspect
@stdout.puts Automatic::FeedParser.get_url(feeds.pop).pretty_inspect
end
Expand Down
14 changes: 13 additions & 1 deletion spec/lib/automatic/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# License:: The GPL version 3, or LGPL version 3 (Dual License).
# Contact:: idnanashi@gmail.com
# Created:: Aug 14, 2026
# Updated:: Aug 14, 2026
# Updated:: Aug 19, 2026
# Copyright:: Copyright (c) 2012-2026 Automatic Ruby Developers.

require File.expand_path(File.join(File.dirname(__FILE__), '../../spec_helper'))
Expand Down Expand Up @@ -80,6 +80,18 @@ def run(*argv, root_dir: APP_ROOT)
end
end

describe "the inspect subcommand" do
it "fails cleanly when no feed is discovered" do
stub_const("Feedbag", Class.new)
allow(Automatic).to receive(:require_optional)
allow(Feedbag).to receive(:find).and_return([])

expect(run("inspect", "https://example.com/")).to eq Automatic::CLI::EXIT_FAILURE
expect(err.string).to match(%r{no feed found at https://example\.com/})
expect(out.string).to be_empty
end
end

describe "running a recipe" do
# A recipe of plugins that reach nothing: the framework is exercised
# end to end without a network, which is what the suite is allowed to do.
Expand Down
Loading