1
0
mirror of https://github.com/meineerde/rackstash.git synced 2025-10-17 14:01:01 +00:00

487 Commits

Author SHA1 Message Date
22631e83d6 Fix CI badge in README.md 2020-07-27 19:44:13 +02:00
34b6f2c9cf Run CI workflow on all branches and all tags 2020-07-27 19:43:07 +02:00
fc4539465d Set coveralls flag-name via process ENV in CI workflow
This is a workaround until
https://github.com/coverallsapp/github-action/pull/58 is merged.
2020-07-27 19:34:33 +02:00
596abee168 Drop all externel CI services in favor of Github Actions 2020-07-23 21:17:19 +02:00
40f08f6acd Collect Coveralls coverage on all supported OS's 2020-07-23 17:52:53 +02:00
005ff5d116 Add first version of a GitHub Actions based CI 2020-07-23 16:32:57 +02:00
718e2c026a Create an lcov file for coverage instead of the automatic simplecov formatter for coveralls 2020-07-23 16:29:34 +02:00
80b93b1f14 Move development and test dependencies to Gemfile only to be more flexible 2020-07-23 16:27:13 +02:00
e4a690f6cc Enable Adapter::File#lock on Windows by default again 2020-07-23 16:10:57 +02:00
7e54d70270 Handle plain absolute Windows paths gracefully for adapter creation
A absolute Windows path such as `C:/path.to/file.log` is a valid URL
with schema `C`. If a user specifies such a path, they likely want to
create a File adapter in this case. As such, we fallback from
`Adapter.adapter_by_uri_scheme` and create File adapter instance via
`Adapter.adapter_by_type`.
2020-07-23 16:10:57 +02:00
65bf5ae252 Be more strict when parsing URIs for adapter creation
We require correct case of the schema and we no longer use the opaque
part (which appears to have been a bug anyways at this place)
2020-07-23 16:10:57 +02:00
0e0cb7dbae Use a more generic detection of a CI environment for coveralls in specs 2020-07-23 16:10:36 +02:00
12bf9b7ea8 Output OS info in Appveyor builds 2020-07-10 20:54:37 +02:00
f231d226d0 Do not lock files with flock by default anymore
Newer Windows versions (i.e. >= 10.0.14393) apparently follow POSIX more
strictly. With current Windows and Linux versions, we can thus get away
with just writing to the file and depending on the OS to properly
serialize those writes.

On older versions or with some network filesystems, the user might still
have to enable file locking if they are writing to the same log file
from multiple processes.
2020-07-10 20:40:05 +02:00
a8911dbbd7 Fix Rackstash::Utils.clock_time on newer Windows versions 2020-07-10 20:40:05 +02:00
c886db441e Bump Jruby to jruby-9.2.12.0 on Appveyor 2020-07-10 20:39:15 +02:00
26d106cacb Remove support for JRuby 9.0.x 2020-07-10 20:17:18 +02:00
22bcd119e4 Test on truffleruby-head on Travis CI 2020-07-10 19:20:26 +02:00
00e3a7524d Use openjdk8 for older JRuby versions on Travis CI 2020-07-10 19:20:26 +02:00
08ca86b7c3 Explicitly require rack/mock in rack middleware spec 2020-07-10 18:51:07 +02:00
b141e1341c Bump ruby versions on Travis CI 2020-07-10 18:07:36 +02:00
4b50be2e6f Use default distribution on Travis CI 2020-07-10 18:04:02 +02:00
f18b43f1d0 Bump truffleruby to version 20.1.0 in .travis.yml 2020-07-10 18:03:16 +02:00
42500162fb Allow to clone and dup a ClassRegistry object 2020-07-10 17:56:46 +02:00
76731b1d77 Improve error messages for ClassRegistry 2020-07-10 17:56:46 +02:00
eaa13c8111 Dup object_type for class registry only if required 2020-07-10 17:46:25 +02:00
ef57352e1f Combine rackstash helpers into one Rackstash::Utils module 2020-07-10 17:30:46 +02:00
9b20c3b385 Disable unneeded Rubocop rules 2020-06-07 16:46:39 +02:00
c5206b407f Allow filter conditionals to be defined as symbols too 2020-06-07 16:44:53 +02:00
27847ac6ef Ensure the stored object_type of a ClassRegistry is always frozen 2020-06-07 16:44:13 +02:00
aa5a496a18 Fix rubocop style issues 2020-06-07 14:22:14 +02:00
849b319927 Update JRuby 9.2.9.0 for appveyor 2019-12-18 13:20:57 +01:00
9e92e706bf Don't mix hash arguments with keyword arguments
Since Ruby 2.7 differences explicit keyword arguments from implicit hash
arguments, we should also avoid mixing them. By using explicit keyword
arguments, we avoid warning in Ruby 2.7 and errors in Ruby 3.0.
2019-12-18 12:56:29 +01:00
a9641e907d Update all Rubies in .travis.yml 2019-12-18 12:52:46 +01:00
23aabecacc Update TruffleRuby in .travis.yml and allow failures again
Unfortunately, there are still various edge-cases where things randomly
break due to TruffleRuby differences or incompatibilities to other gems.

This time, it was an incompatibility with a json gem update described in
https://github.com/oracle/truffleruby/issues/1857.

We will still try to keep Rackstash compatible with TruffleRuby but will
not consider full support for it release-critical for now.
2019-12-18 12:45:47 +01:00
7fe284309b Remove scope parameter from Logger#tag and Buffer#tag
This reduces the change of a Hash argument being interpreted as keyword
argument inadvertently and clarifies the interface. If a resolver scope
is required, you can also call

    delayed_tag = ->{ |request| request.host }
    logger.tags.merge!(delayed_tag, scope: request)
2019-10-07 19:58:20 +02:00
b3466779bb Fix test to ensure that hashes passed to Buffer#tag are actually stringified 2019-10-07 19:50:29 +02:00
7f5337c0e2 Refactor exclusive file locking and include error handling 2019-10-02 16:29:17 +02:00
769b27dbdb Enable all rubies for appveyor again 2019-09-25 16:25:16 +02:00
706b391176 Don't fail tests if local timezone is UTC 2019-09-25 16:25:16 +02:00
b6e9d0246c jruby? 2019-09-25 16:25:16 +02:00
ff0fd930eb appveyor.yml 2019-09-25 16:25:16 +02:00
e3baeb377e Skip file rename tests on Windows on older Ruby versions
Since these platforms don't support the File::SHARE_DELETE flag on
files, Windows rejects any attempts to delete or rename a file opened
by us. There's nothing we can do here unfortunately...
2019-09-25 16:25:16 +02:00
8943e18aca Correctly parse opaque URLs for the File adapter 2019-09-25 16:25:16 +02:00
6831e3db55 Allow to acquire an exclusive lock on the logfile for each write to a file
This is required on Windows (where we enable this feature by default)
since they don't support concurrent atomic writes above the drive's
sector size (usually between 512 Bytes and 4 KiBytes). Without an
explicit lock, concurrent writes can be interleaved or be partially
lost.
2019-09-25 16:25:16 +02:00
0907a85e81 Use a Concurrent::CyclicBarrier instead of file locking for concurrent file adapter tests 2019-09-25 16:25:15 +02:00
f304f04ded Always run concurrency tests for File adapter with threads
Since fork is not available on some platforms (aka. Windows), we
avoid it and use normal Threads instead. We have fail saves in place to
ensure that tests are still valid even on MRI with its GIL.
2019-09-17 22:26:07 +02:00
c79f2e45d3 Close a tempfile before attemting to rename it in File specs
This is required on Windows which stubornly refused to rename opened
files by default.
2019-09-17 22:26:07 +02:00
68d674668a Explicitly remove temporary files in specs 2019-09-17 22:26:07 +02:00
9ae14f068d Add appveyor.yml to define tests on Appveyor 2019-09-17 22:26:07 +02:00