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

Commit

Permalink
The Big Rename: Hydrant -> Avalon
Browse files Browse the repository at this point in the history
  • Loading branch information
mbklein committed Feb 22, 2013
1 parent d40f634 commit 24e37f9
Show file tree
Hide file tree
Showing 87 changed files with 250 additions and 252 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ lib/tasks/cucumber.rake
cucumber-results/
.idea
public/media_objects
config/hydrant.yml
config/avalon.yml
/dropbox
public/streams
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.9.3-p327-perf
2 changes: 1 addition & 1 deletion .rvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rvm use ruby-1.9.3@hydrant --create >/dev/null 2>&1
rvm use ruby-1.9.3@avalon --create >/dev/null 2>&1
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
gem 'active-fedora', '~> 5.0.0'

gem 'avalon-workflow', git: 'https://github.com/variations-on-video/avalon-workflow.git'
gem 'hydrant-engage', git: "https://github.com/variations-on-video/hydrant-engage.git"
gem 'hydrant-batch', git: "https://github.com/variations-on-video/hydrant-batch.git"
gem 'avalon-engage', git: "https://github.com/variations-on-video/avalon-engage.git"
gem 'avalon-batch', git: "https://github.com/variations-on-video/avalon-batch.git"

platforms :jruby do
gem 'jruby-openssl'
Expand Down
28 changes: 14 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,26 @@ GIT
mediashelf-loggable

GIT
remote: https://github.com/variations-on-video/avalon-workflow.git
revision: 1c573cef34b5ac4177de0bc872de57f3a37763a9
specs:
avalon-workflow (0.0.2a)

GIT
remote: https://github.com/variations-on-video/hydrant-batch.git
revision: 6b38f9012b4138870c5e9b5287d9a3cb4d5642f5
remote: https://github.com/variations-on-video/avalon-batch.git
revision: 7ea0ae79b1db1f8301e5251c1d65fc0ee7404186
specs:
hydrant-batch (0.0.1)
avalon-batch (0.0.1)
activesupport
roo

GIT
remote: https://github.com/variations-on-video/hydrant-engage.git
revision: 9e06f6ceb61588ad0b0414c066b841bd08519962
remote: https://github.com/variations-on-video/avalon-engage.git
revision: f2480900eb96f960d1ed1c7cd184e21375535d7d
specs:
hydrant-engage (0.0.1)
avalon-engage (0.0.1)
less-rails (~> 2.2.3)

GIT
remote: https://github.com/variations-on-video/avalon-workflow.git
revision: 1c573cef34b5ac4177de0bc872de57f3a37763a9
specs:
avalon-workflow (0.0.2a)

GIT
remote: https://github.com/variations-on-video/rubyhorn.git
revision: deab1f0bd069e7666338bf265f6323e3c6f61c0c
Expand Down Expand Up @@ -492,6 +492,8 @@ PLATFORMS
DEPENDENCIES
active-fedora (~> 5.0.0)
activerecord-jdbcsqlite3-adapter
avalon-batch!
avalon-engage!
avalon-workflow!
blacklight (~> 4.0.0)
builder (~> 3.0.0)
Expand All @@ -515,8 +517,6 @@ DEPENDENCIES
haml
headless
hydra-head (~> 5.0.0)
hydrant-batch!
hydrant-engage!
jdbc-sqlite3
jettywrapper
jquery-rails (~> 2.1.4)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ Instructions on how to get a local installation of Avalon Media System installed
* ```git submodule init```
* ```git submodule update```
* Install Mediainfo cli: http://mediainfo.sourceforge.net
* Copy config/hydrant.yml.example to config/hydrant.yml and change as necessary
* Copy config/avalon.yml.example to config/avalon.yml and change as necessary
* ```rake db:migrate```
* ```rake jetty:start```
* ```rake felix:start```
* ```rake spec```

# For batch ingest:
* rake hydrant:batch:ingest
* rake avalon:batch:ingest
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
require File.expand_path('../config/application', __FILE__)
require 'rake'

Hydrant::Application.load_tasks
Avalon::Application.load_tasks
4 changes: 2 additions & 2 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
//= require jquery.ui.nestedSortable

/*
* Place any local overrides in hydrant.js (for Blacklight, Hydra, jQuery,
* Place any local overrides in avalon.js (for Blacklight, Hydra, jQuery,
* etc)
*/
//= require hydrant
//= require avalon
//= require_self
File renamed without changes.
6 changes: 3 additions & 3 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@import "bootstrap";
@import "bootstrap-responsive";
@import "font-awesome";
@import "blacklight_themes/hydrant";
@import "blacklight_themes/avalon";
@import "blacklight_themes/_facets";
@import "blacklight_themes/_facets_responsive";
@import "blacklight/blacklight";
Expand All @@ -17,7 +17,7 @@ body {
/*
* This is the default theme. You can modify many of the settings
* by editing your local app/assets/stylesheets/blacklight_themes/standard.css
* require 'blacklight_themes/hydrant'
* require 'blacklight_themes/avalon'
*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
Expand All @@ -38,5 +38,5 @@ body {
*= require 'hydrant-engage'
*= require self
*/
@import "hydrant";
@import "avalon";

2 changes: 1 addition & 1 deletion app/assets/stylesheets/branding.css.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Custom branding for Hydrant to override Bootstrap, Hydra, and Blacklight
* Custom branding for Avalon to override Bootstrap, Hydra, and Blacklight
* defaults. This should be included at the top of the application.scss file
* so it is preferred over the defaults. */
$sansFontFamily: Arial, Helvetica, sans-serif;
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/admin/groups_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require "role_controls"
class Admin::GroupsController < ApplicationController
before_filter :auth
layout "hydrant"
layout "avalon"

# Currently assumes that to do anything you have to be able to manage Group
# TODO: finer controls
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ApplicationController < ActionController::Base
include AccessControlsHelper

def layout_name
'hydrant'
'avalon'
end

# Please be sure to implement current_user and user_session. Blacklight depends on
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,6 @@ def limit_to_non_hidden_items(solr_parameters, user_parameters)
end
end

layout 'hydrant'
layout 'avalon'

end
4 changes: 2 additions & 2 deletions app/controllers/comments_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CommentsController < ApplicationController
before_filter :set_subjects
layout 'hydrant'
layout 'avalon'

# Index replaces new in this context
def index
Expand All @@ -22,7 +22,7 @@ def create
logger.warn "The mail server does not appear to be responding"
logger.warn e

flash[:notice] = "The message could not be sent in a timely fashion. Contact us at #{Hydrant::Configuration['email']['support']} to report the problem."
flash[:notice] = "The message could not be sent in a timely fashion. Contact us at #{Avalon::Configuration['email']['support']} to report the problem."
render action: "index"
end
else
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/dropbox_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ def bulk_delete
# failsafe for spaces that might be attached to string
filenames = params[:filenames].map(&:strip)

dropbox_filenames = Hydrant::DropboxService.all.map{|f| f[:name] }
dropbox_filenames = Avalon::DropboxService.all.map{|f| f[:name] }
deleted_filenames = []

filenames.each do |filename|
if dropbox_filenames.include?( filename )
if Hydrant::DropboxService.delete( filename )
if Avalon::DropboxService.delete( filename )
deleted_filenames << filename
logger.info "The user #{current_user.username} deleted #{filename} from the dropbox."
end
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/master_files_controller.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
require 'net/http/digest_auth'
require 'net/http/post/multipart'
require 'rubyhorn'
require 'hydrant/controller/controller_behavior'
require 'avalon/controller/controller_behavior'

class MasterFilesController < ApplicationController
include Hydrant::Controller::ControllerBehavior
include Avalon::Controller::ControllerBehavior

skip_before_filter :verify_authenticity_token, :only => [:update]
before_filter :authenticate_user!, :only => [:create]
Expand Down Expand Up @@ -69,7 +69,7 @@ def create
elsif params.has_key?(:dropbox)
@master_files = []
params[:dropbox].each do |file|
file_path = Hydrant::DropboxService.find(file[:id])
file_path = Avalon::DropboxService.find(file[:id])
master_file = MasterFile.create
master_file.mediaobject = media_object
master_file.setContent(File.open(file_path, 'rb'))
Expand Down
8 changes: 4 additions & 4 deletions app/controllers/media_objects_controller.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
require 'hydrant/controller/controller_behavior'
require 'avalon/controller/controller_behavior'

class MediaObjectsController < ApplicationController
include Avalon::Workflow::WorkflowControllerBehavior
include Hydrant::Controller::ControllerBehavior
include Avalon::Controller::ControllerBehavior

before_filter :enforce_access_controls
before_filter :inject_workflow_steps, only: [:edit, :update]
before_filter :load_player_context, only: [:show, :remove]

layout 'hydrant'
layout 'avalon'

# Catch exceptions when you try to reference an object that doesn't exist.
# Attempt to resolve it to a close match if one exists and offer a link to
Expand Down Expand Up @@ -154,7 +154,7 @@ def self.initialize_media_object( user_key )

def matterhorn_service_config
respond_to do |format|
format.any(:xml, :json) { render request.format.to_sym => Hydrant.matterhorn_config }
format.any(:xml, :json) { render request.format.to_sym => Avalon.matterhorn_config }
end
end

Expand Down
4 changes: 2 additions & 2 deletions app/controllers/users/sessions_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Users::SessionsController < Devise::SessionsController
def new
if Hydrant::Authentication::Providers.length == 1
redirect_to user_omniauth_authorize_path(Hydrant::Authentication::Providers.first[:provider])
if Avalon::Authentication::Providers.length == 1
redirect_to user_omniauth_authorize_path(Avalon::Authentication::Providers.first[:provider])
else
super
end
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module ApplicationHelper
def application_name
'Hydrant'
'Avalon'
end

def image_for(item_id)
Expand Down
2 changes: 1 addition & 1 deletion app/mailers/comments_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class CommentsMailer < ActionMailer::Base
default :to => Hydrant::Configuration['email']['comments']
default :to => Avalon::Configuration['email']['comments']

def contact_email(comment)
@comment = comment
Expand Down
12 changes: 6 additions & 6 deletions app/mailers/ingest_batch_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@ class IngestBatchMailer < ActionMailer::Base
def status_email( ingest_batch_id )
@ingest_batch = IngestBatch.find(ingest_batch_id)
@media_objects = @ingest_batch.media_objects
@email = @ingest_batch.email || Hydrant::Configuration['email']['notification']
@email = @ingest_batch.email || Avalon::Configuration['email']['notification']
mail(
to: @email,
from: Hydrant::Configuration['email']['notification'],
from: Avalon::Configuration['email']['notification'],
subject: "Batch ingest status for: #{@ingest_batch.name}"
)
end

def batch_ingest_validation_error( package )
@package = package
email = package.manifest.email || Hydrant::Configuration['email']['notification']
email = package.manifest.email || Avalon::Configuration['email']['notification']
mail(
to: email,
from: Hydrant::Configuration['email']['notification'],
from: Avalon::Configuration['email']['notification'],
subject: "Failed batch ingest processing errors for: #{package.manifest.name}",
)
end

def batch_ingest_validation_success( package )
@package = package
email = package.manifest.email || Hydrant::Configuration['email']['notification']
email = package.manifest.email || Avalon::Configuration['email']['notification']
mail(
to: email,
from: Hydrant::Configuration['email']['notification'],
from: Avalon::Configuration['email']['notification'],
subject: "Successfully processed batch ingest: #{package.manifest.name}",
)
end
Expand Down
4 changes: 2 additions & 2 deletions app/models/admin/group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class Admin::Group

def self.non_system_groups
groups = all
if Hydrant::Configuration['groups'] && Hydrant::Configuration['groups']['non_system_groups']
non_system_groups = Hydrant::Configuration['groups']['non_system_groups'].map{|k,groups| groups}.flatten
if Avalon::Configuration['groups'] && Avalon::Configuration['groups']['non_system_groups']
non_system_groups = Avalon::Configuration['groups']['non_system_groups'].map{|k,groups| groups}.flatten
groups.reject! { |g| non_system_groups.include? g.name }
end
groups
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class HydrantFileResource
class AvalonFileResource
attr_accessor :id, :name, :size, :label, :mime_type
end
2 changes: 2 additions & 0 deletions app/models/avalon_local_resource.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class AvalonLocalFileResource < AvalonFileResource
end
2 changes: 2 additions & 0 deletions app/models/avalon_remote_resource.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class AvalonRemoteFileResource < AvalonFileResource
end
2 changes: 1 addition & 1 deletion app/models/derivative.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def streaming_url(is_mobile=false)
(application, prefix, media_id, stream_id, filename, extension) = uri.path.scan(regex).flatten

template = ERB.new(self.class.url_handler.patterns[protocol][format])
result = File.join(Hydrant::Configuration['streaming']["#{protocol}_base"],template.result(binding))
result = File.join(Avalon::Configuration['streaming']["#{protocol}_base"],template.result(binding))
end

def format
Expand Down
4 changes: 2 additions & 2 deletions app/models/file_upload_step.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'hydrant/dropbox'
require 'avalon/dropbox'

class FileUploadStep < Avalon::Workflow::BasicStep
def initialize(step = 'file-upload',
Expand All @@ -12,7 +12,7 @@ def initialize(step = 'file-upload',
# just need to ask the dropbox if there are any files. If so load
# them into a variable that can be referred to later
def before_step context
dropbox_files = Hydrant::DropboxService.all
dropbox_files = Avalon::DropboxService.all
context[:dropbox_files] = dropbox_files
context
end
Expand Down
2 changes: 0 additions & 2 deletions app/models/hydrant_local_resource.rb

This file was deleted.

2 changes: 0 additions & 2 deletions app/models/hydrant_remote_resource.rb

This file was deleted.

Loading

0 comments on commit 24e37f9

Please sign in to comment.