curate 0.6.4 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/curate/organizations_controller.rb +96 -0
  3. data/app/helpers/curate/organizations_helper.rb +13 -0
  4. data/app/helpers/curate_helper.rb +4 -0
  5. data/app/models/concerns/curate/ability.rb +8 -0
  6. data/app/models/curate/user_behavior/base.rb +13 -0
  7. data/app/repository_models/collection.rb +1 -0
  8. data/app/repository_models/curation_concern/model.rb +1 -0
  9. data/app/repository_models/organization.rb +17 -0
  10. data/app/repository_models/person.rb +1 -0
  11. data/app/repository_models/profile_section.rb +1 -0
  12. data/app/views/curate/organizations/_button_create_organization.html.erb +1 -0
  13. data/app/views/curate/organizations/_document_list.html.erb +11 -0
  14. data/app/views/curate/organizations/_form.html.erb +49 -0
  15. data/app/views/curate/organizations/_organization.html.erb +24 -0
  16. data/app/views/curate/organizations/edit.html.erb +4 -0
  17. data/app/views/curate/organizations/index.html.erb +11 -0
  18. data/app/views/curate/organizations/new.html.erb +4 -0
  19. data/app/views/curate/organizations/show.html.erb +27 -0
  20. data/app/views/organizations/_organization.html.erb +30 -0
  21. data/app/views/shared/_add_content.html.erb +1 -0
  22. data/lib/curate/rails/routes.rb +1 -0
  23. data/lib/curate/version.rb +1 -1
  24. data/lib/generators/curate/application_template.rb +1 -1
  25. data/lib/generators/curate/curate_generator.rb +3 -0
  26. data/spec/abilities/generic_file_abilities_spec.rb +12 -0
  27. data/spec/abilities/generic_work_abilities_spec.rb +12 -0
  28. data/spec/controllers/curate/organizations_controller_spec.rb +50 -0
  29. data/spec/factories/organizations_factory.rb +21 -0
  30. data/spec/internal/Gemfile +4 -22
  31. data/spec/internal/Gemfile.lock +1 -376
  32. data/spec/internal/app/assets/javascripts/application.js +0 -4
  33. data/spec/internal/app/assets/stylesheets/application.css +0 -1
  34. data/spec/internal/app/controllers/application_controller.rb +0 -9
  35. data/spec/internal/config/application.rb +0 -6
  36. data/spec/internal/config/environments/test.rb +1 -2
  37. data/spec/internal/config/initializers/mime_types.rb +1 -8
  38. data/spec/internal/config/initializers/secret_token.rb +1 -1
  39. data/spec/internal/config/locales/en.yml +20 -11
  40. data/spec/internal/config/routes.rb +0 -8
  41. data/spec/internal/db/development.sqlite3 +0 -0
  42. data/spec/internal/db/schema.rb +1 -216
  43. data/spec/internal/db/test.sqlite3 +0 -0
  44. data/spec/internal/lib/generators/test_app_generator.rb +2 -23
  45. data/spec/internal/log/development.log +4 -323
  46. data/spec/repository_models/organization_spec.rb +66 -0
  47. metadata +20 -160
  48. data/spec/internal/app/assets/images/blacklight/bg.png +0 -0
  49. data/spec/internal/app/assets/images/blacklight/border.png +0 -0
  50. data/spec/internal/app/assets/images/blacklight/bul_sq_gry.gif +0 -0
  51. data/spec/internal/app/assets/images/blacklight/checkmark.gif +0 -0
  52. data/spec/internal/app/assets/images/blacklight/logo.png +0 -0
  53. data/spec/internal/app/assets/images/blacklight/magnifying_glass.gif +0 -0
  54. data/spec/internal/app/assets/images/blacklight/remove.gif +0 -0
  55. data/spec/internal/app/assets/images/blacklight/separator.gif +0 -0
  56. data/spec/internal/app/assets/images/blacklight/start_over.gif +0 -0
  57. data/spec/internal/app/models/ability.rb +0 -20
  58. data/spec/internal/app/models/solr_document.rb +0 -38
  59. data/spec/internal/app/models/user.rb +0 -23
  60. data/spec/internal/config/SolrMarc/config-test.properties +0 -37
  61. data/spec/internal/config/SolrMarc/config.properties +0 -37
  62. data/spec/internal/config/SolrMarc/index.properties +0 -97
  63. data/spec/internal/config/SolrMarc/index_scripts/dewey.bsh +0 -47
  64. data/spec/internal/config/SolrMarc/index_scripts/format.bsh +0 -126
  65. data/spec/internal/config/SolrMarc/translation_maps/README_MAPS +0 -1
  66. data/spec/internal/config/SolrMarc/translation_maps/callnumber_map.properties +0 -407
  67. data/spec/internal/config/SolrMarc/translation_maps/composition_era_map.properties +0 -56
  68. data/spec/internal/config/SolrMarc/translation_maps/country_map.properties +0 -379
  69. data/spec/internal/config/SolrMarc/translation_maps/format_map.properties +0 -50
  70. data/spec/internal/config/SolrMarc/translation_maps/instrument_map.properties +0 -101
  71. data/spec/internal/config/SolrMarc/translation_maps/language_map.properties +0 -490
  72. data/spec/internal/config/doi.yml +0 -5
  73. data/spec/internal/config/fedora.yml +0 -14
  74. data/spec/internal/config/initializers/action_dispatch_http_upload_monkey_patch.rb +0 -12
  75. data/spec/internal/config/initializers/curate_config.rb +0 -24
  76. data/spec/internal/config/initializers/devise.rb +0 -254
  77. data/spec/internal/config/initializers/hydra-remote_identifier_config.rb +0 -29
  78. data/spec/internal/config/initializers/hydra_config.rb +0 -28
  79. data/spec/internal/config/initializers/mailboxer.rb +0 -17
  80. data/spec/internal/config/initializers/redis_config.rb +0 -32
  81. data/spec/internal/config/initializers/resque_admin.rb +0 -10
  82. data/spec/internal/config/initializers/resque_config.rb +0 -5
  83. data/spec/internal/config/initializers/sufia.rb +0 -81
  84. data/spec/internal/config/jetty.yml +0 -5
  85. data/spec/internal/config/locales/devise.en.yml +0 -59
  86. data/spec/internal/config/recipients_list.yml +0 -2
  87. data/spec/internal/config/redis.yml +0 -6
  88. data/spec/internal/config/role_map_cucumber.yml +0 -10
  89. data/spec/internal/config/role_map_development.yml +0 -12
  90. data/spec/internal/config/role_map_production.yml +0 -2
  91. data/spec/internal/config/role_map_test.yml +0 -15
  92. data/spec/internal/config/solr.yml +0 -10
  93. data/spec/internal/db/migrate/20140131175455_devise_create_users.rb +0 -42
  94. data/spec/internal/db/migrate/20140131175500_add_devise_guests_to_users.rb +0 -15
  95. data/spec/internal/db/migrate/20140131175501_create_searches.rb +0 -16
  96. data/spec/internal/db/migrate/20140131175502_create_bookmarks.rb +0 -18
  97. data/spec/internal/db/migrate/20140131175503_remove_editable_fields_from_bookmarks.rb +0 -12
  98. data/spec/internal/db/migrate/20140131175504_add_user_types_to_bookmarks_searches.rb +0 -16
  99. data/spec/internal/db/migrate/20140131175505_acts_as_follower_migration.rb +0 -17
  100. data/spec/internal/db/migrate/20140131175506_add_social_to_users.rb +0 -13
  101. data/spec/internal/db/migrate/20140131175507_create_single_use_links.rb +0 -12
  102. data/spec/internal/db/migrate/20140131175508_add_ldap_attrs_to_user.rb +0 -27
  103. data/spec/internal/db/migrate/20140131175509_add_avatars_to_users.rb +0 -9
  104. data/spec/internal/db/migrate/20140131175510_create_checksum_audit_logs.rb +0 -20
  105. data/spec/internal/db/migrate/20140131175511_create_version_committers.rb +0 -15
  106. data/spec/internal/db/migrate/20140131175512_add_groups_to_users.rb +0 -11
  107. data/spec/internal/db/migrate/20140131175513_create_local_authorities.rb +0 -50
  108. data/spec/internal/db/migrate/20140131175514_create_trophies.rb +0 -10
  109. data/spec/internal/db/migrate/20140131175536_create_mailboxer.mailboxer_engine.rb +0 -62
  110. data/spec/internal/db/migrate/20140131175537_add_notified_object.mailboxer_engine.rb +0 -18
  111. data/spec/internal/db/migrate/20140131175538_add_notification_code.mailboxer_engine.rb +0 -14
  112. data/spec/internal/db/migrate/20140131175539_add_attachments.mailboxer_engine.rb +0 -10
  113. data/spec/internal/db/migrate/20140131175540_rename_receipts_read.mailboxer_engine.rb +0 -10
  114. data/spec/internal/db/migrate/20140131175541_add_global_notification_support.mailboxer_engine.rb +0 -10
  115. data/spec/internal/db/migrate/20140131175545_add_terms_of_service_to_user.curate_engine.rb +0 -6
  116. data/spec/internal/db/migrate/20140131175546_add_user_force_update_profile.curate_engine.rb +0 -9
  117. data/spec/internal/db/migrate/20140131175547_create_help_requests.curate_engine.rb +0 -23
  118. data/spec/internal/db/migrate/20140131175548_add_repository_id_to_user.curate_engine.rb +0 -7
  119. data/spec/internal/db/migrate/20140131175549_create_curate_proxy_deposit_rights.curate_engine.rb +0 -12
  120. data/spec/internal/db/migrate/20140131175550_change_display_name_to_name.curate_engine.rb +0 -7
  121. data/spec/internal/fedora_conf/conf/development/fedora.fcfg +0 -953
  122. data/spec/internal/fedora_conf/conf/test/fedora.fcfg +0 -953
  123. data/spec/internal/solr_conf/conf/schema.xml +0 -273
  124. data/spec/internal/solr_conf/conf/solrconfig.xml +0 -167
  125. data/spec/internal/solr_conf/solr.xml +0 -35
  126. data/spec/internal/test/models/user_test.rb +0 -7
@@ -1,5 +0,0 @@
1
- ---
2
- :username: apitest
3
- :password: apitest
4
- :shoulder: doi:10.5072/FK2
5
- :url: https://n2t.net/ezid/
@@ -1,14 +0,0 @@
1
- development:
2
- user: fedoraAdmin
3
- password: fedoraAdmin
4
- url: http://127.0.0.1:8983/fedora
5
- test: &TEST
6
- user: fedoraAdmin
7
- password: fedoraAdmin
8
- url: <%= "http://127.0.0.1:#{ENV['TEST_JETTY_PORT'] || 8983}/fedora-test" %>
9
- production:
10
- user: fedoraAdmin
11
- password: fedoraAdmin
12
- url: http://your.production.server:8080/fedora
13
- cucumber:
14
- <<: *TEST
@@ -1,12 +0,0 @@
1
- module ActionDispatch
2
- module Http
3
- class UploadedFile
4
- def closed?
5
- @tempfile.closed?
6
- end
7
- def close
8
- @tempfile.close
9
- end
10
- end
11
- end
12
- end
@@ -1,24 +0,0 @@
1
- Curate.configure do |config|
2
- config.application_root_url = 'http://localhost'
3
- config.default_antivirus_instance = lambda {|file_path|
4
- AntiVirusScanner::NO_VIRUS_FOUND_RETURN_VALUE
5
- }
6
- config.characterization_runner = lambda {|file_path|
7
- Curate::Engine.root.join('spec/support/files/default_fits_output.xml').read
8
- }
9
- config.register_curation_concern :generic_work
10
- config.register_curation_concern :dataset
11
- config.register_curation_concern :article
12
- config.register_curation_concern :etd
13
- config.register_curation_concern :image
14
- config.register_curation_concern :document
15
- # # You can override curate's antivirus runner by configuring a lambda (or
16
- # # object that responds to call)
17
- # config.default_antivirus_instance = lambda {|filename| … }
18
-
19
- # # Used for constructing permanent URLs
20
- # config.application_root_url = 'https://repository.higher.edu/'
21
-
22
- # # Override the file characterization runner that is used
23
- # config.characterization_runner = lambda {|filename| … }
24
- end
@@ -1,254 +0,0 @@
1
- # Use this hook to configure devise mailer, warden hooks and so forth.
2
- # Many of these configuration options can be set straight in your model.
3
- Devise.setup do |config|
4
- # The secret key used by Devise. Devise uses this key to generate
5
- # random tokens. Changing this key will render invalid all existing
6
- # confirmation, reset password and unlock tokens in the database.
7
- config.secret_key = '66b8872a8ff57be9e0bd2dbea4bfcb9ad6f55b461f590102c2ac7faf1e7157a57520a7df14405b2cc46172ba5834255da5be510a41ddba9924d4a8554a03eab0'
8
-
9
- # ==> Mailer Configuration
10
- # Configure the e-mail address which will be shown in Devise::Mailer,
11
- # note that it will be overwritten if you use your own mailer class
12
- # with default "from" parameter.
13
- config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
14
-
15
- # Configure the class responsible to send e-mails.
16
- # config.mailer = 'Devise::Mailer'
17
-
18
- # ==> ORM configuration
19
- # Load and configure the ORM. Supports :active_record (default) and
20
- # :mongoid (bson_ext recommended) by default. Other ORMs may be
21
- # available as additional gems.
22
- require 'devise/orm/active_record'
23
-
24
- # ==> Configuration for any authentication mechanism
25
- # Configure which keys are used when authenticating a user. The default is
26
- # just :email. You can configure it to use [:username, :subdomain], so for
27
- # authenticating a user, both parameters are required. Remember that those
28
- # parameters are used only when authenticating and not when retrieving from
29
- # session. If you need permissions, you should implement that in a before filter.
30
- # You can also supply a hash where the value is a boolean determining whether
31
- # or not authentication should be aborted when the value is not present.
32
- # config.authentication_keys = [ :email ]
33
-
34
- # Configure parameters from the request object used for authentication. Each entry
35
- # given should be a request method and it will automatically be passed to the
36
- # find_for_authentication method and considered in your model lookup. For instance,
37
- # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
38
- # The same considerations mentioned for authentication_keys also apply to request_keys.
39
- # config.request_keys = []
40
-
41
- # Configure which authentication keys should be case-insensitive.
42
- # These keys will be downcased upon creating or modifying a user and when used
43
- # to authenticate or find a user. Default is :email.
44
- config.case_insensitive_keys = [ :email ]
45
-
46
- # Configure which authentication keys should have whitespace stripped.
47
- # These keys will have whitespace before and after removed upon creating or
48
- # modifying a user and when used to authenticate or find a user. Default is :email.
49
- config.strip_whitespace_keys = [ :email ]
50
-
51
- # Tell if authentication through request.params is enabled. True by default.
52
- # It can be set to an array that will enable params authentication only for the
53
- # given strategies, for example, `config.params_authenticatable = [:database]` will
54
- # enable it only for database (email + password) authentication.
55
- # config.params_authenticatable = true
56
-
57
- # Tell if authentication through HTTP Auth is enabled. False by default.
58
- # It can be set to an array that will enable http authentication only for the
59
- # given strategies, for example, `config.http_authenticatable = [:database]` will
60
- # enable it only for database authentication. The supported strategies are:
61
- # :database = Support basic authentication with authentication key + password
62
- # config.http_authenticatable = false
63
-
64
- # If http headers should be returned for AJAX requests. True by default.
65
- # config.http_authenticatable_on_xhr = true
66
-
67
- # The realm used in Http Basic Authentication. 'Application' by default.
68
- # config.http_authentication_realm = 'Application'
69
-
70
- # It will change confirmation, password recovery and other workflows
71
- # to behave the same regardless if the e-mail provided was right or wrong.
72
- # Does not affect registerable.
73
- # config.paranoid = true
74
-
75
- # By default Devise will store the user in session. You can skip storage for
76
- # particular strategies by setting this option.
77
- # Notice that if you are skipping storage for all authentication paths, you
78
- # may want to disable generating routes to Devise's sessions controller by
79
- # passing :skip => :sessions to `devise_for` in your config/routes.rb
80
- config.skip_session_storage = [:http_auth]
81
-
82
- # By default, Devise cleans up the CSRF token on authentication to
83
- # avoid CSRF token fixation attacks. This means that, when using AJAX
84
- # requests for sign in and sign up, you need to get a new CSRF token
85
- # from the server. You can disable this option at your own risk.
86
- # config.clean_up_csrf_token_on_authentication = true
87
-
88
- # ==> Configuration for :database_authenticatable
89
- # For bcrypt, this is the cost for hashing the password and defaults to 10. If
90
- # using other encryptors, it sets how many times you want the password re-encrypted.
91
- #
92
- # Limiting the stretches to just one in testing will increase the performance of
93
- # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
94
- # a value less than 10 in other environments.
95
- config.stretches = Rails.env.test? ? 1 : 10
96
-
97
- # Setup a pepper to generate the encrypted password.
98
- # config.pepper = '25811be9198a0b94161ab5eebf4e1c28b4f498aeac376584530fada3844869de16b57f043f74e69d466429e0228c6d9e30caa22cdb33a194a76b4ed00fca3359'
99
-
100
- # ==> Configuration for :confirmable
101
- # A period that the user is allowed to access the website even without
102
- # confirming his account. For instance, if set to 2.days, the user will be
103
- # able to access the website for two days without confirming his account,
104
- # access will be blocked just in the third day. Default is 0.days, meaning
105
- # the user cannot access the website without confirming his account.
106
- # config.allow_unconfirmed_access_for = 2.days
107
-
108
- # A period that the user is allowed to confirm their account before their
109
- # token becomes invalid. For example, if set to 3.days, the user can confirm
110
- # their account within 3 days after the mail was sent, but on the fourth day
111
- # their account can't be confirmed with the token any more.
112
- # Default is nil, meaning there is no restriction on how long a user can take
113
- # before confirming their account.
114
- # config.confirm_within = 3.days
115
-
116
- # If true, requires any email changes to be confirmed (exactly the same way as
117
- # initial account confirmation) to be applied. Requires additional unconfirmed_email
118
- # db field (see migrations). Until confirmed new email is stored in
119
- # unconfirmed email column, and copied to email column on successful confirmation.
120
- config.reconfirmable = true
121
-
122
- # Defines which key will be used when confirming an account
123
- # config.confirmation_keys = [ :email ]
124
-
125
- # ==> Configuration for :rememberable
126
- # The time the user will be remembered without asking for credentials again.
127
- # config.remember_for = 2.weeks
128
-
129
- # If true, extends the user's remember period when remembered via cookie.
130
- # config.extend_remember_period = false
131
-
132
- # Options to be passed to the created cookie. For instance, you can set
133
- # :secure => true in order to force SSL only cookies.
134
- # config.rememberable_options = {}
135
-
136
- # ==> Configuration for :validatable
137
- # Range for password length. Default is 8..128.
138
- config.password_length = 8..128
139
-
140
- # Email regex used to validate email formats. It simply asserts that
141
- # one (and only one) @ exists in the given string. This is mainly
142
- # to give user feedback and not to assert the e-mail validity.
143
- # config.email_regexp = /\A[^@]+@[^@]+\z/
144
-
145
- # ==> Configuration for :timeoutable
146
- # The time you want to timeout the user session without activity. After this
147
- # time the user will be asked for credentials again. Default is 30 minutes.
148
- # config.timeout_in = 30.minutes
149
-
150
- # If true, expires auth token on session timeout.
151
- # config.expire_auth_token_on_timeout = false
152
-
153
- # ==> Configuration for :lockable
154
- # Defines which strategy will be used to lock an account.
155
- # :failed_attempts = Locks an account after a number of failed attempts to sign in.
156
- # :none = No lock strategy. You should handle locking by yourself.
157
- # config.lock_strategy = :failed_attempts
158
-
159
- # Defines which key will be used when locking and unlocking an account
160
- # config.unlock_keys = [ :email ]
161
-
162
- # Defines which strategy will be used to unlock an account.
163
- # :email = Sends an unlock link to the user email
164
- # :time = Re-enables login after a certain amount of time (see :unlock_in below)
165
- # :both = Enables both strategies
166
- # :none = No unlock strategy. You should handle unlocking by yourself.
167
- # config.unlock_strategy = :both
168
-
169
- # Number of authentication tries before locking an account if lock_strategy
170
- # is failed attempts.
171
- # config.maximum_attempts = 20
172
-
173
- # Time interval to unlock the account if :time is enabled as unlock_strategy.
174
- # config.unlock_in = 1.hour
175
-
176
- # Warn on the last attempt before the account is locked.
177
- # config.last_attempt_warning = false
178
-
179
- # ==> Configuration for :recoverable
180
- #
181
- # Defines which key will be used when recovering the password for an account
182
- # config.reset_password_keys = [ :email ]
183
-
184
- # Time interval you can reset your password with a reset password key.
185
- # Don't put a too small interval or your users won't have the time to
186
- # change their passwords.
187
- config.reset_password_within = 6.hours
188
-
189
- # ==> Configuration for :encryptable
190
- # Allow you to use another encryption algorithm besides bcrypt (default). You can use
191
- # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
192
- # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
193
- # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
194
- # REST_AUTH_SITE_KEY to pepper).
195
- #
196
- # Require the `devise-encryptable` gem when using anything other than bcrypt
197
- # config.encryptor = :sha512
198
-
199
- # ==> Scopes configuration
200
- # Turn scoped views on. Before rendering "sessions/new", it will first check for
201
- # "users/sessions/new". It's turned off by default because it's slower if you
202
- # are using only default views.
203
- # config.scoped_views = false
204
-
205
- # Configure the default scope given to Warden. By default it's the first
206
- # devise role declared in your routes (usually :user).
207
- # config.default_scope = :user
208
-
209
- # Set this configuration to false if you want /users/sign_out to sign out
210
- # only the current scope. By default, Devise signs out all scopes.
211
- # config.sign_out_all_scopes = true
212
-
213
- # ==> Navigation configuration
214
- # Lists the formats that should be treated as navigational. Formats like
215
- # :html, should redirect to the sign in page when the user does not have
216
- # access, but formats like :xml or :json, should return 401.
217
- #
218
- # If you have any extra navigational formats, like :iphone or :mobile, you
219
- # should add them to the navigational formats lists.
220
- #
221
- # The "*/*" below is required to match Internet Explorer requests.
222
- # config.navigational_formats = ['*/*', :html]
223
-
224
- # The default HTTP method used to sign out a resource. Default is :delete.
225
- config.sign_out_via = :get
226
-
227
- # ==> OmniAuth
228
- # Add a new OmniAuth provider. Check the wiki for more information on setting
229
- # up on your models and hooks.
230
- # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
231
-
232
- # ==> Warden configuration
233
- # If you want to use other strategies, that are not supported by Devise, or
234
- # change the failure app, you can configure them inside the config.warden block.
235
- #
236
- # config.warden do |manager|
237
- # manager.intercept_401 = false
238
- # manager.default_strategies(:scope => :user).unshift :some_external_strategy
239
- # end
240
-
241
- # ==> Mountable engine configurations
242
- # When using Devise inside an engine, let's call it `MyEngine`, and this engine
243
- # is mountable, there are some extra configurations to be taken into account.
244
- # The following options are available, assuming the engine is mounted as:
245
- #
246
- # mount MyEngine, at: '/my_engine'
247
- #
248
- # The router that invoked `devise_for`, in the example above, would be:
249
- # config.router_name = :my_engine
250
- #
251
- # When using omniauth, Devise cannot automatically set Omniauth path,
252
- # so you need to do it manually. For the users scope, it would be:
253
- # config.omniauth_path_prefix = '/my_engine/users/auth'
254
- end
@@ -1,29 +0,0 @@
1
- # Register and configure remote identifiers for persisted objects
2
- Hydra::RemoteIdentifier.configure do |config|
3
- doi_credentials = Psych.load_file(Rails.root.join("config/doi.yml"))
4
- config.remote_service(:doi, doi_credentials) do |doi|
5
- doi.register(GenericWork, Dataset, Article, Etd, Image, Document) do |map|
6
- map.target {|obj| Curate.permanent_url_for(obj) }
7
- map.creator :creator
8
- map.title :title
9
- map.publisher {|o| Array(o.publisher).join("; ")}
10
- map.publicationyear {|o| o.date_uploaded.year }
11
- # Make sure that this method both sets the identifier and persists the change!
12
- map.set_identifier {|o,value| o.identifier = value; o.save }
13
- end
14
- end
15
-
16
- # doi_credentials = Psych.load_file("/path/to/doi_credentials.yml")
17
- # config.remote_service(:doi, doi_credentials) do |doi|
18
- # doi.register(PersistedObject) do |map|
19
- # map.target :url
20
- # map.creator {|obj| obj.person_name }
21
- # map.title :title
22
- # map.publisher :publisher
23
- # map.publicationyear :publicationyear
24
- #
25
- # # Make sure that this method persists the value
26
- # map.set_identifier :set_doi_identifier=
27
- # end
28
- # end
29
- end
@@ -1,28 +0,0 @@
1
- # The following lines determine which user attributes your hydrangea app will use
2
- # This configuration allows you to use the out of the box ActiveRecord associations between users and user_attributes
3
- # It also allows you to specify your own user attributes
4
- # The easiest way to override these methods would be to create your own module to include in User
5
- # For example you could create a module for your local LDAP instance called MyLocalLDAPUserAttributes:
6
- # User.send(:include, MyLocalLDAPAttributes)
7
- # As long as your module includes methods for full_name, affiliation, and photo the personalization_helper should function correctly
8
- #
9
-
10
- # windows doesn't properly require hydra-head (from the gemfile), so we need to require it explicitly here:
11
- require 'hydra/head' unless defined? Hydra
12
-
13
- if Hydra.respond_to?(:configure)
14
- Hydra.configure(:shared) do |config|
15
- # This specifies the solr field names of permissions-related fields.
16
- # You only need to change these values if you've indexed permissions by some means other than the Hydra's built-in tooling.
17
- # If you change these, you must also update the permissions request handler in your solrconfig.xml to return those values
18
- indexer = Solrizer::Descriptor.new(:string, :stored, :indexed, :multivalued)
19
- config[:permissions] = {
20
- :discover => {:group =>ActiveFedora::SolrService.solr_name("discover_access_group", indexer), :individual=>ActiveFedora::SolrService.solr_name("discover_access_person", indexer)},
21
- :read => {:group =>ActiveFedora::SolrService.solr_name("read_access_group", indexer), :individual=>ActiveFedora::SolrService.solr_name("read_access_person", indexer)},
22
- :edit => {:group =>ActiveFedora::SolrService.solr_name("edit_access_group", indexer), :individual=>ActiveFedora::SolrService.solr_name("edit_access_person", indexer)},
23
- :owner => ActiveFedora::SolrService.solr_name("depositor", indexer),
24
- :embargo_release_date => ActiveFedora::SolrService.solr_name("embargo_release_date", Solrizer::Descriptor.new(:date, :stored, :indexed))
25
- }
26
-
27
- end
28
- end
@@ -1,17 +0,0 @@
1
- Mailboxer.setup do |config|
2
-
3
- #Configures if you applications uses or no the email sending for Notifications and Messages
4
- config.uses_emails = true
5
-
6
- #Configures the default from for the email sent for Messages and Notifications of Mailboxer
7
- config.default_from = "no-reply@mailboxer.com"
8
-
9
- #Configures the methods needed by mailboxer
10
- config.email_method = :mailboxer_email
11
- config.name_method = :name
12
-
13
- #Configures if you use or not a search engine and wich one are you using
14
- #Supported enignes: [:solr,:sphinx]
15
- config.search_enabled = false
16
- config.search_engine = :solr
17
- end
@@ -1,32 +0,0 @@
1
- if defined?(PhusionPassenger)
2
- PhusionPassenger.on_event(:starting_worker_process) do |forked|
3
- # We're in smart spawning mode.
4
- if forked
5
- # Re-establish redis connection
6
- require 'redis'
7
- config = YAML::load(ERB.new(IO.read(File.join(Rails.root, 'config', 'redis.yml'))).result)[Rails.env].with_indifferent_access
8
-
9
- # The important two lines
10
- $redis.client.disconnect if $redis
11
- $redis = Redis.new(host: config[:host], port: config[:port], thread_safe: true) rescue nil
12
- Resque.redis = $redis
13
- Resque.redis.client.reconnect if Resque.redis
14
- end
15
- end
16
- else
17
- config = YAML::load(ERB.new(IO.read(File.join(Rails.root, 'config', 'redis.yml'))).result)[Rails.env].with_indifferent_access
18
- $redis = Redis.new(host: config[:host], port: config[:port], thread_safe: true) rescue nil
19
- end
20
-
21
-
22
- # Code borrowed from Obie's Redis patterns talk at RailsConf'12
23
- Nest.class_eval do
24
- def initialize(key, redis=$redis)
25
- super(key.to_param)
26
- @redis = redis
27
- end
28
-
29
- def [](key)
30
- self.class.new("#{self}:#{key.to_param}", @redis)
31
- end
32
- end
@@ -1,10 +0,0 @@
1
- module Sufia
2
- class ResqueAdmin
3
- def self.matches?(request)
4
- current_user = request.env['warden'].user
5
- return false if current_user.blank?
6
- # TODO code a group here that makes sense
7
- #current_user.groups.include? 'umg/up.dlt.scholarsphere-admin'
8
- end
9
- end
10
- end
@@ -1,5 +0,0 @@
1
- config = YAML::load(ERB.new(IO.read(File.join(Rails.root, 'config', 'redis.yml'))).result)[Rails.env].with_indifferent_access
2
- Resque.redis = Redis.new(host: config[:host], port: config[:port], thread_safe: true)
3
-
4
- Resque.inline = Rails.env.test?
5
- Resque.redis.namespace = "#{Sufia.config.id_namespace}:#{Rails.env}"
@@ -1,81 +0,0 @@
1
- # Returns an array containing the vhost 'CoSign service' value and URL
2
- Sufia.config do |config|
3
-
4
- config.fits_to_desc_mapping= {
5
- :file_title => :title,
6
- :file_author => :creator
7
- }
8
-
9
- # Specify a different template for your repositories unique identifiers
10
- # config.noid_template = ".reeddeeddk"
11
-
12
- config.max_days_between_audits = 7
13
-
14
- config.cc_licenses = {
15
- 'Attribution 3.0 United States' => 'http://creativecommons.org/licenses/by/3.0/us/',
16
- 'Attribution-ShareAlike 3.0 United States' => 'http://creativecommons.org/licenses/by-sa/3.0/us/',
17
- 'Attribution-NonCommercial 3.0 United States' => 'http://creativecommons.org/licenses/by-nc/3.0/us/',
18
- 'Attribution-NoDerivs 3.0 United States' => 'http://creativecommons.org/licenses/by-nd/3.0/us/',
19
- 'Attribution-NonCommercial-NoDerivs 3.0 United States' => 'http://creativecommons.org/licenses/by-nc-nd/3.0/us/',
20
- 'Attribution-NonCommercial-ShareAlike 3.0 United States' => 'http://creativecommons.org/licenses/by-nc-sa/3.0/us/',
21
- 'Public Domain Mark 1.0' => 'http://creativecommons.org/publicdomain/mark/1.0/',
22
- 'CC0 1.0 Universal' => 'http://creativecommons.org/publicdomain/zero/1.0/',
23
- 'All rights reserved' => 'All rights reserved'
24
- }
25
-
26
- config.cc_licenses_reverse = Hash[*config.cc_licenses.to_a.flatten.reverse]
27
-
28
- config.resource_types = {
29
- "Article" => "Article",
30
- "Audio" => "Audio",
31
- "Book" => "Book",
32
- "Capstone Project" => "Capstone Project",
33
- "Conference Proceeding" => "Conference Proceeding",
34
- "Dataset" => "Dataset",
35
- "Dissertation" => "Dissertation",
36
- "Image" => "Image",
37
- "Journal" => "Journal",
38
- "Map or Cartographic Material" => "Map or Cartographic Material",
39
- "Masters Thesis" => "Masters Thesis",
40
- "Part of Book" => "Part of Book",
41
- "Poster" => "Poster",
42
- "Presentation" => "Presentation",
43
- "Project" => "Project",
44
- "Report" => "Report",
45
- "Research Paper" => "Research Paper",
46
- "Software or Program Code" => "Software or Program Code",
47
- "Video" => "Video",
48
- "Other" => "Other",
49
- }
50
-
51
- config.permission_levels = {
52
- "Choose Access"=>"none",
53
- "View/Download" => "read",
54
- "Edit" => "edit"
55
- }
56
-
57
- config.owner_permission_levels = {
58
- "Edit" => "edit"
59
- }
60
-
61
- config.queue = Sufia::Resque::Queue
62
-
63
- # Map hostnames onto Google Analytics tracking IDs
64
- # config.google_analytics_id = 'UA-99999999-1'
65
-
66
-
67
- # Where to store tempfiles, leave blank for the system temp directory (e.g. /tmp)
68
- # config.temp_file_base = '/home/developer1'
69
-
70
- # If you have ffmpeg installed and want to transcode audio and video uncomment this line
71
- # config.enable_ffmpeg = true
72
-
73
- # Specify the Fedora pid prefix:
74
- # config.id_namespace = "sufia"
75
-
76
- # Specify the path to the file characterization tool:
77
- # config.fits_path = "fits.sh"
78
-
79
- end
80
-
81
- Date::DATE_FORMATS[:standard] = "%m/%d/%Y"