s3_patron 0.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
  SHA1:
3
- metadata.gz: c5401d3149d3a10ccc33bca7672fd07ebe1b8ac3
4
- data.tar.gz: 8dcfee301097d8ca826d009a1430da0615ca4150
3
+ metadata.gz: bcd8213be62686995920bd1ab4f8d701185ba94e
4
+ data.tar.gz: a5823c91f0d69389bc565ec6913946af9f054891
5
5
  SHA512:
6
- metadata.gz: 13d7eb96bbcf23f5b48a347297fb1e1bbf34033a9213feb84cee0d204281370193618a79e18a60a003cd1754d9a6786fc8e47166d3724f19874a53253a500177
7
- data.tar.gz: 2625ec19a26908f934bf4eccdb4d352584d99f651c8faf46c3a178fbc3bdc7e2016032f4236ce14b48b368198837c532be3cc14796d5f6a0977da659e0a5dfb1
6
+ metadata.gz: ac825c13054b08f5805a9716f529b1b6d0cf4aa5c213435fc9ea242acc7eef15aec3739ff4d27af4bda444b7d2bdfc7b0369a7636988cab7e0f5336070245f1a
7
+ data.tar.gz: 8f128df75dc287ed73eca60ea6e57af92eaa10be2b30a43611dba07240f2b85180d4d2f72b868d128cab907a6882dd2f8fadb7490f5fcca0ecfe7648e6789ef1
data/README.md CHANGED
@@ -22,17 +22,81 @@ Set ENV variables
22
22
 
23
23
  ## Usage
24
24
 
25
+ ```shell
26
+ #List of Commands:
27
+ $ s3patron buckets [REGION(OPTIONAL)] # List all buckets
28
+ $ s3patron create [BUCKET_NAME] [REGION(OPTIONAL)] # create bucket
29
+ $ s3patron download [BUCKET_NAME] [OBJECT] [DOWNLOAD_LOCATION(default=CURRENT DIR)] [REGION(default=ENV[AWS_REGION])] # Download object from bucket
30
+ $ s3patron help [COMMAND] # Describe Commands
31
+ $ s3patron list [BUCKET_NAME] [REGION(OPTIONAL)] # List objects inside bucket
32
+ $ s3patron upload [BUCKET_NAME] [FILE] [REGION(OPTIONAL)] # Upload into bucket
33
+
34
+ ```
35
+
36
+ #Examples
37
+
38
+ ##List Buckets
39
+
40
+ ```shell
41
+ #Normal
42
+ $ s3patron buckets
43
+ # Will list all buckets in your s3. By default it lists first 50 items
44
+
45
+ $ s3patron buckets -a
46
+ # passing -a flag will list all items with no limit.
47
+
48
+ $ s3patron buckets -l 10 #will show first 10 buckets
49
+ # You can customize number of results by passing -l flag followed by limit
50
+ ```
51
+
52
+ ##Create Bucket
53
+
54
+ ```shell
55
+ #Normal
56
+ $ s3patron create example_bucket
57
+ # Will create a bucket named example_bucket
58
+
59
+ #Optional
60
+ # If you do not want to use the AWS REGION defined in env variables you can pass region as next argument to create
61
+ $ s3patron create example_bucket us-east-1
25
62
  ```
26
- Commands:
27
- s3patron buckets REGION(OPTIONAL) # List all buckets
28
- s3patron create BUCKET_NAME REGION(OPTIONAL) # create bucket
29
- s3patron download BUCKET_NAME OBJECT DOWNLOAD_LOCATION(OPTIONAL) REGION(OPTIONAL) # Download object from bucket
30
- s3patron help [COMMAND] # Describe Commands
31
- s3patron list BUCKET_NAME REGION(OPTIONAL) # List objects inside bucket
32
- s3patron upload BUCKET_NAME FILE REGION(OPTIONAL) PATH_TO_FILE # Upload into bucket
33
63
 
64
+ ##List Objects inside the bucket
65
+
66
+ ```shell
67
+ #Normal
68
+ $ s3patron list example_bucket
69
+ # Will list all objects inside example_bucket in your s3. By default it lists first 50 items
70
+
71
+ $ s3patron list example_bucket -a
72
+ # passing -a flag will list all items with no limit.
73
+
74
+ $ s3patron list example_bucket -l 10 #will show first 10 buckets
75
+ # You can customize number of results by passing -l flag followed by limit
76
+ ```
77
+
78
+ ##Upload into a bucket
79
+ ```shell
80
+ #Normal
81
+ $ s3patron upload example_bucket example_file.txt
82
+ # Will upload example_file.txt to example_bucket
83
+
84
+ #Optional
85
+ # If you do not want to use the AWS REGION defined in env variables you can pass region as next argument
34
86
  ```
35
87
 
88
+ ##Download object from bucket
89
+ ```shell
90
+ #Normal
91
+ $ s3patron download example_bucket example_file.txt
92
+ # Will download example_file.txt to current directory
93
+
94
+ #Optional
95
+ # If you do not want to use the AWS REGION defined in env variables you can pass region as next argument
96
+ ```
97
+
98
+
99
+
36
100
  ##Rubygems.org
37
101
  Hosted at [Rubygems.org](https://rubygems.org/gems/s3_patron)
38
102
 
data/lib/s3_patron/cli.rb CHANGED
@@ -28,7 +28,6 @@ module S3Patron
28
28
  end
29
29
 
30
30
  desc 'upload BUCKET_NAME FILE REGION(OPTIONAL) PATH_TO_FILE', 'Upload into a bucket'
31
- method_option :bucket, type: :string, default: false, aliases: '-b', desc: 'Name of the bucket where you want to upload'
32
31
  def upload(bucket_name, file, region=ENV['AWS_REGION'])
33
32
  s3 = Aws::S3::Resource.new(region: region)
34
33
  begin
@@ -1,3 +1,3 @@
1
1
  module S3Patron
2
- VERSION = '0.0.2'.freeze
2
+ VERSION = '0.0.2.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3_patron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suyesh Bhandari