hanami-cli 2.0.0.alpha6.1 → 2.0.0.alpha8.1

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: f638410c01ada276d3654df47b5dc3ec94ed3544cde718905f995560b52f3f2d
4
- data.tar.gz: 710b48678744cf2070b92e7644d9805a68b045a3aa12d0f70ec063b3f977b39d
3
+ metadata.gz: 26744ec7cba96a8251cd90d9589a9d0f0e291b4221af53ce951f584ced1b00c6
4
+ data.tar.gz: 68c47e62e9c8fc493beee084c2815b57f9b57605bcd9bba7762a124cf16a0ba3
5
5
  SHA512:
6
- metadata.gz: 3cd808e7091004c7a4cd2579595836088e07b15aa124d18ce56320805c3d823fa4d8ec72e4a0f56aa55e75c9ba0723d8952c7dca7adcb8df48aa92ee962c0afe
7
- data.tar.gz: e8bfaa8e8be33c0e6cd0f4246c091c70a60c0f378c0ad60c1979de3181f49bb2102d27a72f9afb38bac1e8ca08e8e6e3f37d3860d2dd919b24a199070e79c740
6
+ metadata.gz: c2a419226b3050ef5fa6dc9281e3d81e16c19e905de8148f4c560fcc47687ee0e872b448a61f07b72c460bf8f993b66f4fcddec8b1d3915afd4a3129f79e6c82
7
+ data.tar.gz: edfbff76a5d55b406b3d3886e5f5a315716044c6ac59bbe132dda837dcf8ad8df3ce4f98110ff0c72af1c9458ba8a870e95e3ac204a6021ccf791311384d5fd5
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,22 @@
1
1
  # Hanami::CLI
2
2
  Hanami Command Line Interface
3
3
 
4
+ ## v2.0.0.alpha8.1 - 2020-05-23
5
+
6
+ ### Fixed
7
+ - [Tim Riley] Ensure CLI starts properly by fixing use of `Slice.slice_name`
8
+
9
+ ## v2.0.0.alpha8 - 2020-05-19
10
+
11
+ ### Fixed
12
+ - [Andrew Croome] Respect HANAMI_ENV env var to set Hanami env if no `--env` option is supplied
13
+ - [Lucas Mendelowski] Ensure Sequel migrations extension is loaded before related `db` commands are run
14
+
15
+ ## v2.0.0.alpha7 - 2022-03-11
16
+
17
+ ### Changed
18
+ - [Tim Riley] [Internal] Update console slice readers to work with new `Hanami::Application.slices` API
19
+
4
20
  ## v2.0.0.alpha6.1 - 2022-02-11
5
21
  ### Fixed
6
22
  - [Viet Tran] Ensure `hanami db` commands to work with `hanami` `v2.0.0.alpha6`
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
 
@@ -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.1"
5
+ VERSION = "2.0.0.alpha8.1"
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.to_sym) 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.1
4
+ version: 2.0.0.alpha8.1
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-11 00:00:00.000000000 Z
11
+ date: 2022-05-23 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.