hoodoo 3.0.0 → 3.0.1

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: 1fba8a5c7386f99669d0b9d6a68934488c2f07feefb8c9df8681a0d3827859d2
4
- data.tar.gz: 0d69810c6555070d48d58ec7374d92fea7d7dd09d5dac4527affd79818f4de05
3
+ metadata.gz: ef730a9a4925b630d4f7870fb209c51ce96bc3af92418f339dd264ddb03d2faf
4
+ data.tar.gz: 151ffad0a0efa0d9e89576b05bbf3a40e51b33672e74e3cd19a6e232fc5ccaf7
5
5
  SHA512:
6
- metadata.gz: cb688e1a5daaf79690301811303dbba3996f6e41d94f7d1a856e413690137bea698ac060156d57e040518f90b719caa9f815a6a40c14cf43693e55bcbea59b58
7
- data.tar.gz: ae0455ff6a34c53ee7cc960d0e16b6836a52190b8699215c8d9afe9c53307aa4dda097bfbe246754467434fc0e5ec856195dfd307aae14338cd004421f452624
6
+ metadata.gz: eb71ad0c0c796c8dee5c21e9a12a304b50c79a9cdbe23fa625551234718d487f3bb235e216999ba5b8803288c48a59855e035906f391f0032c5ae9215f4ded73
7
+ data.tar.gz: 29acf2cbb534c507dcf0bb4360e4cec5efd7e39375b20f7de72b6f1999047fef3062be21f11321a3e5ed01d0b1e425c4cda289d275217bbf70f4432075d3133a
@@ -30,9 +30,8 @@ module Hoodoo
30
30
  # end
31
31
  #
32
32
  def validate_each( record, attribute, value )
33
-
34
33
  unless value.nil? || Hoodoo::UUID.valid?( value )
35
- record.errors[ attribute ] << ( options[ :message ] || 'is invalid' )
34
+ record.errors.add(attribute, options[ :message ] || 'is invalid' )
36
35
  end
37
36
 
38
37
  end
@@ -12,7 +12,7 @@ module Hoodoo
12
12
  # The Hoodoo gem version. If this changes, be sure to re-run
13
13
  # <tt>bundle install</tt> or <tt>bundle update</tt>.
14
14
  #
15
- VERSION = '3.0.0'
15
+ VERSION = '3.0.1'
16
16
 
17
17
  # The Hoodoo gem date. If this changes, be sure to re-run
18
18
  # <tt>bundle install</tt> or <tt>bundle update</tt>.
@@ -46,7 +46,6 @@ describe Hoodoo::ActiveRecord::Creator do
46
46
  @interaction.context.response,
47
47
  @interaction
48
48
  )
49
-
50
49
  @context = @interaction.context
51
50
  @session = @interaction.context.session
52
51
  end
@@ -65,8 +64,8 @@ describe Hoodoo::ActiveRecord::Creator do
65
64
 
66
65
  instance = klass.new_in( @context )
67
66
 
68
- expect( instance.created_at ).to eq( @time )
69
- expect( instance.updated_at ).to eq( @time )
67
+ expect( Hoodoo::Utilities.standard_datetime(instance.created_at) ).to eq( Hoodoo::Utilities.standard_datetime(@time) )
68
+ expect( Hoodoo::Utilities.standard_datetime(instance.updated_at) ).to eq( Hoodoo::Utilities.standard_datetime(@time) )
70
69
  end
71
70
 
72
71
  it 'creates with provided attributes' do
@@ -152,7 +152,7 @@ describe Hoodoo::ActiveRecord::ErrorMapping do
152
152
  } )
153
153
 
154
154
  array_col = RSpecModelErrorMappingTest.columns_hash[ 'array' ]
155
- expect( array_col ).to receive( :array ).once.and_return( true )
155
+ expect(array_col.array).to eq( true )
156
156
 
157
157
  m.adds_errors_to?( @errors )
158
158
 
@@ -461,7 +461,7 @@ describe Hoodoo::ActiveRecord::Support do
461
461
  } )
462
462
 
463
463
  array_col = RSpecModelErrorMappingTest.columns_hash[ 'array' ]
464
- expect( array_col ).to receive( :array ).once.and_return( true )
464
+ expect(array_col.array).to eq( true )
465
465
 
466
466
  m.validate()
467
467
  expect( described_class.translate_errors_on( m ).errors ).to eq( [
@@ -28,7 +28,7 @@ describe Hoodoo::ActiveRecord::UUID do
28
28
  it 'should complain about a bad UUID' do
29
29
  m = RSpecModelUUIDTest.new
30
30
  m.id = "hello"
31
-
31
+
32
32
  expect( m.save ).to eq( false )
33
33
  expect( Hoodoo::UUID.valid?( m.id ) ).to eq( false )
34
34
  expect( m.errors ).to_not be_empty
data/spec/spec_helper.rb CHANGED
@@ -200,7 +200,7 @@ def spec_helper_connect_to_postgres( database_name = 'postgres' )
200
200
  :adapter => 'postgresql',
201
201
  :username => ENV[ 'DATABASE_USER' ],
202
202
  :host => '127.0.0.1',
203
- :port => 15432,
203
+ :port => ENV[ 'DATABASE_PORT' ] || 5432,
204
204
  :database => database_name
205
205
  )
206
206
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoodoo
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Loyalty New Zealand
@@ -584,7 +584,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
584
584
  - !ruby/object:Gem::Version
585
585
  version: '0'
586
586
  requirements: []
587
- rubygems_version: 3.3.6
587
+ rubygems_version: 3.3.7
588
588
  signing_key:
589
589
  specification_version: 4
590
590
  summary: Opinionated APIs