menu-cli 0.3.1 → 0.3.2

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: 11ebfed52f241e9d4ba3b890e5bb1e09af66fd33
4
- data.tar.gz: 40c5fa4cf017e73812854572cf793a1050c08d66
3
+ metadata.gz: 9512579d3df0f9ae34ef9363ed28f7fe4fff9f77
4
+ data.tar.gz: fddd47cefb9d4a39ae27e21878867b78a9c3e094
5
5
  SHA512:
6
- metadata.gz: 8af7884cd085bc0cdafd1e2be084114f851863b8aa5dd190369cf63da3c2d8415b00e3829c2a90aa583d63764add9653b23d4dca21310d9045a2b621272e423d
7
- data.tar.gz: 3dccdc5f667f7c8e0445042bce56a8dac95bee4088027de0bbd182ab30d8dac3111ea72d0f879463029039441fa216e0758ef9f2773e05fecee56204e85ee5ac
6
+ metadata.gz: 071f1dbb8f56945f9676b044432454e94632d72c4cc8b600cf205be2bd645d78d0c2411cad714f7ed279d5512e18008a89fcc6cfd6a6b9665e29756bc8cfdbaf
7
+ data.tar.gz: 3d36674230dc282e8e2d95d852d5b0dbc76f2c49bbcbad91e30ccf97d3d4c2a4287a366dd51bb2af0676c91ab07b127ead5000a57c00971ee1709dfcf28db393
@@ -9,12 +9,8 @@ module Menu
9
9
  end
10
10
 
11
11
  def upload_payload
12
- unless File.exists? @payload_file
13
- puts "Could not open payload"
14
- exit 1
15
- end
16
12
  s3 = Aws::S3::Client.new(region: 'us-east-1')
17
- key = "#{options.component}/v#{self.version}-#{@checksum}#{File.extname(@payload_file)}"
13
+ key = "#{options.component}/v#{self.version}-#{md5}#{File.extname(@payload_file)}"
18
14
  puts "Uploading payload (#{key}) to S3..." if @options.verbose
19
15
  s3.put_object(
20
16
  acl: "public-read",
@@ -27,10 +23,14 @@ module Menu
27
23
  end
28
24
 
29
25
  def payload_file= file
26
+ unless File.exists? file
27
+ puts "Could not open payload"
28
+ exit 1
29
+ end
30
30
  @payload_file = file
31
31
  puts "Calcuating checksum..." if @options.verbose
32
- @checksum = Digest::MD5.file(file).hexdigest
33
- puts "Checksum: "+ @checksum
32
+ md5 = Digest::MD5.file(file).hexdigest
33
+ puts "Checksum: "+ md5
34
34
  end
35
35
 
36
36
  def to_json s
@@ -38,7 +38,7 @@ module Menu
38
38
  version: version,
39
39
  beta: beta,
40
40
  payload: payload,
41
- md5: @checksum
41
+ md5: md5
42
42
  }.to_json
43
43
  end
44
44
  end
@@ -36,7 +36,7 @@ module Menu
36
36
  bucket: @options.bucket,
37
37
  key: "#{@options.component}.json",
38
38
  content_type: "application/json",
39
- cache_control: "max-age = 7200"
39
+ cache_control: "public, s-maxage=7200, max-age=120"
40
40
  )
41
41
  log "JSON uploaded"
42
42
  end
@@ -1,3 +1,3 @@
1
1
  module Menu
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: menu-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kurt Nelson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-06 00:00:00.000000000 Z
11
+ date: 2015-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday