civo 0.3.13 → 0.3.14

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: 6b2606cec16c3a6cf508c3ad2ae7970271220f8b
4
- data.tar.gz: 5c0c77ff03d9bd30331cf3d28cfc613489c016ec
3
+ metadata.gz: 34735df97b431f2fd2841c799b5e95848f17aeba
4
+ data.tar.gz: 3adb22eab41a786533ef46ecc73ad6b4072db716
5
5
  SHA512:
6
- metadata.gz: a05e3658aff0d50e6e43ea78ba299d366d58145735c1fb17c10cf61d94085a6f5f9b1365bb4d56b698ed39c684ed5444c3b58e6bf9c8200e7ee73bc024e4bc4d
7
- data.tar.gz: 2bcbc57708a9c6e3bbe8d7257944dcb5306a2c6e10e58357ef16a7f8bd64bed07b636fd7e56b7002d7c49db2500df64f69314f1657a3bc476f99ddda92b50c76
6
+ metadata.gz: 0f44d7ce9445e75ad5ad6bcf45484a892bf8e08de8a81ceb7280e54f312cc3ffa07c42418e7a1d8b39dad9c66114a655fe07ae799d90cf9f4f469fcd107eb63a
7
+ data.tar.gz: 8154252cc2473c8808b18a52c70eefc3e072680f5d2cd530991e095f4b0686fa663bb22cea7bc131a5fb74e87aeaebe1534bf05783670b769bb029d2db820682
@@ -1,15 +1,7 @@
1
1
  module Civo
2
2
  class Firewall < Base
3
- get :all, "/v1/firewalls", fake: [{
4
- "name" => "instance-12345",
5
- "instance_count" => 10,
6
- "rules_count" => 3
7
- }]
8
- put :create, "/v1/firewalls/:name", required: [:name], fake: {
9
- "result" => "success"
10
- }
11
- delete :remove, "/v1/firewalls/:name", required: [:name], fake: {
12
- "result" => "success"
13
- }
3
+ get :all, "/v1/firewalls"
4
+ put :create, "/v1/firewalls/:name", required: [:name]
5
+ delete :remove, "/v1/firewalls/:name", required: [:name]
14
6
  end
15
7
  end
@@ -1,20 +1,8 @@
1
1
  module Civo
2
2
  class FirewallRule < Base
3
- get :all, "/v1/firewalls/:name/rules", required: [:name], fake: [{
4
- "id" => "12345678-9012-3456-7890-123456789012",
5
- "protocol" => "tcp",
6
- "start_port" => "0",
7
- "end_port" => "65535",
8
- "cidr" => "0.0.0.0/0",
9
- "direction" => "inbound",
10
- "restriction" => "allow"
11
- }]
3
+ get :all, "/v1/firewalls/:name/rules", required: [:name]
12
4
  put :create, "/v1/firewalls/:name/rules", required: [:name, :protocol, :start_port,
13
- :cidr, :direction, :restriction], fake: {
14
- "result" => "success"
15
- }
16
- delete :remove, "/v1/firewalls/:name/rules/:id", required: [:name, :id], fake: {
17
- "result" => "success"
18
- }
5
+ :cidr, :direction]
6
+ delete :remove, "/v1/firewalls/:name/rules/:id", required: [:name, :id]
19
7
  end
20
8
  end
@@ -12,6 +12,7 @@ module Civo
12
12
  put :start, "/v1/instances/:id/start", requires: [:id]
13
13
  put :upgrade, "/v1/instances/:id", requires: [:size, :id]
14
14
  put :restore, "/v1/instances/:id/restore", requires: [:snapshot, :id]
15
+ put :firewall, "/v1/instances/:id/firewall", requires: [:name, :id]
15
16
 
16
17
  def nice_ip_addresses
17
18
  @ip_addresses ||= (self._attributes[:ip_addresses].items rescue []).map do |ip|
@@ -1,3 +1,3 @@
1
1
  module Civo
2
- VERSION = "0.3.13"
2
+ VERSION = "0.3.14"
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.3.13
4
+ version: 0.3.14
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-02-02 00:00:00.000000000 Z
11
+ date: 2016-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: flexirest
@@ -64,7 +64,6 @@ files:
64
64
  - app/models/civo/account.rb
65
65
  - app/models/civo/base.rb
66
66
  - app/models/civo/firewall.rb
67
- - app/models/civo/firewall_rule
68
67
  - app/models/civo/firewall_rule.rb
69
68
  - app/models/civo/instance.rb
70
69
  - app/models/civo/ip.rb
File without changes