advanced pipeline
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: ../libs/ruby/warp_engine
|
||||
specs:
|
||||
warp_engine (0.9.0)
|
||||
warp_engine (0.9.1)
|
||||
apipie-rails
|
||||
blueprinter
|
||||
rails (>= 8.0)
|
||||
|
||||
@@ -19,7 +19,6 @@ ActiveAdmin.register Store do
|
||||
end
|
||||
column :updated_at
|
||||
actions defaults: true do |store|
|
||||
|
||||
link_to store.active? ? "Hide" : "List",
|
||||
toggle_admin_store_path(store),
|
||||
method: :put
|
||||
|
||||
@@ -15,7 +15,6 @@ class Api::StoresController < ApiController
|
||||
returns code: 200, desc: "Array of stores" do
|
||||
property :name, String, desc: "Display name of the store"
|
||||
property :catalogUrl, String, desc: "Base URL of the WarpEngine catalog it serves"
|
||||
|
||||
end
|
||||
def index
|
||||
render json: StoreService.new.index
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
class StoreService
|
||||
|
||||
def index
|
||||
StoreSerializer.render_as_hash(Store.active.ordered)
|
||||
end
|
||||
|
||||
@@ -10,7 +10,7 @@ RSpec.describe Api::StoresController, type: :request do
|
||||
|
||||
expect(response).to have_http_status(:ok)
|
||||
json = JSON.parse(response.body)
|
||||
expect(json.map { |s| s["name"] }).to eq(["Apex Games", "Zed Games"])
|
||||
expect(json.map { |s| s["name"] }).to eq([ "Apex Games", "Zed Games" ])
|
||||
end
|
||||
|
||||
it "answers with the fields a client needs, camelCased" do
|
||||
|
||||
@@ -9,7 +9,7 @@ RSpec.describe Event, type: :model do
|
||||
future = create(:event, date: 1.week.from_now)
|
||||
create(:event, date: 1.week.ago)
|
||||
|
||||
expect(Event.upcoming).to eq([future])
|
||||
expect(Event.upcoming).to eq([ future ])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -15,7 +15,7 @@ RSpec.describe Store, type: :model do
|
||||
later = create(:store, name: "Zed Games")
|
||||
first = create(:store, name: "Apex Games")
|
||||
|
||||
expect(Store.ordered).to eq([first, later])
|
||||
expect(Store.ordered).to eq([ first, later ])
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user