bukelatta 0.1.5 → 0.1.6

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: 448e8621bda245cbe529d9613448de981f0ce4b3
4
- data.tar.gz: 0e3c4d8e98d9baf1783c90e15404a97a299e1022
3
+ metadata.gz: c3eb38c6f1afdae77f3f9561798b715821a114a6
4
+ data.tar.gz: 6b2a49f6be84ea6d19d569ae1029eab491a70623
5
5
  SHA512:
6
- metadata.gz: fa66465f6a709a9805a3b7dd127874425b6c57f14683cce909527b3c57765765aac9f4b2c6b403b5777ddb54defac2f4e338b437607c8ce06582f0b1231ad4fd
7
- data.tar.gz: 05ae15ec80f014cd4893e472e2f36080dfc1666461f7a763b6584d5167cc456dbacbc47add8566c8a263c5c84a071af11fbe9a8a19bdc7e964701ce01b22ce25
6
+ metadata.gz: 3f72bb3992f60753ea69873ff7888b461f90700fa193b64883c1603355b81d0033bced1013b4ce8cf7100b93ed2376b7c4064e7a76381018cd02a8427a5e9e55
7
+ data.tar.gz: 0df17d35625c6fe93325a094e7bb89e9eb77c8bf29ccf34a5af8e467192a2cbca990bf845dcd5012dbf3c5610261f2c45073f1f65446f9b7bc9275d35ee989d9
data/README.md CHANGED
@@ -79,3 +79,6 @@ bucket "bar-bucket" do
79
79
  "Resource"=>"arn:aws:s3:::bar-bucket/*"}]}
80
80
  end
81
81
  ```
82
+
83
+ ## Similar tools
84
+ * [Codenize.tools](http://codenize.tools/)
@@ -6,7 +6,8 @@ require 'optparse'
6
6
 
7
7
  Version = Bukelatta::VERSION
8
8
 
9
- DEFAULT_FILENAME = 'PolicyFile'
9
+ OLD_DEFAULT_FILENAME = 'PolicyFile'
10
+ DEFAULT_FILENAME = 'Policyfile'
10
11
 
11
12
  MAGIC_COMMENT = <<-EOS
12
13
  # -*- mode: ruby -*-
@@ -143,8 +144,19 @@ def main(argv)
143
144
  when :apply
144
145
  file = options[:file]
145
146
 
146
- unless File.exist?(file)
147
- raise "No PolicyFile found (looking for: #{file})"
147
+ # TODO: Remove OLD_DEFAULT_FILENAME support
148
+ if File.exist?(file)
149
+ if file == DEFAULT_FILENAME and Dir.glob(DEFAULT_FILENAME).first == OLD_DEFAULT_FILENAME
150
+ file = OLD_DEFAULT_FILENAME
151
+ logger.warn(%!"#{OLD_DEFAULT_FILENAME}" is deprecated. Please use "#{DEFAULT_FILENAME}"!.yellow)
152
+ end
153
+ else
154
+ if file == DEFAULT_FILENAME and File.exist?(OLD_DEFAULT_FILENAME)
155
+ file = OLD_DEFAULT_FILENAME
156
+ logger.warn(%!"#{OLD_DEFAULT_FILENAME}" is deprecated. Please use "#{DEFAULT_FILENAME}"!.yellow)
157
+ else
158
+ raise "No PolicyFile found (looking for: #{file})"
159
+ end
148
160
  end
149
161
 
150
162
  message = "Apply `#{file}` to Bucket Policy"
@@ -1,3 +1,3 @@
1
1
  module Bukelatta
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
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.5
4
+ version: 0.1.6
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-21 00:00:00.000000000 Z
11
+ date: 2016-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk