hako 0.13.0 → 0.13.1

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: 44168c92adc956e117f59a47a63eeab9479288d0
4
- data.tar.gz: 8dc7fbc348b50f6ea2194e2e2adb6a9802258e89
3
+ metadata.gz: 4e3546c11125dcdd22aa894b140f12a21d72053c
4
+ data.tar.gz: f065a1ce00ac0bb8c970c21971783ee901c9727b
5
5
  SHA512:
6
- metadata.gz: 8a2cf60847f746fcc21a7c2b84c74898239d7b8d8b85a950491d01f9e367dcc8b7a5667279e6a1378c71a35a14e455a5613601d896e482b874cfe670d832d3bb
7
- data.tar.gz: f39fcc090dac6613a3c6886582841bee8226a926da2d0ea1a63c231ba80d25d45f4ce5192af2def86cc52521e3722beeada382b8713bca5bc281dae7ca401c98
6
+ metadata.gz: c115a3e2418af61c37e553f1300e825607fbf7f853058d404c741a2bbce39d9cdaa25bba9c8b3486eb6208900ab663f16ae9b369abd0f09280e2bdbf8db4a1b4
7
+ data.tar.gz: 1fe6dc394faacbaf5b8b928ac5dcf1773fdb78fd3a28048fdff12d8f05478c2eb2c1fceeb8f9681f30a94fceebc365af0696264d13a5bf48084d08c5813bef3b
@@ -46,6 +46,7 @@ module Hako
46
46
  def configure(options)
47
47
  super
48
48
  @options = options
49
+ @options['locations'] ||= { '/' => {} }
49
50
  @s3 = S3Config.new(@options.fetch('s3'))
50
51
  end
51
52
 
@@ -62,11 +63,15 @@ module Hako
62
63
  end
63
64
 
64
65
  def upload_config(front_conf)
65
- s3_client.put_object(
66
- body: front_conf,
67
- bucket: @s3.bucket,
68
- key: @s3.key(@app.id),
69
- )
66
+ if @dry_run
67
+ Hako.logger.info "Generated configuration:\n#{front_conf}"
68
+ else
69
+ s3_client.put_object(
70
+ body: front_conf,
71
+ bucket: @s3.bucket,
72
+ key: @s3.key(@app.id),
73
+ )
74
+ end
70
75
  end
71
76
 
72
77
  def s3_client
@@ -102,8 +107,7 @@ module Hako
102
107
  end
103
108
 
104
109
  def locations
105
- locs = @options.fetch('locations', {}).dup
106
- locs['/'] ||= {}
110
+ locs = @options.fetch('locations').dup
107
111
  locs.keys.each do |k|
108
112
  locs[k] = Location.new(locs[k])
109
113
  end
data/lib/hako/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Hako
3
- VERSION = '0.13.0'
3
+ VERSION = '0.13.1'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hako
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kohei Suzuki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-29 00:00:00.000000000 Z
11
+ date: 2016-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk