hanami-cli 2.0.0.alpha6 → 2.0.0.alpha8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3361be433795e150f29ab26ac279c54a636c87612b6947b3185976aed0e0501
4
- data.tar.gz: a8efd20d5f683498d53a80a9b963cfa4ab05033a9eb22244a302bc4589695954
3
+ metadata.gz: 9254e418675a38d43d9ea6404db85e316332a7abb786faa381d6fa6d2c82b635
4
+ data.tar.gz: 5e1993cfa72b0f8e11e17e05de048ad28d38393de2d354900c4c9452cc9ceb8a
5
5
  SHA512:
6
- metadata.gz: 045e08a4d5c6a13eca9004ad79666bf7e37b1427e9623943a2dfa78504322963f4169046d4c03776ea8b887965e0e8518f488017a426706dc3b5dd9b4a6e9e3b
7
- data.tar.gz: 6dd902d2509013a6cab5658c0f418c93b7a1500006be00d4713727c708916025076c9027de8b4463fa7749233c46869dfca2321bf49173b0299a5537822b4504
6
+ metadata.gz: 9915d5d4537081e5403cc11505efd02b91b65b42e4f83797027430c0f2f008052f29c151d8c67a800bff3134c6b5f061025d119a1b87d17cec4ae76ca7547b27
7
+ data.tar.gz: 7cfbe727c30c04711d13e622887eba5061558dd426a2cd61784e501fef390f6c618006a3c11962a2d7ed52c2a6bce500dfe8525771abe2306f75e3de8143737e
data/.action_hero.yml ADDED
@@ -0,0 +1,11 @@
1
+ # This is a config synced from hanami/template-gem repo
2
+
3
+ sources:
4
+ - repo: hanami/template-gem
5
+ sync:
6
+ - ".action_hero.yml.erb"
7
+ - ".github/FUNDING.yml"
8
+ - ".rspec"
9
+ - ".rubocop.yml"
10
+ - "CODE_OF_CONDUCT.md"
11
+ - "LICENSE.md.erb"
@@ -0,0 +1 @@
1
+ github: hanami
data/CHANGELOG.md CHANGED
@@ -1,6 +1,21 @@
1
1
  # Hanami::CLI
2
2
  Hanami Command Line Interface
3
3
 
4
+ ## v2.0.0.alpha8 - 2020-05-19
5
+
6
+ ### Fixed
7
+ - [Andrew Croome] Respect HANAMI_ENV env var to set Hanami env if no `--env` option is supplied
8
+ - [Lucas Mendelowski] Ensure Sequel migrations extension is loaded before related `db` commands are run
9
+
10
+ ## v2.0.0.alpha7 - 2022-03-11
11
+
12
+ ### Changed
13
+ - [Tim Riley] [Internal] Update console slice readers to work with new `Hanami::Application.slices` API
14
+
15
+ ## v2.0.0.alpha6.1 - 2022-02-11
16
+ ### Fixed
17
+ - [Viet Tran] Ensure `hanami db` commands to work with `hanami` `v2.0.0.alpha6`
18
+
4
19
  ## v2.0.0.alpha6 - 2022-02-10
5
20
  ### Added
6
21
  - [Luca Guidi] Official support for Ruby: MRI 3.1
data/LICENSE.md ADDED
@@ -0,0 +1,22 @@
1
+ Copyright © 2014-2022 Luca Guidi
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/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Hanami::CLI
2
2
 
3
- [Hanami](http://hanamirb.org) command line
3
+ CLI commands for [full-stack Hanami applications](`https://github.com/hanami/hanami`).
4
+
5
+ **NOTE**: For versions 0.4 and below, there was a general purpose CLI utility library with this same name. That library has since been renamed to [dry-rb/cli](https://github.com/dry-rb/dry-cli). Please update your Gemfiles accordingly.
4
6
 
5
7
  ## Installation
6
8
 
@@ -11,14 +11,18 @@ module Hanami
11
11
  module Environment
12
12
  def call(**opts)
13
13
  env = opts[:env]
14
- ENV["HANAMI_ENV"] = env.to_s
14
+
15
+ hanami_env = env ? env.to_s : ENV["HANAMI_ENV"] || "development"
16
+
17
+ ENV["HANAMI_ENV"] = hanami_env
18
+
15
19
  super(**opts)
16
20
  end
17
21
  end
18
22
 
19
23
  def self.inherited(klass)
20
24
  super
21
- klass.option(:env, required: false, default: "development", desc: "Application's environment")
25
+ klass.option(:env, required: false, desc: "Application's environment")
22
26
  klass.prepend(Environment)
23
27
  end
24
28
 
@@ -69,7 +69,7 @@ module Hanami
69
69
  def rom_config
70
70
  @rom_config ||=
71
71
  begin
72
- application.init_bootable(:persistence)
72
+ application.prepare(:persistence)
73
73
  application.container["persistence.config"]
74
74
  end
75
75
  end
@@ -108,7 +108,11 @@ module Hanami
108
108
  private
109
109
 
110
110
  def sequel_migrator
111
- Sequel::TimestampMigrator.new(migrator.connection, migrations_path, {})
111
+ @sequel_migrator ||= begin
112
+ require 'sequel'
113
+ Sequel.extension :migration
114
+ Sequel::TimestampMigrator.new(migrator.connection, migrations_path, {})
115
+ end
112
116
  end
113
117
 
114
118
  def migrations_path
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Hanami
4
4
  module CLI
5
- VERSION = "2.0.0.alpha6"
5
+ VERSION = "2.0.0.alpha8"
6
6
  end
7
7
  end
@@ -12,8 +12,8 @@ module Hanami
12
12
  def initialize(application)
13
13
  super()
14
14
 
15
- application.slices.each do |(name, slice)|
16
- define_method(name) do
15
+ application.slices.each do |slice|
16
+ define_method(slice.slice_name) do
17
17
  slice
18
18
  end
19
19
  end
data/project.yml ADDED
@@ -0,0 +1,2 @@
1
+ name: hanami-cli
2
+ custom_ci: false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hanami-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.alpha6
4
+ version: 2.0.0.alpha8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luca Guidi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-10 00:00:00.000000000 Z
11
+ date: 2022-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -116,6 +116,8 @@ executables:
116
116
  extensions: []
117
117
  extra_rdoc_files: []
118
118
  files:
119
+ - ".action_hero.yml"
120
+ - ".github/FUNDING.yml"
119
121
  - ".github/workflows/ci.yml"
120
122
  - ".gitignore"
121
123
  - ".rspec"
@@ -123,7 +125,7 @@ files:
123
125
  - CHANGELOG.md
124
126
  - CODE_OF_CONDUCT.md
125
127
  - Gemfile
126
- - LICENSE.txt
128
+ - LICENSE.md
127
129
  - README.md
128
130
  - Rakefile
129
131
  - bin/console
@@ -206,6 +208,7 @@ files:
206
208
  - lib/hanami/console/context.rb
207
209
  - lib/hanami/console/plugins/slice_readers.rb
208
210
  - lib/hanami/rake_tasks.rb
211
+ - project.yml
209
212
  homepage: https://hanamirb.org
210
213
  licenses:
211
214
  - MIT
@@ -230,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
230
233
  - !ruby/object:Gem::Version
231
234
  version: 1.3.1
232
235
  requirements: []
233
- rubygems_version: 3.3.3
236
+ rubygems_version: 3.3.7
234
237
  signing_key:
235
238
  specification_version: 4
236
239
  summary: Hanami CLI
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2021 Luca Guidi
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all 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,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.