glare 1.2.0 → 1.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e226cb39d95b10c480df7d010890467f8f65af0d2640f80dc05bb9fe0cc38dd6
4
- data.tar.gz: 80ffd27027901623f5ff3b79989d5f89bb8bd6c354889bc48fc037d41dfc9484
3
+ metadata.gz: 615b3484f4e4d2536da113d5a1699f2c96a73fdf69cbeff0ec32a713b163bcf1
4
+ data.tar.gz: 26c0f5cd94f719ca6ce949d62869fcee21be90216a078a0fc9016dbddd65b4a5
5
5
  SHA512:
6
- metadata.gz: a5610704ad3c8db6f575a98e491b94b5333c98113153fbd1ff54b0c1e6280bbc931330b8795c7a3297beda1793ee31c8de08e0092dd1a5adce5a81e65f13046c
7
- data.tar.gz: 05bd9c85b68b445d88dba8610ae3b14c8587f2db31bf9f3453e334da50b2717f769d88f3cd6d27cb2c4abd1025607c737570b0a58e4decf1c235a37558deee49
6
+ metadata.gz: 2b7c02160628c062263c0bf3228136d8251496bacc494c4fd6f2d20ce989b75507f83e00ab63de22b2a7a5e6bebf301d123eb40fbe5d800e84bf812daa76152b
7
+ data.tar.gz: cd5b6b08c8524dd6fffea44c30fa25936b0198c1b30a43642628c9b3360fe76c104d597f505b336f2abd306be73c752323abc97de3a3d7600a1fb9ddc2d31436
data/Gemfile CHANGED
@@ -3,7 +3,3 @@
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
-
7
- group :test do
8
- gem 'coveralls', require: false
9
- end
data/README.md CHANGED
@@ -4,8 +4,7 @@ Ruby gem to interact with CloudFlare API v4
4
4
 
5
5
  ## Build Status
6
6
 
7
- [![Build Status](https://travis-ci.org/peertransfer/glare.svg?branch=master)](https://travis-ci.org/peertransfer/glare)
8
- [![Coverage Status](https://coveralls.io/repos/github/peertransfer/glare/badge.svg?branch=master)](https://coveralls.io/github/peertransfer/glare?branch=master)
7
+ [![Build Status](https://github.com/peertransfer/glare/actions/workflows/ruby.yml/badge.svg)](https://github.com/peertransfer/glare/actions)
9
8
  [![Code Climate](https://codeclimate.com/github/peertransfer/glare/badges/gpa.svg)](https://codeclimate.com/github/peertransfer/glare)
10
9
  [![Known Vulnerabilities](https://snyk.io/test/github/peertransfer/glare/badge.svg)](https://snyk.io/test/github/peertransfer/glare)
11
10
 
data/glare.gemspec CHANGED
@@ -28,6 +28,6 @@ Gem::Specification.new do |spec|
28
28
  spec.add_development_dependency 'rspec', '~> 3.7'
29
29
 
30
30
  spec.add_dependency 'faraday', '~> 1.0'
31
- spec.add_dependency 'faraday_middleware', '>= 1.0.0.rc1'
31
+ spec.add_dependency 'faraday_middleware', '>= 1.0.0'
32
32
  spec.add_dependency 'public_suffix', '>= 3.0.2', '< 5.0'
33
33
  end
data/lib/glare/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Glare
4
- VERSION = '1.2.0'
4
+ VERSION = '1.2.2'
5
5
  end
@@ -12,7 +12,7 @@ RSpec.describe 'delete domain', integration: true do
12
12
  end
13
13
 
14
14
  it 'deletes all records with given type' do
15
- expect(resolve(domain)).to eq(destination)
15
+ expect(resolve(domain)).to match_array(destination)
16
16
  delete(domain)
17
17
  expect(resolve(domain)).to eq([])
18
18
  end
data/spec/proxied_spec.rb CHANGED
@@ -6,10 +6,15 @@ RSpec.describe 'retrieves proxied values', integration: true do
6
6
  context 'when a domain contains more than one destination' do
7
7
  let(:domain) { 'a.flywire.com.cn' }
8
8
  let(:type) { 'A' }
9
+
9
10
  before do
10
11
  register_domain(domain, destination)
11
12
  end
12
13
 
14
+ after do
15
+ deregister_domain(domain, destination)
16
+ end
17
+
13
18
  context 'two new records' do
14
19
  let(:destination) { ['1.2.3.4', '5.6.7.8'] }
15
20
 
@@ -23,6 +28,10 @@ RSpec.describe 'retrieves proxied values', integration: true do
23
28
  Glare.register(domain, destination, type, proxied: true)
24
29
  end
25
30
 
31
+ def deregister_domain(domain, type)
32
+ Glare.deregister(domain, type)
33
+ end
34
+
26
35
  def proxied?(domain)
27
36
  Glare.proxied?(domain, type)
28
37
  end
@@ -40,7 +40,7 @@ RSpec.describe 'Resolve domain', integration: true do
40
40
  let(:destination) { ['1.2.3.4', '5.6.7.8'] }
41
41
 
42
42
  it 'resolves to right destination' do
43
- expect(resolve(domain)).to eq(destination)
43
+ expect(resolve(domain)).to match_array(destination)
44
44
  end
45
45
  end
46
46
 
@@ -56,7 +56,7 @@ RSpec.describe 'Resolve domain', integration: true do
56
56
  let(:destination) { ['1.2.3.5', '6.7.8.9'] }
57
57
 
58
58
  it 'resolves to right destination' do
59
- expect(resolve(domain)).to eq(destination)
59
+ expect(resolve(domain)).to match_array(destination)
60
60
  end
61
61
  end
62
62
  end
data/spec/spec_helper.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'coveralls'
4
- Coveralls.wear!
3
+ require 'json'
5
4
 
6
5
  # This file was generated by the `rspec --init` command. Conventionally, all
7
6
  # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
data/spec/ttl_spec.rb CHANGED
@@ -6,10 +6,15 @@ RSpec.describe 'retrieves proxied values', integration: true do
6
6
  context 'when a domain contains more than one destination' do
7
7
  let(:domain) { 'a.flywire.com.cn' }
8
8
  let(:type) { 'A' }
9
+
9
10
  before do
10
11
  register_domain(domain, destination)
11
12
  end
12
13
 
14
+ after do
15
+ deregister_domain(domain, destination)
16
+ end
17
+
13
18
  context 'two new records' do
14
19
  let(:destination) { ['1.2.3.4', '5.6.7.8'] }
15
20
 
@@ -24,6 +29,10 @@ RSpec.describe 'retrieves proxied values', integration: true do
24
29
  Glare.register(domain, destination, type, ttl: 300)
25
30
  end
26
31
 
32
+ def deregister_domain(domain, type)
33
+ Glare.deregister(domain, type)
34
+ end
35
+
27
36
  def records(domain)
28
37
  Glare.records(domain, type)
29
38
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glare
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jose Luis Salas
8
8
  - Omar Lopez
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-03-25 00:00:00.000000000 Z
12
+ date: 2022-10-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -73,14 +73,14 @@ dependencies:
73
73
  requirements:
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: 1.0.0.rc1
76
+ version: 1.0.0
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: 1.0.0.rc1
83
+ version: 1.0.0
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: public_suffix
86
86
  requirement: !ruby/object:Gem::Requirement
@@ -101,7 +101,7 @@ dependencies:
101
101
  - - "<"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '5.0'
104
- description:
104
+ description:
105
105
  email:
106
106
  - josacar@users.noreply.github.com
107
107
  - olopez@users.noreply.github.com
@@ -146,7 +146,7 @@ homepage: https://github.com/peertransfer/glare
146
146
  licenses:
147
147
  - MIT
148
148
  metadata: {}
149
- post_install_message:
149
+ post_install_message:
150
150
  rdoc_options: []
151
151
  require_paths:
152
152
  - lib
@@ -161,22 +161,21 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
161
  - !ruby/object:Gem::Version
162
162
  version: '0'
163
163
  requirements: []
164
- rubyforge_project:
165
- rubygems_version: 2.7.7
166
- signing_key:
164
+ rubygems_version: 3.2.15
165
+ signing_key:
167
166
  specification_version: 4
168
167
  summary: API client for CloudFlare v4 API
169
168
  test_files:
170
- - spec/units/operations_spec.rb
171
- - spec/units/api_response_spec.rb
172
- - spec/units/glare_spec.rb
173
- - spec/resolve_domain_spec.rb
174
- - spec/spec_helper.rb
175
- - spec/proxied_spec.rb
176
169
  - spec/delete_domain_spec.rb
177
- - spec/ttl_spec.rb
178
- - spec/fixtures/wadus_records_reverse_order.json
179
- - spec/fixtures/wadus_records.json
180
170
  - spec/fixtures/empty_result.json
181
171
  - spec/fixtures/error_response.json
182
172
  - spec/fixtures/list_zone.json
173
+ - spec/fixtures/wadus_records.json
174
+ - spec/fixtures/wadus_records_reverse_order.json
175
+ - spec/proxied_spec.rb
176
+ - spec/resolve_domain_spec.rb
177
+ - spec/spec_helper.rb
178
+ - spec/ttl_spec.rb
179
+ - spec/units/api_response_spec.rb
180
+ - spec/units/glare_spec.rb
181
+ - spec/units/operations_spec.rb