mirror of
https://github.com/samsonjs/grape_logging.git
synced 2026-03-25 08:55:47 +00:00
Get specs running again, but they still fail (#86)
* Get specs running again, but they still fail on Ruby 3.4 * Add Ruby 3.4 to test matrix * Remove bundler from dev dependencies
This commit is contained in:
parent
cc29dc7868
commit
ce103dad5a
7 changed files with 11 additions and 17 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
name: Grape Logging CI
|
name: CI
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
|
|
@ -9,7 +9,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
ruby-version: ["3.0", "3.1", "3.2", "3.3"]
|
ruby-version: ["3.0", "3.1", "3.2", "3.3", "3.4"]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
language: ruby
|
|
||||||
rvm:
|
|
||||||
- 2.3.1
|
|
||||||
cache: bundler
|
|
||||||
script:
|
|
||||||
- bundle exec rspec
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
# grape_logging
|
# grape_logging
|
||||||
|
|
||||||
[](https://codeclimate.com/github/aserafin/grape_logging)
|
[](https://github.com/aserafin/grape_logging/actions/workflows/ci.yml)
|
||||||
[](https://travis-ci.org/aserafin/grape_logging)
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
|
@ -19,7 +18,7 @@ Or install it yourself as:
|
||||||
|
|
||||||
## Basic Usage
|
## Basic Usage
|
||||||
|
|
||||||
In your api file (somewhere on the top), insert grape logging middleware before grape error middleware. This is important due to the behaviour of `lib/grape/middleware/error.rb`, which manipulates the status of the response when there is an error.
|
In your api file (somewhere on the top), insert grape logging middleware before grape error middleware. This is important due to the behaviour of `lib/grape/middleware/error.rb`, which manipulates the status of the response when there is an error.
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
require 'grape_logging'
|
require 'grape_logging'
|
||||||
|
|
|
||||||
4
Rakefile
4
Rakefile
|
|
@ -1,2 +1,6 @@
|
||||||
require 'bundler/gem_tasks'
|
require 'bundler/gem_tasks'
|
||||||
|
require 'rspec/core/rake_task'
|
||||||
|
|
||||||
|
RSpec::Core::RakeTask.new(:spec)
|
||||||
|
|
||||||
|
task default: :spec
|
||||||
|
|
|
||||||
0
bin/console
Normal file → Executable file
0
bin/console
Normal file → Executable file
|
|
@ -1,4 +1,3 @@
|
||||||
# coding: utf-8
|
|
||||||
lib = File.expand_path('../lib', __FILE__)
|
lib = File.expand_path('../lib', __FILE__)
|
||||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||||
require 'grape_logging/version'
|
require 'grape_logging/version'
|
||||||
|
|
@ -19,11 +18,9 @@ Gem::Specification.new do |spec|
|
||||||
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
||||||
spec.require_paths = ['lib']
|
spec.require_paths = ['lib']
|
||||||
|
|
||||||
spec.add_dependency 'grape'
|
spec.add_dependency 'grape', '< 2.4.0'
|
||||||
spec.add_dependency 'rack'
|
spec.add_dependency 'rack'
|
||||||
|
|
||||||
spec.add_development_dependency 'bundler', '~> 1.8'
|
spec.add_development_dependency 'rake', '~> 13.3'
|
||||||
spec.add_development_dependency 'rake', '~> 10.0'
|
|
||||||
spec.add_development_dependency 'rspec', '~> 3.5'
|
spec.add_development_dependency 'rspec', '~> 3.5'
|
||||||
spec.add_development_dependency 'pry-byebug', '~> 3.4.2'
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
require 'grape/middleware/base'
|
require 'grape'
|
||||||
|
|
||||||
module GrapeLogging
|
module GrapeLogging
|
||||||
module Middleware
|
module Middleware
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue