aws-rds-instance_types 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws/rds/instance_types/version.rb +1 -1
- data/lib/dldinternet/aws/rds/instance_types.rb +13 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f11391a277cc8f6d5458c82fc26574ea4bb422d
|
4
|
+
data.tar.gz: fd989751ad40cf796c34263e1ae9f1c19c3a5a08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1198cd4c463c91fbc26f3a08fd70abedd20320d9e503d31c2191c440fbc9544b9654b6e1ee285da6a387253e57e7079f8c55ee6cb75f54b743dc91a7db8715d
|
7
|
+
data.tar.gz: 1c5ac85d60a4d762a85dc1cbd47dc0e71890a4b550419dc8ab3a93e2a1f9bb817efaae90ce57b938b567dd3518bf741378fac804078f0a44aa7abea66ff89b8c
|
@@ -42,7 +42,7 @@ module DLDInternet
|
|
42
42
|
as = d.css('div div h2 a')
|
43
43
|
as.each do |a|
|
44
44
|
# puts "'#{a.text}'"
|
45
|
-
if a.text
|
45
|
+
if a.text.match %r'\s*DB Instance Classes\s*'
|
46
46
|
itm = d
|
47
47
|
break
|
48
48
|
end
|
@@ -50,10 +50,16 @@ module DLDInternet
|
|
50
50
|
break if itm
|
51
51
|
idx += 1
|
52
52
|
end
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
53
|
+
if idx < divs.count
|
54
|
+
divs = divs[idx..-1]
|
55
|
+
table = nil
|
56
|
+
divs.each do |d|
|
57
|
+
table = d.css('div.aws-table table')
|
58
|
+
break if table
|
59
|
+
end
|
60
|
+
|
61
|
+
@instance_types = scrapeTable(HEADINGS, table) if table
|
62
|
+
end
|
57
63
|
end
|
58
64
|
end
|
59
65
|
end
|
@@ -65,7 +71,7 @@ module DLDInternet
|
|
65
71
|
divs = nk.search('div')
|
66
72
|
if divs.count > 0
|
67
73
|
nine = divs.select { |div| div.to_s.match regex }
|
68
|
-
if nine.count
|
74
|
+
if nine.count >= 1
|
69
75
|
nine = nine.shift
|
70
76
|
ret = nine
|
71
77
|
end
|
@@ -75,7 +81,7 @@ module DLDInternet
|
|
75
81
|
|
76
82
|
# ---------------------------------------------------------------------------------------------------------------
|
77
83
|
def scrapeTable(cHeadings,table)
|
78
|
-
raise Error.new 'Cannot find instance type table' unless table.is_a?(Nokogiri::XML::Element)
|
84
|
+
raise Error.new 'Cannot find instance type table' unless (table.is_a?(Nokogiri::XML::Element) or table.is_a?(Nokogiri::XML::NodeSet))
|
79
85
|
rows = table.search('tr')[0..-1]
|
80
86
|
head = rows.shift
|
81
87
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-rds-instance_types
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christo De Lange
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|