outatime 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: ad66a0137663ddd2acc6eb4d723360557dd39c9b
4
- data.tar.gz: dbf910aa8229373c9d7d305ab83abcb82c67fcad
3
+ metadata.gz: 9413cb4ec7dfd1657acd3b8f031fc03b74c9ca9c
4
+ data.tar.gz: d880faa841f6e506d602c22cbb5ad76027f2f1ff
5
5
  SHA512:
6
- metadata.gz: d85e34909a6fd7b71555565e207519fe537c3b416ca625ea5b93b96fa38428c9ecb5eede76812525fb62a326149de5652dfebb592cfc388bedbb10f0d893cc57
7
- data.tar.gz: 34f8bc3d299908d13c035475c1a8e21eaf8d53bd0dadc049bc9776723cf62782864b39993da1c8dce37f1e768616cff2fa690bd2d7e91b1f7d231d34e7652a86
6
+ metadata.gz: d258fd21d762e66e887507f5630af69e86cd1532633b64b115e1c6d78767e94db640c5bbf13923ad8f924ba3afd4a5032d26ad637bf8eec09b01961f02420326
7
+ data.tar.gz: f8044e58e7f1ca9a4acec8551a663b48612f72837bed2d3d112557bd7cc765758673a171b329ed73d229f0988114c89943195cf014ae60a5c002ec2536be134e
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2016 Pressed.net
3
+ Copyright (c) 2016-2017 Pressed.net
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -21,12 +21,12 @@ Or install it yourself as:
21
21
  ## Usage
22
22
 
23
23
  ```
24
- outatime -r {region} -b {bucket-name} -f {date} -p {subdirectory} --profile {aws profile name}
24
+ outatime -r {region} -b {bucket name} -f {date} -p {s3 subdirectory} --d {local path} --o {aws profile name}
25
25
  ```
26
26
 
27
27
  Example:
28
28
  ```
29
- outatime -r us-east-1 -b my-bucket -f '21 Oct 2015' -p schematics/hoverboard --profile aws-profile
29
+ outatime -r us-east-1 -b my-bucket -f '21 Oct 2015' -p schematics/hoverboard -d ~/docs -o aws-profile
30
30
  ```
31
31
 
32
32
  ## Development
@@ -53,8 +53,8 @@ module Outatime
53
53
  s3_client.list_object_versions(bucket: @options[:bucket],
54
54
  prefix: @options[:prefix]).each do |response|
55
55
 
56
- versions += filter_future_items(response.versions, @from)
57
- delete_markers += filter_future_items(response.delete_markers, @from)
56
+ versions.concat(filter_future_items(response.versions))
57
+ delete_markers.concat(filter_future_items(response.delete_markers))
58
58
  end
59
59
 
60
60
  # keep only the latest versions
@@ -127,16 +127,13 @@ module Outatime
127
127
  @s3_client ||= Aws::S3::Client.new(region: region)
128
128
  end
129
129
 
130
- # Private: Returns an Array of items modified on or before the given date/time.
130
+ # Private: Returns an Array of items modified on or before the @from date/time.
131
131
  #
132
132
  # items - An Array of objects. Object must respond to #last_modified.
133
- # date_time - Comparison date/time.
134
133
  #
135
134
  # Returns Array.
136
- def filter_future_items(items, date_time)
137
- items.find_all do |obj|
138
- obj.last_modified <= @from
139
- end
135
+ def filter_future_items(items)
136
+ items.keep_if { |obj| obj.last_modified <= @from }
140
137
  end
141
138
  end
142
139
  end
@@ -1,3 +1,3 @@
1
1
  module Outatime
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: outatime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Mazzi
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-12-22 00:00:00.000000000 Z
13
+ date: 2017-02-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: aws-sdk