valkyrie 1.5.1 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39e92d9e4892ac5d68a53cbcea67333f51575c4a186f2ffedb97bcc1be846135
4
- data.tar.gz: c6776eddd61f9e016c92ff23d97061c45d05beb27069d8b814b08b22b6ea6387
3
+ metadata.gz: a009fdb760bb925b92e9ade5096b39dae461c754816df543314850a012f7a656
4
+ data.tar.gz: f26925e5eb0dc7df138f81dc89ad6bb5c4444ea556ac8fedde7d73bd3e76b69e
5
5
  SHA512:
6
- metadata.gz: 463a7de54cb62d517e50a0923b2a3532a7bb88dfd6389dcd4223834df136ab6c7353bec60d850f2f22eb28a0ca5b3465b48a6be9d51d06730d62523b5febf8eb
7
- data.tar.gz: 9682ba62bf4e3071b7c7a2a95a51c540108f80e55b17f39aac9820bfee343531fb20fec2b2573af3ee7db6e99c804ae33e7ec0b76d99963b2618828ed19b5634
6
+ metadata.gz: 6cef97cbaa3a6ecb12cfb78626d2ed5fea0d8f433ad07a4cc5a6fb145c7346447959af98456e1f620f24203924d9dd2763b8a31b0804776971182d80fd1eb23a
7
+ data.tar.gz: 2bdaffa5595d88b6da9c66f64f4e64a52b1af10ae24706d40357ed9ccad5b2a49209a2a8e9f263268b719133db90383205ce910b166074c681ffbec8011498cb
data/.circleci/config.yml CHANGED
@@ -1,10 +1,34 @@
1
1
  ---
2
- version: 2
2
+ version: 2.1
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.2"
14
+ type: "string"
15
+ environment:
16
+ BUNDLE_GEMFILE: << parameters.gemfile >>
6
17
  steps:
7
18
  - 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
8
32
  - run:
9
33
  name: Install Docker Compose
10
34
  command: |
@@ -13,30 +37,60 @@ jobs:
13
37
  sudo mv ~/docker-compose /usr/local/bin/docker-compose
14
38
  - run:
15
39
  name: Update bundler
16
- command: gem install bundler -v 1.16.2
40
+ command: gem install bundler -v 1.17.2
17
41
  - restore_cache:
18
42
  keys:
19
- - bundle-{{ checksum "Gemfile" }}-{{ checksum "valkyrie.gemspec" }}
20
- - bundle- # used if checksum fails
43
+ - bundle-{{ checksum "<< parameters.gemfile >>" }}-{{ checksum "valkyrie.gemspec" }}-<< parameters.ruby >>-6
21
44
  - 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 >>
22
49
  - run:
23
50
  name: Install dependencies
24
51
  command: bundle install --path=vendor/bundle --jobs 4 --retry 3
25
52
  - save_cache:
26
- key: bundle-{{ checksum "Gemfile" }}-{{ checksum "valkyrie.gemspec" }}
53
+ key: bundle-{{ checksum "<< parameters.gemfile >>" }}-{{ checksum "valkyrie.gemspec" }}-<< parameters.ruby >>-6
27
54
  paths:
28
55
  - "vendor/bundle"
56
+ - "gemfiles/vendor/bundle"
29
57
  - run:
30
58
  name: Run Rubocop
31
59
  command: bundle exec rake rubocop
32
60
  - run:
33
61
  name: Run Specs
34
62
  command: bundle exec rake docker:spec
63
+ - store_artifacts:
64
+ path: coverage
65
+ destination: coverage
35
66
  workflows:
36
67
  version: 2
37
68
  build:
38
69
  jobs:
39
- - build
70
+ - build:
71
+ gemfile: "gemfiles/activerecord_5_2.gemfile"
72
+ ruby: 2.6.2
73
+ name: "Ruby2-6_Rails5-2"
74
+ - build:
75
+ gemfile: "gemfiles/activerecord_5_1.gemfile"
76
+ ruby: 2.6.2
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.5
89
+ name: "Ruby2-4_Rails5-2"
90
+ - build:
91
+ gemfile: "gemfiles/activerecord_5_1.gemfile"
92
+ ruby: 2.4.5
93
+ name: "Ruby2-4_Rails5-1"
40
94
  nightly:
41
95
  triggers:
42
96
  - schedule:
@@ -46,4 +100,27 @@ workflows:
46
100
  only:
47
101
  - master
48
102
  jobs:
49
- - build
103
+ - build:
104
+ gemfile: "gemfiles/activerecord_5_2.gemfile"
105
+ ruby: 2.6.2
106
+ name: "Ruby2-6_Rails5-2"
107
+ - build:
108
+ gemfile: "gemfiles/activerecord_5_1.gemfile"
109
+ ruby: 2.6.2
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.5
122
+ name: "Ruby2-4_Rails5-2"
123
+ - build:
124
+ gemfile: "gemfiles/activerecord_5_1.gemfile"
125
+ ruby: 2.4.5
126
+ name: "Ruby2-4_Rails5-1"
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  /vendor
11
+ /gemfiles/*.lock
data/.rubocop.yml CHANGED
@@ -9,6 +9,7 @@ AllCops:
9
9
  - 'bin/*'
10
10
  - 'db/schema.rb'
11
11
  - 'vendor/**/*'
12
+ - 'gemfiles/vendor/**/*'
12
13
  RSpec/ScatteredSetup:
13
14
  Enabled: false
14
15
  Metrics/BlockLength:
@@ -31,3 +32,7 @@ Naming/PredicateName:
31
32
  - "lib/valkyrie/persistence/solr/queries/default_paginator.rb"
32
33
  Lint/UnusedMethodArgument:
33
34
  AllowUnusedKeywordArguments: true
35
+ Naming/FileName:
36
+ Exclude:
37
+ - 'Appraisals'
38
+ - 'Gemfile'
data/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ ruby 2.5.1
data/Appraisals ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+ appraise "activerecord-5-2" do
3
+ gem "activerecord", "~> 5.2.0"
4
+ end
5
+
6
+ appraise "activerecord-5-1" do
7
+ gem "activerecord", "~> 5.1.0"
8
+ end
data/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ # v1.6.0 2018-04-17
2
+
3
+ ## Changes since last release
4
+
5
+ * Deprecation in preparation for LDP to be optional
6
+ * Deprecation in preparation for RSolr to be optional
7
+ * Deprecation in preparation for ActiveRecord to be optional
8
+ * Remove Rails requirement
9
+ * Remove ActiveTriples dependency.
10
+
11
+ Additional thanks to the following for code review and issue reports leading to
12
+ this release:
13
+
14
+ [carolyncole](https://github.com/carolyncole)
15
+ [dgcliff](https://github.com/dgcliff)
16
+ [escowles](https://github.com/escowles)
17
+ [no-reply](https://github.com/no-reply)
18
+
1
19
  # v1.5.1 2018-02-08
2
20
 
3
21
  ## Changes since last release
data/README.md CHANGED
@@ -5,13 +5,12 @@ Valkyrie is a gem for enabling multiple backends for storage of files and metada
5
5
  ![Valkyrie Logo](valkyrie_logo.png)
6
6
 
7
7
  Code: [![Version](https://badge.fury.io/rb/valkyrie.png)](http://badge.fury.io/rb/valkyrie)
8
- [![Build Status](https://circleci.com/gh/samvera-labs/valkyrie.svg?style=svg)](https://circleci.com/gh/samvera-labs/valkyrie)
9
- [![Coverage Status](https://coveralls.io/repos/github/samvera-labs/valkyrie/badge.svg?branch=master)](https://coveralls.io/github/samvera-labs/valkyrie?branch=master)
10
- [![Stories in Ready](https://badge.waffle.io/samvera-labs/valkyrie.png?label=ready&title=Ready)](https://waffle.io/samvera-labs/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)
11
10
 
12
11
  Docs: [![Contribution Guidelines](http://img.shields.io/badge/CONTRIBUTING-Guidelines-blue.svg)](./CONTRIBUTING.md)
13
12
  [![Apache 2.0 License](http://img.shields.io/badge/APACHE2-license-blue.svg)](./LICENSE)
14
- [![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/github/samvera-labs/valkyrie)
13
+ [![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/gems/valkyrie)
15
14
 
16
15
  Jump in: [![Slack Status](http://slack.samvera.org/badge.svg)](http://slack.samvera.org/)
17
16
 
@@ -131,7 +130,7 @@ For each environment, you must set two values:
131
130
  The values are the short names used in your initializer.
132
131
 
133
132
  Further details can be found on the [Persistence Wiki
134
- page](https://github.com/samvera-labs/valkyrie/wiki/Persistence).
133
+ page](https://github.com/samvera/valkyrie/wiki/Persistence).
135
134
 
136
135
  ## Usage
137
136
 
@@ -155,7 +154,7 @@ attribute :authors, Valkyrie::Types::Array.meta(ordered: true)
155
154
  ```
156
155
 
157
156
  Defining resource attributes is explained in greater detail on the [Using Types Wiki
158
- page](https://github.com/samvera-labs/valkyrie/wiki/Using-Types).
157
+ page](https://github.com/samvera/valkyrie/wiki/Using-Types).
159
158
 
160
159
  #### Work Types Generator
161
160
 
@@ -191,16 +190,16 @@ objects = adapter.query_service.find_all
191
190
  Valkyrie.config.metadata_adapter.query_service.find_all_of_model(model: MyModel)
192
191
  ```
193
192
 
194
- The Wiki documents the usage of [Queries](https://github.com/samvera-labs/valkyrie/wiki/Queries),
195
- [Persistence](https://github.com/samvera-labs/valkyrie/wiki/Persistence), and
196
- [ChangeSets and Dirty Tracking](https://github.com/samvera-labs/valkyrie/wiki/ChangeSets-and-Dirty-Tracking).
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).
197
196
 
198
197
  ### Concurrency Support
199
198
  A Valkyrie repository may have concurrent updates, for example, from a load-balanced Rails application, or
200
199
  from multiple [Sidekiq](https://github.com/mperham/sidekiq) background workers). In order to prevent multiple
201
200
  simultaneous updates applied to the same resource from losing or corrupting data, Valkyrie supports optimistic
202
201
  locking. How to use optimistic locking with Valkyrie is documented on the [Optimistic Locking Wiki
203
- page](https://github.com/samvera-labs/valkyrie/wiki/Optimistic-Locking).
202
+ page](https://github.com/samvera/valkyrie/wiki/Optimistic-Locking).
204
203
 
205
204
  ### The Public API
206
205
  Valkyrie's public API is defined by the shared specs that are used to test each of its core classes.
@@ -214,7 +213,7 @@ shared specs, but there may be new ones. These new shared specs will fail in you
214
213
  custom adapters, but your application will still work.
215
214
 
216
215
  Using the shared specs in your own models is described in more detail on the [Shared Specs Wiki
217
- page](https://github.com/samvera-labs/valkyrie/wiki/Shared-Specs).
216
+ page](https://github.com/samvera/valkyrie/wiki/Shared-Specs).
218
217
 
219
218
  ### Fedora 5 Compatibility
220
219
  When configuring your adapter, include the `fedora_version` parameter in your metadata or storage adapter
@@ -286,4 +285,4 @@ This software has been developed by and is brought to you by the Samvera communi
286
285
 
287
286
  ## Contributing
288
287
 
289
- Bug reports and pull requests are welcome on GitHub at https://github.com/samvera-labs/valkyrie/.
288
+ Bug reports and pull requests are welcome on GitHub at https://github.com/samvera/valkyrie/.
data/Rakefile CHANGED
@@ -57,8 +57,14 @@ namespace :db do
57
57
  scope = ENV['SCOPE']
58
58
  verbose_was = ActiveRecord::Migration.verbose
59
59
  ActiveRecord::Migration.verbose = verbose
60
- ActiveRecord::Migrator.migrate(MIGRATIONS_DIR, version) do |migration|
61
- scope.blank? || scope == migration.scope
60
+ if ActiveRecord::Migrator.respond_to?(:migrate)
61
+ ActiveRecord::Migrator.migrate(MIGRATIONS_DIR, version) do |migration|
62
+ scope.blank? || scope == migration.scope
63
+ end
64
+ else
65
+ ActiveRecord::Base.connection.migration_context.migrate(version) do |migration|
66
+ scope.blank? || scope == migration.scope
67
+ end
62
68
  end
63
69
  ActiveRecord::Base.clear_cache!
64
70
  ensure
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 5.1.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 5.2.0"
6
+
7
+ gemspec path: "../"
data/lib/valkyrie.rb CHANGED
@@ -14,7 +14,6 @@ require 'valkyrie/rdf_patches'
14
14
  require 'json/ld'
15
15
  require 'logger'
16
16
  require 'rdf/vocab'
17
- require 'rails'
18
17
 
19
18
  module Valkyrie
20
19
  require 'valkyrie/id'
@@ -49,11 +48,15 @@ module Valkyrie
49
48
  end
50
49
 
51
50
  def environment
52
- Rails.env
51
+ if const_defined?(:Rails) && Rails.respond_to?(:env)
52
+ Rails.env
53
+ else
54
+ ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development"
55
+ end
53
56
  end
54
57
 
55
58
  def config_root_path
56
- if const_defined?(:Rails) && Rails.root
59
+ if const_defined?(:Rails) && Rails.respond_to?(:root)
57
60
  Rails.root
58
61
  else
59
62
  Pathname.new(Dir.pwd)
@@ -1,9 +1,13 @@
1
1
  # frozen_string_literal: true
2
- #
3
2
  module Valkyrie::Persistence
4
3
  # Implements the DataMapper Pattern to store metadata into Fedora
5
4
  module Fedora
6
- require 'active_triples'
5
+ # Deprecation to allow us to make pg an optional dependency
6
+ path = Bundler.definition.gemfiles.first
7
+ matches = File.readlines(path).select { |l| l =~ /gem ['"]ldp\b/ }
8
+ if matches.empty?
9
+ warn "[DEPRECATION] ldp will not be included as a dependency in Valkyrie's gemspec as of the next major release. Please add the gem directly to your Gemfile if you use a fedora adapter."
10
+ end
7
11
  require 'active_fedora'
8
12
  require 'valkyrie/persistence/fedora/permissive_schema'
9
13
  require 'valkyrie/persistence/fedora/metadata_adapter'
@@ -63,7 +63,7 @@ module Valkyrie::Persistence::Fedora
63
63
  g.proxy_in = proxy_in.try(:uri)
64
64
  g.next = self.next.try(:rdf_subject)
65
65
  g.prev = prev.try(:rdf_subject)
66
- g
66
+ g.graph
67
67
  end
68
68
 
69
69
  # Resolves the URI for the value of the list expression
@@ -104,10 +104,10 @@ module Valkyrie::Persistence::Fedora
104
104
  # Populates attributes for the LinkedNode
105
105
  # @param instance [ListNode]
106
106
  def populate(instance)
107
- instance.proxy_for = resource.proxy_for.first
108
- instance.proxy_in = resource.proxy_in.first
109
- instance.next_uri = resource.next.first
110
- instance.prev_uri = resource.prev.first
107
+ instance.proxy_for = resource.proxy_for
108
+ instance.proxy_in = resource.proxy_in
109
+ instance.next_uri = resource.next
110
+ instance.prev_uri = resource.prev
111
111
  end
112
112
 
113
113
  private
@@ -115,16 +115,33 @@ module Valkyrie::Persistence::Fedora
115
115
  # Constructs a set of triples using ActiveTriples as objects
116
116
  # @return [Valkyrie::Persistence::Fedora::ListNode::Resource]
117
117
  def resource
118
- @resource ||= Resource.new(uri, data: graph)
118
+ @resource ||= Resource.new(uri, graph: graph)
119
119
  end
120
120
  end
121
121
 
122
122
  # Class for providing a set of triples modeling linked list nodes
123
- class Resource < ActiveTriples::Resource
124
- property :proxy_for, predicate: ::RDF::Vocab::ORE.proxyFor, cast: false
125
- property :proxy_in, predicate: ::RDF::Vocab::ORE.proxyIn, cast: false
126
- property :next, predicate: ::RDF::Vocab::IANA.next, cast: false
127
- property :prev, predicate: ::RDF::Vocab::IANA.prev, cast: false
123
+ class Resource
124
+ def self.property(property, predicate:)
125
+ define_method property do
126
+ graph.query([uri, predicate, nil]).objects.first
127
+ end
128
+
129
+ define_method "#{property}=" do |val|
130
+ return if val.nil?
131
+ graph << [uri, predicate, val]
132
+ end
133
+ end
134
+
135
+ property :proxy_for, predicate: ::RDF::Vocab::ORE.proxyFor
136
+ property :proxy_in, predicate: ::RDF::Vocab::ORE.proxyIn
137
+ property :next, predicate: ::RDF::Vocab::IANA.next
138
+ property :prev, predicate: ::RDF::Vocab::IANA.prev
139
+
140
+ attr_reader :graph, :uri
141
+ def initialize(uri, graph: RDF::Graph.new)
142
+ @uri = uri
143
+ @graph = graph
144
+ end
128
145
  end
129
146
  end
130
147
  end
@@ -2,12 +2,19 @@
2
2
  module Valkyrie::Persistence
3
3
  # Implements the DataMapper Pattern to store metadata into Postgres
4
4
  module Postgres
5
+ # :nocov:
5
6
  # Deprecation to allow us to make pg an optional dependency
6
7
  path = Bundler.definition.gemfiles.first
7
8
  matches = File.readlines(path).select { |l| l =~ /gem ['"]pg\b/ }
8
9
  if matches.empty?
9
10
  warn "[DEPRECATION] pg will not be included as a dependency in Valkyrie's gemspec as of the next major release. Please add the gem directly to your Gemfile if you use a postgres adapter."
10
11
  end
12
+ matches = File.readlines(path).select { |l| l =~ /gem ['"]activerecord\b/ }
13
+ if matches.empty?
14
+ warn "[DEPRECATION] activerecord will not be included as a dependency in Valkyrie's gemspec as of the next major release." \
15
+ "Please add the gem directly to your Gemfile if you use a postgres adapter."
16
+ end
17
+ # :nocov:
11
18
 
12
19
  require 'valkyrie/persistence/postgres/metadata_adapter'
13
20
  end
@@ -2,6 +2,13 @@
2
2
  module Valkyrie::Persistence
3
3
  # Implements the DataMapper Pattern to store metadata into Solr
4
4
  module Solr
5
+ # Deprecation to allow us to make rsolr an optional dependency
6
+ path = Bundler.definition.gemfiles.first
7
+ matches = File.readlines(path).select { |l| l =~ /gem ['"]rsolr\b/ }
8
+ if matches.empty?
9
+ warn "[DEPRECATION] rsolr will not be included as a dependency in Valkyrie's gemspec as of the next major release. Please add the gem directly to your Gemfile if you use a solr adapter."
10
+ end
11
+ require 'valkyrie/persistence/postgres/metadata_adapter'
5
12
  require 'valkyrie/persistence/solr/metadata_adapter'
6
13
  require 'valkyrie/persistence/solr/composite_indexer'
7
14
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Valkyrie
3
- VERSION = "1.5.1"
3
+ VERSION = "1.6.0"
4
4
  end
@@ -168,7 +168,6 @@
168
168
  <fieldType class="solr.TextField" name="textSuggest" positionIncrementGap="100">
169
169
  <analyzer>
170
170
  <tokenizer class="solr.KeywordTokenizerFactory"/>
171
- <filter class="solr.StandardFilterFactory"/>
172
171
  <filter class="solr.LowerCaseFilterFactory"/>
173
172
  <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
174
173
  </analyzer>
data/tasks/dev.rake CHANGED
@@ -3,6 +3,7 @@
3
3
  namespace :server do
4
4
  desc "Start solr and fedora servers for testing"
5
5
  task :test do
6
+ require 'rails'
6
7
  require 'solr_wrapper'
7
8
  require 'fcrepo_wrapper'
8
9
  SolrWrapper.wrap(shared_solr_opts.merge(port: 8984, instance_dir: 'tmp/blacklight-core-test')) do |solr|
@@ -21,6 +22,7 @@ namespace :server do
21
22
 
22
23
  desc "Cleanup test servers"
23
24
  task :clean_test do
25
+ require 'rails'
24
26
  require 'solr_wrapper'
25
27
  require 'fcrepo_wrapper'
26
28
  SolrWrapper.instance(shared_solr_opts.merge(port: 8984, instance_dir: 'tmp/blacklight-core-test')).remove_instance_dir!
@@ -31,6 +33,7 @@ namespace :server do
31
33
 
32
34
  desc "Start solr and fedora servers for development"
33
35
  task :development do
36
+ require 'rails'
34
37
  require 'solr_wrapper'
35
38
  require 'fcrepo_wrapper'
36
39
 
data/tasks/docker.rake CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  require 'valkyrie'
3
3
 
4
- if Rails.env.development? || Rails.env.test?
4
+ if Valkyrie.environment == "development" || Valkyrie.environment == "test"
5
5
  begin
6
6
  require 'docker/stack/rake_task'
7
7
 
@@ -17,7 +17,7 @@ if Rails.env.development? || Rails.env.test?
17
17
 
18
18
  desc 'Spin up test stack and run specs'
19
19
  task :spec do
20
- Rails.env = 'test'
20
+ ENV["RACK_ENV"] = "test"
21
21
  Docker::Stack::Controller.new(project: 'valkyrie', cleanup: true).with_containers do
22
22
  Rake::Task['db:create'].invoke
23
23
  Rake::Task['db:migrate'].invoke
data/valkyrie.gemspec CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
33
33
  spec.add_dependency 'pg'
34
34
  spec.add_dependency 'json-ld'
35
35
  spec.add_dependency 'json'
36
- spec.add_dependency 'active-triples'
36
+ spec.add_dependency 'ldp'
37
37
 
38
38
  spec.add_development_dependency "bundler", "~> 1.16"
39
39
  spec.add_development_dependency "rake", "~> 10.0"
@@ -43,12 +43,12 @@ Gem::Specification.new do |spec|
43
43
  spec.add_development_dependency "pry-byebug"
44
44
  spec.add_development_dependency "database_cleaner"
45
45
  spec.add_development_dependency "simplecov"
46
- spec.add_development_dependency "coveralls"
47
46
  spec.add_development_dependency "bixby"
48
47
  spec.add_development_dependency 'yard'
49
48
  spec.add_development_dependency 'solr_wrapper'
50
49
  spec.add_development_dependency 'fcrepo_wrapper'
51
50
  spec.add_development_dependency 'docker-stack', '~> 0.2.6'
52
- spec.add_development_dependency 'activerecord', '~> 5.1.0'
51
+ spec.add_development_dependency 'activerecord'
53
52
  spec.add_development_dependency 'timecop'
53
+ spec.add_development_dependency 'appraisal'
54
54
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: valkyrie
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trey Pendragon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-08 00:00:00.000000000 Z
11
+ date: 2019-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-struct
@@ -207,7 +207,7 @@ dependencies:
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
209
  - !ruby/object:Gem::Dependency
210
- name: active-triples
210
+ name: ldp
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
213
  - - ">="
@@ -332,20 +332,6 @@ dependencies:
332
332
  - - ">="
333
333
  - !ruby/object:Gem::Version
334
334
  version: '0'
335
- - !ruby/object:Gem::Dependency
336
- name: coveralls
337
- requirement: !ruby/object:Gem::Requirement
338
- requirements:
339
- - - ">="
340
- - !ruby/object:Gem::Version
341
- version: '0'
342
- type: :development
343
- prerelease: false
344
- version_requirements: !ruby/object:Gem::Requirement
345
- requirements:
346
- - - ">="
347
- - !ruby/object:Gem::Version
348
- version: '0'
349
335
  - !ruby/object:Gem::Dependency
350
336
  name: bixby
351
337
  requirement: !ruby/object:Gem::Requirement
@@ -420,16 +406,16 @@ dependencies:
420
406
  name: activerecord
421
407
  requirement: !ruby/object:Gem::Requirement
422
408
  requirements:
423
- - - "~>"
409
+ - - ">="
424
410
  - !ruby/object:Gem::Version
425
- version: 5.1.0
411
+ version: '0'
426
412
  type: :development
427
413
  prerelease: false
428
414
  version_requirements: !ruby/object:Gem::Requirement
429
415
  requirements:
430
- - - "~>"
416
+ - - ">="
431
417
  - !ruby/object:Gem::Version
432
- version: 5.1.0
418
+ version: '0'
433
419
  - !ruby/object:Gem::Dependency
434
420
  name: timecop
435
421
  requirement: !ruby/object:Gem::Requirement
@@ -444,6 +430,20 @@ dependencies:
444
430
  - - ">="
445
431
  - !ruby/object:Gem::Version
446
432
  version: '0'
433
+ - !ruby/object:Gem::Dependency
434
+ name: appraisal
435
+ requirement: !ruby/object:Gem::Requirement
436
+ requirements:
437
+ - - ">="
438
+ - !ruby/object:Gem::Version
439
+ version: '0'
440
+ type: :development
441
+ prerelease: false
442
+ version_requirements: !ruby/object:Gem::Requirement
443
+ requirements:
444
+ - - ">="
445
+ - !ruby/object:Gem::Version
446
+ version: '0'
447
447
  description:
448
448
  email:
449
449
  - tpendragon@princeton.edu
@@ -459,6 +459,8 @@ files:
459
459
  - ".rspec"
460
460
  - ".rubocop.yml"
461
461
  - ".rubocop_todo.yml"
462
+ - ".tool-versions"
463
+ - Appraisals
462
464
  - CHANGELOG.md
463
465
  - CODE_OF_CONDUCT.md
464
466
  - CONTRIBUTING.md
@@ -484,6 +486,8 @@ files:
484
486
  - db/migrate/20180802220739_add_optimistic_locking_to_orm_resources.rb
485
487
  - db/schema.rb
486
488
  - db/seeds.rb
489
+ - gemfiles/activerecord_5_1.gemfile
490
+ - gemfiles/activerecord_5_2.gemfile
487
491
  - lib/config/database_connection.rb
488
492
  - lib/generators/valkyrie/resource_generator.rb
489
493
  - lib/generators/valkyrie/templates/resource.rb.erb
@@ -607,7 +611,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
607
611
  version: '0'
608
612
  requirements: []
609
613
  rubyforge_project:
610
- rubygems_version: 2.7.7
614
+ rubygems_version: 2.7.6
611
615
  signing_key:
612
616
  specification_version: 4
613
617
  summary: An ORM using the Data Mapper pattern, specifically built to solve Digital