Skip to content

Commit

Permalink
Rename Lerna to Hyku. Fixes #461
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Nov 7, 2016
1 parent 3f04860 commit fe229ca
Show file tree
Hide file tree
Showing 28 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .ebextensions/honeybadger.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@

DEPLOY_ENVS=$($EB_SUPPORT_FILES/generate_env | grep "APP_ENV\|HONEYBADGER_API_KEY")

/usr/bin/env $DEPLOY_ENVS APP_VERSION=$(unzip -z "${EB_CONFIG_SOURCE_BUNDLE}" | tail -n 1) bash -c 'curl -sd "deploy[repository]=git@github.com:projecthydra-labs/lerna.git&deploy[revision]=${APP_VERSION}&deploy[local_username]=root&deploy[environment]=${APP_ENV}&api_key=${HONEYBADGER_API_KEY}" https://api.honeybadger.io/v1/deploys' > /tmp/deploy_01_notify.log
/usr/bin/env $DEPLOY_ENVS APP_VERSION=$(unzip -z "${EB_CONFIG_SOURCE_BUNDLE}" | tail -n 1) bash -c 'curl -sd "deploy[repository]=git@github.com:projecthydra-labs/hyku.git&deploy[revision]=${APP_VERSION}&deploy[local_username]=root&deploy[environment]=${APP_ENV}&api_key=${HONEYBADGER_API_KEY}" https://api.honeybadger.io/v1/deploys' > /tmp/deploy_01_notify.log
2 changes: 1 addition & 1 deletion .solr_wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ cloud: true

configsets:
- dir: solr/config/
name: lerna
name: hyku
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ before_script:
before_deploy:
- git clean -dxf; rm -rf vendor/bundle
- echo $TRAVIS_COMMIT > REVISION
- mkdir build; zip -q -r build/lerna.zip .
- mkdir build; zip -q -r build/hyku.zip .

services:
- postgresql
Expand All @@ -37,7 +37,7 @@ deploy:
region: us-east-1
local_dir: build
skip_cleanup: true
upload-dir: lerna/branch/${TRAVIS_BRANCH}
upload-dir: hyku/branch/${TRAVIS_BRANCH}
acl: public_read
on:
all_branches: true
Expand All @@ -50,5 +50,5 @@ deploy:
region: us-east-1
skip_cleanup: true
local_dir: build
upload-dir: lerna/current
upload-dir: hyku/current
acl: public_read
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[![Build Status](https://travis-ci.org/projecthydra-labs/lerna.svg)](https://travis-ci.org/projecthydra-labs/lerna)
[![Coverage Status](https://coveralls.io/repos/projecthydra-labs/lerna/badge.svg?branch=master&service=github)](https://coveralls.io/github/projecthydra-labs/lerna?branch=master)
[![Stories in Ready](https://badge.waffle.io/projecthydra-labs/lerna.png?label=ready&title=Ready)](https://waffle.io/projecthydra-labs/lerna)
[![Build Status](https://travis-ci.org/projecthydra-labs/hyku.svg)](https://travis-ci.org/projecthydra-labs/hyku)
[![Coverage Status](https://coveralls.io/repos/projecthydra-labs/hyku/badge.svg?branch=master&service=github)](https://coveralls.io/github/projecthydra-labs/hyku?branch=master)
[![Stories in Ready](https://badge.waffle.io/projecthydra-labs/hyku.png?label=ready&title=Ready)](https://waffle.io/projecthydra-labs/hyku)

# Hydra-in-a-Box Repository App

Codename: Lerna
Codename: Hyku

## Running the stack

Expand All @@ -21,13 +21,13 @@ $ bundle exec rails server

### On AWS

AWS CloudFormation templates for the Lerna stack are available in a separate repository:
AWS CloudFormation templates for the Hyku stack are available in a separate repository:

https://github.com/hybox/aws

### With Docker

We distribute a `docker-compose.yml` configuration for running the Lerna stack and application using docker. Once you have [docker](https://docker.com) installed and running, launch the stack using e.g.:
We distribute a `docker-compose.yml` configuration for running the Hyku stack and application using docker. Once you have [docker](https://docker.com) installed and running, launch the stack using e.g.:

```bash
$ docker-compose up -d
Expand All @@ -51,11 +51,11 @@ Hydra-in-a-Box supports multitenancy using the `apartment` gem. `apartment` work
### from CSV:

```bash
$ ./bin/import_from_csv localhost spec/fixtures/csv/gse_metadata.csv ../lerna-objects
$ ./bin/import_from_csv localhost spec/fixtures/csv/gse_metadata.csv ../hyku-objects
```

### from purl:

```bash
$ ./bin/import_from_purl ../lerna-objects bc390xk2647 bc402fk6835 bc483gc9313
$ ./bin/import_from_purl ../hyku-objects bc390xk2647 bc402fk6835 bc483gc9313
```
File renamed without changes.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/sufia.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@import "blacklight/blacklight";
@import "font-awesome";
@import "sufia/sufia";
@import "lerna";
@import "hyku";
@import "accounts";
@import "viewer";

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 @@ -33,7 +33,7 @@ class ApplicationController < ActionController::Base
private

def peek_enabled?
can? :peek, Lerna::Application
can? :peek, Hyku::Application
end

def require_active_account!
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/curation_concerns/file_sets_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module CurationConcerns
class FileSetsController < ApplicationController
include CurationConcerns::FileSetsControllerBehavior
include Sufia::FileSetsControllerBehavior
self.show_presenter = Lerna::FileSetPresenter
self.show_presenter = Hyku::FileSetPresenter
end
end
2 changes: 1 addition & 1 deletion app/models/ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def superadmin_permissions
return unless current_user.has_role? :superadmin

can :manage, :all
can :peek, Lerna::Application
can :peek, Hyku::Application
end

def restrict_site_admin_permissions
Expand Down
2 changes: 1 addition & 1 deletion app/models/content_block.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class ContentBlock < ActiveRecord::Base
include Sufia::ContentBlockBehavior
include Lerna::ContentBlockBehavior
include Hyku::ContentBlockBehavior
end
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Lerna
module Hyku
module ContentBlockBehavior
extend ActiveSupport::Concern

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module CurationConcerns
class GenericWorkShowPresenter < Sufia::WorkShowPresenter
self.file_presenter_class = Lerna::FileSetPresenter
self.file_presenter_class = Hyku::FileSetPresenter

def manifest_url
manifest_helper.polymorphic_url([:manifest, self])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Lerna
module Hyku
class FileSetPresenter < Sufia::FileSetPresenter
include DisplaysImage
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>Lerna</title>
<title>Hyku</title>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
Expand Down
4 changes: 2 additions & 2 deletions bin/extract_mods_to_spreadsheet
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# 'base_path/druid_wg827ks1643/**/descMetadata.xml'
#
# Usage example:
# ./bin/extract_mods_to_spreadsheet ../lerna-bags/ out.csv
# ./bin/extract_mods_to_spreadsheet ../hyku-bags/ out.csv

base_path = ARGV[0]
output_path = ARGV[1]
Expand All @@ -28,7 +28,7 @@ puts 'Starting import...'
data = Dir.glob("#{base_path}/**/descMetadata.xml").map do |filename|
# Assumption: filename will contain the druid
# example:
# "lerna-metadata/GSE/druid_wg827ks1643/data/metadata/descMetadata.xml"
# "hyku-metadata/GSE/druid_wg827ks1643/data/metadata/descMetadata.xml"
id = filename.gsub(%r{.*/druid_(\w+)/.*}, '\1')
{id: [id], type: ['ETD']}
.merge(Importer::ModsParser.new(filename).attributes)
Expand Down
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

module Lerna
module Hyku
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Use a real queuing backend for Active Job (and separate queues per environment)
require 'active_job/queue_adapters/better_active_elastic_job_adapter'
config.active_job.queue_adapter = Settings.active_job.queue_adapter
# config.active_job.queue_name_prefix = "lerna_#{Rails.env}"
# config.active_job.queue_name_prefix = "hyku_#{Rails.env}"

config.action_mailer.perform_caching = false

Expand Down
2 changes: 1 addition & 1 deletion config/initializers/peek.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Peek.into Peek::Views::Git, nwo: 'projecthydra-labs/lerna'
Peek.into Peek::Views::Git, nwo: 'projecthydra-labs/hyku'
Peek.into Peek::Views::Faraday
Peek.into Peek::Views::PG
Peek.into Peek::Views::PerformanceBar
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/session_store.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Be sure to restart your server when you modify this file.

Rails.application.config.session_store :cookie_store, key: '_lerna_session'
Rails.application.config.session_store :cookie_store, key: '_hyku_session'
6 changes: 3 additions & 3 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ action_controller:
asset_host:

redis:
default_namespace: lerna
default_namespace: hyku

solr:
url: "http://127.0.0.1:8983/solr/"
configset: lerna
configset: hyku
configset_source_path: <%= File.join(Rails.root, 'solr', 'config') %>
collection_options:
async:
auto_add_replicas:
collection:
config_name: lerna
config_name: hyku
create_node_set:
max_shards_per_node:
num_shards: 1
Expand Down
2 changes: 1 addition & 1 deletion config/solr_wrapper_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ cloud: true

configsets:
- dir: solr/config/
name: lerna
name: hyku
2 changes: 1 addition & 1 deletion lib/importer/mods_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def model
end

def origin_text
'Converted from MODS 3.4 to local RDF profile by Lerna'.freeze
'Converted from MODS 3.4 to local RDF profile by Hyku'.freeze
end

def mods
Expand Down
2 changes: 1 addition & 1 deletion lib/stanford/importer/purl_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def model
end

def origin_text
'Imported from PURL to local RDF profile by Lerna'.freeze
'Imported from PURL to local RDF profile by Hyku'.freeze
end

def collection?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
RSpec.describe CurationConcerns::FileSetsController do
describe 'show_presenter' do
subject { described_class.show_presenter }
it { is_expected.to eq Lerna::FileSetPresenter }
it { is_expected.to eq Hyku::FileSetPresenter }
end
end
6 changes: 3 additions & 3 deletions spec/jobs/create_solr_collection_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
expect(client).to receive(:get).with('/solr/admin/collections',
params: hash_including(action: 'CREATE',
name: account.tenant,
'collection.configName': 'lerna'))
'collection.configName': 'hyku'))
described_class.perform_now(account)

expect(account.solr_endpoint.url).to eq "#{Settings.solr.url}#{account.tenant}"
Expand All @@ -37,7 +37,7 @@
subject { described_class.new(data).to_h }
let(:data) do
{
collection: { config_name: 'lerna', blank: '' },
collection: { config_name: 'hyku', blank: '' },
num_shards: 1,
replication_factor: 5,
rule: 'asdf',
Expand All @@ -51,7 +51,7 @@
end

it 'collapses nested hashes' do
expect(subject).to include('collection.configName': 'lerna')
expect(subject).to include('collection.configName': 'hyku')
end

it 'camelizes key values' do
Expand Down
2 changes: 1 addition & 1 deletion spec/models/account_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
describe '#switch' do
let!(:previous_solr_connection) { Blacklight.default_index }
let!(:previous_fcrepo_connection) { ActiveFedora.fedora }
let!(:previous_redis_namespace) { 'lerna' }
let!(:previous_redis_namespace) { 'hyku' }

before do
subject.build_solr_endpoint.update(url: 'http://example.com/solr/')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

describe "file_presenter_class" do
subject { described_class.file_presenter_class }
it { is_expected.to eq Lerna::FileSetPresenter }
it { is_expected.to eq Hyku::FileSetPresenter }
end

describe "representative_presenter" do
Expand All @@ -27,7 +27,7 @@
presenter.representative_presenter
end
it "returns a presenter" do
expect(subject).to be_kind_of Lerna::FileSetPresenter
expect(subject).to be_kind_of Hyku::FileSetPresenter
end
end
end
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'rails_helper'
require 'iiif_manifest'
RSpec.describe Lerna::FileSetPresenter do
RSpec.describe Hyku::FileSetPresenter do
let(:file_set) { FactoryGirl.create(:file_set) }
let(:solr_document) { SolrDocument.new(file_set.to_solr) }
let(:request) { double(base_url: 'http://test.host') }
Expand Down

0 comments on commit fe229ca

Please sign in to comment.