fog-core 1.39.0 → 1.40.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/CONTRIBUTORS.md +1 -0
- data/changelog.md +5 -0
- data/lib/fog/core/version.rb +1 -1
- data/lib/fog/test_helpers.rb +1 -0
- data/lib/fog/test_helpers/formats_helper.rb +0 -24
- data/lib/fog/test_helpers/minitest/assertions.rb +11 -0
- data/lib/fog/test_helpers/minitest/expectations.rb +3 -0
- data/lib/fog/test_helpers/types_helper.rb +24 -0
- data/spec/test_helpers/formats_helper_spec.rb +1 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abc6608c2e6103a70c0c6c2c1c36f38557f95d04
|
4
|
+
data.tar.gz: d2233c2d6ef1b60911b10fab9df46563bc298fd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddc5d8ec308a27bf840bebd1c2080feb70a0a369431ef820081254394c4e2915298a6f68f0c9bd432559e7bb5c02cb377e85e6636ce27bb2d1960b0d5d399007
|
7
|
+
data.tar.gz: e3853600d78048e76b5ef544960a7c9fb667395e262ef4f7a5e877617bdf5695ad18e9c9f4bdf9a996a81ecc9075dbb2ce8690bab7e3bc7756f4e35cbd4fd097
|
data/CONTRIBUTORS.md
CHANGED
@@ -13,6 +13,7 @@
|
|
13
13
|
* Frederick Cheung <frederick.cheung@gmail.com>
|
14
14
|
* Gilles Dubreuil <gilles@redhat.com>
|
15
15
|
* Griffin Smith <wildgriffin45@gmail.com>
|
16
|
+
* Harry Maclean <harryjmaclean@googlemail.com>
|
16
17
|
* Isaac Hollander McCreery <ihmccreery@google.com>
|
17
18
|
* Jake Bell <jake@theunraveler.com>
|
18
19
|
* Josh Kalderimis <josh.kalderimis@gmail.com>
|
data/changelog.md
CHANGED
data/lib/fog/core/version.rb
CHANGED
data/lib/fog/test_helpers.rb
CHANGED
@@ -6,6 +6,7 @@ require "fog/test_helpers/formats_helper"
|
|
6
6
|
require "fog/test_helpers/mock_helper"
|
7
7
|
require "fog/test_helpers/model_helper"
|
8
8
|
require "fog/test_helpers/responds_to_helper"
|
9
|
+
require "fog/test_helpers/types_helper"
|
9
10
|
require "fog/test_helpers/succeeds_helper"
|
10
11
|
require "fog/test_helpers/compute/flavors_helper"
|
11
12
|
require "fog/test_helpers/compute/server_helper"
|
@@ -1,29 +1,5 @@
|
|
1
1
|
require "fog/schema/data_validator"
|
2
2
|
|
3
|
-
# format related hackery
|
4
|
-
# allows both true.is_a?(Fog::Boolean) and false.is_a?(Fog::Boolean)
|
5
|
-
# allows both nil.is_a?(Fog::Nullable::String) and "".is_a?(Fog::Nullable::String)
|
6
|
-
module Fog
|
7
|
-
module Boolean; end
|
8
|
-
module Nullable
|
9
|
-
module Boolean; end
|
10
|
-
module Integer; end
|
11
|
-
module String; end
|
12
|
-
module Time; end
|
13
|
-
module Float; end
|
14
|
-
module Hash; end
|
15
|
-
module Array; end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
[FalseClass, TrueClass].each { |klass| klass.send(:include, Fog::Boolean) }
|
19
|
-
[FalseClass, TrueClass, NilClass, Fog::Boolean].each { |klass| klass.send(:include, Fog::Nullable::Boolean) }
|
20
|
-
[NilClass, String].each { |klass| klass.send(:include, Fog::Nullable::String) }
|
21
|
-
[NilClass, Time].each { |klass| klass.send(:include, Fog::Nullable::Time) }
|
22
|
-
[Integer, NilClass].each { |klass| klass.send(:include, Fog::Nullable::Integer) }
|
23
|
-
[Float, NilClass].each { |klass| klass.send(:include, Fog::Nullable::Float) }
|
24
|
-
[Hash, NilClass].each { |klass| klass.send(:include, Fog::Nullable::Hash) }
|
25
|
-
[Array, NilClass].each { |klass| klass.send(:include, Fog::Nullable::Array) }
|
26
|
-
|
27
3
|
module Shindo
|
28
4
|
class Tests
|
29
5
|
# Generates a Shindo test that compares a hash schema to the result
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require "fog/schema/data_validator"
|
2
|
+
|
3
|
+
module MiniTest::Assertions
|
4
|
+
# Compares a hash's structure against a reference schema hash and returns true
|
5
|
+
# when they match. Fog::Schema::Datavalidator is used for the validation.
|
6
|
+
def assert_match_schema(actual, schema, message = nil, options = {})
|
7
|
+
validator = Fog::Schema::DataValidator.new
|
8
|
+
message = "expected:\n #{actual}\nto be equivalent of:\n#{schema}"
|
9
|
+
assert(validator.validate(actual, schema, options), message)
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Format related hackery
|
2
|
+
# allows both true.is_a?(Fog::Boolean) and false.is_a?(Fog::Boolean)
|
3
|
+
# allows both nil.is_a?(Fog::Nullable::String) and ''.is_a?(Fog::Nullable::String)
|
4
|
+
module Fog
|
5
|
+
module Boolean; end
|
6
|
+
module Nullable
|
7
|
+
module Boolean; end
|
8
|
+
module Integer; end
|
9
|
+
module String; end
|
10
|
+
module Time; end
|
11
|
+
module Float; end
|
12
|
+
module Hash; end
|
13
|
+
module Array; end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
[FalseClass, TrueClass].each {|klass| klass.send(:include, Fog::Boolean)}
|
18
|
+
[FalseClass, TrueClass, NilClass, Fog::Boolean].each {|klass| klass.send(:include, Fog::Nullable::Boolean)}
|
19
|
+
[NilClass, String].each {|klass| klass.send(:include, Fog::Nullable::String)}
|
20
|
+
[NilClass, Time].each {|klass| klass.send(:include, Fog::Nullable::Time)}
|
21
|
+
[Integer, NilClass].each {|klass| klass.send(:include, Fog::Nullable::Integer)}
|
22
|
+
[Float, NilClass].each {|klass| klass.send(:include, Fog::Nullable::Float)}
|
23
|
+
[Hash, NilClass].each {|klass| klass.send(:include, Fog::Nullable::Hash)}
|
24
|
+
[Array, NilClass].each {|klass| klass.send(:include, Fog::Nullable::Array)}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.40.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Light
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-05-
|
12
|
+
date: 2016-05-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: builder
|
@@ -250,10 +250,13 @@ files:
|
|
250
250
|
- lib/fog/test_helpers/compute/servers_helper.rb
|
251
251
|
- lib/fog/test_helpers/formats_helper.rb
|
252
252
|
- lib/fog/test_helpers/helper.rb
|
253
|
+
- lib/fog/test_helpers/minitest/assertions.rb
|
254
|
+
- lib/fog/test_helpers/minitest/expectations.rb
|
253
255
|
- lib/fog/test_helpers/mock_helper.rb
|
254
256
|
- lib/fog/test_helpers/model_helper.rb
|
255
257
|
- lib/fog/test_helpers/responds_to_helper.rb
|
256
258
|
- lib/fog/test_helpers/succeeds_helper.rb
|
259
|
+
- lib/fog/test_helpers/types_helper.rb
|
257
260
|
- lib/fog/volume.rb
|
258
261
|
- lib/fog/vpn.rb
|
259
262
|
- lib/tasks/test_task.rb
|