cloud-instancetype 1.0.0 → 1.1.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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/cloud/instancetype.rb +8 -2
- data/lib/cloud/instancetype/version.rb +1 -1
- data/rubygem-cloud-instancetype.spec +6 -5
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7506186fd6d63d251338d7ccdcd4ee633e9bfe7620c255863401ceba2a658a88
|
|
4
|
+
data.tar.gz: ba811582102e81d8abc9c45377b71c2c24c5a863591732b26d2502d42c02faaa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b3fbe546954fdcf4262a44ab37815d9196533035ffb5f41955bb5850665e3c9ac1a12d04dedceb64bea570c4b6384711c7ceb6ed035309bb11c4d79209b28e47
|
|
7
|
+
data.tar.gz: c584c68de188945974004fee4198ffcb149275e70619f8ba84220d8c9cb7d8c7342ba217876ba892ca6da7aa6140c5f569120a6523b36ec9fd65ae3b1d5bff6b
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -35,7 +35,7 @@ Config files are JSON, and contain structured information about both the instanc
|
|
|
35
35
|
|
|
36
36
|
### Rails
|
|
37
37
|
|
|
38
|
-
Place your instance type data in `config/data/#{cloud}-types.json`.
|
|
38
|
+
Place your default instance type data in `config/data/#{cloud}-types.json`, or override with `vendor/data/#{cloud}-types.json`.
|
|
39
39
|
|
|
40
40
|
Load your instance types by the framework key:
|
|
41
41
|
|
data/lib/cloud/instancetype.rb
CHANGED
|
@@ -29,7 +29,9 @@ module Cloud
|
|
|
29
29
|
|
|
30
30
|
class << self
|
|
31
31
|
def for(cloud)
|
|
32
|
-
load(
|
|
32
|
+
load(rails_vendor_path(cloud))
|
|
33
|
+
rescue
|
|
34
|
+
load(rails_config_path(cloud))
|
|
33
35
|
end
|
|
34
36
|
|
|
35
37
|
def load(data_path)
|
|
@@ -42,10 +44,14 @@ module Cloud
|
|
|
42
44
|
|
|
43
45
|
private
|
|
44
46
|
|
|
45
|
-
def
|
|
47
|
+
def rails_config_path(cloud)
|
|
46
48
|
Rails.root.join("config", "data", "#{cloud}-types.json")
|
|
47
49
|
end
|
|
48
50
|
|
|
51
|
+
def rails_vendor_path(cloud)
|
|
52
|
+
Rails.root.join("vendor", "data", "#{cloud}-types.json")
|
|
53
|
+
end
|
|
54
|
+
|
|
49
55
|
def get_raw_collection(data_path)
|
|
50
56
|
JSON.parse(File.read(data_path))
|
|
51
57
|
end
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#
|
|
2
2
|
# spec file for package rubygem-cloud-instancetype
|
|
3
|
-
# this code base is under development
|
|
4
3
|
#
|
|
5
4
|
# Copyright (c) 2020 SUSE LLC
|
|
6
5
|
#
|
|
@@ -13,9 +12,10 @@
|
|
|
13
12
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
14
13
|
# published by the Open Source Initiative.
|
|
15
14
|
|
|
16
|
-
# Please submit bugfixes or comments via
|
|
15
|
+
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
17
16
|
#
|
|
18
17
|
|
|
18
|
+
|
|
19
19
|
Name: rubygem-cloud-instancetype
|
|
20
20
|
Version: 1.0.0
|
|
21
21
|
Release: 0
|
|
@@ -25,10 +25,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
25
25
|
BuildRequires: %{rubygem gem2rpm}
|
|
26
26
|
BuildRequires: %{ruby}
|
|
27
27
|
BuildRequires: ruby-macros >= 5
|
|
28
|
-
|
|
29
|
-
Source:
|
|
28
|
+
URL: https://github.com/suse-enceladus/rubygem-cloud-instancetype
|
|
29
|
+
Source: https://rubygems.org/gems/%{mod_full_name}.gem
|
|
30
30
|
Summary: Describe public cloud instance types
|
|
31
|
-
License: GPL-3.0
|
|
31
|
+
License: GPL-3.0-only
|
|
32
|
+
Group: Development/Languages/Ruby
|
|
32
33
|
|
|
33
34
|
%description
|
|
34
35
|
Describe public cloud instance types.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cloud-instancetype
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Mason
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-10-
|
|
11
|
+
date: 2020-10-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|