cloud-instancetype 1.0.0 → 1.1.0

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
  SHA256:
3
- metadata.gz: 8e816cc2954520421bf0199595ab06035f262da484fcd046950269cb2b61fc1d
4
- data.tar.gz: c01ee4b3979df11673abb3ecc10d8e17e25ed0e79b028c06e6676439610c86aa
3
+ metadata.gz: 7506186fd6d63d251338d7ccdcd4ee633e9bfe7620c255863401ceba2a658a88
4
+ data.tar.gz: ba811582102e81d8abc9c45377b71c2c24c5a863591732b26d2502d42c02faaa
5
5
  SHA512:
6
- metadata.gz: 5f960ac3b96dcf14606bf4784c09151003d9bff80d968cdd5aa9254ac9a9ab009fc735cb535eba3c7088967b941304ce441018c032152584e19067300c5e0bb4
7
- data.tar.gz: 1eb60f2260787b5ab9d19859ac4b21dab107c0cf2663bcf6ca964f56f2576a95f9957f774944b39515ac13e982d9bf5d81d839b4c90f4d8ca789b41dfb0070ac
6
+ metadata.gz: b3fbe546954fdcf4262a44ab37815d9196533035ffb5f41955bb5850665e3c9ac1a12d04dedceb64bea570c4b6384711c7ceb6ed035309bb11c4d79209b28e47
7
+ data.tar.gz: c584c68de188945974004fee4198ffcb149275e70619f8ba84220d8c9cb7d8c7342ba217876ba892ca6da7aa6140c5f569120a6523b36ec9fd65ae3b1d5bff6b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cloud-instancetype (0.0.3)
4
+ cloud-instancetype (1.1.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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
 
@@ -29,7 +29,9 @@ module Cloud
29
29
 
30
30
  class << self
31
31
  def for(cloud)
32
- load(rails_data_path(cloud))
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 rails_data_path(cloud)
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,5 +1,5 @@
1
1
  module Cloud
2
2
  class InstanceType
3
- VERSION = "1.0.0"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  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 http://bugzilla.suse.com/
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
- Url: https://github.com/suse-enceladus/rubygem-cloud-instancetype
29
- Source: http://rubygems.org/gems/%{mod_full_name}.gem
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.0.0
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-06 00:00:00.000000000 Z
11
+ date: 2020-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler