Development: Local Development - marian13/convenient_service GitHub Wiki
Prerequisites
-
Ruby version manager (asdf with Ruby plugin is preferred, but not required)
-
gem install bundler
Setup
-
Clone the repo.
git clone [email protected]:marian13/convenient_service.git -
Navigate to it.
cd convenient_service -
Install dependencies.
task deps:install
Playground
-
irb with without any external dependencies.
task playgroundor
task playground:standard -
irb with all external dependencies.
task playground:all -
irb with Rails 5.2.
task playground:rails_5.2 -
irb with Rails 6.0.
task playground:rails_6.0 -
irb with Rails 6.1.
task playground:rails_6.1 -
irb with Rails 7.0.
task playground:rails_7.0 -
irb with Dry.
task playground:dry
NOTE: Do not use cmd + c (ctrl + c) to exit from irb. Prefer exit, quit or cmd + d (ctrl + d). Check the following picture:
Linters
-
Lint all files by Rubocop.
task rubocopalias tl="task lint"tl -
Lint a single file by Rubocop.
task rubocop -- lib/convenient_service/configs/standard.rb
Tests
-
Run all tests and specs.
task test -
Run all specs (RSpec).
task rspecalias tr="task rspec"tr -
Run Standard specs.
task rspec:standard -
Run Rails 5.2 specs.
task rspec:rails_5.2 -
Run Rails 6.0 specs.
task rspec:rails_6.0 -
Run Rails 6.1 specs.
task rspec:rails_6.1 -
Run Rails 7.0 specs.
task rspec:rails_7.0 -
Run Dry specs.
task rspec:dry -
Run a single spec file.
task rspec -- spec/lib/convenient_service/configs/standard_spec.rbtask rspec:rails_5.2 -- spec/lib/convenient_service/configs/standard_spec.rb -
Run a single spec.
task rspec -- spec/lib/convenient_service/configs/standard_spec.rb:91 -
Run a single spec with logs.
CONVENIENT_SERVICE_LOGGER_LEVEL=debug CONVENIENT_SERVICE_LOGGER_ENABLE_COLORS=true task rspec -- spec/lib/convenient_service/examples/standard/request_params/services/prepare_spec.rb:130 -
Run minitests.
task minitest -
Run a single minitest file.
task minitest -- test/lib/convenient_service/support/gems/rspec_test.rb
Coverage
-
task coverage:open
Docs
-
Generate docs with SDoc.
task docs:generate -
Open docs.
task docs:open
Release
-
Bump a new gem version, create a corresponding git tag, and deploy to the RubyGems (using gem-release)
Check
task release:majortask release:minortask release:patchCheck Release: New Version wiki for detailed info.
Docker
Check Docker Development wiki.
More tasks
Check Taskfile.yml for the full list of possible tasks.