linode_cluster 0.1.0 → 0.1.1

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: 8d16e05b82b5374305de75916421044f78bcb194
4
- data.tar.gz: 051bb20d4eec6914127f7fda25db51a750bbd5cc
3
+ metadata.gz: a85d6f82219aecb312c1905449fe2a85556fc82d
4
+ data.tar.gz: b29bc8b11f8c8bd75e78e6b3381f2de9bb9042af
5
5
  SHA512:
6
- metadata.gz: 8abf69bf934bb425ff48cdb44d85feeb60d64b35c66996484a22beefabbbb471b8f96ade93c4f2f9a606016fbeb03c56076abf2e7bead94512d10f2bdb34c539
7
- data.tar.gz: 1ffccd1f6f81c472685abd1ca0a182b8bde55850e5311104432e936e69f6a399c1762275af7721034605458ea1c798da687b9effa9e8894134589297e5d99ea1
6
+ metadata.gz: ea9b34d3092d7d3632d7eab9d2d27fc6be67bf8db2033b205084eaccaa9824dc1b8745c388c2989f0d86d4f29624af48039b1e37798cf3824d7a4b08af72289d
7
+ data.tar.gz: 788d27ce05644a9c029eaa26358c7f5e99b36a4000f443b653ce4eb74864f67f7512361e157b9cb04edbac9fc1a18fcf99949df0570e21053bec5fe1d2212524
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2017-06-12 22:31:54 +0100 using RuboCop version 0.49.1.
3
+ # on 2017-06-14 12:19:26 -0500 using RuboCop version 0.49.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -12,20 +12,6 @@ Layout/EmptyLineAfterMagicComment:
12
12
  Exclude:
13
13
  - 'linode_cluster.gemspec'
14
14
 
15
- # Offense count: 1
16
- # Cop supports --auto-correct.
17
- # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
18
- Layout/ExtraSpacing:
19
- Exclude:
20
- - 'linode_cluster.gemspec'
21
-
22
- # Offense count: 1
23
- # Cop supports --auto-correct.
24
- # Configuration parameters: AllowForAlignment.
25
- Layout/SpaceAroundOperators:
26
- Exclude:
27
- - 'linode_cluster.gemspec'
28
-
29
15
  # Offense count: 3
30
16
  Metrics/AbcSize:
31
17
  Max: 51
@@ -35,7 +21,7 @@ Metrics/AbcSize:
35
21
  Metrics/BlockLength:
36
22
  Max: 59
37
23
 
38
- # Offense count: 11
24
+ # Offense count: 7
39
25
  # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
40
26
  # URISchemes: http, https
41
27
  Metrics/LineLength:
@@ -68,7 +54,7 @@ Style/PercentLiteralDelimiters:
68
54
  Exclude:
69
55
  - 'linode_cluster.gemspec'
70
56
 
71
- # Offense count: 19
57
+ # Offense count: 18
72
58
  # Cop supports --auto-correct.
73
59
  # Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
74
60
  # SupportedStyles: single_quotes, double_quotes
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'securerandom'
4
+
3
5
  module LinodeCluster
4
6
  # node factory class
5
7
  class NodeFactory
@@ -12,28 +14,28 @@ module LinodeCluster
12
14
  @client = client
13
15
  end
14
16
 
15
- def find_datacenter_id
16
- client.find_datacenter_id
17
+ def find_datacenter_id(*args)
18
+ client.find_datacenter_id(*args)
17
19
  end
18
20
 
19
- def find_plan_id
20
- client.find_plan_id
21
+ def find_plan_id(*args)
22
+ client.find_plan_id(*args)
21
23
  end
22
24
 
23
- def find_node_by_id
24
- client.find_node_by_id
25
+ def find_node_by_id(*args)
26
+ client.find_node_by_id(*args)
25
27
  end
26
28
 
27
- def refresh_nodes
28
- client.refresh_nodes
29
+ def refresh_nodes(*args)
30
+ client.refresh_nodes(*args)
29
31
  end
30
32
 
31
- def find_distribution_id_by_name
32
- client.find_distribution_id_by_name
33
+ def find_distribution_id_by_name(*args)
34
+ client.find_distribution_id_by_name(*args)
33
35
  end
34
36
 
35
- def find_default_kernel
36
- client.find_default_kernel
37
+ def find_default_kernel(*args)
38
+ client.find_default_kernel(*args)
37
39
  end
38
40
 
39
41
  def create(attributes)
@@ -54,7 +56,8 @@ module LinodeCluster
54
56
  size: 512
55
57
  )
56
58
 
57
- # need to fetch data about the new node to calculate the size of the new disk
59
+ # need to fetch data about the new node to calculate the size of the new
60
+ # disk
58
61
  refresh_nodes
59
62
  new_node = find_node_by_id(result.linodeid)
60
63
 
@@ -1,3 +1,3 @@
1
1
  module LinodeCluster
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linode_cluster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruben Stranders
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-12 00:00:00.000000000 Z
11
+ date: 2017-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: linode