sufia 2.0.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +111 -0
- data/Gemfile +4 -4
- data/History.md +126 -0
- data/README.md +23 -5
- data/SUFIA_VERSION +1 -1
- data/app/assets/javascripts/sufia/multiForm.js +10 -2
- data/app/assets/stylesheets/{application-bootstrap.css → application-bootstrap.css.erb} +7 -7
- data/app/assets/stylesheets/{bootstrap.min.css → bootstrap.min.css.erb} +1 -1
- data/app/controllers/concerns/sufia/users_controller_behavior.rb +9 -3
- data/app/controllers/single_use_link_controller.rb +1 -1
- data/app/helpers/sufia_helper.rb +7 -1
- data/app/models/contact_form.rb +0 -14
- data/app/views/_user_util_links.html.erb +0 -15
- data/app/views/batch_edits/_check_all.html.erb +2 -2
- data/app/views/batch_edits/_delete_selected.html.erb +1 -1
- data/app/views/layouts/{_head-tag-content.html.erb → _head_tag_content.html.erb} +0 -0
- data/app/views/layouts/homepage.html.erb +2 -2
- data/app/views/layouts/sufia-one-column.html.erb +1 -1
- data/app/views/layouts/sufia-two-column.html.erb +1 -1
- data/app/views/users/edit.html.erb +1 -1
- data/app/views/users/show.html.erb +1 -17
- data/config/routes.rb +31 -33
- data/lib/generators/sufia/sufia_generator.rb +5 -3
- data/lib/generators/sufia/templates/catalog_controller.rb +5 -1
- data/lib/generators/sufia/templates/config/redis_config.rb +1 -14
- data/lib/sufia/batch_edits_controller_behavior.rb +1 -1
- data/lib/sufia/controller.rb +1 -1
- data/lib/sufia/dashboard_controller_behavior.rb +8 -2
- data/lib/sufia/files_controller_behavior.rb +1 -2
- data/lib/sufia/version.rb +1 -1
- data/spec/active_fedora/unsaved_digital_object_spec.rb +1 -15
- data/spec/controllers/authorities_controller_spec.rb +1 -15
- data/spec/controllers/batch_controller_spec.rb +10 -16
- data/spec/controllers/batch_edits_controller_spec.rb +1 -1
- data/spec/controllers/catalog_controller_spec.rb +1 -15
- data/spec/controllers/dashboard_controller_spec.rb +23 -17
- data/spec/controllers/downloads_controller_spec.rb +1 -15
- data/spec/controllers/generic_files_controller_spec.rb +18 -32
- data/spec/controllers/mailbox_controller_spec.rb +1 -15
- data/spec/controllers/single_use_link_controller_spec.rb +6 -13
- data/spec/controllers/users_controller_spec.rb +27 -41
- data/spec/factories/users.rb +5 -14
- data/spec/features/browse_dashboard_files.rb +21 -0
- data/spec/features/browse_files.rb +31 -0
- data/spec/features/contact_form.rb +99 -0
- data/spec/features/display_dashboard.rb +46 -0
- data/spec/features/ingest_upload_files.rb +24 -0
- data/spec/features/users_spec.rb +25 -0
- data/spec/helpers/generic_file_helper_spec.rb +10 -3
- data/spec/helpers/sufia_helper_spec.rb +1 -1
- data/spec/lib/sufia/id_service_spec.rb +1 -15
- data/spec/models/audit_job_spec.rb +1 -15
- data/spec/models/batch_spec.rb +1 -15
- data/spec/models/batch_update_job_spec.rb +3 -16
- data/spec/models/characterize_job_spec.rb +4 -4
- data/spec/models/checksum_audit_log_spec.rb +1 -15
- data/spec/models/event_jobs_spec.rb +1 -15
- data/spec/models/file_content_datastream_spec.rb +5 -19
- data/spec/models/fits_datastream_spec.rb +1 -15
- data/spec/models/generic_file/web_form_spec.rb +34 -0
- data/spec/models/generic_file_spec.rb +11 -39
- data/spec/models/local_authority_spec.rb +3 -15
- data/spec/models/properties_datastream_spec.rb +1 -1
- data/spec/models/single_use_link_spec.rb +1 -1
- data/spec/models/solr_document_spec.rb +1 -1
- data/spec/models/transcode_audio_job_spec.rb +1 -1
- data/spec/models/transcode_video_job_spec.rb +1 -1
- data/spec/models/trophy_spec.rb +1 -1
- data/spec/models/unzip_job_spec.rb +1 -15
- data/spec/models/user_spec.rb +1 -15
- data/spec/rake/sufia_fixtures_spec.rb +3 -17
- data/spec/routing/route_spec.rb +7 -21
- data/spec/spec_helper.rb +8 -20
- data/spec/support/features.rb +6 -0
- data/spec/support/features/session_helpers.rb +21 -0
- data/spec/support/lib/generators/test_app_generator.rb +4 -0
- data/spec/views/batch_edits/check_all_spec.rb +6 -4
- data/sufia-models/app/models/checksum_audit_log.rb +1 -15
- data/sufia-models/app/models/domain_term.rb +3 -15
- data/sufia-models/app/models/geo_names_resource.rb +1 -13
- data/sufia-models/app/models/local_authority.rb +12 -17
- data/sufia-models/app/models/local_authority_entry.rb +1 -15
- data/sufia-models/app/models/single_use_link.rb +2 -3
- data/sufia-models/app/models/trophy.rb +1 -1
- data/sufia-models/app/models/version_committer.rb +1 -15
- data/sufia-models/lib/sufia/models.rb +6 -2
- data/sufia-models/lib/sufia/models/engine.rb +1 -1
- data/sufia-models/lib/sufia/models/generic_file.rb +3 -0
- data/sufia-models/lib/sufia/models/generic_file/accessible_attributes.rb +87 -0
- data/sufia-models/lib/sufia/models/generic_file/permissions.rb +2 -1
- data/sufia-models/lib/sufia/models/generic_file/web_form.rb +4 -1
- data/sufia-models/lib/sufia/models/user.rb +9 -2
- data/sufia-models/lib/sufia/models/version.rb +1 -1
- data/{lib → sufia-models/lib}/tasks/resque.rake +0 -0
- data/sufia-models/sufia-models.gemspec +13 -11
- data/sufia.gemspec +1 -3
- data/tasks/sufia-dev.rake +21 -10
- metadata +30 -84
- data/config/cucumber.yml +0 -8
- data/features/browse_dashboard_files.feature +0 -16
- data/features/browse_files.feature +0 -16
- data/features/contact_form.feature +0 -86
- data/features/display_dashboard.feature +0 -42
- data/features/ingest_upload_files.feature +0 -21
- data/features/step_definitions/edit_metadata_steps.rb +0 -89
- data/features/step_definitions/fixture_steps.rb +0 -35
- data/features/step_definitions/show_document_steps.rb +0 -103
- data/features/step_definitions/sufia.rb +0 -69
- data/features/step_definitions/user_steps.rb +0 -58
- data/features/step_definitions/web_steps.rb +0 -235
- data/features/support/cleanup.rb +0 -19
- data/features/support/env.rb +0 -90
- data/features/support/headless.rb +0 -26
- data/features/support/paths.rb +0 -101
- data/features/users.feature +0 -18
- data/spec/lib/sufia/role_mapper_spec.rb +0 -28
- data/spec/support/Gemfile +0 -24
- data/spec/views/single_user_link/download.html.erb_spec.rb +0 -5
- data/spec/views/single_user_link/generate_download.html.erb_spec.rb +0 -5
- data/spec/views/single_user_link/generate_show.html.erb_spec.rb +0 -5
- data/spec/views/single_user_link/show.html.erb_spec.rb +0 -5
- data/tasks/cucumber.rake +0 -72
data/features/users.feature
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
Feature: User Profile
|
2
|
-
|
3
|
-
Scenario: Show my profile
|
4
|
-
Given I load users
|
5
|
-
Given I am logged in as "curator1@example.com"
|
6
|
-
And I follow "curator1@example.com"
|
7
|
-
Then I should see "Edit Your Profile"
|
8
|
-
|
9
|
-
Scenario: Edit my profile
|
10
|
-
Given I load users
|
11
|
-
Given I am logged in as "curator1@example.com"
|
12
|
-
And I follow "curator1@example.com"
|
13
|
-
And I follow "Edit Your Profile"
|
14
|
-
And I fill in "user_twitter_handle" with "curatorOfData"
|
15
|
-
And I press "Save Profile"
|
16
|
-
Then I should see "Your profile has been updated"
|
17
|
-
And I should see "curatorOfData"
|
18
|
-
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# Copyright © 2012 The Pennsylvania State University
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
require 'spec_helper'
|
16
|
-
|
17
|
-
describe RoleMapper do
|
18
|
-
before do
|
19
|
-
@user = FactoryGirl.create(:user)
|
20
|
-
User.any_instance.stub(:groups).and_return(["umg/up.dlt.gamma-ci", "umg/up.dlt.redmine"])
|
21
|
-
end
|
22
|
-
subject {::RoleMapper.roles(@user.user_key)}
|
23
|
-
it "should return LDAP groups" do
|
24
|
-
pending "This is for Penn only"
|
25
|
-
subject.should == ["umg/up.dlt.gamma-ci", "umg/up.dlt.redmine"]
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
data/spec/support/Gemfile
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
gem 'rails', '3.2.13'
|
4
|
-
|
5
|
-
gem 'sqlite3'
|
6
|
-
|
7
|
-
gem 'devise' #BL adds this later, so check to see if we can remove this
|
8
|
-
gem 'blacklight'
|
9
|
-
gem 'hydra-head'
|
10
|
-
gem 'hydra-batch-edit', '~>1.0.1'
|
11
|
-
|
12
|
-
|
13
|
-
gem 'sufia', :path=>'../../'
|
14
|
-
gem 'rspec-rails', :group=>:test
|
15
|
-
gem 'capybara', :group=>:test
|
16
|
-
|
17
|
-
gem 'factory_girl'
|
18
|
-
|
19
|
-
group :assets do
|
20
|
-
gem 'sass-rails', '~> 3.2.3'
|
21
|
-
gem 'coffee-rails', '~> 3.2.1'
|
22
|
-
gem 'jquery-rails'
|
23
|
-
gem 'font-awesome-sass-rails'
|
24
|
-
end
|
data/tasks/cucumber.rake
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
# Copyright © 2012 The Pennsylvania State University
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
|
16
|
-
# It is recommended to regenerate this file in the future when you upgrade to a
|
17
|
-
# newer version of cucumber-rails. Consider adding your own code to a new file
|
18
|
-
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
|
19
|
-
# files.
|
20
|
-
|
21
|
-
|
22
|
-
unless ARGV.any? {|a| a =~ /^gems/} # Don't load anything when running the gems:* tasks
|
23
|
-
|
24
|
-
begin
|
25
|
-
require 'cucumber/rake/task'
|
26
|
-
|
27
|
-
namespace :cucumber do
|
28
|
-
Cucumber::Rake::Task.new({:ok => 'db:test:prepare'}, 'Run features that should pass') do |t|
|
29
|
-
t.fork = true # You may get faster startup if you set this to false
|
30
|
-
t.profile = 'default'
|
31
|
-
end
|
32
|
-
|
33
|
-
Cucumber::Rake::Task.new({:wip => 'db:test:prepare'}, 'Run features that are being worked on') do |t|
|
34
|
-
t.fork = true # You may get faster startup if you set this to false
|
35
|
-
t.profile = 'wip'
|
36
|
-
end
|
37
|
-
|
38
|
-
Cucumber::Rake::Task.new({:rerun => 'db:test:prepare'}, 'Record failing features and run only them if any exist') do |t|
|
39
|
-
t.fork = true # You may get faster startup if you set this to false
|
40
|
-
t.profile = 'rerun'
|
41
|
-
end
|
42
|
-
|
43
|
-
desc 'Run all features'
|
44
|
-
task :all => [:ok, :wip]
|
45
|
-
|
46
|
-
task :statsetup do
|
47
|
-
require 'rails/code_statistics'
|
48
|
-
::STATS_DIRECTORIES << %w(Cucumber\ features features) if File.exist?('features')
|
49
|
-
::CodeStatistics::TEST_TYPES << "Cucumber features" if File.exist?('features')
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
desc 'Alias for cucumber:ok'
|
54
|
-
task :cucumber => 'cucumber:ok'
|
55
|
-
|
56
|
-
task :features => :cucumber do
|
57
|
-
STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***"
|
58
|
-
end
|
59
|
-
|
60
|
-
# In case we don't have ActiveRecord, append a no-op task that we can depend upon.
|
61
|
-
task 'db:test:prepare' do
|
62
|
-
end
|
63
|
-
|
64
|
-
task :stats => 'cucumber:statsetup'
|
65
|
-
rescue LoadError
|
66
|
-
desc 'cucumber rake task not available (cucumber not installed)'
|
67
|
-
task :cucumber do
|
68
|
-
abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
end
|