Sha256: 2623faafbbca0f62ca5db2d78c171afa191cc48fcd6ae5d21454d428db59d958
Contents?: true
Size: 394 Bytes
Versions: 3
Compression:
Stored size: 394 Bytes
Contents
require 'spec_helper' require 'sinatra/base' require 'json' class SinatraMixin < Sinatra::Base class Artist < Sequel::Model plugin :json_serializer extend Rack::Reducer reduces dataset, filters: SEQUEL_QUERY[:filters] end get '/artists' do @artists = Artist.reduce(params) @artists.all.to_json end end describe SinatraMixin do it_behaves_like Rack::Reducer end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rack-reducer-1.0.1 | spec/sinatra_mixin_spec.rb |
rack-reducer-1.0.0 | spec/sinatra_mixin_spec.rb |
rack-reducer-0.1.2 | spec/sinatra_mixin_spec.rb |