omniai-tools 0.6.1 → 0.6.2

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: 92931cd23e47e41ef1be07da377a47cf0e9af2456f58974f8a384597f9c2d6c6
4
- data.tar.gz: 9adf44825839528ca308915cf6f58f5d5ef86b052f5dd7f4e5abfbef8fd98a6b
3
+ metadata.gz: d9fc703ed47e1756627d0f2078e340839f6f7b1f9f7f7dec6d16db9ef187a5b5
4
+ data.tar.gz: 81b50a1493dfab9218ab87c5529ad96e6915e42bf9db5926da0ca2f1a7d89f86
5
5
  SHA512:
6
- metadata.gz: b02dcd4125e9198e30c4ade51a6b942d9bc945ee03be946c0fb93328ffc3a7b3a29c2a4a10a3a5dfa98f003402d9e73de900e0015aed3e07969243cf16edc742
7
- data.tar.gz: 4c4fa96c08aa45a8d0b76401602050e241a18a4eae4e5af6c59771a522fdb791c4bcc7771bf4bbd02e12f1c63e6d4945278030c8991bd56b35823a238b841abe
6
+ metadata.gz: a8161e1fc16285ab875ce9836d53e9accff7b039d1b79f9e4ff7ae362b4e38125ea1683475ae1e846640d938a9c676c19213f9c0757c5364e28943e256e8237f
7
+ data.tar.gz: a95cf834e444627c57ea2a71fe81564fb232baa6bc708537c5b825895777d24b516f56d806a8bcfa5f84db0bdabc0aadeaa6ba098663f70a2f4cbba9228e503e
@@ -4,10 +4,10 @@ module OmniAI
4
4
  module Tools
5
5
  module Disk
6
6
  # @example
7
- # tool = OmniAI::Tools::Disk::DirectoryCreateTool.new(root: "./project")
8
- # tool.execute(path: "./foo/bar")
9
- class DirectoryCreateTool < BaseTool
10
- description "Creates a directory."
7
+ # tool = OmniAI::Tools::Disk::DirectoryMoveTool.new(root: "./project")
8
+ # tool.execute(old_path: "./foo", new_path: "./bar")
9
+ class DirectoryMoveTool < BaseTool
10
+ description "Moves a directory from one location to another."
11
11
 
12
12
  parameter :old_path, :string, description: "a path (e.g. `./old`)"
13
13
  parameter :new_path, :string, description: "a path (e.g. `./new`)"
@@ -19,9 +19,8 @@ module OmniAI
19
19
  #
20
20
  # @return [String]
21
21
  def execute(old_path:, new_path:)
22
- @logger.info("#{self.class.name}#execute path=#{path.inspect}")
23
-
24
- FileUtils.mv(old_path, new_path)
22
+ @logger.info("#{self.class.name}#execute old_path=#{old_path.inspect} new_path=#{new_path.inspect}")
23
+ FileUtils.mv(resolve!(path: old_path), resolve!(path: new_path))
25
24
  rescue SecurityError => e
26
25
  @logger.error(e.message)
27
26
  raise e
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAI
4
4
  module Tools
5
- VERSION = "0.6.1"
5
+ VERSION = "0.6.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniai-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Sylvestre