valkyrie 1.7.1 → 2.0.0.RC1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +6 -86
  3. data/.gitignore +0 -1
  4. data/.rubocop.yml +0 -5
  5. data/CHANGELOG.md +1 -160
  6. data/README.md +62 -84
  7. data/Rakefile +2 -8
  8. data/lib/valkyrie.rb +4 -39
  9. data/lib/valkyrie/id.rb +0 -8
  10. data/lib/valkyrie/persistence/fedora.rb +3 -7
  11. data/lib/valkyrie/persistence/fedora/list_node.rb +11 -28
  12. data/lib/valkyrie/persistence/fedora/metadata_adapter.rb +1 -8
  13. data/lib/valkyrie/persistence/fedora/permissive_schema.rb +0 -16
  14. data/lib/valkyrie/persistence/fedora/query_service.rb +6 -8
  15. data/lib/valkyrie/persistence/memory/metadata_adapter.rb +0 -5
  16. data/lib/valkyrie/persistence/memory/persister.rb +1 -1
  17. data/lib/valkyrie/persistence/memory/query_service.rb +6 -11
  18. data/lib/valkyrie/persistence/postgres.rb +1 -14
  19. data/lib/valkyrie/persistence/postgres/metadata_adapter.rb +0 -5
  20. data/lib/valkyrie/persistence/postgres/orm_converter.rb +1 -1
  21. data/lib/valkyrie/persistence/postgres/persister.rb +1 -9
  22. data/lib/valkyrie/persistence/postgres/query_service.rb +4 -6
  23. data/lib/valkyrie/persistence/solr.rb +0 -7
  24. data/lib/valkyrie/persistence/solr/metadata_adapter.rb +0 -5
  25. data/lib/valkyrie/persistence/solr/model_converter.rb +2 -11
  26. data/lib/valkyrie/persistence/solr/orm_converter.rb +2 -2
  27. data/lib/valkyrie/persistence/solr/queries/find_inverse_references_query.rb +4 -4
  28. data/lib/valkyrie/persistence/solr/queries/find_members_query.rb +4 -11
  29. data/lib/valkyrie/persistence/solr/query_service.rb +4 -7
  30. data/lib/valkyrie/resource.rb +21 -62
  31. data/lib/valkyrie/specs/shared_specs.rb +0 -5
  32. data/lib/valkyrie/specs/shared_specs/change_set_persister.rb +9 -9
  33. data/lib/valkyrie/specs/shared_specs/persister.rb +1 -3
  34. data/lib/valkyrie/specs/shared_specs/queries.rb +17 -45
  35. data/lib/valkyrie/specs/shared_specs/resource.rb +6 -11
  36. data/lib/valkyrie/specs/shared_specs/solr_indexer.rb +3 -3
  37. data/lib/valkyrie/specs/shared_specs/storage_adapter.rb +4 -17
  38. data/lib/valkyrie/storage/disk.rb +1 -2
  39. data/lib/valkyrie/storage/fedora.rb +16 -29
  40. data/lib/valkyrie/storage/memory.rb +1 -2
  41. data/lib/valkyrie/types.rb +6 -24
  42. data/lib/valkyrie/version.rb +1 -1
  43. data/solr/config/schema.xml +1 -0
  44. data/tasks/dev.rake +0 -3
  45. data/tasks/docker.rake +2 -2
  46. data/valkyrie.gemspec +6 -7
  47. metadata +49 -62
  48. data/.tool-versions +0 -1
  49. data/Appraisals +0 -8
  50. data/CODE_OF_CONDUCT.md +0 -36
  51. data/CONTRIBUTING.md +0 -161
  52. data/SUPPORT.md +0 -5
  53. data/gemfiles/activerecord_5_1.gemfile +0 -7
  54. data/gemfiles/activerecord_5_2.gemfile +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fbacc1a80b59edcd0ea79874e7049a8782b95ee886e570484647a4f55d8b985
4
- data.tar.gz: 93e4e74002395406aaeded34e93122a94e574ea6a7119e5c6b7e4a5adc888379
3
+ metadata.gz: 3a6595012901f53ab2c47eca1f7aca4e02c6de433ab564c026ea23fc4157ae88
4
+ data.tar.gz: 20ad473091497657070518c0b019a92436db6cc18b829aed53288c876b29a684
5
5
  SHA512:
6
- metadata.gz: e2ceae6ebf059b44f26395a0a13ff88b405785d17cefaf6fe8688a3ed4057df59bccc6139cc5418557d36d78548f621e9719ff2051033733302c4d9207e1b504
7
- data.tar.gz: 397366d288da8cb381628c91146ccfa4de1b8d8b824d7c78a747bc2f21d5ac8654397551a5f3edba4d14dd717de0ebfa0949c1f20609dbbe92aa1ccb9ec3269f
6
+ metadata.gz: 0deef685a04e187a7e8352aad5ff9bb7431617b905d03da8222b3f3591bc472f6cf9188bfd426d2afa221dd5778fed3f120c2e99d4e75d95b1d51fe0f66c9d0e
7
+ data.tar.gz: 27c8e622b13e742ce3f4a6ec88d0d72daa3f90163ce5aba1658a77c4fb0d825349dec1867d1c8a4b1f8a48350c7d40a0f82fb129aa29e060585142b6456d6c85
data/.circleci/config.yml CHANGED
@@ -1,96 +1,39 @@
1
1
  ---
2
- version: 2.1
2
+ version: 2
3
3
  jobs:
4
4
  build:
5
5
  machine: true
6
- parameters:
7
- gemfile:
8
- description: "Gemfile to run"
9
- default: "Gemfile"
10
- type: "string"
11
- ruby:
12
- description: "Ruby version"
13
- default: "2.6.3"
14
- type: "string"
15
- environment:
16
- BUNDLE_GEMFILE: << parameters.gemfile >>
17
6
  steps:
18
7
  - checkout
19
- - run:
20
- name: Set ruby version to << parameters.ruby >>
21
- command: |
22
- rvm install << parameters.ruby >>
23
- echo . $(rvm << parameters.ruby >> do rvm env --path) >> $BASH_ENV
24
- - run:
25
- shell: /bin/bash -l
26
- name: Uninstall global Bundler
27
- command: |
28
- rvm use << parameters.ruby >>
29
- rvm gemset use global
30
- gem uninstall bundler -x
31
- echo Uninstalled
32
8
  - run:
33
9
  name: Install Docker Compose
34
10
  command: |
35
11
  curl -L https://github.com/docker/compose/releases/download/1.19.0/docker-compose-`uname -s`-`uname -m` > ~/docker-compose
36
12
  chmod +x ~/docker-compose
37
13
  sudo mv ~/docker-compose /usr/local/bin/docker-compose
38
- - run:
39
- name: Update bundler
40
- command: gem install bundler -v 1.17.2
41
14
  - restore_cache:
42
15
  keys:
43
- - bundle-{{ checksum "<< parameters.gemfile >>" }}-{{ checksum "valkyrie.gemspec" }}-<< parameters.ruby >>-6
16
+ - bundle-{{ checksum "Gemfile" }}-{{ checksum "valkyrie.gemspec" }}
17
+ - bundle- # used if checksum fails
44
18
  - run: sudo apt-get update && sudo apt-get install -y libpq-dev
45
- - run:
46
- name: Set BUNDLE_GEMFILE
47
- command: |
48
- export BUNDLE_GEMFILE=~/project/<< parameters.gemfile >>
49
19
  - run:
50
20
  name: Install dependencies
51
21
  command: bundle install --path=vendor/bundle --jobs 4 --retry 3
52
22
  - save_cache:
53
- key: bundle-{{ checksum "<< parameters.gemfile >>" }}-{{ checksum "valkyrie.gemspec" }}-<< parameters.ruby >>-6
23
+ key: bundle-{{ checksum "Gemfile" }}-{{ checksum "valkyrie.gemspec" }}
54
24
  paths:
55
25
  - "vendor/bundle"
56
- - "gemfiles/vendor/bundle"
57
26
  - run:
58
27
  name: Run Rubocop
59
28
  command: bundle exec rake rubocop
60
29
  - run:
61
30
  name: Run Specs
62
31
  command: bundle exec rake docker:spec
63
- - store_artifacts:
64
- path: coverage
65
- destination: coverage
66
32
  workflows:
67
33
  version: 2
68
34
  build:
69
35
  jobs:
70
- - build:
71
- gemfile: "gemfiles/activerecord_5_2.gemfile"
72
- ruby: 2.6.3
73
- name: "Ruby2-6_Rails5-2"
74
- - build:
75
- gemfile: "gemfiles/activerecord_5_1.gemfile"
76
- ruby: 2.6.3
77
- name: "Ruby2-6_Rails5-1"
78
- - build:
79
- gemfile: "gemfiles/activerecord_5_2.gemfile"
80
- ruby: 2.5.5
81
- name: "Ruby2-5_Rails5-2"
82
- - build:
83
- gemfile: "gemfiles/activerecord_5_1.gemfile"
84
- ruby: 2.5.5
85
- name: "Ruby2-5_Rails5-1"
86
- - build:
87
- gemfile: "gemfiles/activerecord_5_2.gemfile"
88
- ruby: 2.4.6
89
- name: "Ruby2-4_Rails5-2"
90
- - build:
91
- gemfile: "gemfiles/activerecord_5_1.gemfile"
92
- ruby: 2.4.6
93
- name: "Ruby2-4_Rails5-1"
36
+ - build
94
37
  nightly:
95
38
  triggers:
96
39
  - schedule:
@@ -100,27 +43,4 @@ workflows:
100
43
  only:
101
44
  - master
102
45
  jobs:
103
- - build:
104
- gemfile: "gemfiles/activerecord_5_2.gemfile"
105
- ruby: 2.6.3
106
- name: "Ruby2-6_Rails5-2"
107
- - build:
108
- gemfile: "gemfiles/activerecord_5_1.gemfile"
109
- ruby: 2.6.3
110
- name: "Ruby2-6_Rails5-1"
111
- - build:
112
- gemfile: "gemfiles/activerecord_5_2.gemfile"
113
- ruby: 2.5.5
114
- name: "Ruby2-5_Rails5-2"
115
- - build:
116
- gemfile: "gemfiles/activerecord_5_1.gemfile"
117
- ruby: 2.5.5
118
- name: "Ruby2-5_Rails5-1"
119
- - build:
120
- gemfile: "gemfiles/activerecord_5_2.gemfile"
121
- ruby: 2.4.6
122
- name: "Ruby2-4_Rails5-2"
123
- - build:
124
- gemfile: "gemfiles/activerecord_5_1.gemfile"
125
- ruby: 2.4.6
126
- name: "Ruby2-4_Rails5-1"
46
+ - build
data/.gitignore CHANGED
@@ -8,4 +8,3 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  /vendor
11
- /gemfiles/*.lock
data/.rubocop.yml CHANGED
@@ -9,7 +9,6 @@ AllCops:
9
9
  - 'bin/*'
10
10
  - 'db/schema.rb'
11
11
  - 'vendor/**/*'
12
- - 'gemfiles/vendor/**/*'
13
12
  RSpec/ScatteredSetup:
14
13
  Enabled: false
15
14
  Metrics/BlockLength:
@@ -32,7 +31,3 @@ Naming/PredicateName:
32
31
  - "lib/valkyrie/persistence/solr/queries/default_paginator.rb"
33
32
  Lint/UnusedMethodArgument:
34
33
  AllowUnusedKeywordArguments: true
35
- Naming/FileName:
36
- Exclude:
37
- - 'Appraisals'
38
- - 'Gemfile'
data/CHANGELOG.md CHANGED
@@ -1,163 +1,4 @@
1
- # v1.7.1 2019-05-30
2
-
3
- ## Changes since last release
4
-
5
- * Fix ROOT_PATH error in StorageAdapter#upload shared specs
6
- [tpendragon](https://github.com/tpendragon)
7
-
8
- Additional thanks to the following for code review and issue reports leading to
9
- this release:
10
-
11
- [escowles](https://github.com/escowles)
12
-
13
- # v1.7.0 2019-05-29
14
-
15
- ## Changes since last release
16
-
17
- * Permit storage adapters to have arbitrary arguments to #upload.
18
- [jrgriffiniii](https://github.com/jrgriffiniii)
19
- * Storage adapters can now all upload regular IO objects.
20
- [tpendragon](https://github.com/tpendragon)
21
- * Fedora Storage Adapter has a configurable `resource_uri_transformer` for going
22
- from a `Resource` to a Fedora path.
23
- [elrayle](https://github.com/elrayle)
24
- * Improve Gem metadata and allow Bundler 2
25
- [jcoyne](https://github.com/jcoyne)
26
-
27
- # v1.6.0 2019-04-17
28
-
29
- ## Changes since last release
30
-
31
- * Deprecation in preparation for LDP to be optional
32
- * Deprecation in preparation for RSolr to be optional
33
- * Deprecation in preparation for ActiveRecord to be optional
34
- * Remove Rails requirement
35
- * Remove ActiveTriples dependency.
36
-
37
- Additional thanks to the following for code review and issue reports leading to
38
- this release:
39
-
40
- [carolyncole](https://github.com/carolyncole)
41
- [dgcliff](https://github.com/dgcliff)
42
- [escowles](https://github.com/escowles)
43
- [no-reply](https://github.com/no-reply)
44
-
45
- # v1.5.1 2019-02-08
46
-
47
- ## Changes since last release
48
-
49
- * Namespace shared-spec resources to avoid conflict in apps.
50
- [tpendragon](https://github.com/tpendragon)
51
-
52
- Additional thanks to the following for code review and issue reports leading to
53
- this release:
54
-
55
- [cjcolvar](https://github.com/cjcolvar)
56
- [escowles](https://github.com/escowles)
57
-
58
- # v1.5.0 2019-02-06
59
-
60
- ## Changes since last release
61
-
62
- * Fix solr casting when an updated_at key isn't present in the solr document.
63
- [tpendragon](https://github.com/tpendragon)
64
- * Add missing query service requirement to persister shared specs
65
- [cjcolvar](https://github.com/cjcolvar)
66
- * Provide a warning when postgres adapter overwrites an ID, deprecate this
67
- behavior so it will throw an exception in the future.
68
- [cam156](https://github.com/cam156)
69
- [hackmastera](https://github.com/hackmastera)
70
- [tpendragon](https://github.com/tpendragon)
71
- * Add support for passing just an ID to find_inverse_references_by
72
- [cam156](https://github.com/cam156)
73
- [hackmastera](https://github.com/hackmastera)
74
- * Fix memory adapter raising an exception in find_by_alternate_identifier when
75
- there are resources without the alternate_identifier attribute.
76
- [jeremyf](https://github.com/jeremyf)
77
- * Provide a warning when using the postgres adapter without manually providing
78
- the pg gem, so it can be an optional dependency in 2.0.0.
79
- [hackmastera](https://github.com/hackmastera)
80
- * Provide guidance in specs on how to define alternate_ids
81
- [cjcolvar](https://github.com/cjcolvar)
82
- * Upload files to Fedora using form/multipart.
83
- [tpendragon](https://github.com/tpendragon)
84
- * Improve CompositePersister documentation.
85
- [tpendragon](https://github.com/tpendragon)
86
- * Add a Valkyrie::Types::Params::ID type which handles when an HTML form passes
87
- an empty string value.
88
- [tpendragon](https://github.com/tpendragon)
89
- * Deprecate .member on Valkyrie::Types::Array & Set
90
- [tpendragon](https://github.com/tpendragon)
91
- * Fix updated_at not being set correctly for the Solr adapter, fix shared specs.
92
- [tpendragon](https://github.com/tpendragon)
93
-
94
- Additional thanks to the following for code review and issue reports leading to
95
- this release:
96
-
97
- [awead](https://github.com/awead)
98
- [escowles](https://github.com/escowles)
99
- [kelynch](https://github.com/kelynch)
100
- [mbklein](https://github.com/mbklein)
101
- [mjgiarlo](https://github.com/mjgiarlo)
102
- [no-reply](https://github.com/no-reply)
103
- [revgum](https://github.com/revgum)
104
-
105
- # v1.5.0 RC2 2019-02-01
106
-
107
- ## Changes since last release
108
-
109
- * Fix solr casting when an updated_at key isn't present in the solr document.
110
- [tpendragon](https://github.com/tpendragon)
111
-
112
- Additional thanks to the following for code review:
113
-
114
- [mjgiarlo](https://github.com/mjgiarlo)
115
-
116
- # v1.5.0 RC1 2019-02-01
117
-
118
- ## Changes since last release
119
-
120
- * Add missing query service requirement to persister shared specs
121
- [cjcolvar](https://github.com/cjcolvar)
122
- * Provide a warning when postgres adapter overwrites an ID, deprecate this
123
- behavior so it will throw an exception in the future.
124
- [cam156](https://github.com/cam156)
125
- [hackmastera](https://github.com/hackmastera)
126
- [tpendragon](https://github.com/tpendragon)
127
- * Add support for passing just an ID to find_inverse_references_by
128
- [cam156](https://github.com/cam156)
129
- [hackmastera](https://github.com/hackmastera)
130
- * Fix memory adapter raising an exception in find_by_alternate_identifier when
131
- there are resources without the alternate_identifier attribute.
132
- [jeremyf](https://github.com/jeremyf)
133
- * Provide a warning when using the postgres adapter without manually providing
134
- the pg gem, so it can be an optional dependency in 2.0.0.
135
- [hackmastera](https://github.com/hackmastera)
136
- * Provide guidance in specs on how to define alternate_ids
137
- [cjcolvar](https://github.com/cjcolvar)
138
- * Upload files to Fedora using form/multipart.
139
- [tpendragon](https://github.com/tpendragon)
140
- * Improve CompositePersister documentation.
141
- [tpendragon](https://github.com/tpendragon)
142
- * Add a Valkyrie::Types::Params::ID type which handles when an HTML form passes
143
- an empty string value.
144
- [tpendragon](https://github.com/tpendragon)
145
- * Deprecate .member on Valkyrie::Types::Array & Set
146
- [tpendragon](https://github.com/tpendragon)
147
- * Fix updated_at not being set correctly for the Solr adapter, fix shared specs.
148
- [tpendragon](https://github.com/tpendragon)
149
-
150
- Additional thanks to the following for code review and issue reports leading to
151
- this release:
152
-
153
- [awead](https://github.com/awead)
154
- [escowles](https://github.com/escowles)
155
- [kelynch](https://github.com/kelynch)
156
- [mbklein](https://github.com/mbklein)
157
- [no-reply](https://github.com/no-reply)
158
- [revgum](https://github.com/revgum)
159
-
160
- # v1.4.0 2019-01-08
1
+ # v1.4.0 2018-01-08
161
2
 
162
3
  ## Changes since last release.
163
4
 
data/README.md CHANGED
@@ -4,29 +4,22 @@ Valkyrie is a gem for enabling multiple backends for storage of files and metada
4
4
 
5
5
  ![Valkyrie Logo](valkyrie_logo.png)
6
6
 
7
- Code: [![Version](https://badge.fury.io/rb/valkyrie.png)](http://badge.fury.io/rb/valkyrie)
8
- [![Build Status](https://circleci.com/gh/samvera/valkyrie.svg?style=svg)](https://circleci.com/gh/samvera/valkyrie)
9
- ![Coverage Status](https://img.shields.io/badge/Coverage-100-brightgreen.svg)
10
-
11
- Docs: [![Contribution Guidelines](http://img.shields.io/badge/CONTRIBUTING-Guidelines-blue.svg)](./CONTRIBUTING.md)
12
- [![Apache 2.0 License](http://img.shields.io/badge/APACHE2-license-blue.svg)](./LICENSE)
13
- [![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/gems/valkyrie)
14
-
15
- Jump in: [![Slack Status](http://slack.samvera.org/badge.svg)](http://slack.samvera.org/)
7
+ [![CircleCI](https://circleci.com/gh/samvera-labs/valkyrie.svg?style=svg)](https://circleci.com/gh/samvera-labs/valkyrie)
8
+ [![Coverage Status](https://coveralls.io/repos/github/samvera-labs/valkyrie/badge.svg?branch=master)](https://coveralls.io/github/samvera-labs/valkyrie?branch=master)
9
+ [![Stories in Ready](https://badge.waffle.io/samvera-labs/valkyrie.png?label=ready&title=Ready)](https://waffle.io/samvera-labs/valkyrie)
10
+ [![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/github/samvera-labs/valkyrie)
16
11
 
17
12
  ## Primary Contacts
18
13
 
19
14
  ### Product Owner
20
- [Katherine Lynch](https://github.com/kelynch)
21
15
 
22
- ### Technical Lead
23
- [Trey Pendragon](https://github.com/tpendragon)
16
+ [Carolyn Cole](https://github.com/cam156)
24
17
 
25
- ## Help
18
+ ### Technical Lead
26
19
 
27
- The Samvera community is here to help. Please see our [support guide](./SUPPORT.md).
20
+ [Trey Pendragon](https://github.com/tpendragon)
28
21
 
29
- ## Getting Started
22
+ ## Installation
30
23
 
31
24
  Add this line to your application's Gemfile:
32
25
 
@@ -44,6 +37,7 @@ Valkyrie is configured in two places: an initializer that registers the persiste
44
37
  configuration file that sets which options are used by default in which environments.
45
38
 
46
39
  ### Sample initializer: `config/initializers/valkyrie.rb`:
40
+
47
41
  Here is a sample initializer that registers a couple adapters and storage adapters, in each case linking an
48
42
  instance with a short name that can be used to refer to it in your application:
49
43
 
@@ -87,8 +81,7 @@ The initializer registers two `Valkyrie::MetadataAdapter` instances for storing
87
81
 
88
82
  Other adapter options include `Valkyrie::Persistence::BufferedPersister` for buffering in memory before bulk
89
83
  updating another persister, `Valkyrie::Persistence::CompositePersister` for storing in more than one adapter
90
- at once, `Valkyrie::Persistence::Solr` for storing in Solr, and `Valkyrie::Persistence::Fedora` for storing
91
- in Fedora.
84
+ at once, `Valkyrie::Persistence::Solr` for storing in Solr, and `Valkyrie::Persistence::Fedora` for storing in Fedora.
92
85
 
93
86
  The initializer also registers three `Valkyrie::StorageAdapter` instances for storing files:
94
87
  * `:disk` which stores files on disk
@@ -96,17 +89,8 @@ The initializer also registers three `Valkyrie::StorageAdapter` instances for st
96
89
  * `:memory` which stores files in an in-memory cache (again, not persistent, so this is only appropriate for
97
90
  testing)
98
91
 
99
- ### Sample configuration with custom `Valkyrie.config.resource_class_resolver`:
100
- ```
101
- require 'valkyrie'
102
- Rails.application.config.to_prepare do
103
- Valkyrie.config.resource_class_resolver = lambda do |resource_klass_name|
104
- # Do complicated lookup based on the string
105
- end
106
- end
107
- ```
108
-
109
92
  ### Sample configuration: `config/valkyrie.yml`:
93
+
110
94
  A sample configuration file that configures your application to use different adapters:
111
95
 
112
96
  ```
@@ -129,12 +113,26 @@ For each environment, you must set two values:
129
113
 
130
114
  The values are the short names used in your initializer.
131
115
 
132
- Further details can be found on the [Persistence Wiki
133
- page](https://github.com/samvera/valkyrie/wiki/Persistence).
116
+ Further details can be found on the [the Wiki](https://github.com/samvera-labs/valkyrie/wiki/Persistence).
134
117
 
135
118
  ## Usage
136
119
 
120
+ ### The Public API
121
+
122
+ Valkyrie's public API is defined by the shared specs that are used to test each of its core classes.
123
+ This include change sets, resources, persisters, adapters, and queries. When creating your own kinds of
124
+ these kinds of classes, you should use these shared specs to test your classes for conformance to
125
+ Valkyrie's API.
126
+
127
+ When breaking changes are introduced, necessitating a major version change, the shared specs will reflect
128
+ this. When new features are added and a minor version is released there will be no change to the existing shared
129
+ specs, but there may be new ones. These new shared specs will fail in your
130
+ application if you have custom adapters, but your application will still work.
131
+
132
+ Using the shared specs in your own models is described in more [detail](https://github.com/samvera-labs/valkyrie/wiki/Shared-Specs).
133
+
137
134
  ### Define a Custom Work
135
+
138
136
  Define a custom work class:
139
137
 
140
138
  ```
@@ -153,8 +151,7 @@ order of multiple values.
153
151
  attribute :authors, Valkyrie::Types::Array.meta(ordered: true)
154
152
  ```
155
153
 
156
- Defining resource attributes is explained in greater detail on the [Using Types Wiki
157
- page](https://github.com/samvera/valkyrie/wiki/Using-Types).
154
+ Defining resource attributes is explained in greater detail within the [Wiki](https://github.com/samvera-labs/valkyrie/wiki/Using-Types).
158
155
 
159
156
  #### Work Types Generator
160
157
 
@@ -172,6 +169,7 @@ rails generate valkyrie:resource Foo/Bar title member_ids:array
172
169
  ```
173
170
 
174
171
  ### Read and Write Data
172
+
175
173
  ```
176
174
  # initialize a metadata adapter
177
175
  adapter = Valkyrie::MetadataAdapter.find(:postgres)
@@ -190,64 +188,44 @@ objects = adapter.query_service.find_all
190
188
  Valkyrie.config.metadata_adapter.query_service.find_all_of_model(model: MyModel)
191
189
  ```
192
190
 
193
- The Wiki documents the usage of [Queries](https://github.com/samvera/valkyrie/wiki/Queries),
194
- [Persistence](https://github.com/samvera/valkyrie/wiki/Persistence), and
195
- [ChangeSets and Dirty Tracking](https://github.com/samvera/valkyrie/wiki/ChangeSets-and-Dirty-Tracking).
196
-
197
- ### Concurrency Support
198
- A Valkyrie repository may have concurrent updates, for example, from a load-balanced Rails application, or
199
- from multiple [Sidekiq](https://github.com/mperham/sidekiq) background workers). In order to prevent multiple
200
- simultaneous updates applied to the same resource from losing or corrupting data, Valkyrie supports optimistic
201
- locking. How to use optimistic locking with Valkyrie is documented on the [Optimistic Locking Wiki
202
- page](https://github.com/samvera/valkyrie/wiki/Optimistic-Locking).
203
-
204
- ### The Public API
205
- Valkyrie's public API is defined by the shared specs that are used to test each of its core classes.
206
- This include change sets, resources, persisters, adapters, and queries. When creating your own kinds of
207
- these kinds of classes, you should use these shared specs to test your classes for conformance to
208
- Valkyrie's API.
191
+ The usage of `ChangeSets` in writing data are further documented [here](https://github.com/samvera-labs/valkyrie/wiki/ChangeSets-and-Dirty-Tracking).
209
192
 
210
- When breaking changes are introduced, necessitating a major version change, the shared specs will reflect
211
- this. When new features are added and a minor version is released there will be no change to the existing
212
- shared specs, but there may be new ones. These new shared specs will fail in your application if you have
213
- custom adapters, but your application will still work.
193
+ ### Concurrency Support (Optimistic Locking)
194
+ By default, it is assumed that a Valkyrie repository implementation shall use a solution supporting concurrent updates for resources (multiple resources can be updated simultaneously using a Gem such as [Sidekiq](https://github.com/mperham/sidekiq)). In order to handle the possibility of multiple updates applied to the same resource corrupting data, Valkyrie supports optimistic locking. For further details, please reference the [overview of optimistic locking for Valkyrie resources](https://github.com/samvera-labs/valkyrie/wiki/Optimistic-Locking).
214
195
 
215
- Using the shared specs in your own models is described in more detail on the [Shared Specs Wiki
216
- page](https://github.com/samvera/valkyrie/wiki/Shared-Specs).
196
+ ## Installing a Development environment
217
197
 
218
- ### Fedora 5 Compatibility
219
- When configuring your adapter, include the `fedora_version` parameter in your metadata or storage adapter
220
- config. If Fedora requires auth, you can also include that in the URL, e.g.:
198
+ ### Without Docker
221
199
 
222
- ```
223
- Valkyrie::Storage::Fedora.new(
224
- connection: Ldp::Client.new("http://fedoraAdmin:fedoraAdmin@localhost:8988/rest"),
225
- fedora_version: 5
226
- )
227
- ```
200
+ #### External Requirements
201
+ * PostgreSQL with the uuid-ossp extension.
202
+ * Note: Enabling uuid-ossp requires database superuser privileges.
203
+ * From `psql`: `alter user [username] with superuser;`
228
204
 
229
- ## Installing a Development environment
205
+ #### To run the test suite
206
+ 1. Start Solr and Fedora servers for testing with `rake server:test`
207
+ 1. Run `rake db:create` (First time only)
208
+ 1. Run `rake db:migrate`
230
209
 
231
210
  ### With Docker
232
- The development and test stacks use fully contained virtual volumes and bind all services to different ports,
233
- so they can be running at the same time without issue.
234
211
 
235
212
  #### External Requirements
236
213
  * [Docker](https://store.docker.com/search?offering=community&type=edition) version >= 17.09.0
237
-
214
+ *
238
215
  ### Dependency Setup (Mac OSX)
216
+
239
217
  1. `brew install docker`
240
218
  1. `brew install docker-machine`
241
219
  1. `brew install docker-compose`
242
220
 
243
221
  ### Starting Docker (Mac OSX)
222
+
244
223
  1. `docker-machine create default`
245
224
  1. `docker-machine start default`
246
225
  1. `eval "$(docker-machine env)"`
247
226
 
248
227
  #### Starting the development mode dependencies
249
- 1. Start Solr, Fedora, and PostgreSQL with `rake docker:dev:daemon` (or `rake docker:dev:up` in a separate
250
- shell to run them in the foreground)
228
+ 1. Start Solr, Fedora, and PostgreSQL with `rake docker:dev:daemon` (or `rake docker:dev:up` in a separate shell to run them in the foreground)
251
229
  1. Run `rake db:create db:migrate` to initialize the database
252
230
  1. Develop!
253
231
  1. Run `rake docker:dev:down` to stop the server stack
@@ -257,32 +235,32 @@ so they can be running at the same time without issue.
257
235
  1. `rake docker:spec`
258
236
 
259
237
  #### To run the test suite manually
260
- 1. Start Solr, Fedora, and PostgreSQL with `rake docker:test:daemon` (or `rake docker:test:up` in a separate
261
- shell to run them in the foreground)
238
+ 1. Start Solr, Fedora, and PostgreSQL with `rake docker:test:daemon` (or `rake docker:test:up` in a separate shell to run them in the foreground)
262
239
  1. Run `rake db:create db:migrate` to initialize the database
263
240
  1. Run the gem's RSpec test suite with `rspec spec` or `rake`
264
241
  1. Run `rake docker:test:down` to stop the server stack
265
242
  * The test stack cleans up after itself on exit.
266
243
 
267
- ### Without Docker
244
+ ## Fedora 5 Compatibility
245
+ When configuring your adapter, include the `fedora_version` parameter in your metadata or storage adapter config. If Fedora requires auth, you can also include that in the URL, e.g.:
246
+ ```
247
+ Valkyrie::Storage::Fedora.new(connection: Ldp::Client.new("http://fedoraAdmin:fedoraAdmin@localhost:8988/rest"), fedora_version: 5)
248
+ ```
268
249
 
269
- #### External Requirements
270
- * PostgreSQL with the uuid-ossp extension.
271
- * Note: Enabling uuid-ossp requires database superuser privileges.
272
- * From `psql`: `alter user [username] with superuser;`
250
+ The development and test stacks use fully contained virtual volumes and bind all services to different ports, so they can be running at the same time without issue.
273
251
 
274
- #### To run the test suite
275
- 1. Start Solr and Fedora servers for testing with `rake server:test`
276
- 1. Run `rake db:create` (First time only)
277
- 1. Run `rake db:migrate`
252
+ ## Get Help
253
+
254
+ If you have any questions regarding Valkyrie you can send a message to [the
255
+ Samvera community tech list](mailto:samvera-tech@googlegroups.com) or the `#valkyrie`
256
+ channel in the [Samvera community Slack
257
+ team](https://wiki.duraspace.org/pages/viewpage.action?pageId=87460391#Getintouch!-Slack).
278
258
 
279
- ## Acknowledgments
259
+ ## License
280
260
 
281
- This software has been developed by and is brought to you by the Samvera community. Learn more at the
282
- [Samvera website](http://samvera.org/).
261
+ Valkyrie is available under [the Apache 2.0 license](../LICENSE).
283
262
 
284
- ![Samvera Logo](https://wiki.duraspace.org/download/thumbnails/87459292/samvera-fall-font2-200w.png?version=1&modificationDate=1498550535816&api=v2)
285
263
 
286
264
  ## Contributing
287
265
 
288
- Bug reports and pull requests are welcome on GitHub at https://github.com/samvera/valkyrie/.
266
+ Bug reports and pull requests are welcome on GitHub at https://github.com/samvera-labs/valkyrie/.