lib/holds Ruby sources: core logic inlib/narou/, web helpers inlib/web/, and CLI subcommands underlib/command/.spec/contains RSpec examples plus shared helpers inspec/support/.- CLI entry points live in
bin/narouandnarou.rbfor local execution. - Site settings, templates, and assets reside in
webnovel/,preset/, andtemplate/. - CI and release automation are under
.circleci/andRakefiletasks.
bundle install: install gem dependencies locally.bundle exec ruby narou.rb web: boot the local web interface for manual checks.bundle exec ruby narou.rb download <novel_id>: fetch source content for conversion experiments.bundle exec rspec: run the full test suite; scope to a file withbundle exec rspec spec/downloader_spec.rb.bundle exec rubocop(add-Ato auto-correct): enforce Ruby style and catch regressions.
- Use Ruby two-space indentation, single quotes for simple strings, and snake_case for files and methods.
- Namespaces should follow
Narou::CamelCasemodules; mirror existing CLI subcommand patterns inlib/command/. - Keep new files ASCII with
# frozen_string_literal: trueat the top when applicable. - Run
bundle exec rubocopandbundle exec reekbefore submitting changes.
- Write deterministic RSpec examples in
spec/; name files*_spec.rband group contexts clearly. - Stub network or filesystem side effects; rely on fixtures in
spec/support/when possible. - Execute
bundle exec rspecprior to review; add focused specs for new behaviour or bug fixes.
- Craft imperative commit subjects (e.g.,
Add downloader retry logic) and reference issues like#123when relevant. - Update
ChangeLog.mdfor user-facing changes and summarise scope, motivation, and test notes in PR descriptions. - Attach screenshots or logs for web/UI work and call out migrations or breaking changes explicitly.
- Keep secrets out of the tree; validate new YAML configs in
webnovel/before shipping. - Follow UTF-8 defaults in entry scripts and ensure downloaded data is sanitised before conversion.
- Keep edits minimal and scoped, favour incremental fixes over sweeping refactors.
- Respect existing public APIs and CLI behaviours; coordinate larger changes through issues first.