Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

Adding Grocer and configuring to export when transitioning to Metadata Review state #983

Merged
merged 1 commit into from
Feb 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ group :staging, :development do
end
gem 'rbtrace', require: false
gem 'pul_uv_rails', github: 'pulibrary/pul_uv_rails', branch: 'master'
gem 'grocer', github: 'pulibrary/grocer', branch: 'spawn'
source 'https://rails-assets.org' do
gem 'rails-assets-babel-polyfill'
gem 'rails-assets-bootstrap-select', '1.9.4'
Expand Down
10 changes: 10 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ GIT
hydra-pcdm (>= 0.9)
om (~> 3.1)

GIT
remote: git://github.com/pulibrary/grocer.git
revision: 9824808403395529073eb4c720efb897b8f1eda8
branch: spawn
specs:
grocer (0.1.0)
active-fedora
kaminari

GIT
remote: git://github.com/pulibrary/pul_metadata_services.git
revision: 584736f58b3dcf1136e9b1817954299d5e6ca82c
Expand Down Expand Up @@ -819,6 +828,7 @@ DEPENDENCIES
factory_girl_rails
fcrepo_wrapper (~> 0.6.0)
geo_concerns (~> 0.3.4)
grocer!
hydra-derivatives (= 3.1.3)
hydra-pcdm!
hydra-role-management (~> 0.2.0)
Expand Down
1 change: 1 addition & 0 deletions app/assets/javascripts/grocer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//= require grocer/application
1 change: 1 addition & 0 deletions app/assets/stylesheets/grocer.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import 'grocer/grocer';
3 changes: 3 additions & 0 deletions config/initializers/grocer.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Grocer.configure do |conf|
conf.export_dir = ENV['PLUM_EXPORT_DIR'] || Rails.root.join('tmp', 'export')
end
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Rails.application.routes.draw do
mount Grocer::Engine => '/'
mount JasmineRails::Engine => '/specs' if defined?(JasmineRails)
mount BrowseEverything::Engine => '/browse'

Expand Down
1 change: 1 addition & 0 deletions config/workflows/books_workflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
}
],
"transition_to": "metadata_review",
"methods": ["Grocer::ExportObject"],
"notifications": [
{
"notification_type": "email",
Expand Down
16 changes: 16 additions & 0 deletions db/migrate/20170127153850_create_grocer_exports.grocer.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This migration comes from grocer (originally 20170119220038)
class CreateGrocerExports < ActiveRecord::Migration[5.0]
def change
create_table :grocer_exports do |t|
t.string :pid
t.integer :job
t.string :status
t.datetime :last_error
t.datetime :last_success
t.string :logfile

t.timestamps
end
add_index :grocer_exports, :pid, unique: true
end
end
6 changes: 6 additions & 0 deletions db/migrate/20170127153851_add_ark_to_grocer_exports.grocer.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This migration comes from grocer (originally 20170124154627)
class AddArkToGrocerExports < ActiveRecord::Migration[5.0]
def change
add_column :grocer_exports, :ark, :string
end
end
15 changes: 14 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20170103194043) do
ActiveRecord::Schema.define(version: 20170127153851) do

create_table "bookmarks", force: :cascade do |t|
t.integer "user_id", null: false
Expand Down Expand Up @@ -56,6 +56,19 @@
t.index ["user_id"], name: "index_curation_concerns_operations_on_user_id"
end

create_table "grocer_exports", force: :cascade do |t|
t.string "pid"
t.integer "job"
t.string "status"
t.datetime "last_error"
t.datetime "last_success"
t.string "logfile"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "ark"
t.index ["pid"], name: "index_grocer_exports_on_pid", unique: true
end

create_table "minter_states", force: :cascade do |t|
t.string "namespace", default: "default", null: false
t.string "template", null: false
Expand Down