sufia 2.0.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +111 -0
  3. data/Gemfile +4 -4
  4. data/History.md +126 -0
  5. data/README.md +23 -5
  6. data/SUFIA_VERSION +1 -1
  7. data/app/assets/javascripts/sufia/multiForm.js +10 -2
  8. data/app/assets/stylesheets/{application-bootstrap.css → application-bootstrap.css.erb} +7 -7
  9. data/app/assets/stylesheets/{bootstrap.min.css → bootstrap.min.css.erb} +1 -1
  10. data/app/controllers/concerns/sufia/users_controller_behavior.rb +9 -3
  11. data/app/controllers/single_use_link_controller.rb +1 -1
  12. data/app/helpers/sufia_helper.rb +7 -1
  13. data/app/models/contact_form.rb +0 -14
  14. data/app/views/_user_util_links.html.erb +0 -15
  15. data/app/views/batch_edits/_check_all.html.erb +2 -2
  16. data/app/views/batch_edits/_delete_selected.html.erb +1 -1
  17. data/app/views/layouts/{_head-tag-content.html.erb → _head_tag_content.html.erb} +0 -0
  18. data/app/views/layouts/homepage.html.erb +2 -2
  19. data/app/views/layouts/sufia-one-column.html.erb +1 -1
  20. data/app/views/layouts/sufia-two-column.html.erb +1 -1
  21. data/app/views/users/edit.html.erb +1 -1
  22. data/app/views/users/show.html.erb +1 -17
  23. data/config/routes.rb +31 -33
  24. data/lib/generators/sufia/sufia_generator.rb +5 -3
  25. data/lib/generators/sufia/templates/catalog_controller.rb +5 -1
  26. data/lib/generators/sufia/templates/config/redis_config.rb +1 -14
  27. data/lib/sufia/batch_edits_controller_behavior.rb +1 -1
  28. data/lib/sufia/controller.rb +1 -1
  29. data/lib/sufia/dashboard_controller_behavior.rb +8 -2
  30. data/lib/sufia/files_controller_behavior.rb +1 -2
  31. data/lib/sufia/version.rb +1 -1
  32. data/spec/active_fedora/unsaved_digital_object_spec.rb +1 -15
  33. data/spec/controllers/authorities_controller_spec.rb +1 -15
  34. data/spec/controllers/batch_controller_spec.rb +10 -16
  35. data/spec/controllers/batch_edits_controller_spec.rb +1 -1
  36. data/spec/controllers/catalog_controller_spec.rb +1 -15
  37. data/spec/controllers/dashboard_controller_spec.rb +23 -17
  38. data/spec/controllers/downloads_controller_spec.rb +1 -15
  39. data/spec/controllers/generic_files_controller_spec.rb +18 -32
  40. data/spec/controllers/mailbox_controller_spec.rb +1 -15
  41. data/spec/controllers/single_use_link_controller_spec.rb +6 -13
  42. data/spec/controllers/users_controller_spec.rb +27 -41
  43. data/spec/factories/users.rb +5 -14
  44. data/spec/features/browse_dashboard_files.rb +21 -0
  45. data/spec/features/browse_files.rb +31 -0
  46. data/spec/features/contact_form.rb +99 -0
  47. data/spec/features/display_dashboard.rb +46 -0
  48. data/spec/features/ingest_upload_files.rb +24 -0
  49. data/spec/features/users_spec.rb +25 -0
  50. data/spec/helpers/generic_file_helper_spec.rb +10 -3
  51. data/spec/helpers/sufia_helper_spec.rb +1 -1
  52. data/spec/lib/sufia/id_service_spec.rb +1 -15
  53. data/spec/models/audit_job_spec.rb +1 -15
  54. data/spec/models/batch_spec.rb +1 -15
  55. data/spec/models/batch_update_job_spec.rb +3 -16
  56. data/spec/models/characterize_job_spec.rb +4 -4
  57. data/spec/models/checksum_audit_log_spec.rb +1 -15
  58. data/spec/models/event_jobs_spec.rb +1 -15
  59. data/spec/models/file_content_datastream_spec.rb +5 -19
  60. data/spec/models/fits_datastream_spec.rb +1 -15
  61. data/spec/models/generic_file/web_form_spec.rb +34 -0
  62. data/spec/models/generic_file_spec.rb +11 -39
  63. data/spec/models/local_authority_spec.rb +3 -15
  64. data/spec/models/properties_datastream_spec.rb +1 -1
  65. data/spec/models/single_use_link_spec.rb +1 -1
  66. data/spec/models/solr_document_spec.rb +1 -1
  67. data/spec/models/transcode_audio_job_spec.rb +1 -1
  68. data/spec/models/transcode_video_job_spec.rb +1 -1
  69. data/spec/models/trophy_spec.rb +1 -1
  70. data/spec/models/unzip_job_spec.rb +1 -15
  71. data/spec/models/user_spec.rb +1 -15
  72. data/spec/rake/sufia_fixtures_spec.rb +3 -17
  73. data/spec/routing/route_spec.rb +7 -21
  74. data/spec/spec_helper.rb +8 -20
  75. data/spec/support/features.rb +6 -0
  76. data/spec/support/features/session_helpers.rb +21 -0
  77. data/spec/support/lib/generators/test_app_generator.rb +4 -0
  78. data/spec/views/batch_edits/check_all_spec.rb +6 -4
  79. data/sufia-models/app/models/checksum_audit_log.rb +1 -15
  80. data/sufia-models/app/models/domain_term.rb +3 -15
  81. data/sufia-models/app/models/geo_names_resource.rb +1 -13
  82. data/sufia-models/app/models/local_authority.rb +12 -17
  83. data/sufia-models/app/models/local_authority_entry.rb +1 -15
  84. data/sufia-models/app/models/single_use_link.rb +2 -3
  85. data/sufia-models/app/models/trophy.rb +1 -1
  86. data/sufia-models/app/models/version_committer.rb +1 -15
  87. data/sufia-models/lib/sufia/models.rb +6 -2
  88. data/sufia-models/lib/sufia/models/engine.rb +1 -1
  89. data/sufia-models/lib/sufia/models/generic_file.rb +3 -0
  90. data/sufia-models/lib/sufia/models/generic_file/accessible_attributes.rb +87 -0
  91. data/sufia-models/lib/sufia/models/generic_file/permissions.rb +2 -1
  92. data/sufia-models/lib/sufia/models/generic_file/web_form.rb +4 -1
  93. data/sufia-models/lib/sufia/models/user.rb +9 -2
  94. data/sufia-models/lib/sufia/models/version.rb +1 -1
  95. data/{lib → sufia-models/lib}/tasks/resque.rake +0 -0
  96. data/sufia-models/sufia-models.gemspec +13 -11
  97. data/sufia.gemspec +1 -3
  98. data/tasks/sufia-dev.rake +21 -10
  99. metadata +30 -84
  100. data/config/cucumber.yml +0 -8
  101. data/features/browse_dashboard_files.feature +0 -16
  102. data/features/browse_files.feature +0 -16
  103. data/features/contact_form.feature +0 -86
  104. data/features/display_dashboard.feature +0 -42
  105. data/features/ingest_upload_files.feature +0 -21
  106. data/features/step_definitions/edit_metadata_steps.rb +0 -89
  107. data/features/step_definitions/fixture_steps.rb +0 -35
  108. data/features/step_definitions/show_document_steps.rb +0 -103
  109. data/features/step_definitions/sufia.rb +0 -69
  110. data/features/step_definitions/user_steps.rb +0 -58
  111. data/features/step_definitions/web_steps.rb +0 -235
  112. data/features/support/cleanup.rb +0 -19
  113. data/features/support/env.rb +0 -90
  114. data/features/support/headless.rb +0 -26
  115. data/features/support/paths.rb +0 -101
  116. data/features/users.feature +0 -18
  117. data/spec/lib/sufia/role_mapper_spec.rb +0 -28
  118. data/spec/support/Gemfile +0 -24
  119. data/spec/views/single_user_link/download.html.erb_spec.rb +0 -5
  120. data/spec/views/single_user_link/generate_download.html.erb_spec.rb +0 -5
  121. data/spec/views/single_user_link/generate_show.html.erb_spec.rb +0 -5
  122. data/spec/views/single_user_link/show.html.erb_spec.rb +0 -5
  123. data/tasks/cucumber.rake +0 -72
@@ -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
@@ -1,5 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe "single_user_link/download.html.erb" do
4
- pending "add some examples to (or delete) #{__FILE__}"
5
- end
@@ -1,5 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe "single_user_link/generate_download.html.erb" do
4
- pending "add some examples to (or delete) #{__FILE__}"
5
- end
@@ -1,5 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe "single_user_link/generate_show.html.erb" do
4
- pending "add some examples to (or delete) #{__FILE__}"
5
- end
@@ -1,5 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe "single_user_link/show.html.erb" do
4
- pending "add some examples to (or delete) #{__FILE__}"
5
- 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