hanami-reloader 1.0.0.alpha1 → 1.0.0.beta3
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 +4 -4
- data/CHANGELOG.md +26 -2
- data/README.md +35 -44
- data/hanami-reloader.gemspec +6 -5
- data/lib/hanami/reloader/commands.rb +99 -0
- data/lib/hanami/reloader/version.rb +1 -1
- data/lib/hanami/reloader.rb +2 -4
- metadata +28 -27
- data/lib/hanami/reloader/cli.rb +0 -85
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99be1699345c5f4febac46c7fd5cc26c49d24604b98a049dadb0f3f2290db2a3
|
4
|
+
data.tar.gz: 9a53a2b068b64a9398b915180ab91b524fcd41a0b4cd7e0a583305ee33244dbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f71bc7d05997a92cb9a7131da09d96c3045b9a3ba54d4400223a90ec7c5e6823775f747106b43fdea3867b5ca7a158fe08537efcdfe25bed4c48fc642846bae9
|
7
|
+
data.tar.gz: f4175e6c9448942649ae0d29011f4c4d2e5ea36b709d2b30caf8a0b6ba21f647686c17703469a38101b8f3970a4be8a959d0ffafdbee4ace3b0566ed0f6681d9
|
data/CHANGELOG.md
CHANGED
@@ -1,31 +1,55 @@
|
|
1
1
|
# Hanami::Reloader
|
2
|
-
|
2
|
+
|
3
|
+
Code reloading for Hanami 2
|
4
|
+
|
5
|
+
## v1.0.0.beta3 - 2022-09-21
|
6
|
+
|
7
|
+
### Added
|
8
|
+
|
9
|
+
- [Luca Guidi] Support for Hanami 2.0
|
10
|
+
- [Luca Guidi] Official support for Ruby 3.0 and 3.1
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
|
14
|
+
- [Luca Guidi] Drop support for Ruby: MRI 2.5, 2.6, and 2.7.
|
3
15
|
|
4
16
|
## v1.0.0.alpha1 - 2019-01-30
|
17
|
+
|
5
18
|
### Added
|
19
|
+
|
6
20
|
- [Luca Guidi] Added support for `hanami server --no-code-reloading` to skip code reloading.
|
7
21
|
- [Luca Guidi] Added `hanami server --guardfile` option to specify the path to `Guardfile`. It defaults to `Guardfile` at the root of the project.
|
8
22
|
- [Luca Guidi] Added support for `hanami generate reloader --puma` to generate Puma specific configuration.
|
9
23
|
|
10
24
|
### Changed
|
25
|
+
|
11
26
|
- [Luca Guidi] Drop support for Ruby: MRI 2.3, and 2.4.
|
12
27
|
- [Luca Guidi] `hanami generate reloader` generates `Guardfile` (instead of `.hanami.server.guardfile`), with the Guard `:server` group.
|
13
28
|
- [Luca Guidi] `hanami server` will look for `Guardfile` at the root of the project instead of `.hanami.server.guardfile`.
|
14
29
|
|
15
|
-
## v0.3.0 -
|
30
|
+
## v0.3.0 - 2020-02-10
|
31
|
+
|
16
32
|
### Added
|
33
|
+
|
34
|
+
- [Luca Guidi] Official support for Ruby 2.7.0
|
17
35
|
- [Luca Guidi] Official support for Ruby 2.6.0
|
18
36
|
- [Luca Guidi] Support for `bundler` 2.0+
|
19
37
|
|
20
38
|
## v0.2.1 - 2018-01-23
|
39
|
+
|
21
40
|
### Fixed
|
41
|
+
|
22
42
|
- [Luca Guidi] Avoid Guard prompt when shutting down the server
|
23
43
|
|
24
44
|
## v0.2.0 - 2017-11-24
|
45
|
+
|
25
46
|
### Changed
|
47
|
+
|
26
48
|
- [Marcello Rocha] Use `.hanami.server.guardfile` instead of `Guardfile` to avoid conflicts with other `guard` plugins.
|
27
49
|
|
28
50
|
## v0.1.0 - 2017-11-01
|
51
|
+
|
29
52
|
### Added
|
53
|
+
|
30
54
|
- [Luca Guidi] Added Hanami command `hanami generate reloader`
|
31
55
|
- [Luca Guidi] Code reloading based on `guard`
|
data/README.md
CHANGED
@@ -1,73 +1,64 @@
|
|
1
1
|
# Hanami::Reloader
|
2
2
|
|
3
|
-
|
3
|
+
Reloader and testing support for [full-stack Hanami applications](`https://github.com/hanami/hanami`).
|
4
4
|
|
5
|
-
##
|
6
|
-
|
7
|
-
### 1. Setup Hanami project
|
5
|
+
## Status
|
8
6
|
|
9
|
-
|
10
|
-
|
11
|
-
hanami
|
12
|
-
```
|
7
|
+
[](https://badge.fury.io/rb/hanami-rspec)
|
8
|
+
[](https://github.com/hanami/rspec/actions?query=workflow%3Aci+branch%3Amain)
|
9
|
+
[](https://depfu.com/github/hanami/reloader?project=Bundler)
|
13
10
|
|
14
|
-
|
11
|
+
## Version
|
15
12
|
|
16
|
-
|
13
|
+
Versioning of this gem follows Reloader.
|
17
14
|
|
18
|
-
|
19
|
-
2. Add the following lines
|
15
|
+
## Contact
|
20
16
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
### 3. Setup hanami-reloader
|
28
|
-
|
29
|
-
```shell
|
30
|
-
bundle
|
31
|
-
bundle exec hanami generate reloader
|
32
|
-
```
|
17
|
+
- Home page: http://hanamirb.org
|
18
|
+
- Mailing List: http://hanamirb.org/mailing-list
|
19
|
+
- Bugs/Issues: https://github.com/hanami/reloader/issues
|
20
|
+
- Support: http://stackoverflow.com/questions/tagged/hanami
|
21
|
+
- Chat: http://chat.hanamirb.org
|
33
22
|
|
34
|
-
|
23
|
+
## Rubies
|
35
24
|
|
36
|
-
|
25
|
+
**Hanami::Reloader** supports Ruby (MRI) 3.0+
|
37
26
|
|
38
|
-
|
27
|
+
## Installation
|
39
28
|
|
40
|
-
|
41
|
-
|
42
|
-
If you're using `puma`, I **strongly** suggest to use `guard-puma` **alongside** with `hanami-reloader`.
|
43
|
-
|
44
|
-
Add `guard-puma` to your `Gemfile`:
|
29
|
+
Add this line to your application's Gemfile:
|
45
30
|
|
46
31
|
```ruby
|
47
|
-
group :development do
|
48
|
-
gem "
|
32
|
+
group :cli, :development do
|
33
|
+
gem "hanami-reloader"
|
49
34
|
end
|
50
35
|
```
|
51
36
|
|
52
|
-
|
37
|
+
And then execute:
|
53
38
|
|
54
|
-
|
55
|
-
|
56
|
-
+guard "puma", port: ENV["HANAMI_PORT"] || 2300 do
|
57
|
-
```
|
39
|
+
$ bundle install
|
40
|
+
$ bundle exec hanami setup
|
58
41
|
|
59
|
-
|
42
|
+
## Usage
|
60
43
|
|
61
44
|
## Development
|
62
45
|
|
63
|
-
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
46
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
64
47
|
|
65
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and
|
48
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
66
49
|
|
67
50
|
## Contributing
|
68
51
|
|
69
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
52
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/hanami/reloader. 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).
|
53
|
+
|
54
|
+
## License
|
55
|
+
|
56
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
57
|
+
|
58
|
+
## Code of Conduct
|
59
|
+
|
60
|
+
Everyone interacting in the `Hanami::Reloader` project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/hanami/reloader/blob/main/CODE_OF_CONDUCT.md).
|
70
61
|
|
71
62
|
## Copyright
|
72
63
|
|
73
|
-
Copyright ©
|
64
|
+
Copyright © 2014-2022 Hanami Team – Released under MIT License
|
data/hanami-reloader.gemspec
CHANGED
@@ -15,19 +15,20 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.homepage = "http://hanamirb.org"
|
16
16
|
spec.license = "MIT"
|
17
17
|
|
18
|
-
spec.required_ruby_version = ">=
|
18
|
+
spec.required_ruby_version = ">= 3.0"
|
19
19
|
|
20
|
-
spec.files = `git ls-files -- lib/* CHANGELOG.md LICENSE.md README.md hanami-reloader.gemspec`.split($INPUT_RECORD_SEPARATOR)
|
20
|
+
spec.files = `git ls-files -- lib/* CHANGELOG.md LICENSE.md README.md hanami-reloader.gemspec`.split($INPUT_RECORD_SEPARATOR) # rubocop:disable Layout/LineLength
|
21
21
|
spec.bindir = "exe"
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
25
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
26
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
26
27
|
|
27
|
-
spec.add_dependency "hanami",
|
28
|
-
spec.add_dependency "guard-rack", "~> 2.2"
|
28
|
+
spec.add_dependency "hanami-cli", "~> 2.0.beta"
|
29
29
|
|
30
30
|
spec.add_development_dependency "bundler", ">= 1.6", "< 3"
|
31
|
-
spec.add_development_dependency "rake", "~>
|
31
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
32
32
|
spec.add_development_dependency "rspec", "~> 3.7"
|
33
|
+
spec.add_development_dependency "rubocop", "~> 1.11"
|
33
34
|
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "hanami/cli"
|
4
|
+
require "hanami/cli/command"
|
5
|
+
require "hanami/cli/commands"
|
6
|
+
require "hanami/cli/commands/app/server"
|
7
|
+
|
8
|
+
module Hanami
|
9
|
+
module Reloader
|
10
|
+
module Commands
|
11
|
+
# Guardfile
|
12
|
+
module Guardfile
|
13
|
+
def self.group
|
14
|
+
"server"
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.default_path
|
18
|
+
path("Guardfile")
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.path(value)
|
22
|
+
value
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
# Generate hanami-reloader configuration
|
27
|
+
class Install < Hanami::CLI::Command
|
28
|
+
desc "Generate configuration for code reloading"
|
29
|
+
|
30
|
+
def call(*, **)
|
31
|
+
generate_configuration(Guardfile.default_path)
|
32
|
+
bundle_gems
|
33
|
+
end
|
34
|
+
|
35
|
+
private
|
36
|
+
|
37
|
+
def generate_configuration(path)
|
38
|
+
fs.write path, <<~CODE
|
39
|
+
# frozen_string_literal: true
|
40
|
+
|
41
|
+
group :#{Guardfile.group} do
|
42
|
+
guard "puma", port: ENV["HANAMI_PORT"] || 2300 do
|
43
|
+
watch(%r{config/*})
|
44
|
+
watch(%r{lib/*})
|
45
|
+
watch(%r{app/*})
|
46
|
+
watch(%r{slices/*})
|
47
|
+
end
|
48
|
+
end
|
49
|
+
CODE
|
50
|
+
end
|
51
|
+
|
52
|
+
def bundle_gems
|
53
|
+
fs.touch("Gemfile")
|
54
|
+
gemfile = fs.read("Gemfile")
|
55
|
+
return if gemfile.include?("guard-puma")
|
56
|
+
|
57
|
+
if gemfile.include?("group :development do")
|
58
|
+
fs.inject_line_at_block_bottom "Gemfile", "group :development do", <<~CODE
|
59
|
+
gem "guard-puma"
|
60
|
+
CODE
|
61
|
+
else
|
62
|
+
fs.append "Gemfile", <<~CODE
|
63
|
+
|
64
|
+
group :development do
|
65
|
+
gem "guard-puma"
|
66
|
+
end
|
67
|
+
CODE
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# Override `hanami server` command
|
73
|
+
class Server < Hanami::CLI::Commands::App::Server
|
74
|
+
option :guardfile, type: :string, desc: "Path to Guardfile", default: Guardfile.default_path.to_s
|
75
|
+
option :code_reloading, type: :boolean, desc: "Code reloading", default: true
|
76
|
+
|
77
|
+
example [
|
78
|
+
"--no-code-reloading # Disable code reloading"
|
79
|
+
]
|
80
|
+
|
81
|
+
def call(**args)
|
82
|
+
code_reloading = args.fetch(:code_reloading)
|
83
|
+
|
84
|
+
if code_reloading
|
85
|
+
path = Guardfile.path(args.fetch(:guardfile))
|
86
|
+
exec "bundle exec guard -n f -i -g #{Guardfile.group} -G #{path}"
|
87
|
+
else
|
88
|
+
super
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
if Hanami::CLI.within_hanami_app?
|
97
|
+
Hanami::CLI.after "install", Hanami::Reloader::Commands::Install
|
98
|
+
Hanami::CLI.register "server", Hanami::Reloader::Commands::Server
|
99
|
+
end
|
data/lib/hanami/reloader.rb
CHANGED
@@ -1,11 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "hanami/cli/commands"
|
4
|
-
|
5
3
|
module Hanami
|
6
4
|
# Hanami reloader
|
7
5
|
module Reloader
|
8
|
-
|
9
|
-
|
6
|
+
require_relative "reloader/version"
|
7
|
+
require_relative "reloader/commands"
|
10
8
|
end
|
11
9
|
end
|
metadata
CHANGED
@@ -1,43 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanami-reloader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.beta3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: hanami
|
14
|
+
name: hanami-cli
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.0.
|
19
|
+
version: 2.0.beta
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.0.
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: guard-rack
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '2.2'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '2.2'
|
26
|
+
version: 2.0.beta
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: bundler
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -64,14 +50,14 @@ dependencies:
|
|
64
50
|
requirements:
|
65
51
|
- - "~>"
|
66
52
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
53
|
+
version: '13.0'
|
68
54
|
type: :development
|
69
55
|
prerelease: false
|
70
56
|
version_requirements: !ruby/object:Gem::Requirement
|
71
57
|
requirements:
|
72
58
|
- - "~>"
|
73
59
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
60
|
+
version: '13.0'
|
75
61
|
- !ruby/object:Gem::Dependency
|
76
62
|
name: rspec
|
77
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,6 +72,20 @@ dependencies:
|
|
86
72
|
- - "~>"
|
87
73
|
- !ruby/object:Gem::Version
|
88
74
|
version: '3.7'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: rubocop
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '1.11'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '1.11'
|
89
89
|
description: Code reloading for Hanami
|
90
90
|
email:
|
91
91
|
- me@lucaguidi.com
|
@@ -99,14 +99,15 @@ files:
|
|
99
99
|
- hanami-reloader.gemspec
|
100
100
|
- lib/hanami-reloader.rb
|
101
101
|
- lib/hanami/reloader.rb
|
102
|
-
- lib/hanami/reloader/
|
102
|
+
- lib/hanami/reloader/commands.rb
|
103
103
|
- lib/hanami/reloader/version.rb
|
104
104
|
homepage: http://hanamirb.org
|
105
105
|
licenses:
|
106
106
|
- MIT
|
107
107
|
metadata:
|
108
108
|
allowed_push_host: https://rubygems.org
|
109
|
-
|
109
|
+
rubygems_mfa_required: 'true'
|
110
|
+
post_install_message:
|
110
111
|
rdoc_options: []
|
111
112
|
require_paths:
|
112
113
|
- lib
|
@@ -114,15 +115,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
114
115
|
requirements:
|
115
116
|
- - ">="
|
116
117
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
118
|
+
version: '3.0'
|
118
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
120
|
requirements:
|
120
121
|
- - ">"
|
121
122
|
- !ruby/object:Gem::Version
|
122
123
|
version: 1.3.1
|
123
124
|
requirements: []
|
124
|
-
rubygems_version: 3.
|
125
|
-
signing_key:
|
125
|
+
rubygems_version: 3.3.3
|
126
|
+
signing_key:
|
126
127
|
specification_version: 4
|
127
128
|
summary: Hanami reloader
|
128
129
|
test_files: []
|
data/lib/hanami/reloader/cli.rb
DELETED
@@ -1,85 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Hanami
|
4
|
-
module Reloader
|
5
|
-
module CLI
|
6
|
-
# Guardfile
|
7
|
-
module Guardfile
|
8
|
-
def self.group
|
9
|
-
"server"
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.default_path
|
13
|
-
path("Guardfile")
|
14
|
-
end
|
15
|
-
|
16
|
-
def self.path(path)
|
17
|
-
Hanami.root.join(path)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
# Generate hanami-reloader configuration
|
22
|
-
class Generate < Hanami::CLI::Commands::Command
|
23
|
-
desc "Generate configuration for code reloading"
|
24
|
-
|
25
|
-
option :guardfile, type: :string, desc: "Path to Guardfile", default: Guardfile.default_path.to_s
|
26
|
-
option :puma, type: :boolean, desc: "Generate configuration for Puma", default: false
|
27
|
-
|
28
|
-
def call(**args)
|
29
|
-
path = Guardfile.path(args.fetch(:guardfile))
|
30
|
-
puma = args.fetch(:puma)
|
31
|
-
|
32
|
-
generate_configuration(path, puma)
|
33
|
-
bundle_gems(puma)
|
34
|
-
end
|
35
|
-
|
36
|
-
private
|
37
|
-
|
38
|
-
def generate_configuration(path, puma)
|
39
|
-
guard = puma ? "puma" : "rack"
|
40
|
-
|
41
|
-
files.touch(path)
|
42
|
-
files.append path, <<~CODE
|
43
|
-
group :#{Guardfile.group} do
|
44
|
-
guard "#{guard}", port: ENV["HANAMI_PORT"] || 2300 do
|
45
|
-
watch(%r{config/*})
|
46
|
-
watch(%r{lib/*})
|
47
|
-
watch(%r{apps/*})
|
48
|
-
end
|
49
|
-
end
|
50
|
-
CODE
|
51
|
-
end
|
52
|
-
|
53
|
-
def bundle_gems(puma)
|
54
|
-
return unless puma
|
55
|
-
|
56
|
-
exec "bundle add guard-puma --skip-install --group=development"
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
# Override `hanami server` command
|
61
|
-
class Server < Hanami::CLI::Commands::Server
|
62
|
-
option :guardfile, type: :string, desc: "Path to Guardfile", default: Guardfile.default_path.to_s
|
63
|
-
option :code_reloading, type: :boolean, desc: "Code reloading", default: true
|
64
|
-
|
65
|
-
example [
|
66
|
-
"--no-code-reloading # Disable code reloading"
|
67
|
-
]
|
68
|
-
|
69
|
-
def call(**args)
|
70
|
-
code_reloading = args.fetch(:code_reloading)
|
71
|
-
|
72
|
-
if code_reloading
|
73
|
-
path = Guardfile.path(args.fetch(:guardfile))
|
74
|
-
exec "bundle exec guard -n f -i -g #{Guardfile.group} -G #{path}"
|
75
|
-
else
|
76
|
-
super
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
Hanami::CLI.register "generate reloader", Hanami::Reloader::CLI::Generate
|
85
|
-
Hanami::CLI.register "server", Hanami::Reloader::CLI::Server
|