buckler 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -1
- data/buckler.gemspec +1 -1
- data/lib/buckler/actions/destroy_bucket.rb +1 -1
- data/lib/buckler/actions/list_regions.rb +1 -1
- data/lib/buckler/actions.rb +2 -2
- data/lib/buckler/commands.rb +6 -6
- data/lib/buckler/version.rb +1 -1
- data/test/integration/bad_options_test.rb +1 -1
- data/test/integration/create_bucket_test.rb +1 -1
- data/test/integration/empty_bucket_test.rb +1 -1
- metadata +4 -5
- data/lib/buckler/actions/get_bucket.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e46db8b2d3494b3c3743d7360c056fcaeea604ee
|
4
|
+
data.tar.gz: b1e3c73255a6c936f5a2ca4806bff885fe41b8f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e289ff7ce40d40b45af09db6223ee4a83da1c07064be784c374947c2f666235174b745d103bb15f594bae96f7f2869cee6c9b125cd164a0edb8a50697c3d1021
|
7
|
+
data.tar.gz: 836897245241ce7e8eaa25239fe1380fcff090b7f84649ae293a2a2d236fccc3cf9a4257d9cec76ebde914af03aab9b79fa5bd2e2abdc2e5d84e534ef8b8a87c
|
data/README.md
CHANGED
@@ -13,13 +13,20 @@ gem install buckler
|
|
13
13
|
bucket help
|
14
14
|
```
|
15
15
|
|
16
|
+
### Neat Features
|
17
|
+
|
18
|
+
- Buckler will "context switch" with you as you change project folders. It discovers AWS credentials in your `.env` files and Heroku applications.
|
19
|
+
- Prompts you to confirm dangerous actions.
|
20
|
+
- Works with bucket versioning. Issues reversible `delete` commands for versioned bucket objects.
|
21
|
+
- The `bucket sync` command spends extra time doing what you want when you "copy" a bucket. The following properties on each object are also transferred: ACLs, metadata, storage class, `Cache-Control` header, and `Content-*` headers, and `Expires` header. This lets you get close to an exact copy of a bucket for testing migrations or other destructive changes.
|
22
|
+
|
16
23
|
### Command Reference
|
17
24
|
|
18
25
|
```shell
|
19
26
|
# Get a list of your buckets
|
20
27
|
bucket list
|
21
28
|
|
22
|
-
# Run any command with additional
|
29
|
+
# Run any command with additional debugging info
|
23
30
|
bucket list --verbose
|
24
31
|
|
25
32
|
# Get a list of all S3 regions
|
data/buckler.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.authors = ["Corey Csuhta"]
|
11
11
|
s.homepage = "https://github.com/csuhta/buckler"
|
12
12
|
s.summary = "Perform common actions on S3 buckets from the command line"
|
13
|
-
s.description = "Buckler is a
|
13
|
+
s.description = "Buckler is a command line tool for performing common actions on Amazon S3 buckets. It’s more do-what-you-want and less overwhelmingly powerful than the AWS CLI. It’s also designed to work with Heroku applications."
|
14
14
|
|
15
15
|
s.executables = ["bucket"]
|
16
16
|
s.files = `git ls-files`.split("\n")
|
@@ -8,7 +8,7 @@ module Buckler
|
|
8
8
|
|
9
9
|
if @bucket.versioning.status == "Enabled"
|
10
10
|
log "The bucket #{name.bucketize} has versioning enabled, it cannot be deleted."
|
11
|
-
log "You must disable versioning in the AWS
|
11
|
+
log "You must disable versioning in the AWS Management Console."
|
12
12
|
exit false
|
13
13
|
end
|
14
14
|
|
@@ -9,7 +9,7 @@ module Buckler
|
|
9
9
|
when "us-east-1"
|
10
10
|
table << [name, human_name, "Default region"]
|
11
11
|
when "cn-north-1"
|
12
|
-
table << [name, human_name, "Requires
|
12
|
+
table << [name, human_name, "Requires Chinese account"]
|
13
13
|
else
|
14
14
|
table << [name, human_name, nil]
|
15
15
|
end
|
data/lib/buckler/actions.rb
CHANGED
@@ -24,7 +24,7 @@ module Buckler
|
|
24
24
|
return @bucket
|
25
25
|
|
26
26
|
rescue Aws::S3::Errors::NoSuchBucket
|
27
|
-
|
27
|
+
|
28
28
|
alert "No such bucket “#{name}”"
|
29
29
|
exit false
|
30
30
|
|
@@ -35,7 +35,7 @@ module Buckler
|
|
35
35
|
|
36
36
|
end
|
37
37
|
|
38
|
-
# Prints a warning message about
|
38
|
+
# Prints a warning message about irreversible changes to the screen.
|
39
39
|
# The user is required to confirm by typing the given `name_required`
|
40
40
|
# `additional_lines` are printed before the warning.
|
41
41
|
# If `confirmation` matches `name_required`, this method is a no-op.
|
data/lib/buckler/commands.rb
CHANGED
@@ -4,7 +4,7 @@ Buckler::Commands::Root = Cri::Command.define do
|
|
4
4
|
|
5
5
|
name "bucket"
|
6
6
|
usage "bucket <command> [options]"
|
7
|
-
summary "
|
7
|
+
summary "perform common actions on Amazon S3 buckets"
|
8
8
|
description %{
|
9
9
|
Buckler allows you perform common actions on your Amazon S3 buckets.
|
10
10
|
|
@@ -92,7 +92,7 @@ Buckler::Commands::List = Cri::Command.define do
|
|
92
92
|
description %{
|
93
93
|
Prints a list of all Amazon S3 buckets on your account.
|
94
94
|
|
95
|
-
“All” may be
|
95
|
+
“All” may be relative, AWS access keys can be generated without
|
96
96
|
the power to see every bucket available to the master keys.
|
97
97
|
}
|
98
98
|
|
@@ -115,9 +115,9 @@ Buckler::Commands::Create = Cri::Command.define do
|
|
115
115
|
you specify a different region with the --region option.
|
116
116
|
Get a list of all valid regions with `Buckler regions`.
|
117
117
|
|
118
|
-
For maximum
|
118
|
+
For maximum compatibility, Amazon always recommends that you use
|
119
119
|
DNS and TLS-safe bucket names,
|
120
|
-
which contain only the ASCII characters a-z, 0-9, or the
|
120
|
+
which contain only the ASCII characters a-z, 0-9, or the hyphen (-)
|
121
121
|
|
122
122
|
Bucket names with dots or uppercase letters may be unable
|
123
123
|
to use certain Amazon Web Service features.
|
@@ -180,7 +180,7 @@ Buckler::Commands::Destroy = Cri::Command.define do
|
|
180
180
|
available for use again.
|
181
181
|
|
182
182
|
You CANNOT delete a bucket that has versioning enabled.
|
183
|
-
You must first disable versioning on the AWS
|
183
|
+
You must first disable versioning on the AWS Management Console.
|
184
184
|
|
185
185
|
For more information:
|
186
186
|
https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-or-empty-bucket.html
|
@@ -207,7 +207,7 @@ Buckler::Commands::Sync = Cri::Command.define do
|
|
207
207
|
Objects in the target bucket that don’t exist in the source bucket will be deleted.
|
208
208
|
The end result will be two buckets with identical objects.
|
209
209
|
|
210
|
-
The following properties on each object are also
|
210
|
+
The following properties on each object are also transferred:
|
211
211
|
ACLs,
|
212
212
|
Amazon S3 metadata,
|
213
213
|
Amazon S3 storage class,
|
data/lib/buckler/version.rb
CHANGED
@@ -9,7 +9,7 @@ class BadOptionsTest < BucklerTest
|
|
9
9
|
|
10
10
|
# Errors when the ID is correct but the secret is wrong
|
11
11
|
stdout, stderr = run_buckler_command("list --id #{ENV.fetch("AWS_ACCESS_KEY_ID")} --secret BUT_ALSO_DOGGIES")
|
12
|
-
assert stderr.include?("Invalid AWS Secret Access Key"), "Error
|
12
|
+
assert stderr.include?("Invalid AWS Secret Access Key"), "Error message should be printed"
|
13
13
|
assert stderr.include?(ENV.fetch("AWS_ACCESS_KEY_ID")), "Should repeat Key ID"
|
14
14
|
|
15
15
|
end
|
@@ -12,7 +12,7 @@ class CreateBucketTest < BucklerTest
|
|
12
12
|
assert stdout.include?(test_name), "Bucket name should be repeated to user"
|
13
13
|
assert bucket.exists?, "Bucket should be created"
|
14
14
|
|
15
|
-
# Can’t create a bucket that already
|
15
|
+
# Can’t create a bucket that already exists
|
16
16
|
|
17
17
|
stdout, stderr = run_buckler_command("create #{test_name}")
|
18
18
|
assert stderr.include?("already exists"), "“already exists” text not printed"
|
@@ -9,7 +9,7 @@ class EmptyBucketTest < BucklerTest
|
|
9
9
|
stdout, stderr = run_buckler_command("empty #{test_name} --confirm #{test_name}")
|
10
10
|
assert bucket.objects.none?, "The bucket should be emptied"
|
11
11
|
|
12
|
-
# Can’t empty a
|
12
|
+
# Can’t empty a nonexistent bucket
|
13
13
|
|
14
14
|
test_name = "buckler-#{SecureRandom.hex(6)}"
|
15
15
|
stdout, stderr = run_buckler_command("empty #{test_name}")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buckler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Corey Csuhta
|
@@ -108,9 +108,9 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0.6'
|
111
|
-
description: Buckler is a
|
112
|
-
|
113
|
-
|
111
|
+
description: Buckler is a command line tool for performing common actions on Amazon
|
112
|
+
S3 buckets. It’s more do-what-you-want and less overwhelmingly powerful than the
|
113
|
+
AWS CLI. It’s also designed to work with Heroku applications.
|
114
114
|
email:
|
115
115
|
executables:
|
116
116
|
- bucket
|
@@ -133,7 +133,6 @@ files:
|
|
133
133
|
- lib/buckler/actions/create_bucket.rb
|
134
134
|
- lib/buckler/actions/destroy_bucket.rb
|
135
135
|
- lib/buckler/actions/empty_bucket.rb
|
136
|
-
- lib/buckler/actions/get_bucket.rb
|
137
136
|
- lib/buckler/actions/list_buckets.rb
|
138
137
|
- lib/buckler/actions/list_regions.rb
|
139
138
|
- lib/buckler/actions/sync_buckets.rb
|
File without changes
|