hanami-cli_bulma 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/FUNDING.yml +1 -0
- data/.github/workflows/ci.yml +68 -0
- data/.gitignore +13 -0
- data/.repobot.yml +9 -0
- data/.rspec +2 -0
- data/.rubocop.yml +46 -0
- data/.tool-versions +1 -0
- data/.yardopts +3 -0
- data/CHANGELOG.md +374 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +31 -0
- data/LICENSE.md +22 -0
- data/README.md +61 -0
- data/Rakefile +12 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/docker-compose.yml +14 -0
- data/exe/hanami +15 -0
- data/hanami-cli_bulma.gemspec +47 -0
- data/lib/hanami/cli_bulma/bundler.rb +16 -0
- data/lib/hanami/cli_bulma/commands/app/command.rb +21 -0
- data/lib/hanami/cli_bulma/commands/app/generate/action.rb +25 -0
- data/lib/hanami/cli_bulma/commands/app/generate/slice.rb +27 -0
- data/lib/hanami/cli_bulma/commands/app/generate/view.rb +23 -0
- data/lib/hanami/cli_bulma/commands/app/generate.rb +16 -0
- data/lib/hanami/cli_bulma/commands/app.rb +30 -0
- data/lib/hanami/cli_bulma/commands/gem/new.rb +28 -0
- data/lib/hanami/cli_bulma/commands/gem.rb +21 -0
- data/lib/hanami/cli_bulma/commands.rb +35 -0
- data/lib/hanami/cli_bulma/generators/app/action/action.erb +17 -0
- data/lib/hanami/cli_bulma/generators/app/action/slice_action.erb +17 -0
- data/lib/hanami/cli_bulma/generators/app/action.rb +72 -0
- data/lib/hanami/cli_bulma/generators/app/slice/action.erb +7 -0
- data/lib/hanami/cli_bulma/generators/app/slice/app_css.erb +7 -0
- data/lib/hanami/cli_bulma/generators/app/slice/app_js.erb +1 -0
- data/lib/hanami/cli_bulma/generators/app/slice/app_layout.erb +46 -0
- data/lib/hanami/cli_bulma/generators/app/slice/favicon.ico +0 -0
- data/lib/hanami/cli_bulma/generators/app/slice/helpers.erb +10 -0
- data/lib/hanami/cli_bulma/generators/app/slice/keep.erb +0 -0
- data/lib/hanami/cli_bulma/generators/app/slice/operation.erb +7 -0
- data/lib/hanami/cli_bulma/generators/app/slice/relation.erb +8 -0
- data/lib/hanami/cli_bulma/generators/app/slice/repo.erb +8 -0
- data/lib/hanami/cli_bulma/generators/app/slice/routes.erb +3 -0
- data/lib/hanami/cli_bulma/generators/app/slice/struct.erb +8 -0
- data/lib/hanami/cli_bulma/generators/app/slice/view.erb +7 -0
- data/lib/hanami/cli_bulma/generators/app/slice.rb +26 -0
- data/lib/hanami/cli_bulma/generators/app/view/app_template-edit.html.erb +24 -0
- data/lib/hanami/cli_bulma/generators/app/view/app_template-index.html.erb +24 -0
- data/lib/hanami/cli_bulma/generators/app/view/app_template-new.html.erb +24 -0
- data/lib/hanami/cli_bulma/generators/app/view/app_template-show.html.erb +5 -0
- data/lib/hanami/cli_bulma/generators/app/view/app_template.html.erb +5 -0
- data/lib/hanami/cli_bulma/generators/app/view/app_view-edit.erb +10 -0
- data/lib/hanami/cli_bulma/generators/app/view/app_view-index.erb +10 -0
- data/lib/hanami/cli_bulma/generators/app/view/app_view-new.erb +10 -0
- data/lib/hanami/cli_bulma/generators/app/view/app_view-show.erb +10 -0
- data/lib/hanami/cli_bulma/generators/app/view/app_view.erb +10 -0
- data/lib/hanami/cli_bulma/generators/app/view/slice_template-edit.html.erb +24 -0
- data/lib/hanami/cli_bulma/generators/app/view/slice_template-index.html.erb +26 -0
- data/lib/hanami/cli_bulma/generators/app/view/slice_template-new.html.erb +24 -0
- data/lib/hanami/cli_bulma/generators/app/view/slice_template-show.html.erb +5 -0
- data/lib/hanami/cli_bulma/generators/app/view/slice_template.html.erb +5 -0
- data/lib/hanami/cli_bulma/generators/app/view/slice_view-edit.erb +10 -0
- data/lib/hanami/cli_bulma/generators/app/view/slice_view-index.erb +13 -0
- data/lib/hanami/cli_bulma/generators/app/view/slice_view-new.erb +10 -0
- data/lib/hanami/cli_bulma/generators/app/view/slice_view-show.erb +10 -0
- data/lib/hanami/cli_bulma/generators/app/view/slice_view.erb +10 -0
- data/lib/hanami/cli_bulma/generators/app/view.rb +73 -0
- data/lib/hanami/cli_bulma/generators/app/view_context.rb +19 -0
- data/lib/hanami/cli_bulma/generators/gem/app/404.html +82 -0
- data/lib/hanami/cli_bulma/generators/gem/app/500.html +82 -0
- data/lib/hanami/cli_bulma/generators/gem/app/action.erb +12 -0
- data/lib/hanami/cli_bulma/generators/gem/app/app.erb +8 -0
- data/lib/hanami/cli_bulma/generators/gem/app/app_css.erb +7 -0
- data/lib/hanami/cli_bulma/generators/gem/app/app_js.erb +1 -0
- data/lib/hanami/cli_bulma/generators/gem/app/app_layout.erb +45 -0
- data/lib/hanami/cli_bulma/generators/gem/app/assets.js +16 -0
- data/lib/hanami/cli_bulma/generators/gem/app/config_ru.erb +5 -0
- data/lib/hanami/cli_bulma/generators/gem/app/dev +8 -0
- data/lib/hanami/cli_bulma/generators/gem/app/env.erb +4 -0
- data/lib/hanami/cli_bulma/generators/gem/app/favicon.ico +0 -0
- data/lib/hanami/cli_bulma/generators/gem/app/gemfile.erb +44 -0
- data/lib/hanami/cli_bulma/generators/gem/app/gitignore.erb +9 -0
- data/lib/hanami/cli_bulma/generators/gem/app/helpers.erb +10 -0
- data/lib/hanami/cli_bulma/generators/gem/app/keep.erb +0 -0
- data/lib/hanami/cli_bulma/generators/gem/app/operation.erb +13 -0
- data/lib/hanami/cli_bulma/generators/gem/app/package.json.erb +8 -0
- data/lib/hanami/cli_bulma/generators/gem/app/procfile.erb +4 -0
- data/lib/hanami/cli_bulma/generators/gem/app/puma.erb +47 -0
- data/lib/hanami/cli_bulma/generators/gem/app/rakefile.erb +3 -0
- data/lib/hanami/cli_bulma/generators/gem/app/readme.erb +1 -0
- data/lib/hanami/cli_bulma/generators/gem/app/relation.erb +10 -0
- data/lib/hanami/cli_bulma/generators/gem/app/repo.erb +10 -0
- data/lib/hanami/cli_bulma/generators/gem/app/routes.erb +7 -0
- data/lib/hanami/cli_bulma/generators/gem/app/settings.erb +9 -0
- data/lib/hanami/cli_bulma/generators/gem/app/struct.erb +10 -0
- data/lib/hanami/cli_bulma/generators/gem/app/types.erb +11 -0
- data/lib/hanami/cli_bulma/generators/gem/app/validator.erb +12 -0
- data/lib/hanami/cli_bulma/generators/gem/app/view.erb +9 -0
- data/lib/hanami/cli_bulma/generators/gem/app.rb +114 -0
- data/lib/hanami/cli_bulma/version.rb +11 -0
- data/lib/hanami/cli_bulma.rb +50 -0
- data/lib/hanami-cli_bulma.rb +3 -0
- data/project.yml +2 -0
- metadata +242 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 617813dff3ba33e2dbc0c181b072eb3f557d1f2b14e437e2243b6dcd732d933a
|
4
|
+
data.tar.gz: 2c6279d9578e751ea66a66053ab55a8c81ebccd2f0f012f7c9b784379b670597
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f468d771d8676b01e3ee74d75fa6f6ee2bdcd0dd29665b6f9acbaa529694c0d998999feaa660a7b7b0969b173d3a2619bc6a0cdb330470b9416aeb8a07ef7bf3
|
7
|
+
data.tar.gz: b9a0212a9430520c757f2c2e4903cfe4703904f80b9a771c1dfa62d01028f50976db24bce82da6e0dc37b8077c2ebd97cc96195b979bcc67f437399bd49e863d
|
data/.github/FUNDING.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
github: hanami
|
@@ -0,0 +1,68 @@
|
|
1
|
+
name: ci
|
2
|
+
|
3
|
+
"on":
|
4
|
+
push:
|
5
|
+
paths:
|
6
|
+
- ".github/workflows/ci.yml"
|
7
|
+
- "lib/**"
|
8
|
+
- "*.gemspec"
|
9
|
+
- "spec/**"
|
10
|
+
- "Rakefile"
|
11
|
+
- "Gemfile"
|
12
|
+
- ".rubocop.yml"
|
13
|
+
pull_request:
|
14
|
+
branches:
|
15
|
+
- main
|
16
|
+
schedule:
|
17
|
+
- cron: "30 4 * * *"
|
18
|
+
create:
|
19
|
+
|
20
|
+
jobs:
|
21
|
+
tests:
|
22
|
+
runs-on: ubuntu-latest
|
23
|
+
strategy:
|
24
|
+
fail-fast: false
|
25
|
+
matrix:
|
26
|
+
ruby:
|
27
|
+
- "3.3"
|
28
|
+
- "3.2"
|
29
|
+
- "3.1"
|
30
|
+
env:
|
31
|
+
POSTGRES_BASE_URL: postgres://postgres:password@localhost:5432/hanami_cli_test
|
32
|
+
steps:
|
33
|
+
- uses: actions/checkout@v1
|
34
|
+
- name: Install package dependencies
|
35
|
+
run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
|
36
|
+
- name: Set up Ruby
|
37
|
+
uses: ruby/setup-ruby@v1
|
38
|
+
with:
|
39
|
+
ruby-version: ${{matrix.ruby}}
|
40
|
+
bundler-cache: true
|
41
|
+
- name: Run all tests
|
42
|
+
run: bundle exec rake spec
|
43
|
+
services:
|
44
|
+
mysql:
|
45
|
+
image: mysql:latest
|
46
|
+
env:
|
47
|
+
MYSQL_ROOT_PASSWORD: password
|
48
|
+
ports:
|
49
|
+
- 3307:3306
|
50
|
+
options: >-
|
51
|
+
--health-cmd "mysqladmin ping"
|
52
|
+
--health-interval 10s
|
53
|
+
--health-timeout 5s
|
54
|
+
--health-retries 3
|
55
|
+
postgres:
|
56
|
+
# Use postgres:14 for CLI compatibility with ubuntu-latest, currently ubuntu-22.04
|
57
|
+
# See https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md
|
58
|
+
image: postgres:14
|
59
|
+
env:
|
60
|
+
POSTGRES_USER: postgres
|
61
|
+
POSTGRES_PASSWORD: password
|
62
|
+
ports:
|
63
|
+
- 5432:5432
|
64
|
+
options: >-
|
65
|
+
--health-cmd pg_isready
|
66
|
+
--health-interval 10s
|
67
|
+
--health-timeout 5s
|
68
|
+
--health-retries 5
|
data/.gitignore
ADDED
data/.repobot.yml
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# Please keep AllCops, Bundler, Style, Metrics groups and then order cops
|
2
|
+
# alphabetically
|
3
|
+
AllCops:
|
4
|
+
SuggestExtensions: false
|
5
|
+
inherit_from:
|
6
|
+
- https://raw.githubusercontent.com/hanami/devtools/main/.rubocop.yml
|
7
|
+
Layout/LineLength:
|
8
|
+
Exclude:
|
9
|
+
- Gemfile
|
10
|
+
- 'spec/**/*.rb'
|
11
|
+
Lint/DuplicateBranch:
|
12
|
+
Enabled: false
|
13
|
+
Lint/EmptyFile:
|
14
|
+
Exclude:
|
15
|
+
- 'spec/fixtures/**/*.rb'
|
16
|
+
Lint/NonLocalExitFromIterator:
|
17
|
+
Enabled: false
|
18
|
+
Naming/HeredocDelimiterNaming:
|
19
|
+
Enabled: false
|
20
|
+
Naming/MethodParameterName:
|
21
|
+
AllowedNames:
|
22
|
+
- fs
|
23
|
+
Naming/RescuedExceptionsVariableName:
|
24
|
+
Enabled: false
|
25
|
+
Style/AccessorGrouping:
|
26
|
+
Enabled: false
|
27
|
+
Style/BlockDelimiters:
|
28
|
+
Enabled: false
|
29
|
+
Style/CommentedKeyword:
|
30
|
+
Enabled: false
|
31
|
+
Style/EmptyHeredoc:
|
32
|
+
Enabled: false
|
33
|
+
Style/IdenticalConditionalBranches:
|
34
|
+
Enabled: false
|
35
|
+
Style/LambdaCall:
|
36
|
+
Enabled: false
|
37
|
+
Style/TrailingCommaInArguments:
|
38
|
+
Enabled: false
|
39
|
+
Style/TrailingCommaInArrayLiteral:
|
40
|
+
Enabled: false
|
41
|
+
Style/TrailingCommaInHashLiteral:
|
42
|
+
Enabled: false
|
43
|
+
Style/StringConcatenation:
|
44
|
+
Enabled: false
|
45
|
+
Style/ZeroLengthPredicate:
|
46
|
+
Enabled: false
|
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
nodejs 21.2.0
|
data/.yardopts
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,374 @@
|
|
1
|
+
# Hanami::CLI
|
2
|
+
|
3
|
+
Hanami Command Line Interface
|
4
|
+
|
5
|
+
## v2.2.0.beta2 - 2024-09-25
|
6
|
+
|
7
|
+
### Added
|
8
|
+
|
9
|
+
- [Tim Riley] MySQL support for `db` commands (#226)
|
10
|
+
- [Tim Riley] Support for multiple gateways in `db` commands (#232, #234, #237, #238)
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
|
14
|
+
- [Kyle Plump, Tim Riley] Delete `.keep` files when generating new files into previously empty directory (#224)
|
15
|
+
- [Sean Collins] Add `db/*.sqlite` to the `.gitignore` in new apps (#210)
|
16
|
+
- [Sean Collins] Print warnings for misconfigured databases when running `db` commands (#211)
|
17
|
+
|
18
|
+
## v2.2.0.beta1 - 2024-07-16
|
19
|
+
|
20
|
+
### Added
|
21
|
+
|
22
|
+
- [Sean Collins] Generate db files in `hanami new` and `generate slice`
|
23
|
+
- [Tim Riley] Add `db` commands: `create`, `drop`, `migrate`, `structure dump` `structure load`, `seed` `prepare`, `version`
|
24
|
+
- [Tim Riley] Support SQLite and Postgres for `db` commands
|
25
|
+
- [Sean Collins] Add `generate` commands for db components: `generate migration`, `generate relation`, `generate repo`, `generate struct`
|
26
|
+
- [Krzysztof] Add `generate component` command
|
27
|
+
- [Sean Collins] Add `generate operation` command
|
28
|
+
|
29
|
+
### Changed
|
30
|
+
|
31
|
+
- Drop support for Ruby 3.0
|
32
|
+
|
33
|
+
## v2.1.1 - 2024-03-19
|
34
|
+
|
35
|
+
### Fixed
|
36
|
+
|
37
|
+
- [Ryan Bigg] Properly pass INT signal to child processes when interrupting `hanami assets watch` command
|
38
|
+
|
39
|
+
## v2.1.0 - 2024-02-27
|
40
|
+
|
41
|
+
### Changed
|
42
|
+
|
43
|
+
- [Tim Riley] Underscore slice names in `public/assets/` to avoid naming conflicts with nested asset entry points. In this arrangement, an "admin" slice will have its assets compiled into `public/assets/_admin/`.
|
44
|
+
|
45
|
+
## v2.1.0.rc3 - 2024-02-16
|
46
|
+
|
47
|
+
### Changed
|
48
|
+
|
49
|
+
- [Tim Riley] For `hanami assets` commands, run a separate assets compilation process per slice (in parallel).
|
50
|
+
- [Tim Riley] Generate compiled assets into separate folders per slice, each with its own `assets.js` manifest file: `public/assets/` for the app, and `public/assets/[slice_name]/` for each slice.
|
51
|
+
- [Tim Riley] For `hanami assets` commands, directly detect and invoke the `config/assets.js` files. Look for this file within each slice, and fall back to the app-level file.
|
52
|
+
- [Tim Riley] Do not generate `"scripts": {"assets": "..."}` section in new app's `package.json`.
|
53
|
+
- [Tim Riley] Subclasses of `Hanami::CLI::Command` receive default args to their `#initialize` methods, and do not need to re-declare default args themselves.
|
54
|
+
- [Philip Arndt] Alphabetically sort hanami gems in the new app `Gemfile`.
|
55
|
+
|
56
|
+
### Fixed
|
57
|
+
|
58
|
+
- [Nishiki (錦華)] Strip invalid characters from module name when generating new app.
|
59
|
+
|
60
|
+
## v2.1.0.rc2 - 2023-11-08
|
61
|
+
|
62
|
+
### Added
|
63
|
+
|
64
|
+
- [Tim Riley] Add `--skip-tests` for `hanami generate` commands. This CLI option will skip tests generation.
|
65
|
+
|
66
|
+
### Changed
|
67
|
+
|
68
|
+
- [Tim Riley] Set `"type": "module"` in package.json, enabling ES modules by default
|
69
|
+
- [Tim Riley] Rename `config/assets.mjs` to `config/assets.js` (use a plain `.js` file extension)
|
70
|
+
|
71
|
+
### Fixed
|
72
|
+
|
73
|
+
- [Tim Riley] Use correct helper names in generated app layout
|
74
|
+
- [Luca Guidi] Ensure to generate apps with correct pre-release version of `hanami-assets` NPM package
|
75
|
+
- [Sean Collins] Print to stderr NPM installation errors when running `hanami install`
|
76
|
+
- [Sean Collins] Ensure to install missing gems after `hanami install` is ran
|
77
|
+
|
78
|
+
## v2.1.0.rc1 - 2023-11-01
|
79
|
+
|
80
|
+
### Added
|
81
|
+
|
82
|
+
- [Tim Riley] `hanami new` to generate `bin/dev` as configuration for `hanami dev`
|
83
|
+
- [Luca Guidi] Introducing `hanami generate part` to generate view parts
|
84
|
+
|
85
|
+
### Fixed
|
86
|
+
|
87
|
+
- [Luca Guidi] `hanami new` generates a fully documented Puma configuration in `config/puma.rb`
|
88
|
+
|
89
|
+
### Changed
|
90
|
+
|
91
|
+
- [Tim Riley] `hanami new` generates a `config/assets.mjs` as Assets configuration
|
92
|
+
- [Tim Riley] `hanami new` generates a leaner `package.json`
|
93
|
+
- [Tim Riley] `hanami new` doesn't generate a default root route anymore
|
94
|
+
- [Aaron Moodie & Tim Riley] `hanami new` to generate a redesigned 404 and 500 error pages
|
95
|
+
- [Luca Guidi] When generating a RESTful action, skip `create`, if `new` is present, and `update`, if `edit` is present
|
96
|
+
|
97
|
+
## v2.1.0.beta2 - 2023-10-04
|
98
|
+
|
99
|
+
### Added
|
100
|
+
|
101
|
+
- [Luca Guidi] `hanami new` generates `Procfile.dev`
|
102
|
+
- [Luca Guidi] `hanami new` generates basic app assets, if `hanami-assets` is bundled by the app
|
103
|
+
- [Luca Guidi] `hanami new` accepts `--head` to generate the app using Hanami HEAD version from GitHub
|
104
|
+
- [Luca Guidi] `hanami generate slice` generates basic slice assets, if `hanami-assets` is bundled by the app
|
105
|
+
- [Ryan Bigg] `hanami generate action` generates corresponding view, if `hanami-view` is bundled by the app
|
106
|
+
- [Luca Guidi] `hanami assets compile` to compile assets at the deploy time
|
107
|
+
- [Luca Guidi] `hanami assets watch` to watch and compile assets at the development time
|
108
|
+
- [Luca Guidi] `hanami dev` to start the processes in `Procfile.dev`
|
109
|
+
|
110
|
+
### Fixed
|
111
|
+
|
112
|
+
- [Luca Guidi] `hanami new` generates a `Gemfile` with `hanami-webconsole` in `:development` group
|
113
|
+
- [Luca Guidi] `hanami new` generates a `Gemfile` with versioned `hanami-webconsole`, `hanami-rspec`, and `hanami-reloader`
|
114
|
+
|
115
|
+
## v2.1.0.beta1 - 2023-06-29
|
116
|
+
|
117
|
+
### Added
|
118
|
+
|
119
|
+
- [Tim Riley] `hanami new` to generate default views, templates, and helpers
|
120
|
+
- [Tim Riley] `hanami generate slice` to generate default views, templates, and helpers
|
121
|
+
- [Tim Riley] `hanami generate action` to generate associated view and template
|
122
|
+
- [Tim Riley] Introduced `hanami generate view`
|
123
|
+
- [Tim Riley] `hanami new` to generate `Gemfile` with `hanami-view` and `hanami-webconsole` gems
|
124
|
+
- [Tim Riley] `hanami new` to generate default error pages for `404` and `500` HTTP errors
|
125
|
+
|
126
|
+
### Fixed
|
127
|
+
|
128
|
+
- [Philip Arndt] `hanami server` to start only one Puma worker by default
|
129
|
+
|
130
|
+
## v2.0.3 - 2023-02-01
|
131
|
+
|
132
|
+
### Added
|
133
|
+
|
134
|
+
- [Luca Guidi] Generate a default `.gitignore` when using `hanami new`
|
135
|
+
|
136
|
+
### Fixed
|
137
|
+
|
138
|
+
- [dsisnero] Ensure to run automatically bundle gems when using `hanami new` on Windows
|
139
|
+
- [Luca Guidi] Ensure to generate the correct action identifier in routes when using `hanami generate action` with deeply nested action name
|
140
|
+
|
141
|
+
## v2.0.2 - 2022-12-25
|
142
|
+
|
143
|
+
### Added
|
144
|
+
|
145
|
+
- [Luca Guidi] Official support for Ruby 3.2
|
146
|
+
|
147
|
+
## v2.0.1 - 2022-12-06
|
148
|
+
|
149
|
+
### Fixed
|
150
|
+
|
151
|
+
- [Luca Guidi] Ensure to load `.env` files during CLI commands execution
|
152
|
+
- [Luca Guidi] Ensure `hanami server` to respect HTTP port used in `.env` or the value given as CLI argument (`--port`)
|
153
|
+
|
154
|
+
## v2.0.0 - 2022-11-22
|
155
|
+
|
156
|
+
### Added
|
157
|
+
|
158
|
+
- [Tim Riley] Use Zeitwerk to autoload the gem
|
159
|
+
|
160
|
+
### Fixed
|
161
|
+
|
162
|
+
- [Luca Guidi] In case of internal exception, don't print the stack trace to stderr, print the error message, exit with 1.
|
163
|
+
- [Tim Riley] Ensure to be able to run `hanami` CLI in Hanami app subdirectories.
|
164
|
+
- [Sean Collins] Return an error when trying to run `hanami new` with an existing target path (file or directory)
|
165
|
+
|
166
|
+
## v2.0.0.rc1 - 2022-11-08
|
167
|
+
|
168
|
+
## v2.0.0.beta4 - 2022-10-24
|
169
|
+
|
170
|
+
### Changed
|
171
|
+
|
172
|
+
- [Sean Collins] Show output when generating files (e.g. in `hanami new`) (#49)
|
173
|
+
- [Luca Guidi] Advertise Bundler and Hanami install steps when running `hanami new` (#54)
|
174
|
+
|
175
|
+
## v2.0.0.beta3 - 2022-09-21
|
176
|
+
|
177
|
+
### Added
|
178
|
+
|
179
|
+
- [Luca Guidi] New applications to support Puma server out of the box. Add the `puma` gem to `Gemfile` and generate `config/puma.rb`.
|
180
|
+
- [Luca Guidi] New applications to support code reloading for `hanami server` via `hanami-reloader`. This gem is added to app's `Gemfile`.
|
181
|
+
- [Marc Busqué] Introduce code reloading for `hanami console` via `#reload` method to be invoked within the console context.
|
182
|
+
|
183
|
+
### Fixed
|
184
|
+
|
185
|
+
- [Luca Guidi] Respect plural when generating code via `hanami new` and `hanami generate`. Example: `hanami new code_insights` => `CodeInsights` instead of `CodeInsight`
|
186
|
+
- [Luca Guidi] Ensure `hanami generate action` to not crash when invoked with non-RESTful action names. Example: `hanami generate action talent.apply`
|
187
|
+
|
188
|
+
### Changed
|
189
|
+
|
190
|
+
- [Piotr Solnica] `hanami generate action` to add routes to `config/routes.rb` without the `define` block context. See https://github.com/hanami/hanami/pull/1208
|
191
|
+
|
192
|
+
## v2.0.0.beta2 - 2022-08-16
|
193
|
+
|
194
|
+
### Added
|
195
|
+
|
196
|
+
- [Luca Guidi] Added `hanami generate slice` command, for generating a new slice [#32]
|
197
|
+
- [Luca Guidi] Added `hanami generate action` command, for generating a new action in the app or a slice [#33]
|
198
|
+
- [Marc Busqué] Added `hanami middlewares` command, for listing middleware configed in app and/or in `config/routes.rb` [#30]
|
199
|
+
|
200
|
+
### Changed
|
201
|
+
|
202
|
+
- [Marc Busqué, Tim Riley] `hanami` command will detect the app even when called inside nested subdirectories [#34]
|
203
|
+
- [Seb Wilgosz] Include hanami-validations in generated app’s `Gemfile`, allowing action classes to specify `.params` [#31]
|
204
|
+
- [Tim Riley] Include dry-types in generated app’s `Gemfile`, which is used by the types module defined in `lib/[app_name]/types.rb` (dry-types is no longer a hard dependency of the hanami gem as of 2.0.0.beta2) [#29]
|
205
|
+
- [Tim Riley] Include dotenv in generated app’s `Gemfile`, allowing `ENV` values to be loaded from `.env*` files [#29]
|
206
|
+
|
207
|
+
## v2.0.0.beta1 - 2022-07-20
|
208
|
+
|
209
|
+
### Added
|
210
|
+
|
211
|
+
- [Luca Guidi] Implemented `hanami new` to generate a new Hanami app
|
212
|
+
- [Piotr Solnica] Implemented `hanami console` to start an interactive console (REPL)
|
213
|
+
- [Marc Busqué] Implemented `hanami server` to start a HTTP server based on Rack
|
214
|
+
- [Marc Busqué] Implemented `hanami routes` to print app routes
|
215
|
+
- [Luca Guidi] Implemented `hanami version` to print app Hanami version
|
216
|
+
|
217
|
+
## v2.0.0.alpha8.1 - 2022-05-23
|
218
|
+
|
219
|
+
### Fixed
|
220
|
+
|
221
|
+
- [Tim Riley] Ensure CLI starts properly by fixing use of `Slice.slice_name`
|
222
|
+
|
223
|
+
## v2.0.0.alpha8 - 2022-05-19
|
224
|
+
|
225
|
+
### Fixed
|
226
|
+
|
227
|
+
- [Andrew Croome] Respect HANAMI_ENV env var to set Hanami env if no `--env` option is supplied
|
228
|
+
- [Lucas Mendelowski] Ensure Sequel migrations extension is loaded before related `db` commands are run
|
229
|
+
|
230
|
+
## v2.0.0.alpha7 - 2022-03-11
|
231
|
+
|
232
|
+
### Changed
|
233
|
+
|
234
|
+
- [Tim Riley] [Internal] Update console slice readers to work with new `Hanami::Application.slices` API
|
235
|
+
|
236
|
+
## v2.0.0.alpha6.1 - 2022-02-11
|
237
|
+
|
238
|
+
### Fixed
|
239
|
+
|
240
|
+
- [Viet Tran] Ensure `hanami db` commands to work with `hanami` `v2.0.0.alpha6`
|
241
|
+
|
242
|
+
## v2.0.0.alpha6 - 2022-02-10
|
243
|
+
|
244
|
+
### Added
|
245
|
+
|
246
|
+
- [Luca Guidi] Official support for Ruby: MRI 3.1
|
247
|
+
|
248
|
+
### Changed
|
249
|
+
|
250
|
+
- [Luca Guidi] Drop support for Ruby: MRI 2.6, and 2.7
|
251
|
+
|
252
|
+
## v2.0.0.alpha4 - 2021-12-07
|
253
|
+
|
254
|
+
### Added
|
255
|
+
|
256
|
+
- [Tim Riley] Display a custom prompt when using irb-based console (consistent with pry-based console)
|
257
|
+
- [Phil Arndt] Support `postgresql://` URL schemes (in addition to existing `postgres://` support) for `db` subcommands
|
258
|
+
|
259
|
+
### Fixed
|
260
|
+
|
261
|
+
- [Tim Riley] Ensure slice helper methods work in console (e.g. top-level `main` method will return `Main::Slice` if an app has a "main" slice defined)
|
262
|
+
|
263
|
+
## v2.0.0.alpha3 - 2021-11-09
|
264
|
+
|
265
|
+
No changes.
|
266
|
+
|
267
|
+
## v2.0.0.alpha2 - 2021-05-04
|
268
|
+
|
269
|
+
### Added
|
270
|
+
|
271
|
+
- [Luca Guidi] Official support for Ruby: MRI 3.0
|
272
|
+
- [Luca Guidi] Dynamically change the set of available commands depending on the context (outside or inside an Hanami app)
|
273
|
+
- [Luca Guidi] Dynamically change the set of available commands depending on Hanami app architecture
|
274
|
+
- [Luca Guidi] Implemented `hanami version` (available both outside and inside an Hanami app)
|
275
|
+
- [Piotr Solnica] Implemented `db *` commands (available both outside and inside an Hanami app) (sqlite and postgres only for now)
|
276
|
+
- [Piotr Solnica] Implemented `console` command with support for `IRB` and `Pry` (`pry` is auto-detected)
|
277
|
+
|
278
|
+
### Changed
|
279
|
+
|
280
|
+
- [Luca Guidi] Changed the purpose of this gem: the CLI Ruby framework has been extracted into `dry-cli` gem. `hanami-cli` is now the `hanami` command line.
|
281
|
+
- [Luca Guidi] Drop support for Ruby: MRI 2.5.
|
282
|
+
|
283
|
+
## v1.0.0.alpha1 - 2019-01-30
|
284
|
+
|
285
|
+
### Added
|
286
|
+
|
287
|
+
- [Luca Guidi] Inheritng from subclasses of `Hanami::CLI::Command`, allows to inherit arguments, options, description, and examples.
|
288
|
+
- [Luca Guidi] Allow to use `super` from `#call`
|
289
|
+
|
290
|
+
### Changed
|
291
|
+
|
292
|
+
- [Luca Guidi] Drop support for Ruby: MRI 2.3, and 2.4.
|
293
|
+
|
294
|
+
## v0.3.1 - 2019-01-18
|
295
|
+
|
296
|
+
### Added
|
297
|
+
|
298
|
+
- [Luca Guidi] Official support for Ruby: MRI 2.6
|
299
|
+
- [Luca Guidi] Support `bundler` 2.0+
|
300
|
+
|
301
|
+
## v0.3.0 - 2018-10-24
|
302
|
+
|
303
|
+
## v0.3.0.beta1 - 2018-08-08
|
304
|
+
|
305
|
+
### Added
|
306
|
+
|
307
|
+
- [Anton Davydov & Alfonso Uceda] Introduce array type for arguments (`foo exec test spec/bookshelf/entities spec/bookshelf/repositories`)
|
308
|
+
- [Anton Davydov & Alfonso Uceda] Introduce array type for options (`foo generate config --apps=web,api`)
|
309
|
+
- [Alfonso Uceda] Introduce variadic arguments (`foo run ruby:latest -- ruby -v`)
|
310
|
+
- [Luca Guidi] Official support for JRuby 9.2.0.0
|
311
|
+
|
312
|
+
### Fixed
|
313
|
+
|
314
|
+
- [Anton Davydov] Print informative message when unknown or wrong option is passed (`"test" was called with arguments "--framework=unknown"`)
|
315
|
+
|
316
|
+
## v0.2.0 - 2018-04-11
|
317
|
+
|
318
|
+
## v0.2.0.rc2 - 2018-04-06
|
319
|
+
|
320
|
+
## v0.2.0.rc1 - 2018-03-30
|
321
|
+
|
322
|
+
## v0.2.0.beta2 - 2018-03-23
|
323
|
+
|
324
|
+
### Added
|
325
|
+
|
326
|
+
- [Anton Davydov & Luca Guidi] Support objects as callbacks
|
327
|
+
|
328
|
+
### Fixed
|
329
|
+
|
330
|
+
- [Anton Davydov & Luca Guidi] Ensure callbacks' context of execution (aka `self`) to be the command that is being executed
|
331
|
+
|
332
|
+
## v0.2.0.beta1 - 2018-02-28
|
333
|
+
|
334
|
+
### Added
|
335
|
+
|
336
|
+
- [Anton Davydov] Register `before`/`after` callbacks for commands
|
337
|
+
|
338
|
+
## v0.1.1 - 2018-02-27
|
339
|
+
|
340
|
+
### Added
|
341
|
+
|
342
|
+
- [Luca Guidi] Official support for Ruby: MRI 2.5
|
343
|
+
|
344
|
+
### Fixed
|
345
|
+
|
346
|
+
- [Alfonso Uceda] Ensure default values for arguments to be sent to commands
|
347
|
+
- [Alfonso Uceda] Ensure to fail when a missing required argument isn't provider, but an option is provided instead
|
348
|
+
|
349
|
+
## v0.1.0 - 2017-10-25
|
350
|
+
|
351
|
+
## v0.1.0.rc1 - 2017-10-16
|
352
|
+
|
353
|
+
## v0.1.0.beta3 - 2017-10-04
|
354
|
+
|
355
|
+
## v0.1.0.beta2 - 2017-10-03
|
356
|
+
|
357
|
+
### Added
|
358
|
+
|
359
|
+
- [Alfonso Uceda] Allow default value for arguments
|
360
|
+
|
361
|
+
## v0.1.0.beta1 - 2017-08-11
|
362
|
+
|
363
|
+
### Added
|
364
|
+
|
365
|
+
- [Alfonso Uceda, Luca Guidi] Commands banner and usage
|
366
|
+
- [Alfonso Uceda] Added support for subcommands
|
367
|
+
|
368
|
+
- [Alfonso Uceda] Validations for arguments and options
|
369
|
+
- [Alfonso Uceda] Commands arguments and options
|
370
|
+
- [Alfonso Uceda] Commands description
|
371
|
+
- [Alfonso Uceda, Oana Sipos] Commands aliases
|
372
|
+
- [Luca Guidi] Exit on unknown command
|
373
|
+
- [Luca Guidi, Alfonso Uceda, Oana Sipos] Command lookup
|
374
|
+
- [Luca Guidi, Tim Riley] Trie based registry to register commands and allow third-parties to override/add commands
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6
|
+
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
8
|
+
|
9
|
+
## Our Standards
|
10
|
+
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
12
|
+
|
13
|
+
* Demonstrating empathy and kindness toward other people
|
14
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
15
|
+
* Giving and gracefully accepting constructive feedback
|
16
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
17
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
18
|
+
|
19
|
+
Examples of unacceptable behavior include:
|
20
|
+
|
21
|
+
* The use of sexualized language or imagery, and sexual attention or
|
22
|
+
advances of any kind
|
23
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
24
|
+
* Public or private harassment
|
25
|
+
* Publishing others' private information, such as a physical or email
|
26
|
+
address, without their explicit permission
|
27
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
28
|
+
professional setting
|
29
|
+
|
30
|
+
## Enforcement Responsibilities
|
31
|
+
|
32
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
33
|
+
|
34
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
35
|
+
|
36
|
+
## Scope
|
37
|
+
|
38
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
39
|
+
|
40
|
+
## Enforcement
|
41
|
+
|
42
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at me@lucaguidi.com. All complaints will be reviewed and investigated promptly and fairly.
|
43
|
+
|
44
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
45
|
+
|
46
|
+
## Enforcement Guidelines
|
47
|
+
|
48
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
49
|
+
|
50
|
+
### 1. Correction
|
51
|
+
|
52
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
53
|
+
|
54
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
55
|
+
|
56
|
+
### 2. Warning
|
57
|
+
|
58
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
59
|
+
|
60
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
61
|
+
|
62
|
+
### 3. Temporary Ban
|
63
|
+
|
64
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
65
|
+
|
66
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
67
|
+
|
68
|
+
### 4. Permanent Ban
|
69
|
+
|
70
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
71
|
+
|
72
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
73
|
+
|
74
|
+
## Attribution
|
75
|
+
|
76
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
77
|
+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
78
|
+
|
79
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
80
|
+
|
81
|
+
[homepage]: https://www.contributor-covenant.org
|
82
|
+
|
83
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
84
|
+
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
data/Gemfile
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
gemspec
|
5
|
+
|
6
|
+
unless ENV["CI"]
|
7
|
+
gem "byebug", platforms: :mri
|
8
|
+
gem "yard"
|
9
|
+
gem "yard-junk"
|
10
|
+
end
|
11
|
+
|
12
|
+
gem "hanami", github: "hanami/hanami", branch: "main"
|
13
|
+
gem "hanami-assets", github: "hanami/assets", branch: "main"
|
14
|
+
gem "hanami-controller", github: "hanami/controller", branch: "main"
|
15
|
+
gem "hanami-db", github: "hanami/db", branch: "main"
|
16
|
+
gem "hanami-router", github: "hanami/router", branch: "main"
|
17
|
+
gem "hanami-utils", github: "hanami/utils", branch: "main"
|
18
|
+
|
19
|
+
gem "dry-system", github: "dry-rb/dry-system", branch: "main"
|
20
|
+
|
21
|
+
gem "rack"
|
22
|
+
|
23
|
+
# gem "mysql2"
|
24
|
+
gem "pg"
|
25
|
+
gem "sqlite3"
|
26
|
+
|
27
|
+
gem "hanami-devtools", github: "hanami/devtools", branch: "main"
|
28
|
+
|
29
|
+
group :test do
|
30
|
+
gem "pry"
|
31
|
+
end
|
data/LICENSE.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright © 2014 Hanami Team
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|