pgai 0.2.0 → 0.2.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: fd5bb462021691510f2c194497d6fb87ef5e100a9c48d7ca1c9afab037774628
4
- data.tar.gz: 636221fc95e3cc65f22267fe0d922129749104d9eaf9658e15e408cd8b2df1e0
3
+ metadata.gz: 7c07781fdcd787b0aaba1d7fe23afcb6e63ee1b5da7900ac454bd9d2e95dde4f
4
+ data.tar.gz: 3ff5e06bc552e96b04359bca358f83563f11d76eed0cd205d4d8210ab9f86604
5
5
  SHA512:
6
- metadata.gz: f3cdda7843c5752d3fcfd0bcae46b4184c2104800d9c071eb056b2f719be7f905f2c88ac92ba2bac9af825afdf446e2f8e674b34d2d39476024ebd1f89fc6e7b
7
- data.tar.gz: 39b881e6da03d37b8950bedad53e1d2093260f85bb1ee8a4640ad1e1f2d90d931d2a4eef11de89b5173fa9ae644277f52f22309b334789ad1257043cde5d993e
6
+ metadata.gz: 82dc1b7d5aea1922e36753731125e85239c1a4d03e7bcaeb172e37c4db959fdbee24aa55ecaaf82eeb6312ade4b15efcbf827687acf0012eb135487b6b918bd3
7
+ data.tar.gz: 3308fcc8359891f10b550e20f448ca0e0e32e1ee00753aedbfcf08bd90efe18de7a932fd3de3dd43c841468a45280b663a664d854eb823a98de516a2bb6d7a9d
data/lib/pgai/cli/main.rb CHANGED
@@ -25,6 +25,13 @@ module Pgai::Cli
25
25
  Pgai::CloneManager.new(env, config: configuration).cleanup
26
26
  end
27
27
 
28
+ desc "reset database-name", "Reset clone's state"
29
+ def reset(name)
30
+ env = configuration.enviroments.fetch(name)
31
+
32
+ Pgai::CloneManager.new(env, config: configuration).reset
33
+ end
34
+
28
35
  desc "info database-name", "Show clone details"
29
36
  def info(name)
30
37
  env = configuration.enviroments.fetch(name)
@@ -28,6 +28,13 @@ module Pgai
28
28
  port_forward.stop
29
29
  end
30
30
 
31
+ def reset
32
+ configure_enviroment
33
+ return unless find_raw_clone
34
+
35
+ dblab.reset_clone(id: clone_id)
36
+ end
37
+
31
38
  def info
32
39
  configure_enviroment
33
40
 
data/lib/pgai/dblab.rb CHANGED
@@ -37,6 +37,10 @@ module Pgai
37
37
  dblab("clone", "destroy", id, raw: true)
38
38
  end
39
39
 
40
+ def reset_clone(id:)
41
+ dblab("clone", "reset", id, raw: true)
42
+ end
43
+
40
44
  private
41
45
 
42
46
  attr_reader :config, :hostname
data/lib/pgai/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pgai
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pgai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marius Bobin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-09 00:00:00.000000000 Z
11
+ date: 2023-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor