confyio 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 991f2b1c5ea416118f21031808b69ca4aacab344
4
- data.tar.gz: ab1fbb3ed62359a5f0aa371bc55cd4fa901cf349
3
+ metadata.gz: 639af2dec4aaf421b6d016f8463dab340383fe1f
4
+ data.tar.gz: 2d820b39bb1860f009291e418b2c832df001c044
5
5
  SHA512:
6
- metadata.gz: 2d933ebb61f32b89db27584b26244ca5876f8772e13183fd1830b04aaefe03a6a10e0280f7c9609fb46ec6ab6315927945f58fd813cbda8005a8150e7c2357fb
7
- data.tar.gz: e33bbae1d3ef39bb5b43cb93a8cf1d57200b25bae929a77e586bbe35528c5f56d53651a326c71b3ffa972555c234abc6a0d5ba05e6052e0686f50a4794617c32
6
+ metadata.gz: 00d3892daec80f5552f41f1d28d00491febfe4887c2563414fc212163191163873a9fbf9105db7f111d70ca8416efb274dbd023e578c1304063b935fbb9b84ca
7
+ data.tar.gz: 1c0374d9dd59cbf13bd0a38d5f396aead590a3119d9de9ca9b0085b15d3ff6f818dbccde35e72df053e4cef6d9c822969ec8cfeb6a0ca81e3e177907541a5612
@@ -27,11 +27,11 @@ module Confy
27
27
 
28
28
  # Update the configuration document for the given environment of the project. We will patch the document recursively.
29
29
  #
30
- # '/orgs/:org/projects/:project/envs/:env/config' POST
30
+ # '/orgs/:org/projects/:project/envs/:env/config' PATCH
31
31
  #
32
32
  # body - Configuration to update
33
33
  def update(body, options = {})
34
- @client.post("/orgs/#{@org}/projects/#{@project}/envs/#{@env}/config", body, options)
34
+ @client.patch("/orgs/#{@org}/projects/#{@project}/envs/#{@env}/config", body, options)
35
35
  end
36
36
 
37
37
  end
data/lib/confy/config.rb CHANGED
@@ -7,6 +7,8 @@ module Confy
7
7
  regex = Regexp.new('(https?:\/\/)(.*):(.*)@(.*)\/orgs\/([a-z0-9]*)\/projects\/([a-z0-9]*)\/envs\/([a-z0-9]*)\/config', true)
8
8
  matches = regex.match(url)
9
9
 
10
+ raise 'Invalid url' if matches.nil?
11
+
10
12
  url = {
11
13
  :host => matches[1] + matches[4], :user => matches[2], :pass => matches[3],
12
14
  :org => matches[5], :project => matches[6], :env => matches[7]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: confyio
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavan Kumar Sunkara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-17 00:00:00.000000000 Z
11
+ date: 2014-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday