fog-core 1.39.0 → 1.40.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
  SHA1:
3
- metadata.gz: 17e475fd905c16a4aa4eef1597b0b0ac0e4581ec
4
- data.tar.gz: 5784c6bf3117d6b9d0085ae19ec2a00a7893a0da
3
+ metadata.gz: abc6608c2e6103a70c0c6c2c1c36f38557f95d04
4
+ data.tar.gz: d2233c2d6ef1b60911b10fab9df46563bc298fd2
5
5
  SHA512:
6
- metadata.gz: 1035955dee2c5964d9809e66de644010fa2bff9a4c81fc8c02f11b3b3a7d7ed37d533ca9b2197b7b0347ac645f72109db00c6f0ff976819e3faf28a8eb04aad3
7
- data.tar.gz: 254c903b1fcd2e6ae3685208e904cb9009f37fb04ffc9553bf6655938a800d00039f1cbeb190ef3cc46d2e4d1c03cada70411e7b07df68ebdd4a5f80fd2014b2
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
@@ -1,3 +1,8 @@
1
+ 1.40.0 05/19/2016
2
+ ==========================================================
3
+
4
+ add minitest helpers for schema (parity to shindo)
5
+
1
6
  1.39.0 05/11/2016
2
7
  ==========================================================
3
8
 
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Core
3
- VERSION = "1.39.0"
3
+ VERSION = "1.40.0"
4
4
  end
5
5
  end
@@ -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,3 @@
1
+ module MiniTest::Expectations
2
+ infect_an_assertion :assert_match_schema, :must_match_schema, :reverse
3
+ 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)}
@@ -1,5 +1,6 @@
1
1
  require "spec_helper"
2
2
  require "fog/test_helpers/formats_helper"
3
+ require "fog/test_helpers/types_helper"
3
4
 
4
5
  module Shindo
5
6
  class Tests
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.39.0
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-11 00:00:00.000000000 Z
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