hanami-cli 2.0.0.alpha7 → 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: 80f6066c0b36cef2401b924e8a928e20008e4411259d3b7025b8a884ab4917b4
4
- data.tar.gz: b1f04b56bdc61124aaddcfd6353942ad334437353b5db2114b412e3f5a98d42a
3
+ metadata.gz: 9254e418675a38d43d9ea6404db85e316332a7abb786faa381d6fa6d2c82b635
4
+ data.tar.gz: 5e1993cfa72b0f8e11e17e05de048ad28d38393de2d354900c4c9452cc9ceb8a
5
5
  SHA512:
6
- metadata.gz: 26e7a26bdbf7b6d1e2817854fdca35655633228029b69ab4c5154981a1edd0b72ffe0048951d42bc20605460e5c2693a60cba3b048f2e466260d5566172392fd
7
- data.tar.gz: e8110ea215488c966b7f309087fbb29d5d358fd55a0dc4e438077af70e68b7bcb4de3d59dda4d5699f3478756b4bb5dbfb0db59978f6443b4609c419676ebe8c
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,12 @@
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
+
4
10
  ## v2.0.0.alpha7 - 2022-03-11
5
11
 
6
12
  ### Changed
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.alpha7"
5
+ VERSION = "2.0.0.alpha8"
6
6
  end
7
7
  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.alpha7
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-03-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.