base_indexer 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac8659f2dfed41b11a0308ad26c2a8bc33843e38
4
- data.tar.gz: 50832a31620b8744bbc2b5dfa6c844a2dd3845e3
3
+ metadata.gz: a03a92070fdb7a53780549208a6025a9305fa475
4
+ data.tar.gz: 4768c3289471513b98e948a35b24571c2eafa86d
5
5
  SHA512:
6
- metadata.gz: 538b46846c5e55c96b9e9327c7f7aafa88816aa9906b0782086b6298d95ff49fe6e58988046a0f664a740440aad1e52ceacfd5b600767c8f8fd3080487f675c8
7
- data.tar.gz: 11ccaa43c63b7cdf72efc355604a19a15d568799e3e0f10681955b3962d505b388b23085e711f0062285bc94a2583e9656893a74471a8e1ec2a2cda933f8cfd1
6
+ metadata.gz: 7af6f6405b62b34fb0e6375cb8271a0f857f90b161fad7d881710fdb789483b3395e6d8039f97103e725af0e6149012dfad775a9d3a1f83fa875072f0cb59c7e
7
+ data.tar.gz: b5d980832aa072b436117e7f33ec49d1bc7d74b98b720e84193310cc82c5655f4cf85c070a3808dd42f4a1e0a47f2e5deb40d86ebc92c64d552a768d022a437e
@@ -2,8 +2,8 @@ require_dependency 'base_indexer/application_controller'
2
2
 
3
3
  module BaseIndexer
4
4
  class CollectionsController < ApplicationController
5
- def new
6
- druid = remove_prefix params[:druid]
5
+ def update
6
+ druid = remove_prefix params[:id]
7
7
 
8
8
  Rails.logger.debug "Receiving indexing of collection #{druid}"
9
9
  targets = params[:subtargets]
@@ -21,8 +21,8 @@ module BaseIndexer
21
21
 
22
22
  counter = 0
23
23
 
24
- item_druids.each do |druid|
25
- druid = remove_prefix druid
24
+ item_druids.each do |idruid|
25
+ druid = remove_prefix idruid
26
26
  counter += 1
27
27
  indexer.index druid, targets
28
28
  Rails.logger.debug "#{counter} of #{item_druids.size}: #{druid}"
@@ -2,8 +2,8 @@ require_dependency 'base_indexer/application_controller'
2
2
 
3
3
  module BaseIndexer
4
4
  class ItemsController < ApplicationController
5
- def new
6
- druid = remove_prefix params[:druid]
5
+ def update
6
+ druid = remove_prefix params[:id]
7
7
  Rails.logger.debug "Receiving indexing #{druid}"
8
8
  targets = params[:subtargets]
9
9
 
@@ -19,7 +19,7 @@ module BaseIndexer
19
19
  end
20
20
 
21
21
  def destroy
22
- druid = remove_prefix params[:druid]
22
+ druid = remove_prefix params[:id]
23
23
  Rails.logger.debug "Receiving deleting #{druid}"
24
24
 
25
25
  indexer = BaseIndexer.indexer_class.constantize.new
data/config/routes.rb CHANGED
@@ -3,8 +3,6 @@ BaseIndexer::Engine.routes.draw do
3
3
  get 'about/version' => 'about#version'
4
4
  get 'about' => 'about#version'
5
5
 
6
- post '/items/:druid', to: 'items#new'
7
- delete '/items/:druid', to: 'items#destroy'
8
-
9
- post '/collections/:druid', to: 'collections#new'
6
+ resources :items, only: [:update, :destroy]
7
+ resources :collections, only: :update
10
8
  end
@@ -1,3 +1,3 @@
1
1
  module BaseIndexer
2
- VERSION = '0.5.0'
2
+ VERSION = '0.6.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: base_indexer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ahmed Alsum
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-23 00:00:00.000000000 Z
12
+ date: 2015-10-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails