bukelatta 0.1.2 → 0.1.3

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: 86be96883447847f16acf96e0166721567a75681
4
- data.tar.gz: 5c3a19f8a13b9fc0687d22bd1b18a24d7dd2640a
3
+ metadata.gz: 005ea3970ee3ba921330b6e457083e18a2ec38d9
4
+ data.tar.gz: cf9246ccfc936b93252da04040ccc09f14e84b79
5
5
  SHA512:
6
- metadata.gz: c5eaba78d7726b8a57cffd8dc98af1b10f350ba1b57f2bdae025ae3a5be04d79ba6efeddd2a696a60394ee1cb1c63634c968ec733c8a75ce46d56adee565d8d4
7
- data.tar.gz: a64338561ad9f7b39c1d4667d20e0da0dadaaeaa4f398b7f840247dc6cbcce63f0ae47d134c4833abc9de06077fd2e5346e3663fe24dcf1ffb5a00356cae0e2d
6
+ metadata.gz: 8d033b02851be6048214666af8d47232552650d7561dcefb53689c9fd938b3629f12b8a5b1304f1606d06444e278de2c0a7d0f63eefb7428cc9f881893dea653
7
+ data.tar.gz: 73f1a33da49a7abf9fa4fb4488ac324190c61562b96693c13c67b75d55829e55c03ef09b5ce15abe2e6f625b1a1fc22ffb9b98aad914ef60be7048d9a743f5d8
@@ -6,11 +6,12 @@ class Bukelatta::Client
6
6
  @options = options
7
7
  @client = @options[:client] || Aws::S3::Client.new
8
8
  @resource = Aws::S3::Resource.new(client: @client)
9
- @driver = Bukelatta::Driver.new(@client, options)
9
+ @driver = Bukelatta::Driver.new(@client, @options)
10
+ @exporter = Bukelatta::Exporter.new(@client, @options)
10
11
  end
11
12
 
12
13
  def export
13
- Bukelatta::Exporter.export(@client, @options)
14
+ @exporter.export
14
15
  end
15
16
 
16
17
  def apply(file)
@@ -21,7 +22,7 @@ class Bukelatta::Client
21
22
 
22
23
  def walk(file)
23
24
  expected = load_file(file)
24
- actual = Bukelatta::Exporter.export(@client, @options)
25
+ actual = @exporter.export
25
26
 
26
27
  updated = walk_buckets(expected, actual)
27
28
 
@@ -20,7 +20,7 @@ class Bukelatta::DSL::Converter
20
20
  buckets = []
21
21
 
22
22
  policy_by_bucket.sort_by(&:first).each do |bucket_name, policy|
23
- if not policy or not matched?(buckets)
23
+ if not policy or not matched?(bucket_name)
24
24
  next
25
25
  end
26
26
 
@@ -1,10 +1,6 @@
1
1
  class Bukelatta::Exporter
2
2
  include Bukelatta::Utils::Helper
3
3
 
4
- def self.export(client, options = {})
5
- self.new(client, options).export
6
- end
7
-
8
4
  def initialize(client, options = {})
9
5
  @client = client
10
6
  @options = options
@@ -15,6 +11,8 @@ class Bukelatta::Exporter
15
11
  export_buckets
16
12
  end
17
13
 
14
+ private
15
+
18
16
  def export_buckets
19
17
  result = {}
20
18
  buckets = @resource.buckets
@@ -1,7 +1,5 @@
1
1
  module Bukelatta::Ext
2
2
  module AwsS3BucketExt
3
- DEFULT_CONCURRENCY = 8
4
-
5
3
  def auto_redirect
6
4
  ret = nil
7
5
  bckt = self
@@ -1,3 +1,3 @@
1
1
  module Bukelatta
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bukelatta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - winebarrel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-03 00:00:00.000000000 Z
11
+ date: 2016-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk