mappru 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -3
  3. data/exe/mappru +15 -3
  4. data/lib/mappru/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4dc8eb3b82ed3ed02195af6fd449f315b525b164
4
- data.tar.gz: 643e6d69321a42e687cd9fd3704966d849c10ec9
3
+ metadata.gz: 4eef4f343729a5fb1ad516b79f3d3d1c1b9c32bf
4
+ data.tar.gz: fe13eaeb346e5bd3c95763b26fd7e9d71627fd01
5
5
  SHA512:
6
- metadata.gz: 88a107a38dc9bf505e63f42808855288c78244f9ae829a1ab3a232c2a8d14d4a101cc528e0b24279915daf1a38c2960060e174660598d327ee09cd78f5413681
7
- data.tar.gz: 54464a727881e6682f86d151efc3e14ec1bdb285db3811c827753c4779f23550a95d2ba6a07dc7fac011ce48bd343a7293c81ba1c4e3aab193cb440f9ead2241
6
+ metadata.gz: 3259828ed212987d43ddb5716a943456b71ba77924a20b7e725556893903931f0cfb844b88c1c7464b3a153cde2e14beadf0623355acff6e620327c1eaba50b2
7
+ data.tar.gz: fc17693ec0545b8ff8e23b17045d95c29065a7b8941cc73350617896cd1565db69a76e0c28366c1ca9288145062d49f48a0f04f396898939e07c5d2d6c89ade2
data/README.md CHANGED
@@ -25,10 +25,10 @@ Or install it yourself as:
25
25
  ```sh
26
26
  export AWS_ACCESS_KEY_ID='...'
27
27
  export AWS_SECRET_ACCESS_KEY='...'
28
- mappru -e -o RouteTable # export VPC Route Table
28
+ mappru -e -o Routetable # export VPC Route Table
29
29
  vi PolicyFile
30
30
  mappru -a --dry-run
31
- mappru -a # apply `RouteTable`
31
+ mappru -a # apply `Routetable`
32
32
  ```
33
33
 
34
34
  ## Help
@@ -52,7 +52,7 @@ Usage: mappru [options]
52
52
  --debug
53
53
  ```
54
54
 
55
- ## RouteTable example
55
+ ## Routetable example
56
56
 
57
57
  ```ruby
58
58
  require 'other/tablefile'
@@ -74,3 +74,6 @@ end
74
74
 
75
75
  # Undefined VPC will be ignored
76
76
  ```
77
+
78
+ ## Similar tools
79
+ * [Codenize.tools](http://codenize.tools/)
data/exe/mappru CHANGED
@@ -6,7 +6,8 @@ require 'optparse'
6
6
 
7
7
  Version = Mappru::VERSION
8
8
 
9
- DEFAULT_FILENAME = 'RouteTable'
9
+ OLD_DEFAULT_FILENAME = 'RouteTable'
10
+ DEFAULT_FILENAME = 'Routetable'
10
11
 
11
12
  MAGIC_COMMENT = <<-EOS
12
13
  # -*- mode: ruby -*-
@@ -141,8 +142,19 @@ def run_apply(client, options)
141
142
  logger = Mappru::Logger.instance
142
143
  file = options[:file]
143
144
 
144
- unless File.exist?(file)
145
- raise "No RouteTable found (looking for: #{file})"
145
+ # TODO: Remove OLD_DEFAULT_FILENAME support
146
+ if File.exist?(file)
147
+ if file == DEFAULT_FILENAME and Dir.glob(DEFAULT_FILENAME).first == OLD_DEFAULT_FILENAME
148
+ file = OLD_DEFAULT_FILENAME
149
+ logger.warn(%!"#{OLD_DEFAULT_FILENAME}" is deprecated. Please use "#{DEFAULT_FILENAME}"!.yellow)
150
+ end
151
+ else
152
+ if file == DEFAULT_FILENAME and File.exist?(OLD_DEFAULT_FILENAME)
153
+ file = OLD_DEFAULT_FILENAME
154
+ logger.warn(%!"#{OLD_DEFAULT_FILENAME}" is deprecated. Please use "#{DEFAULT_FILENAME}"!.yellow)
155
+ else
156
+ raise "No RouteTable found (looking for: #{file})"
157
+ end
146
158
  end
147
159
 
148
160
  message = "Apply `#{file}` to Route Table"
@@ -1,3 +1,3 @@
1
1
  module Mappru
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mappru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
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-06 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