hanami-rspec 2.3.1 → 3.0.0

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: 1a2185e39d0b525de7f16d338057a0e2f87b1b2537663c63f0d0f2f9ddc09741
4
- data.tar.gz: 691c5b210355c983af3a879dca1cf69cfbb6197b6c7151a76d37d78b002748c4
3
+ metadata.gz: c4baaba2d178ec3923d5fb41010932f163d2d49d04cefb392dc7f42ca1b8374b
4
+ data.tar.gz: a29d6961031ce60fe544df4b2f60f0e45ee2e9518b3a90650bf89bde2bd3aed2
5
5
  SHA512:
6
- metadata.gz: 79f9422d2a433e90b9b4cf0bc2a8e963c12869004aeac391425c1f23413d5b3c78f04683ba5bd44f10ec74a74c31a9ae99c7fee7f5c96c2e377efbe665b822eb
7
- data.tar.gz: 146c5ee5983d235ddd02a8263d74c67c13acf8e1f58e491c9c068ee0383f6e56e3e7972de2ba47ada5db3b5bca2f1e8cce00e8d11c4dfbb04b43dfa12a6974ac
6
+ metadata.gz: 843469322480c2bf22c7605ece0401e44538858b402dd8c7320ab837b15b892d9956c3b6b112476d9485a397282ab566b10c75aff044ea81528dd0a171d403a1
7
+ data.tar.gz: e686721d90b7d2583323e10273e119962246b91cbdf612420ea741fe75238e565c2126d65bac7a9ae9cada27ec000e8cc1e6a10b78463797ee320a0a5ff60cd2
data/CHANGELOG.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Break Versioning](https://www.taoensso.com/break-versioning).
7
7
 
8
8
  ## [Unreleased]
9
9
 
@@ -19,13 +19,48 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
19
 
20
20
  ### Security
21
21
 
22
- [Unreleased]: https://github.com/hanami/rspec/compare/v2.3.0...HEAD
22
+ [Unreleased]: https://github.com/hanami/rspec/compare/v3.0.0.rc1...HEAD
23
+
24
+ ## [v3.0.0] - 2026-06-30
25
+
26
+ ### Added
27
+
28
+ - Activate Dry Monads' RSpec extension in `spec/support/operations.rb`. (@timriley in #48)
29
+ - Generate a starter spec when running `hanami generate operation`. (@timriley in #48)
30
+ - Generate `spec/support/mailers.rb` to reset recorded mail deliveries between examples tagged `:mailers`. Use this tag for the generated mailer tests. (@timriley in #49)
31
+ - Generate a starter spec when running `hanami generate mailer`. (@timriley in #48)
32
+
33
+ ### Changed
34
+
35
+ - Use `prepend_before` for the generated DatabaseCleaner `:db` hook, so it runs before any other `before` hooks that might touch the database. This prevents factory calls in spec-level `before` blocks from running before the test transaction starts and leaking records across tests. (@timriley in #47)
36
+ - Check for presence of hanami-action gem rather than hanami-controller (now retired). (@cllns in #44)
37
+ - Require Ruby 3.3 or newer.
38
+
39
+ [v3.0.0]: https://github.com/hanami/rspec/compare/v2.3.1...v3.0.0
40
+
41
+ ## [v3.0.0.rc1] - 2026-06-16
42
+
43
+ ### Added
44
+
45
+ - Activate Dry Monads' RSpec extension in `spec/support/operations.rb`. (@timriley)
46
+ - Generate a starter spec when running `hanami generate operation`. (@timriley)
47
+ - Generate a starter spec when running `hanami generate mailer`. (@timriley)
48
+
49
+ ### Changed
50
+
51
+ - Use `prepend_before` for the generated DatabaseCleaner `:db` hook, so it runs before any other `before` hooks that might touch the database. This prevents factory calls in spec-level `before` blocks from running before the test transaction starts and leaking records across tests. (@timriley in #47)
52
+ - Check for presence of hanami-action gem rather than hanami-controller (now retired). (@cllns in #44)
53
+ - Require Ruby 3.3 or newer.
54
+
55
+ [v3.0.0.rc1]: https://github.com/hanami/rspec/compare/v2.3.1...v3.0.0.rc1
23
56
 
24
57
  ## [2.3.1] - 2026-01-23
25
58
 
26
59
  ### Fixed
27
60
 
28
- - Allow command callbacks to run with both Dry CLI 1.3 and 1.4 (1.4 corrects a longstanding bug regarding argument passing to command callbacks, which we had previously worked around here). (@timriley in #41)
61
+ - Allow command callbacks to run with both Dry CLI 1.3 and 1.4 (1.4 corrects a longstanding bug regarding argument passing to command callbacks, which we had previously worked around here). (Tim Riley in #41)
62
+
63
+ [2.3.1]: https://github.com/hanami/rspec/compare/v2.3.0...v2.3.1
29
64
 
30
65
  ## [2.3.0] - 2025-11-12
31
66
 
@@ -35,7 +70,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
35
70
 
36
71
  ### Changed
37
72
 
38
- - Drop support for Ruby 3.1
73
+ - Drop support for Ruby 3.1.
39
74
 
40
75
  [2.3.0.beta2]: https://github.com/hanami/rspec/compare/v2.3.0.beta1...v2.3.0.beta2
41
76
 
@@ -43,7 +78,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
43
78
 
44
79
  ### Changed
45
80
 
46
- - [Aaron Allen] Change shared context name in generated `spec/support/requests.rb` to avoid a RuboCop RSpec offense (#40)
81
+ - Change shared context name in generated `spec/support/requests.rb` to avoid a RuboCop RSpec offense. (Aaron Allen in #40)
47
82
 
48
83
  [2.3.0.beta1]: https://github.com/hanami/rspec/compare/v2.2.1...v2.3.0.beta1
49
84
 
@@ -51,7 +86,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
51
86
 
52
87
  ### Changed
53
88
 
54
- - [Tim Riley] Modify `Gemfile` via a `before "install"` hook on the `hanami` CLI. This ensures that testing-related gems are installed as part of running `hanami new` (#30)
89
+ - Modify `Gemfile` via a `before "install"` hook on the `hanami` CLI. This ensures that testing-related gems are installed as part of running `hanami new`. (Tim Riley in #30)
55
90
 
56
91
  [2.2.1]: https://github.com/hanami/rspec/compare/v2.2.0...v2.2.1
57
92
 
@@ -59,7 +94,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
59
94
 
60
95
  ### Changed
61
96
 
62
- - [Paweł Świątkowski, Seb Wilgosz] Only enhance `generate` CLI commands if the relevant gems are bundled (#29)
97
+ - Only enhance `generate` CLI commands if the relevant gems are bundled. (Paweł Świątkowski, Seb Wilgosz in #29)
63
98
 
64
99
  [2.2.0]: https://github.com/hanami/rspec/compare/v2.2.0.rc1...v2.2.0
65
100
 
@@ -67,11 +102,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
67
102
 
68
103
  ### Added
69
104
 
70
- - [Tim Riley] As part of `hanami install`, add `database_cleaner-sequel` to the `Gemfile` and generate DatabaseCleaner configuration in `spec/support/db.rb` and `spec/support/db/cleaning.rb` (#28)
105
+ - As part of `hanami install`, add `database_cleaner-sequel` to the `Gemfile` and generate DatabaseCleaner configuration in `spec/support/db.rb` and `spec/support/db/cleaning.rb`. (Tim Riley in #28)
71
106
 
72
107
  ### Changed
73
108
 
74
- - [Seb Wilgosz] Only enhance `generate` CLI commands if the relevant gems are bundled (#26)
109
+ - Only enhance `generate` CLI commands if the relevant gems are bundled. (Seb Wilgosz in #26)
75
110
 
76
111
  [2.2.0.rc1]: https://github.com/hanami/rspec/compare/v2.2.0.beta1...v2.2.0.rc1
77
112
 
@@ -79,12 +114,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
79
114
 
80
115
  ### Added
81
116
 
82
- - [Sean Collins] Include `Dry::Monads[:result]` in tests via `support/operations.rb`
117
+ - Include `Dry::Monads[:result]` in tests via `support/operations.rb`. (Sean Collins)
83
118
 
84
119
  ### Changed
85
120
 
86
121
  - Drop support for Ruby 3.0
87
- - [Sean Collins] In generated `spec_helper.rb`, require all files under `spec/support/` in a loop, rather than via manual requires (#24)
122
+ - In generated `spec_helper.rb`, require all files under `spec/support/` in a loop, rather than via manual requires. (Sean Collins in #24)
88
123
 
89
124
  [2.2.0.beta1]: https://github.com/hanami/rspec/compare/v2.1.0...v2.2.0.beta1
90
125
 
@@ -100,12 +135,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
100
135
 
101
136
  ### Added
102
137
 
103
- - [Tim Riley] Skip generating tests for `hanami generate` when `--skip-tests` CLI option is given
104
- - [Tim Riley] Install Capybara and generate `spec/support/capybara.rb` in `hanami install` hook
138
+ - Skip generating tests for `hanami generate` when `--skip-tests` CLI option is given. (Tim Riley)
139
+ - Install Capybara and generate `spec/support/capybara.rb` in `hanami install` hook. (Tim Riley)
105
140
 
106
141
  ### Changed
107
142
 
108
- - [Tim Riley] Add explanatory code comments to `spec/support/rspec.rb` generated in `hanami install` hook
143
+ - Add explanatory code comments to `spec/support/rspec.rb` generated in `hanami install` hook. (Tim Riley)
109
144
 
110
145
  [2.1.0.rc2]: https://github.com/hanami/rspec/compare/v2.1.0.rc1...v2.1.0.rc2
111
146
 
@@ -113,11 +148,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
113
148
 
114
149
  ### Added
115
150
 
116
- - [Luca Guidi] Generate spec for `hanami generate part` command
151
+ - Generate spec for `hanami generate part` command. (Luca Guidi)
117
152
 
118
153
  ### Changed
119
154
 
120
- - [Luca Guidi] Default request spec to expect 404, now that `hanami new` doesn't generate a default root route anymore
155
+ - Default request spec to expect 404, now that `hanami new` doesn't generate a default root route anymore. (Luca Guidi)
121
156
 
122
157
  [2.1.0.rc1]: https://github.com/hanami/rspec/compare/v2.1.0.beta1...v2.1.0.rc1
123
158
 
@@ -129,7 +164,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
129
164
 
130
165
  ### Added
131
166
 
132
- - [Luca Guidi] Official support for Ruby 3.2
167
+ - Official support for Ruby 3.2. (Luca Guidi)
133
168
 
134
169
  [2.0.1]: https://github.com/hanami/rspec/compare/v2.0.0...v2.0.1
135
170
 
@@ -137,8 +172,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
137
172
 
138
173
  ### Added
139
174
 
140
- - [Tim Riley] Use Zeitwerk to autoload the gem
141
- - [Luca Guidi] Support RSpec 3.12
175
+ - Use Zeitwerk to autoload the gem. (Tim Riley)
176
+ - Support RSpec 3.12. (Luca Guidi)
142
177
 
143
178
  [2.0.0]: https://github.com/hanami/rspec/compare/v2.0.0.rc1...v2.0.0
144
179
 
@@ -146,7 +181,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
146
181
 
147
182
  ### Changed
148
183
 
149
- - [Luca Guidi] Follow `hanami` versioning
184
+ - Follow `hanami` versioning. (Luca Guidi)
150
185
 
151
186
  [2.0.0.rc1]: https://github.com/hanami/rspec/compare/v3.11.0.beta4...v2.0.0.rc1
152
187
 
@@ -154,7 +189,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
154
189
 
155
190
  ### Changed
156
191
 
157
- - [Luca Guidi] Generate slice specs under `spec/slices/[slice_name]/` (#9)
192
+ - Generate slice specs under `spec/slices/[slice_name]/`. (Luca Guidi in #9)
158
193
 
159
194
  [3.11.0.beta4]: https://github.com/hanami/rspec/compare/v3.11.0.beta3...v3.11.0.beta4
160
195
 
@@ -162,8 +197,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
162
197
 
163
198
  ### Added
164
199
 
165
- - [Luca Guidi] Hook into `hanami new` and `hanami generate` to respect name pluralization
166
- - [Luca Guidi] Hook into `hanami generate action` to generate action specs
200
+ - Hook into `hanami new` and `hanami generate` to respect name pluralization. (Luca Guidi)
201
+ - Hook into `hanami generate action` to generate action specs. (Luca Guidi)
167
202
 
168
203
  [3.11.0.beta3]: https://github.com/hanami/rspec/compare/v3.11.0.beta2...v3.11.0.beta3
169
204
 
@@ -171,7 +206,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
171
206
 
172
207
  ### Added
173
208
 
174
- - [Luca Guidi] Hook into `hanami generate slice` to generate a slice directory in spec/ along with a placeholder base action spec (#5)
209
+ - Hook into `hanami generate slice` to generate a slice directory in spec/ along with a placeholder base action spec. (Luca Guidi in #5)
175
210
 
176
211
  [3.11.0.beta2]: https://github.com/hanami/rspec/compare/v3.11.0.beta1...v3.11.0.beta2
177
212
 
@@ -179,6 +214,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
179
214
 
180
215
  ### Added
181
216
 
182
- - [Luca Guidi] Hook into `hanami install` to setup RSpec + Rack::Test
217
+ - Hook into `hanami install` to setup RSpec + Rack::Test. (Luca Guidi)
183
218
 
184
219
  [3.11.0.beta1]: https://github.com/hanami/rspec/releases/tag/v3.11.0.beta1
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015-2026 Hanakai team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,18 +1,14 @@
1
- # Hanami::RSpec
1
+ <!--- This file is synced from hanakai-rb/repo-sync -->
2
2
 
3
- RSpec and testing support for [Hanami applications](https://github.com/hanami/hanami).
3
+ [actions]: https://github.com/hanami/hanami-rspec/actions
4
+ [chat]: https://discord.gg/naQApPAsZB
5
+ [forum]: https://discourse.hanamirb.org
6
+ [rubygem]: https://rubygems.org/gems/hanami-rspec
4
7
 
5
- ## Status
8
+ # Hanami RSpec [![Gem Version](https://badge.fury.io/rb/hanami-rspec.svg)][rubygem] [![CI Status](https://github.com/hanami/hanami-rspec/workflows/CI/badge.svg)][actions]
6
9
 
7
- [![Gem Version](https://badge.fury.io/rb/hanami-rspec.svg)](https://badge.fury.io/rb/hanami-rspec)
8
- [![CI](https://github.com/hanami/rspec/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/hanami/rspec/actions?query=workflow%3Aci+branch%3Amain)
9
-
10
- ## Contact
11
-
12
- - Home page: http://hanamirb.org
13
- - Mailing List: http://hanamirb.org/mailing-list
14
- - Bugs/Issues: https://github.com/hanami/rspec/issues
15
- - Chat: http://chat.hanamirb.org
10
+ [![Forum](https://img.shields.io/badge/Forum-dc360f?logo=discourse&logoColor=white)][forum]
11
+ [![Chat](https://img.shields.io/badge/Chat-717cf8?logo=discord&logoColor=white)][chat]
16
12
 
17
13
  ## Installation
18
14
 
@@ -41,14 +37,13 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
41
37
 
42
38
  Bug reports and pull requests are welcome on GitHub at https://github.com/hanami/rspec. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/hanami/rspec/blob/main/CODE_OF_CONDUCT.md).
43
39
 
44
- ## License
40
+ ## Links
45
41
 
46
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
42
+ - [User documentation](https://hanamirb.org)
43
+ - [API documentation](http://rubydoc.info/gems/hanami-rspec)
47
44
 
48
- ## Code of Conduct
49
45
 
50
- Everyone interacting in the `Hanami::RSpec` project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/hanami/rspec/blob/main/CODE_OF_CONDUCT.md).
46
+ ## License
51
47
 
52
- ## Copyright
48
+ See `LICENSE` file.
53
49
 
54
- Copyright © 2014–2024 Hanami Team – Released under MIT License
data/hanami-rspec.gemspec CHANGED
@@ -1,39 +1,38 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "lib/hanami/rspec/version"
3
+ # This file is synced from hanakai-rb/repo-sync. To update it, edit repo-sync.yml.
4
+
5
+ lib = File.expand_path("lib", __dir__)
6
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
7
+ require "hanami/rspec/version"
4
8
 
5
9
  Gem::Specification.new do |spec|
6
10
  spec.name = "hanami-rspec"
7
- spec.version = Hanami::RSpec::VERSION
8
11
  spec.authors = ["Hanakai team"]
9
12
  spec.email = ["info@hanakai.org"]
10
-
11
- spec.summary = "Hanami RSpec"
12
- spec.description = "Hanami RSpec generators and Rake tasks"
13
- spec.homepage = "https://hanamirb.org"
14
13
  spec.license = "MIT"
15
- spec.required_ruby_version = ">= 3.2"
16
-
17
- spec.metadata["allowed_push_host"] = "https://rubygems.org"
18
-
19
- spec.metadata["homepage_uri"] = spec.homepage
20
- spec.metadata["source_code_uri"] = "https://github.com/hanami/rspec"
21
- spec.metadata["changelog_uri"] = "https://github.com/hanami/rspec/blob/master/CHANGELOG.md"
14
+ spec.version = Hanami::RSpec::VERSION.dup
22
15
 
23
- # Specify which files should be added to the gem when it is released.
24
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
- spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
27
- end
16
+ spec.summary = "Hanami RSpec generators and CLI commands"
17
+ spec.description = spec.summary
18
+ spec.homepage = "https://hanamirb.org"
19
+ spec.files = Dir["CHANGELOG.md", "LICENSE", "README.md", "hanami-rspec.gemspec", "lib/**/*"]
28
20
  spec.bindir = "exe"
29
- spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
21
+ spec.executables = Dir["exe/*"].map { |f| File.basename(f) }
30
22
  spec.require_paths = ["lib"]
31
23
 
32
- spec.add_dependency "hanami-cli", "~> 2.3.0"
33
- spec.add_dependency "rspec", "~> 3.12"
34
- spec.add_dependency "rake", "~> 13.0"
35
- spec.add_dependency "zeitwerk", "~> 2.6"
24
+ spec.extra_rdoc_files = ["README.md", "CHANGELOG.md", "LICENSE"]
25
+
26
+ spec.metadata["changelog_uri"] = "https://github.com/hanami/hanami-rspec/blob/main/CHANGELOG.md"
27
+ spec.metadata["source_code_uri"] = "https://github.com/hanami/hanami-rspec"
28
+ spec.metadata["bug_tracker_uri"] = "https://github.com/hanami/hanami-rspec/issues"
29
+ spec.metadata["funding_uri"] = "https://github.com/sponsors/hanami"
36
30
 
37
- spec.add_development_dependency "rubocop", "~> 1.11"
38
- spec.metadata["rubygems_mfa_required"] = "true"
31
+ spec.required_ruby_version = ">= 3.3"
32
+
33
+ spec.add_runtime_dependency "hanami-cli", "~> 3.0.0"
34
+ spec.add_runtime_dependency "rspec", "~> 3.12"
35
+ spec.add_runtime_dependency "rake", "~> 13.0"
36
+ spec.add_runtime_dependency "zeitwerk", "~> 2.6"
39
37
  end
38
+
@@ -4,14 +4,9 @@ require "shellwords"
4
4
 
5
5
  module Hanami
6
6
  module RSpec
7
- # @since 2.0.0
8
7
  # @api private
9
8
  module Commands
10
- # @since 2.0.0
11
- # @api private
12
9
  class Install < Hanami::CLI::Command
13
- # @since 2.0.0
14
- # @api private
15
10
  def call(*, **)
16
11
  append_gemfile
17
12
  append_gitignore
@@ -21,6 +16,7 @@ module Hanami
21
16
  copy_support_db
22
17
  copy_support_features
23
18
  copy_support_operations
19
+ copy_support_mailers
24
20
  copy_support_requests
25
21
 
26
22
  generate_request_spec
@@ -47,7 +43,7 @@ module Hanami
47
43
  def copy_dotrspec
48
44
  fs.cp(
49
45
  fs.expand_path(fs.join("generators", "dotrspec"), __dir__),
50
- fs.expand_path(fs.join(".rspec")),
46
+ fs.expand_path(fs.join(".rspec"))
51
47
  )
52
48
  end
53
49
 
@@ -93,6 +89,15 @@ module Hanami
93
89
  )
94
90
  end
95
91
 
92
+ def copy_support_mailers
93
+ return unless Hanami.bundled?("hanami-mailer")
94
+
95
+ fs.cp(
96
+ fs.expand_path(fs.join("generators", "support_mailers.rb"), __dir__),
97
+ fs.expand_path(fs.join("spec", "support", "mailers.rb"))
98
+ )
99
+ end
100
+
96
101
  def copy_support_requests
97
102
  fs.cp(
98
103
  fs.expand_path(fs.join("generators", "support_requests.rb"), __dir__),
@@ -108,25 +113,9 @@ module Hanami
108
113
  end
109
114
  end
110
115
 
111
- # @since 2.0.0
112
- # @api private
113
116
  module Generate
114
- # @since 2.0.0
115
- # @api private
116
117
  class Slice < Hanami::CLI::Command
117
- # @since 2.0.0
118
- # @api private
119
- def call(options = nil, name: nil, **)
120
- # Support multiple calling conventions for dry-cli cross-version compatibility:
121
- #
122
- # - dry-cli 1.3 calls with positional hash: call({name: "foo"})
123
- # - dry-cli 1.4+: calls with keyword arguments: call(name: "foo")
124
- #
125
- # TODO: Remove this with Hanami 2.4 (which will require dry-cli 1.4+).
126
- if options.is_a?(Hash)
127
- name = options[:name]
128
- end
129
-
118
+ def call(name: nil, **)
130
119
  slice = inflector.underscore(Shellwords.shellescape(name))
131
120
 
132
121
  generator = Generators::Slice.new(fs: fs, inflector: inflector)
@@ -134,24 +123,8 @@ module Hanami
134
123
  end
135
124
  end
136
125
 
137
- # @since 2.0.0
138
- # @api private
139
126
  class Action < Hanami::CLI::Commands::App::Command
140
- # @since 2.0.0
141
- # @api private
142
- def call(options = nil, name: nil, slice: nil, skip_tests: false, **)
143
- # Support multiple calling conventions for dry-cli cross-version compatibility:
144
- #
145
- # - dry-cli 1.3 calls with positional hash: call({name: "foo"})
146
- # - dry-cli 1.4+: calls with keyword arguments: call(name: "foo")
147
- #
148
- # TODO: Remove this with Hanami 2.4 (which will require dry-cli 1.4+).
149
- if options.is_a?(Hash)
150
- name = options[:name]
151
- slice = options[:slice]
152
- skip_tests = options[:skip_tests] || false
153
- end
154
-
127
+ def call(name: nil, slice: nil, skip_tests: false, **)
155
128
  return if skip_tests
156
129
 
157
130
  slice = inflector.underscore(Shellwords.shellescape(slice)) if slice
@@ -165,24 +138,8 @@ module Hanami
165
138
  end
166
139
  end
167
140
 
168
- # @since 2.1.0
169
- # @api private
170
141
  class Part < Hanami::CLI::Commands::App::Command
171
- # @since 2.1.0
172
- # @api private
173
- def call(options = nil, name: nil, slice: nil, skip_tests: false, **)
174
- # Support multiple calling conventions for dry-cli cross-version compatibility:
175
- #
176
- # - dry-cli 1.3 calls with positional hash: call({name: "foo"})
177
- # - dry-cli 1.4+: calls with keyword arguments: call(name: "foo")
178
- #
179
- # TODO: Remove this with Hanami 2.4 (which will require dry-cli 1.4+).
180
- if options.is_a?(Hash)
181
- name = options[:name]
182
- slice = options[:slice]
183
- skip_tests = options[:skip_tests] || false
184
- end
185
-
142
+ def call(name: nil, slice: nil, skip_tests: false, **)
186
143
  return if skip_tests
187
144
 
188
145
  slice = inflector.underscore(Shellwords.shellescape(slice)) if slice
@@ -192,6 +149,36 @@ module Hanami
192
149
  generator.call(app.namespace, slice, name)
193
150
  end
194
151
  end
152
+
153
+ class Operation < Hanami::CLI::Commands::App::Command
154
+ def call(name: nil, slice: nil, skip_tests: false, **)
155
+ return if skip_tests
156
+
157
+ slice = inflector.underscore(Shellwords.shellescape(slice)) if slice
158
+ key = inflector.underscore(Shellwords.shellescape(name))
159
+
160
+ namespace = slice ? inflector.camelize(slice) : app.namespace
161
+ base_path = slice ? "spec/slices/#{slice}" : "spec"
162
+
163
+ generator = Generators::Operation.new(fs:, inflector:)
164
+ generator.call(key:, namespace:, base_path:)
165
+ end
166
+ end
167
+
168
+ class Mailer < Hanami::CLI::Commands::App::Command
169
+ def call(name: nil, slice: nil, skip_tests: false, **)
170
+ return if skip_tests
171
+
172
+ slice = inflector.underscore(Shellwords.shellescape(slice)) if slice
173
+ key = inflector.underscore(Shellwords.shellescape(name))
174
+
175
+ namespace = slice ? inflector.camelize(slice) : app.namespace
176
+ base_path = slice ? "spec/slices/#{slice}" : "spec"
177
+
178
+ generator = Generators::Mailer.new(fs:, inflector:)
179
+ generator.call(key:, namespace:, base_path:)
180
+ end
181
+ end
195
182
  end
196
183
  end
197
184
  end
@@ -36,7 +36,7 @@ module Hanami
36
36
  namespace: namespace,
37
37
  key: inflector.underscore(key),
38
38
  base_path: base_path,
39
- extra_namespace: "Actions",
39
+ extra_namespace: "Actions"
40
40
  )
41
41
  end
42
42
 
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "hanami/cli/generators/app/ruby_class_file"
4
+
5
+ module Hanami
6
+ module RSpec
7
+ module Generators
8
+ # @api private
9
+ class Mailer
10
+ attr_reader :fs, :inflector
11
+
12
+ def initialize(fs:, inflector:)
13
+ @fs = fs
14
+ @inflector = inflector
15
+ end
16
+
17
+ def call(key:, namespace:, base_path:)
18
+ mailer_class_file = mailer_class_file(key:, namespace:, base_path:)
19
+ spec_file_path = mailer_class_file.path.gsub(/\.rb$/, "_spec.rb")
20
+ mailer_class_name = mailer_class_file.fully_qualified_name
21
+
22
+ fs.write(spec_file_path, spec_content(mailer_class_name))
23
+ end
24
+
25
+ private
26
+
27
+ def mailer_class_file(key:, namespace:, base_path:)
28
+ Hanami::CLI::Generators::App::RubyClassFile.new(
29
+ fs:, inflector:, namespace:,
30
+ key: inflector.underscore(key),
31
+ base_path: base_path,
32
+ extra_namespace: "Mailers"
33
+ )
34
+ end
35
+
36
+ def spec_content(class_name)
37
+ <<~RUBY
38
+ # frozen_string_literal: true
39
+
40
+ RSpec.describe #{class_name}, :mailers do
41
+ subject(:mailer) { described_class.new }
42
+
43
+ # Inspect the delivered message to set expectations on its contents:
44
+ #
45
+ # expect(result.message.to).to eq(["recipient@example.com"])
46
+ # expect(result.message.subject).to eq("Welcome")
47
+ # expect(result.message.html_body).to include("...")
48
+
49
+ xit "delivers" do
50
+ result = mailer.deliver
51
+
52
+ expect(result).to be_success
53
+ end
54
+ end
55
+ RUBY
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "hanami/cli/generators/app/ruby_class_file"
4
+
5
+ module Hanami
6
+ module RSpec
7
+ module Generators
8
+ # @api private
9
+ class Operation
10
+ attr_reader :fs, :inflector
11
+
12
+ def initialize(fs:, inflector:)
13
+ @fs = fs
14
+ @inflector = inflector
15
+ end
16
+
17
+ def call(key:, namespace:, base_path:)
18
+ operation_class_file = operation_class_file(key:, namespace:, base_path:)
19
+ spec_file_path = operation_class_file.path.gsub(/\.rb$/, "_spec.rb")
20
+ operation_class_name = operation_class_file.fully_qualified_name
21
+
22
+ fs.write(spec_file_path, spec_content(operation_class_name))
23
+ end
24
+
25
+ private
26
+
27
+ def operation_class_file(key:, namespace:, base_path:)
28
+ Hanami::CLI::Generators::App::RubyClassFile.new(
29
+ fs:, inflector:, namespace:,
30
+ key: inflector.underscore(key),
31
+ base_path: base_path
32
+ )
33
+ end
34
+
35
+ def spec_content(class_name)
36
+ <<~RUBY
37
+ # frozen_string_literal: true
38
+
39
+ RSpec.describe #{class_name} do
40
+ subject(:operation) { described_class.new }
41
+
42
+ # Use `be_success` and `be_failure` (from spec/support/operations.rb) to set expectations on an
43
+ # operation's result:
44
+ #
45
+ # expect(result).to be_success(expected_value)
46
+ # expect(result).to be_failure(:some_error)
47
+
48
+ xit "succeeds" do
49
+ result = operation.call
50
+
51
+ expect(result).to be_success
52
+ end
53
+ end
54
+ RUBY
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -10,9 +10,7 @@ RSpec.configure do |config|
10
10
  #
11
11
  # Modify this proc (or any code below) if you only need specific databases cleaned.
12
12
  all_databases = -> {
13
- slices = [Hanami.app] + Hanami.app.slices.with_nested
14
-
15
- slices.each_with_object([]) { |slice, dbs|
13
+ Hanami.app.with_slices.each_with_object([]) { |slice, dbs|
16
14
  next unless slice.key?("db.rom")
17
15
 
18
16
  dbs.concat slice["db.rom"].gateways.values.map(&:connection)
@@ -25,7 +23,7 @@ RSpec.configure do |config|
25
23
  end
26
24
  end
27
25
 
28
- config.before :each, :db do |example|
26
+ config.prepend_before :each, :db do |example|
29
27
  strategy = example.metadata[:js] ? :truncation : :transaction
30
28
 
31
29
  all_databases.call.each do |db|
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Reset recorded mail deliveries between examples tagged `:mailers`
4
+ #
5
+ # In the test env, mail is delivered via a shared test delivery method, so recorded deliveries
6
+ # accumulate across examples. Tag any example that sends mail with `:mailers` to start with a clean
7
+ # slate:
8
+ #
9
+ # RSpec.describe Mailers::Welcome, :mailers do
10
+ # # ...
11
+ # end
12
+ RSpec.configure do |config|
13
+ config.prepend_before :each, :mailers do
14
+ Hanami.app.with_slices.each do |slice|
15
+ next unless slice.key?("mailers.delivery_method")
16
+
17
+ slice["mailers.delivery_method"].clear
18
+ end
19
+ end
20
+ end
@@ -2,7 +2,8 @@
2
2
 
3
3
  require "dry/monads"
4
4
 
5
- RSpec.configure do |config|
6
- # Provide `Success` and `Failure` for testing operation results
7
- config.include Dry::Monads[:result]
8
- end
5
+ # Load Dry Monads' RSpec extension.
6
+ #
7
+ # This provides `be_success` and `be_failure` matchers for operation results, along with `Success`
8
+ # and `Failure` constructors for use within your examples.
9
+ Dry::Monads.load_extensions(:rspec)
@@ -4,8 +4,7 @@ module Hanami
4
4
  module RSpec
5
5
  # The current hanami-rspec version.
6
6
  #
7
- # @since 2.0.0
8
7
  # @api public
9
- VERSION = "2.3.1"
8
+ VERSION = "3.0.0"
10
9
  end
11
10
  end
data/lib/hanami/rspec.rb CHANGED
@@ -35,13 +35,21 @@ module Hanami
35
35
  Hanami::CLI.before "install", Commands::Install
36
36
  Hanami::CLI.after "generate slice", Commands::Generate::Slice
37
37
 
38
- if Hanami.bundled?("hanami-controller")
38
+ if Hanami.bundled?("dry-operation")
39
+ Hanami::CLI.after "generate operation", Commands::Generate::Operation
40
+ end
41
+
42
+ if Hanami.bundled?("hanami-action")
39
43
  Hanami::CLI.after "generate action", Commands::Generate::Action
40
44
  end
41
45
 
42
46
  if Hanami.bundled?("hanami-view")
43
47
  Hanami::CLI.after "generate part", Commands::Generate::Part
44
48
  end
49
+
50
+ if Hanami.bundled?("hanami-mailer")
51
+ Hanami::CLI.after "generate mailer", Commands::Generate::Mailer
52
+ end
45
53
  end
46
54
  end
47
55
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hanami-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hanakai team
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 2.3.0
18
+ version: 3.0.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: 2.3.0
25
+ version: 3.0.0
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rspec
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -65,39 +65,19 @@ dependencies:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
67
  version: '2.6'
68
- - !ruby/object:Gem::Dependency
69
- name: rubocop
70
- requirement: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '1.11'
75
- type: :development
76
- prerelease: false
77
- version_requirements: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: '1.11'
82
- description: Hanami RSpec generators and Rake tasks
68
+ description: Hanami RSpec generators and CLI commands
83
69
  email:
84
70
  - info@hanakai.org
85
71
  executables: []
86
72
  extensions: []
87
- extra_rdoc_files: []
73
+ extra_rdoc_files:
74
+ - CHANGELOG.md
75
+ - LICENSE
76
+ - README.md
88
77
  files:
89
- - ".github/workflows/ci.yml"
90
- - ".gitignore"
91
- - ".rspec"
92
- - ".rubocop.yml"
93
78
  - CHANGELOG.md
94
- - CODE_OF_CONDUCT.md
95
- - Gemfile
96
- - LICENSE.md
79
+ - LICENSE
97
80
  - README.md
98
- - Rakefile
99
- - bin/console
100
- - bin/setup
101
81
  - hanami-rspec.gemspec
102
82
  - lib/hanami-rspec.rb
103
83
  - lib/hanami/rspec.rb
@@ -108,6 +88,8 @@ files:
108
88
  - lib/hanami/rspec/generators/gemfile_db
109
89
  - lib/hanami/rspec/generators/gitignore
110
90
  - lib/hanami/rspec/generators/helper.rb
91
+ - lib/hanami/rspec/generators/mailer.rb
92
+ - lib/hanami/rspec/generators/operation.rb
111
93
  - lib/hanami/rspec/generators/part.rb
112
94
  - lib/hanami/rspec/generators/part/part_base_spec.erb
113
95
  - lib/hanami/rspec/generators/part/part_slice_base_spec.erb
@@ -122,6 +104,7 @@ files:
122
104
  - lib/hanami/rspec/generators/support_db.rb
123
105
  - lib/hanami/rspec/generators/support_db_cleaning.rb
124
106
  - lib/hanami/rspec/generators/support_features.rb
107
+ - lib/hanami/rspec/generators/support_mailers.rb
125
108
  - lib/hanami/rspec/generators/support_operations.rb
126
109
  - lib/hanami/rspec/generators/support_requests.rb
127
110
  - lib/hanami/rspec/generators/support_rspec.rb
@@ -131,11 +114,10 @@ homepage: https://hanamirb.org
131
114
  licenses:
132
115
  - MIT
133
116
  metadata:
134
- allowed_push_host: https://rubygems.org
135
- homepage_uri: https://hanamirb.org
136
- source_code_uri: https://github.com/hanami/rspec
137
- changelog_uri: https://github.com/hanami/rspec/blob/master/CHANGELOG.md
138
- rubygems_mfa_required: 'true'
117
+ changelog_uri: https://github.com/hanami/hanami-rspec/blob/main/CHANGELOG.md
118
+ source_code_uri: https://github.com/hanami/hanami-rspec
119
+ bug_tracker_uri: https://github.com/hanami/hanami-rspec/issues
120
+ funding_uri: https://github.com/sponsors/hanami
139
121
  rdoc_options: []
140
122
  require_paths:
141
123
  - lib
@@ -143,7 +125,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
143
125
  requirements:
144
126
  - - ">="
145
127
  - !ruby/object:Gem::Version
146
- version: '3.2'
128
+ version: '3.3'
147
129
  required_rubygems_version: !ruby/object:Gem::Requirement
148
130
  requirements:
149
131
  - - ">="
@@ -152,5 +134,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
134
  requirements: []
153
135
  rubygems_version: 3.6.9
154
136
  specification_version: 4
155
- summary: Hanami RSpec
137
+ summary: Hanami RSpec generators and CLI commands
156
138
  test_files: []
@@ -1,43 +0,0 @@
1
- name: ci
2
-
3
- on:
4
- push:
5
- pull_request:
6
- create:
7
- schedule:
8
- - cron: "30 4 * * *"
9
-
10
- jobs:
11
- tests:
12
- runs-on: ubuntu-latest
13
- strategy:
14
- fail-fast: false
15
- matrix:
16
- ruby:
17
- - "4.0"
18
- - "3.4"
19
- - "3.3"
20
- - "3.2"
21
- steps:
22
- - uses: actions/checkout@v1
23
- - name: Install package dependencies
24
- run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
25
- - name: Set up Ruby
26
- uses: ruby/setup-ruby@v1
27
- with:
28
- ruby-version: ${{matrix.ruby}}
29
- - name: Install latest bundler
30
- run: |
31
- gem install bundler --no-document
32
- - name: Bundle install
33
- run: bundle install --jobs 4 --retry 3
34
- - name: Run all tests
35
- run: bundle exec rake
36
-
37
- workflow-keepalive:
38
- if: github.event_name == 'schedule'
39
- runs-on: ubuntu-latest
40
- permissions:
41
- actions: write
42
- steps:
43
- - uses: liskin/gh-workflow-keepalive@v1
data/.gitignore DELETED
@@ -1,13 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
- .rubocop-*
10
- Gemfile.lock
11
-
12
- # rspec failure tracking
13
- .rspec_status
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,28 +0,0 @@
1
- # Please keep AllCops, Bundler, Style, Metrics groups and then order cops
2
- # alphabetically
3
- inherit_from:
4
- - https://raw.githubusercontent.com/hanami/devtools/main/.rubocop.yml
5
- Layout/LineLength:
6
- Exclude:
7
- - Gemfile
8
- Naming/MethodParameterName:
9
- AllowedNames:
10
- - fs
11
- Naming/HeredocDelimiterNaming:
12
- Enabled: false
13
- Style/AccessorGrouping:
14
- Enabled: false
15
- Style/BlockDelimiters:
16
- Enabled: false
17
- Style/CommentedKeyword:
18
- Enabled: false
19
- Style/HashSyntax:
20
- EnforcedShorthandSyntax: either_consistent
21
- Style/LambdaCall:
22
- Enabled: false
23
- Style/TrailingCommaInArguments:
24
- Enabled: false
25
- Style/TrailingCommaInArrayLiteral:
26
- Enabled: false
27
- Style/TrailingCommaInHashLiteral:
28
- Enabled: false
data/CODE_OF_CONDUCT.md DELETED
@@ -1,84 +0,0 @@
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 DELETED
@@ -1,13 +0,0 @@
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
- end
10
-
11
- gem "hanami-utils", github: "hanami/utils", branch: "main"
12
- gem "hanami-cli", github: "hanami/cli", branch: "main"
13
- gem "hanami", github: "hanami/hanami", branch: "main"
data/LICENSE.md DELETED
@@ -1,22 +0,0 @@
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.
data/Rakefile DELETED
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "rspec/core/rake_task"
5
-
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- require "rubocop/rake_task"
9
-
10
- RuboCop::RakeTask.new
11
-
12
- task default: %i[spec rubocop]
data/bin/console DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "bundler/setup"
5
- require "hanami/rspec"
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require "irb"
15
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here