hoodoo 2.2.2 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hoodoo/version.rb +2 -2
- data/spec/logger/writers/file_writer_spec.rb +1 -2
- data/spec/logger/writers/stream_writer_spec.rb +1 -2
- data/spec/spec_helper.rb +25 -5
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b44ab5eb415262a966b85b5745d7babae95bcea72ad1f82dc17d9ba1b0e8aee6
|
4
|
+
data.tar.gz: 7894b8277a7061f9ec1e83ab15fb6f25d92797cf3ad59e2a2d03968ac098b636
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c691cdaf17d8964a04edc102358485047a6b361147f5a14cc8d555772b4709f9dc903ae2d319c5392506330c0686c5cd09ed026bfc0470f923d39bc3d74a1e04
|
7
|
+
data.tar.gz: d2325636825a764be468a6411efec5a9e6bfec2e6d6f5d06f2b404d16a0411b95a23e9499e578600649baadfe65f3069cbdce146367c1acfbbceadef255c2195
|
data/lib/hoodoo/version.rb
CHANGED
@@ -12,11 +12,11 @@ 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 = '2.2.
|
15
|
+
VERSION = '2.2.3'
|
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>.
|
19
19
|
#
|
20
|
-
DATE = '
|
20
|
+
DATE = '2018-02-19'
|
21
21
|
|
22
22
|
end
|
@@ -4,8 +4,7 @@ require 'tempfile'
|
|
4
4
|
describe Hoodoo::Logger::FileWriter do
|
5
5
|
|
6
6
|
before :all do
|
7
|
-
|
8
|
-
@temp_path = File.join( Dir::Tmpname.tmpdir, temp_name )
|
7
|
+
@temp_path = spec_helper_tmpfile_path()
|
9
8
|
end
|
10
9
|
|
11
10
|
after :all do
|
@@ -3,8 +3,7 @@ require 'time'
|
|
3
3
|
|
4
4
|
describe Hoodoo::Logger::StreamWriter do
|
5
5
|
before :all do
|
6
|
-
|
7
|
-
@temp_path = File.join( Dir::Tmpname.tmpdir, temp_name )
|
6
|
+
@temp_path = spec_helper_tmpfile_path()
|
8
7
|
@stream = File.open( @temp_path, 'ab' )
|
9
8
|
end
|
10
9
|
|
data/spec/spec_helper.rb
CHANGED
@@ -19,16 +19,14 @@ end
|
|
19
19
|
|
20
20
|
require 'byebug'
|
21
21
|
|
22
|
-
# Stubbing Net::HTTP with WebMock - disabled by default
|
23
|
-
# tests where
|
24
|
-
# other tests and must not be mocked.
|
22
|
+
# Stubbing Net::HTTP with WebMock - disabled by default via "before :suite"
|
23
|
+
# later; only enable for tests where needed, as real Net::HTTP connections
|
24
|
+
# are used in many other tests and must not be mocked.
|
25
25
|
#
|
26
26
|
# https://github.com/bblimke/webmock
|
27
27
|
|
28
28
|
require 'webmock/rspec'
|
29
29
|
|
30
|
-
WebMock.disable!
|
31
|
-
|
32
30
|
# The ActiveRecord extensions need testing in the context of a database. I
|
33
31
|
# did consider NullDB - https://github.com/nulldb/nulldb - but this was too
|
34
32
|
# far from 'the real thing' for my liking. Instead, we use SQLite in memory
|
@@ -90,6 +88,8 @@ RSpec.configure do | config |
|
|
90
88
|
|
91
89
|
config.before( :suite ) do
|
92
90
|
|
91
|
+
WebMock.disable!
|
92
|
+
|
93
93
|
# Redirect $stderr before each test so a test log gets written without
|
94
94
|
# disturbing the RSpec terminal output; make sure the session system is
|
95
95
|
# in "test mode"; make sure we get a unique DRb daemon instance for the
|
@@ -379,3 +379,23 @@ def spec_helper_count_database_calls_in( &block )
|
|
379
379
|
ActiveSupport::Notifications.subscribed( cb, 'sql.active_record', &block )
|
380
380
|
return count
|
381
381
|
end
|
382
|
+
|
383
|
+
# In Ruby 2.5.0 the Ruby team removed <tt>Dir::Tmpname.make_tmpname</tt>:
|
384
|
+
#
|
385
|
+
# https://github.com/ruby/ruby/commit/25d56ea7b7b52dc81af30c92a9a0e2d2dab6ff27
|
386
|
+
#
|
387
|
+
# Instead we must make our best attempt in plain Ruby ourselves, e.g.:
|
388
|
+
#
|
389
|
+
# https://github.com/rails/rails/issues/31458
|
390
|
+
# https://github.com/rails/rails/pull/31462/files
|
391
|
+
#
|
392
|
+
# Since the above solution uses the process number via "$$" it should be safe
|
393
|
+
# for just this test suite, so we use the same approach here. This method
|
394
|
+
# returns the full file path for the temporary file, not just a leafname.
|
395
|
+
#
|
396
|
+
def spec_helper_tmpfile_path
|
397
|
+
time = Time.now.strftime( "%Y%m%d" )
|
398
|
+
name = "hoodoo-tests-#{ time }-#{ $$ }-#{ rand( 0x100000000 ).to_s( 36 ) }-fd"
|
399
|
+
|
400
|
+
File.join( Dir::Tmpname.tmpdir, name )
|
401
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hoodoo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Loyalty New Zealand
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dalli
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '3.
|
131
|
+
version: '3.3'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '3.
|
138
|
+
version: '3.3'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: activerecord
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -554,7 +554,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
554
554
|
version: '0'
|
555
555
|
requirements: []
|
556
556
|
rubyforge_project:
|
557
|
-
rubygems_version: 2.7.
|
557
|
+
rubygems_version: 2.7.6
|
558
558
|
signing_key:
|
559
559
|
specification_version: 4
|
560
560
|
summary: Opinionated APIs
|