s3_config 0.1.9 → 0.1.10

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: 2f41d2cdd9c4100ae8c13f17785d5ef1661b2a9e
4
- data.tar.gz: 8907bd6892aec90e74e56d4285445b1a83debe4d
3
+ metadata.gz: e186bea791a92b33cdc94e1ac695ff54b07b78f5
4
+ data.tar.gz: 002d681421a1868434762f6c997334b544b33baf
5
5
  SHA512:
6
- metadata.gz: e726854e73c60ecdbd793f48769d758e4e7e6ffc661e51242dce65b0f40024d830a82d3798744a83eade0b99a821819bfe3d8757cacc4263a74973ea0b76a2e6
7
- data.tar.gz: 46d2ec86b1ed604d227b1b762908d1e87bd74824bf8af84e1fd2d9e2f9ba7bd0faf1fa2b119533d1bb7a4a4d3e77dfd71c6abea57e33c18dbca1abe4e55bdabf
6
+ metadata.gz: 1508796682cfe35e4fb6b86794f13a3a0124a0f91fbb3549083335980651779656ef25154ba7f5dc7a67419655e516bc2ad9baaa4132ea903ce517d2f3e5f9f8
7
+ data.tar.gz: b1fd8cf059e7b0063d8be63abb12d57a2e418a4815c15377aabe550e3a4eb25cda33ea715c8969bad59ae66402a1c63a64da9f99b5c14e33aa0f6544a233ea58
data/lib/s3_config/cli.rb CHANGED
@@ -31,21 +31,23 @@ module S3Config
31
31
  end
32
32
 
33
33
  desc "set", "Set S3Config variable for environment. eg: config set production KEY=value"
34
- def set(environment=nil, key_value="")
34
+ def set(environment=nil, *key_values)
35
35
  return unless validate_installed!
36
36
  return error "Environment required. eg: config set production KEY=value" if environment.nil?
37
- key, value = key_value.split '='
38
- return error "Key required. eg: config set production KEY=value" if key.nil?
39
- key.upcase!
40
- if value.nil?
41
- error "Value required. eg: config set production KEY=value"
42
- say "Use `config unset` to delete a key"
43
- return
44
- end
45
37
  @application = S3Config.adapter.new environment: environment
46
38
  version = @application.latest_version
47
- @application.write key, value
48
- say "Set #{key}=#{value} (#{environment})"
39
+ key_values.each do |key_value|
40
+ key, value = key_value.split '='
41
+ return error "Key required. eg: config set production KEY=value" if key.nil?
42
+ key.upcase!
43
+ if value.nil?
44
+ error "Value required. eg: config set production KEY=value"
45
+ say "Use `config unset` to delete a key"
46
+ return
47
+ end
48
+ @application.write key, value
49
+ say "Set #{key}=#{value} (#{environment})"
50
+ end
49
51
  say "====="
50
52
  if @application.latest_version != version
51
53
  say "New version: v#{@application.latest_version}"
@@ -1,3 +1,3 @@
1
1
  module S3Config
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zane Shannon