scaleway_api 0.2.0 → 0.3.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: 4f2d3ce352ad484895a1d81456b781767037f893c7f5f6bb92deef623074f7be
4
- data.tar.gz: 63a12ad82495fc58b65c79409e0a0d316afff3ea35cdce2915629eccaf981d1c
3
+ metadata.gz: 831c0d0fff2fa97e366490aba1835edc66c878c5588423375ca09f2ba73c596f
4
+ data.tar.gz: 4cefae66223196c64bd8c9e7df2f0e7e02e6c5bcfb1132080c317bdc15ad89fa
5
5
  SHA512:
6
- metadata.gz: befae7adeb21b3fdc527ec9fcd6c7fa51966c50974cbe6e2a1900ac0d4df996ec36b187281785a2ef2664b00673ced21b517ad51a9f81e776e79c437c89c5d34
7
- data.tar.gz: daa97c4f8f3777753593c041dcccddc36d14341a745f10b6d507544c4b774654e5953e8f39ea1ae79b09297faccf5cb40e31357b89b5bf2a3687c6a1642767ae
6
+ metadata.gz: 60cc99083ce4703d39b2dc8d5a7778b13e98a2da8dc89e2343b34d4366f0d6338a7ae72d7ef0ddf81689131fb9f5f7f04673d1d94fae7ee38da365f9085e2547
7
+ data.tar.gz: 5a4c18f4ad99702f3b2890e2e893018e336c0de865bbb734497e727ae0455c31e0510043a9f5c28be47af1ba7a7f3e814b8dd9ab982ff06663a79abe47778b25
@@ -4,8 +4,8 @@ require 'activeresource'
4
4
 
5
5
  module ScalewayApi
6
6
  class Image < ActiveResource::Base # rubocop:disable Style/Documentation
7
- self.site = "https://api.scaleway.com/instance/v1/zones/#{ScalewayApi.config.region}"
8
- headers['X-Auth-Token'] = ScalewayApi.config.api_key
7
+ self.site = "https://api.scaleway.com/instance/v1/zones/#{ScalewayApi::Settings.config.region}"
8
+ headers['X-Auth-Token'] = ScalewayApi::Settings.config.api_key
9
9
  self.include_format_in_path = false
10
10
  end
11
11
  end
@@ -4,8 +4,8 @@ require 'activeresource'
4
4
 
5
5
  module ScalewayApi
6
6
  class Server < ActiveResource::Base # rubocop:disable Style/Documentation
7
- self.site = "https://api.scaleway.com/instance/v1/zones/#{ScalewayApi.config.region}"
8
- headers['X-Auth-Token'] = ScalewayApi.config.api_key
7
+ self.site = "https://api.scaleway.com/instance/v1/zones/#{ScalewayApi::Settings.config.region}"
8
+ headers['X-Auth-Token'] = ScalewayApi::Settings.config.api_key
9
9
  self.include_format_in_path = false
10
10
  end
11
11
  end
@@ -0,0 +1,10 @@
1
+ require 'dry-configurable'
2
+
3
+ module ScalewayApi # rubocop:disable Style/Documentation
4
+ class Settings # rubocop:disable Style/Documentation
5
+ extend Dry::Configurable
6
+
7
+ setting :region
8
+ setting :api_key
9
+ end
10
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ScalewayApi
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
data/lib/scaleway_api.rb CHANGED
@@ -1,15 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry-configurable'
3
+ require_relative 'scaleway_api/settings'
4
4
  require_relative 'scaleway_api/image'
5
5
  require_relative 'scaleway_api/server'
6
6
  require_relative 'scaleway_api/version'
7
7
 
8
8
  module ScalewayApi # rubocop:disable Style/Documentation
9
- extend Dry::Configurable
10
-
11
9
  class Error < StandardError; end
12
-
13
- setting :region
14
- setting :api_key
15
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scaleway_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas_Skywalker
@@ -53,6 +53,7 @@ files:
53
53
  - lib/scaleway_api.rb
54
54
  - lib/scaleway_api/image.rb
55
55
  - lib/scaleway_api/server.rb
56
+ - lib/scaleway_api/settings.rb
56
57
  - lib/scaleway_api/version.rb
57
58
  - sig/scaleway_api.rbs
58
59
  homepage: https://github.com/code-fabrik/scaleway_ruby