civo 0.5.7 → 0.5.8

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: 57fb2b192d5d84d7191345e7cdf7852b5b4f4265
4
- data.tar.gz: d49303008f0207f56bd0fee99b8896925c127f22
3
+ metadata.gz: 9e3ff6bfd80c6ebcf5b6ed6630cc1dba92cff784
4
+ data.tar.gz: c2c87963f8fce15d2e8fd6f702aebbd90047390f
5
5
  SHA512:
6
- metadata.gz: d014508f7975d82393676135f16a6eb09c3eff05d4d9431211abf10dae5bf71941c9c4c57bc9bc74b38d6d6bcbfabef0dce6040e36ec6d57006b0e166d52f56e
7
- data.tar.gz: bae6e002d56fe96d2c64035feea0647117bde061013cef49c298679629b96a9ccd6d1474992c2ad2c6b390662b17e22cb656da3554e02f531807063f24a8f0f8
6
+ metadata.gz: 2101e81a18c1c33c20f11340c1eadf329cf19c6cee5bf27bc0968ebf9b12647977acf1e6b6a82bb4dd8da026d7b199d0589061ec64c2cc38e284fe465a13ea7a
7
+ data.tar.gz: 6868d42af6d1077ba54d8b4236a7b4bfe22a7d3467f6aa699ae86790bd125b1d600d7745daf7e83d479f41f84030ae2c5ce8906c89f78cb913851d1b6aa00975
@@ -1,8 +1,15 @@
1
1
  module Civo
2
2
  class FirewallRule < Base
3
- get :all, "/v#{ENV["CIVO_API_VERSION"] || "1"}/firewalls/:name/rules", required: [:name]
4
- post :create, "/v#{ENV["CIVO_API_VERSION"] || "1"}/firewalls/:name/rules", required: [:name, :protocol, :start_port,
5
- :cidr, :direction]
6
- delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "1"}/firewalls/:name/rules/:id", required: [:name, :id]
3
+ if ENV["CIVO_API_VERSION"] == "2"
4
+ get :all, "/v2/firewalls/:firewall_id/rules", required: [:firewall_id]
5
+ post :create, "/v2/firewalls/:firewall_id/rules", required: [:firewall_id, :protocol, :start_port,
6
+ :cidr, :direction]
7
+ delete :remove, "/v2/firewalls/:firewall_id/rules/:id", required: [:firewall_id, :id]
8
+ else
9
+ get :all, "/v#{ENV["CIVO_API_VERSION"] || "1"}/firewalls/:name/rules", required: [:name]
10
+ post :create, "/v#{ENV["CIVO_API_VERSION"] || "1"}/firewalls/:name/rules", required: [:name, :protocol, :start_port,
11
+ :cidr, :direction]
12
+ delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "1"}/firewalls/:name/rules/:id", required: [:name, :id]
13
+ end
7
14
  end
8
15
  end
data/lib/civo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Civo
2
- VERSION = "0.5.7"
2
+ VERSION = "0.5.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: civo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Jeffries
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-21 00:00:00.000000000 Z
11
+ date: 2016-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: flexirest