piculet 0.2.5 → 0.2.6.beta

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: 185c4b8d6fa4fdce46b1462a5a5147b79964d2c9
4
- data.tar.gz: cb2cbee9f9e0d8790457871c234dba9ca9d3794a
3
+ metadata.gz: ddcd012f4f13f2f3426ef922c2cd8e6551398880
4
+ data.tar.gz: efe06333d02bcef32e18f772f5911a046901d95a
5
5
  SHA512:
6
- metadata.gz: c53efed053c5653ab528b1b3a6e5203ee7be450a571b318725cfb46af47876eb3895696ca51ca0ae2ff2d7b8f81d1ed8554a50b7b0c5ba50c0937c741cb44c5a
7
- data.tar.gz: e034869fa8113e5e56ac1582cc46e44826f4371d73a89e526aaa178b989e9e169fd2aa96290291fbd282b126d55d47348254dcba353c35e8e48bb46d3f25cff2
6
+ metadata.gz: f5e7c94ce0ed188ce0dc0aaa33900a913c9f16aa1f976b142e82f016fb33f8c8304be54de173942aad558a96fc3f2e37afa0f38d82607965563d9d0ef43a213a
7
+ data.tar.gz: 3111161d7cbe0604e77019259d71dacaaf3fbaafaff33f4b1c8f17ba2e3cca0eeca911d75a576597f029a0362b87fa4b8f229fe437fec25f0714d4e02e9476bf
data/bin/piculet CHANGED
@@ -10,6 +10,10 @@ mode = nil
10
10
  file = 'Groupfile'
11
11
  output_file = '-'
12
12
  split = false
13
+ MAGIC_COMMENT = <<-EOS
14
+ # -*- mode: ruby -*-
15
+ # vi: set ft=ruby :
16
+ EOS
13
17
 
14
18
  options = {
15
19
  :dry_run => false,
@@ -97,6 +101,7 @@ begin
97
101
  logger.info(" write `#{group_file}`")
98
102
 
99
103
  open(group_file, 'wb') do |f|
104
+ f.puts MAGIC_COMMENT
100
105
  f.puts converter.call(vpc => security_groups)
101
106
  end
102
107
  end
@@ -105,6 +110,8 @@ begin
105
110
  logger.info(" write `#{output_file}`")
106
111
 
107
112
  open(output_file, 'wb') do |f|
113
+ f.puts MAGIC_COMMENT
114
+
108
115
  requires.each do |group_file|
109
116
  f.puts "require '#{File.basename group_file}'"
110
117
  end
@@ -115,7 +122,11 @@ begin
115
122
  puts client.export(options)
116
123
  else
117
124
  logger.info("Export SecurityGroup to `#{output_file}`")
118
- open(output_file, 'wb') {|f| f.puts client.export(options) }
125
+
126
+ open(output_file, 'wb') do |f|
127
+ f.puts MAGIC_COMMENT
128
+ f.puts client.export(options)
129
+ end
119
130
  end
120
131
  end
121
132
  when :apply
@@ -4,6 +4,7 @@ module Piculet
4
4
 
5
5
  def initialize(options = {})
6
6
  @options = OpenStruct.new(options)
7
+ @options_hash = options
7
8
  @options.ec2 = AWS::EC2.new
8
9
  end
9
10
 
@@ -14,7 +15,7 @@ module Piculet
14
15
 
15
16
  def export(options = {})
16
17
  exported = AWS.memoize do
17
- Exporter.export(@options.ec2, options)
18
+ Exporter.export(@options.ec2, @options_hash.merge(options))
18
19
  end
19
20
 
20
21
  if block_given?
@@ -1,3 +1,3 @@
1
1
  module Piculet
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6.beta"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: piculet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - winebarrel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-14 00:00:00.000000000 Z
11
+ date: 2014-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -146,9 +146,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
146
146
  version: '0'
147
147
  required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  requirements:
149
- - - '>='
149
+ - - '>'
150
150
  - !ruby/object:Gem::Version
151
- version: '0'
151
+ version: 1.3.1
152
152
  requirements: []
153
153
  rubyforge_project:
154
154
  rubygems_version: 2.0.14