neo_gruby 0.2.0.pre.rc3 → 0.2.0.pre.rc4

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: d7515a4c65c65fd1d88d0b75d98d937d294ca0fd4452cdd217016416e6be4465
4
- data.tar.gz: aa8eff31855adb36fae93736f5123620f9a1bf5f4d8a9a72cb996e67145b364b
3
+ metadata.gz: 89326ede9eabada88bc8cd1919eb82345fe823f4bef275a053f17b7e04abd75a
4
+ data.tar.gz: e01a70764fa8ea8b49d5338a9f9b669ed8dd5387a78864556898f4163947a07a
5
5
  SHA512:
6
- metadata.gz: b64b978151f78299862adccb49bc8b466af012f36d0e1e647426dc1957b5ccd956a167b61c1a2a7396979a81a00fc5e84977215542c434e0806dc790da3e12b1
7
- data.tar.gz: a83d28be983ea729749afd392f492b4c9fd7b89c203414cfccd0082c7643f7884d8b08ed10c16cf186a0b15526264b01015b8d773d27191f0751679ae740d4e8
6
+ metadata.gz: 30c4f4a011625c59c34c2427beaf74bf09581c7232783c5b6bb37ec392c71dde95bc0c9754317feb2bd85ddb6c522b1c4280c837899d8a7ad3957565779df31d
7
+ data.tar.gz: ad887e9ced72ece4b385b598765e067c3c104a1892ee598736afd9c05ee331001ba29db0a047a795f5bd58648761bbbdb28b7a5ac7fb03f2f45affc7166a9934
@@ -1,5 +1,7 @@
1
1
  require "dry/cli"
2
2
 
3
+ NeoGruby.cli = true
4
+
3
5
  module NeoGruby
4
6
  module CLI
5
7
  module Commands
@@ -8,9 +10,8 @@ module NeoGruby
8
10
  end
9
11
  end
10
12
 
11
- NeoGruby.cli = true
12
-
13
- require_relative 'commands/db'
14
13
  require_relative 'commands/protoc'
15
14
  require_relative 'commands/server'
16
15
  require_relative 'commands/console'
16
+
17
+ require './config/boot' if File.exist? './config/boot.rb'
@@ -1,3 +1,3 @@
1
1
  module NeoGruby
2
- VERSION = "0.2.0-rc3"
2
+ VERSION = "0.2.0-rc4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo_gruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.pre.rc3
4
+ version: 0.2.0.pre.rc4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Welington Sampaio
@@ -93,7 +93,6 @@ files:
93
93
  - lib/neo_gruby/application.rb
94
94
  - lib/neo_gruby/cli/commands.rb
95
95
  - lib/neo_gruby/cli/commands/console.rb
96
- - lib/neo_gruby/cli/commands/db.rb
97
96
  - lib/neo_gruby/cli/commands/protoc.rb
98
97
  - lib/neo_gruby/cli/commands/server.rb
99
98
  - lib/neo_gruby/ext/class.rb
@@ -1,34 +0,0 @@
1
- require "dry/cli"
2
-
3
- module NeoGruby
4
- module CLI
5
- module Commands
6
- module Db
7
- class Migrate < Dry::CLI::Command
8
- desc "Run database migration"
9
-
10
- argument :version, type: :string, desc: "Informe the migration name to destination"
11
-
12
- def call(version: nil, **)
13
- require './config/boot'
14
- require 'sequel'
15
- require 'yaml'
16
-
17
- ::Sequel.extension :migration
18
-
19
- config = YAML.load_file(NeoGruby.root.join('config', 'database.yml'))
20
- config[NeoGruby.env].keys.each do |name|
21
- dir = NeoGruby.root.join('db/migrations', name)
22
- puts dir if File.directory? dir
23
- ::Sequel::Migrator.run(NeoGruby.db[name.to_sym], dir, target: version) if File.directory? dir
24
- end
25
- end
26
- end
27
- end
28
-
29
- register "db" do |prefix|
30
- prefix.register "migrate", Db::Migrate
31
- end
32
- end
33
- end
34
- end