prep_kit 0.1.4 → 0.1.5

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
  SHA1:
3
- metadata.gz: ae32f8868d16ade0566965b8b0c42e5bb8dda528
4
- data.tar.gz: 376346c567331f9283b8253964e4f24a6be07f6f
3
+ metadata.gz: c2ec12dd0bc3b84c4efd93c509378db4af3bdc26
4
+ data.tar.gz: eba1647e0a43878579d3694e6aca838e578ee88e
5
5
  SHA512:
6
- metadata.gz: f26acd84425dbb1ef1634958d40583ee8f94045a1e00117ec75bbd4b560bcf9f0018cde1951be4f9f9679f114018887961f614a2f30d5f93cd307fdb4bb35a98
7
- data.tar.gz: b279d3d159354404dab2bba7190fb5857f26c25e059a51c813e213006dcd9ca8539f375e13608737b12300fa6a086639426f8211e9ac7dd160b94e54114978d9
6
+ metadata.gz: 4936199ef35c552d5d0f8bfcc43d91f4e6a337ae08c8e48cf96274ca9c02271805cd35b64d49628fded876c76957ab85774b99dbbebfa075ae9d3cccfb9bcf80
7
+ data.tar.gz: 5a2c17a68aefb64983cb3938dd6f459b28777c1533ae8a51beba7339c71d91d6c86ce1016da5bd84b44cc02b3030efb1decb13b231ab007b1cb40f51a4394086
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- prep_kit (0.1.4)
4
+ prep_kit (0.1.5)
5
5
  remote_marshal
6
6
 
7
7
  GEM
@@ -1,3 +1,3 @@
1
1
  module PrepKit
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -0,0 +1,11 @@
1
+ module PrepKit
2
+ class With < Task
3
+ def initialize(parent, prepare)
4
+ @prepare = prepare
5
+ end
6
+
7
+ def sh(command)
8
+ @parent.sh("#{@prepare}; #{command}")
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,24 @@
1
+ module PrepKit
2
+ class Within < Task
3
+ def initialize(parent, directory)
4
+ @parent = parent
5
+ @directory = directory
6
+ end
7
+
8
+ def sh(command)
9
+ @parent.sh("cd #{@directory}; #{command}")
10
+ end
11
+
12
+ def test?(path, option)
13
+ @parent.test?(File.join(@directory, path), option)
14
+ end
15
+
16
+ def upload(src, dst)
17
+ @parent.upload(src, File.join(@directory, dst))
18
+ end
19
+
20
+ def download(src, dst)
21
+ @parent.download(File.join(@directory, src), dst)
22
+ end
23
+ end
24
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prep_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - daisuko
@@ -74,6 +74,8 @@ files:
74
74
  - lib/prep_kit/formatter.rb
75
75
  - lib/prep_kit/task.rb
76
76
  - lib/prep_kit/version.rb
77
+ - lib/prep_kit/with.rb
78
+ - lib/prep_kit/within.rb
77
79
  - prep_kit.gemspec
78
80
  homepage: https://github.com/daisuko/prep_kit
79
81
  licenses: