kumogata 0.4.5 → 0.4.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: 7fdd78705361ec8fc36f2c44c1082e16f5c28789
4
- data.tar.gz: a87009e2d2ee94e6b23415e1e6d6b6c7ebd7aad5
3
+ metadata.gz: b1646d7c3f03a1b105c5a5bc6ca27a69d88ce7a0
4
+ data.tar.gz: 9de11baa1375551eaf9458b6d88bf73aed447210
5
5
  SHA512:
6
- metadata.gz: e4af102fcc4b069f907dc145da52e899de20574f36500058c16ae80036d85d7147339dba61b0941033c0e5a4e3e55a2271c095d86771748367dbc169447abec1
7
- data.tar.gz: ede746e11db3a41f3b1aae33dfa209e8fcbb1583f1a994d7ba8853703f11fa918d3efff1b9b83eab86977439f97bfe7cda595d891ebf571ac478e9bd367e6265
6
+ metadata.gz: f5aecb29d489251c22ece46f7460ae4405bc589dd363ae89b4e8be3b3652f978919a82b885d2363787caa2b7e1b2eb914a804665cff673cb9ddbdfd7523f09ac
7
+ data.tar.gz: 54724f7d9f9af6067f59c4e1e2ee7a51dd198a98a5b9b9ad5dc6380657584378bbca1f550ab34182fe650c4a273d71cb9f6ba4eeb7b46c4366d73e79fd211e9e
data/README.md CHANGED
@@ -5,8 +5,8 @@
5
5
 
6
6
  Kumogata is a tool for [AWS CloudFormation](https://aws.amazon.com/cloudformation/).
7
7
 
8
- [![Gem Version](https://badge.fury.io/rb/kumogata.png?201403151714)](http://badge.fury.io/rb/kumogata)
9
- [![Build Status](https://drone.io/github.com/winebarrel/kumogata/status.png?201403151714)](https://drone.io/github.com/winebarrel/kumogata/latest)
8
+ [![Gem Version](https://badge.fury.io/rb/kumogata.png?201403151812)](http://badge.fury.io/rb/kumogata)
9
+ [![Build Status](https://drone.io/github.com/winebarrel/kumogata/status.png?201403151812)](https://drone.io/github.com/winebarrel/kumogata/latest)
10
10
 
11
11
  It can define a template in Ruby DSL, such as:
12
12
 
data/bin/kumogata CHANGED
@@ -49,7 +49,7 @@ rescue Exception => e
49
49
  raise e
50
50
  else
51
51
  backtrace = Kumogata::Utils.filter_backtrace(e.backtrace)
52
- backtrace = backtrace.slice(0, 3)
52
+
53
53
  unless backtrace.empty?
54
54
  $stderr.puts " from #{backtrace.first}".red
55
55
  end
@@ -56,7 +56,7 @@ class Kumogata::ArgumentParser
56
56
  :arguments => [:stack_name],
57
57
  },
58
58
  :diff => {
59
- :description => 'Compare templates logically',
59
+ :description => 'Compare templates logically (file, http://..., stack://...)',
60
60
  :arguments => [:path_or_url1, :path_or_url2],
61
61
  },
62
62
  }
@@ -98,7 +98,16 @@ class Kumogata::Client
98
98
 
99
99
  def diff(path_or_url1, path_or_url2)
100
100
  templates = [path_or_url1, path_or_url2].map do |path_or_url|
101
- template = open_template(path_or_url)
101
+ template = nil
102
+
103
+ if path_or_url =~ %r|\Astack://(.*)|
104
+ stack_name = $1 || ''
105
+ validate_stack_name(stack_name)
106
+ template = export_template(stack_name)
107
+ else
108
+ template = open_template(path_or_url)
109
+ end
110
+
102
111
  JSON.pretty_generate(template)
103
112
  end
104
113
 
@@ -1,3 +1,3 @@
1
1
  module Kumogata
2
- VERSION = '0.4.5'
2
+ VERSION = '0.4.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kumogata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara