interactive_s3 0.0.5 → 0.0.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7445f685501e07f4413d92742c4f29c10b8a2c11
|
4
|
+
data.tar.gz: 90c6ff2d37f57d73215275b797c6710f183542a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6ea074a6bfabea5ea237cf3d1d9154aff27c783dd9ad9705f3124a25ac50919360859ce705d121333b10493b9600bcb08ef999f478f5b52bccaa3456e5a44d9
|
7
|
+
data.tar.gz: 47666cf4eb8c6a5e03acebc23a01ec531160abff898b681d49936bc202d3c9e12c4df5b293e3420ae8249802e8fc129b102b006860067414c5836759b8ac9491
|
data/lib/interactive_s3/s3.rb
CHANGED
@@ -28,7 +28,7 @@ module InteractiveS3
|
|
28
28
|
def exists?
|
29
29
|
return true if root?
|
30
30
|
output, error, status = Open3.capture3('aws', 's3', 'ls', current_path)
|
31
|
-
status.success? && (bucket? || output.
|
31
|
+
status.success? && (bucket? || (output != '' && output.match(/(\S*)\/$/)[1] == stack.last))
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -47,7 +47,7 @@ describe InteractiveS3::Commands::InternalCommand do
|
|
47
47
|
describe described_class::Chdir do
|
48
48
|
describe '#execute' do
|
49
49
|
before do
|
50
|
-
allow(s3).to receive(:
|
50
|
+
allow(s3).to receive(:exists?).and_return(true)
|
51
51
|
s3.stack << 'mybucket' << 'foo' << 'bar'
|
52
52
|
end
|
53
53
|
|
@@ -58,8 +58,8 @@ describe InteractiveS3::S3 do
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
-
describe '#
|
62
|
-
subject { s3.
|
61
|
+
describe '#exists?' do
|
62
|
+
subject { s3.exists? }
|
63
63
|
|
64
64
|
context 'when the s3 path is root' do
|
65
65
|
it { is_expected.to be_truthy }
|
@@ -75,9 +75,10 @@ describe InteractiveS3::S3 do
|
|
75
75
|
end
|
76
76
|
|
77
77
|
context 'status is success and output exists' do
|
78
|
-
let(:output) { '
|
78
|
+
let(:output) { 'bar/' }
|
79
79
|
|
80
80
|
before do
|
81
|
+
stack_to_s3
|
81
82
|
allow(status).to receive(:success?).and_return(true)
|
82
83
|
end
|
83
84
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: interactive_s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yamayo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
112
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.
|
113
|
+
rubygems_version: 2.4.5
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: An interactive shell for AWS CLI (aws s3)
|