active_fedora-datastreams 0.1.0 → 0.4.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
- SHA1:
3
- metadata.gz: 1bd06d5a97b4fd602e01da55dabd0eb63223606b
4
- data.tar.gz: 5e7b41bf053c7fdd2021af984ce0a31207bdb77c
2
+ SHA256:
3
+ metadata.gz: aa947dc2634f37e84f14ccbd616c9d1e7e6590a6ca3688ab924c187d1a7bf652
4
+ data.tar.gz: d9de5c6aead32799f30acf90f64e1e0e7e42860cf4e3801b53dc1b4099417810
5
5
  SHA512:
6
- metadata.gz: 51cb0a96ba7c135ce6454cf0b8a65b91849e8ecf0b040613a40a69628ab6c44b0cd9f4d2b14229fcb71667b4fbcc363fc7e21177cd7449073175e1f3db971062
7
- data.tar.gz: 98d586bf304ed09a8c546157a44cfffb1d2db256349a97fdcc042c477f8537b95d0c5f691c6f7588a22604e5c20fe24f1dfb4dcd421220d771d74cd46da45644
6
+ metadata.gz: c20d66986785b7dab17021b0d46a4d507bc44429f7c6d406cfb1d5f71fd9cf126b38fd5f917acbf6ba88338ed755d2d582d31794939c8a2ed3b4056e0d30d651
7
+ data.tar.gz: fba2e3bc273344b15d7e6164137ed3ef76ec17fd95d72b89fd1c2c9552477d57f20dc497fd2580c7eb5334596b0cc1882ef5603fb1ec1f6179a949eacd3b60ec
@@ -0,0 +1,66 @@
1
+ version: 2.1
2
+ orbs:
3
+ samvera: samvera/circleci-orb@1
4
+ jobs:
5
+ bundle_lint_test:
6
+ parameters:
7
+ ruby_version:
8
+ type: string
9
+ bundler_version:
10
+ type: string
11
+ default: 2.0.1
12
+ rails_version:
13
+ type: string
14
+ solr_port:
15
+ type: string
16
+ default: '8985'
17
+ executor:
18
+ name: 'samvera/ruby_fcrepo_solr'
19
+ ruby_version: << parameters.ruby_version >>
20
+ solr_version: 7-slim
21
+ environment:
22
+ RAILS_VERSION: << parameters.rails_version >>
23
+ SOLR_TEST_PORT: << parameters.solr_port >>
24
+ steps:
25
+ - samvera/cached_checkout
26
+ - checkout
27
+ - run:
28
+ name: Check for 'master' branch
29
+ command: |
30
+ git fetch --all --quiet --prune --prune-tags
31
+ if [[ -n "$(git branch --all --list master */master)" ]]; then
32
+ echo "A branch named 'master' was found. Please remove it."
33
+ echo "$(git branch --all --list master */master)"
34
+ fi
35
+ [[ -z "$(git branch --all --list master */master)" ]]
36
+
37
+ - samvera/bundle:
38
+ ruby_version: << parameters.ruby_version >>
39
+ bundler_version: << parameters.bundler_version >>
40
+
41
+ - samvera/install_solr_core
42
+
43
+ # Skip rubocop for now
44
+ #- samvera/rubocop
45
+
46
+ - samvera/parallel_rspec
47
+
48
+ workflows:
49
+ ci:
50
+ jobs:
51
+ - bundle_lint_test:
52
+ name: ruby2-7_rails6-0
53
+ ruby_version: 2.7.4
54
+ rails_version: 6.0.4.6
55
+ - bundle_lint_test:
56
+ name: ruby2-7_rails5-2
57
+ ruby_version: 2.7.4
58
+ rails_version: 5.2.6
59
+ - bundle_lint_test:
60
+ name: ruby2-6_rails5-2
61
+ ruby_version: 2.6.8
62
+ rails_version: 5.2.6
63
+ - bundle_lint_test:
64
+ name: ruby2-5_rails5-2
65
+ ruby_version: 2.5.9
66
+ rails_version: 5.2.6
data/.travis.yml CHANGED
@@ -1,5 +1,21 @@
1
1
  sudo: false
2
+ cache: bundler
2
3
  language: ruby
3
- rvm:
4
- - 2.3.1
5
- before_install: gem install bundler -v 1.12.5
4
+ rvm: 2.4
5
+ matrix:
6
+ include:
7
+ - rvm: 2.3
8
+ env: RAILS_VERSION=4.2.10
9
+ BUNDLER_VERSION=1.17.3
10
+ - env: RAILS_VERSION=5.0.7
11
+ - env: RAILS_VERSION=5.1.6
12
+ - rvm: 2.5
13
+ - env: RAILS_VERSION=5.2.1
14
+ - rvm: 2.6
15
+ global_env:
16
+ - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
17
+ before_install:
18
+ - gem update --system
19
+ - if [ ! -z $BUNDLER_VERSION ]; then gem install bundler -v $BUNDLER_VERSION; else gem install bundler; fi
20
+ before_script:
21
+ - jdk_switcher use oraclejdk8
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ gem 'activemodel', ENV['RAILS_VERSION'] if ENV['RAILS_VERSION']
4
+
3
5
  # Specify your gem's dependencies in active_fedora-datastreams.gemspec
4
6
  gemspec
data/README.md CHANGED
@@ -30,5 +30,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
30
30
 
31
31
  ## Contributing
32
32
 
33
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/active_fedora-datastreams. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
33
+ If you're working on a PR for this project, create a feature branch off of `main`.
34
34
 
35
+ This repository follows the [Samvera Community Code of Conduct](https://samvera.atlassian.net/wiki/spaces/samvera/pages/405212316/Code+of+Conduct) and [language recommendations](https://github.com/samvera/maintenance/blob/main/templates/CONTRIBUTING.md#language). Please ***do not*** create a branch called `master` for this repository or as part of your pull request; the branch will either need to be removed or renamed before it can be considered for inclusion in the code base and history of this repository.
36
+
37
+ Bug reports and pull requests are welcome on GitHub at https://github.com/samvera-labs/active_fedora-datastreams. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
@@ -17,15 +17,19 @@ Gem::Specification.new do |spec|
17
17
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.add_dependency "active-fedora", ">= 11.0.0.pre", "< 12"
20
+ spec.add_dependency "active-fedora", ">= 11.0.0.pre", "< 14"
21
+ spec.add_dependency "activemodel", "< 6.1" # Pin this because there are test failures with rails 6.1
21
22
  spec.add_dependency "om", "~> 3.1"
22
23
  spec.add_dependency "nom-xml", ">= 0.5.1"
23
24
  spec.add_dependency "rdf-rdfxml", '~> 2.0'
24
- spec.add_development_dependency "bundler", "~> 1.12"
25
+ spec.add_dependency "rdf", "< 3.2" # Pin this to avoid a breaking change introduced in 3.2.0
25
26
  spec.add_development_dependency "rake", "~> 10.0"
26
27
  spec.add_development_dependency "rspec", "~> 3.0"
27
- spec.add_development_dependency "solr_wrapper", "~> 0.4"
28
- spec.add_development_dependency 'fcrepo_wrapper', '~> 0.2'
28
+ spec.add_development_dependency 'rspec_junit_formatter'
29
+ spec.add_development_dependency 'coveralls'
30
+ spec.add_development_dependency 'simplecov'
31
+ spec.add_development_dependency "solr_wrapper", "~> 2.1"
32
+ spec.add_development_dependency 'fcrepo_wrapper', '~> 0.9'
29
33
  spec.add_development_dependency "rubocop", '~> 0.42'
30
34
  spec.add_development_dependency "rubocop-rspec", '~> 1.4'
31
35
  spec.add_development_dependency "equivalent-xml"
data/config/fedora.yml CHANGED
@@ -1,14 +1,14 @@
1
1
  development:
2
2
  user: fedoraAdmin
3
3
  password: fedoraAdmin
4
- url: http://127.0.0.1:<%= ENV['FCREPO_DEVELOPMENT_PORT'] || 8984 %>/rest
5
- base_path: /dev
4
+ url: http://<%= ENV['FCREPO_HOST'] || 'localhost' %>:<%= ENV['FCREPO_DEVELOPMENT_PORT'] || ENV['FCREPO_PORT'] || 8984 %>/<%= ENV['FCREPO_REST_PATH'] || 'rest' %>
5
+ base_path: <%= ENV['FCREPO_BASE_PATH'] || '/dev' %>
6
6
  test:
7
7
  user: fedoraAdmin
8
8
  password: fedoraAdmin
9
- url: http://localhost:<%= ENV['FCREPO_TEST_PORT'] || 8986 %>/rest
10
- base_path: /test
9
+ url: http://<%= ENV['FCREPO_HOST'] || 'localhost' %>:<%= ENV['FCREPO_TEST_PORT'] || ENV['FCREPO_PORT'] || 8986 %>/<%= ENV['FCREPO_REST_PATH'] || 'rest' %>
10
+ base_path: <%= ENV['FCREPO_BASE_PATH'] || '/test' %>
11
11
  production:
12
12
  user: fedoraAdmin
13
13
  password: fedoraAdmin
14
- url: http://127.0.0.1:8983/fedora/rest
14
+ url: http://<%= ENV['FCREPO_HOST'] || 'localhost' %>:<%= ENV['FCREPO_PORT'] || 8983 %>/<%= ENV['FCREPO_REST_PATH'] || 'rest' %>
@@ -44,22 +44,22 @@ module ActiveFedora
44
44
  end
45
45
 
46
46
  def refresh_attributes
47
- changed_attributes.clear
47
+ clear_attribute_changes(changes.keys)
48
48
  @ng_xml = nil
49
49
  end
50
50
 
51
51
  # don't want content eagerly loaded by proxy, so implementing methods that would be implemented by define_attribute_methods
52
52
  def ng_xml_will_change!
53
- changed_attributes['ng_xml'] = nil
53
+ attribute_will_change!("ng_xml")
54
54
  end
55
55
 
56
56
  def ng_xml_doesnt_change!
57
- changed_attributes.delete('ng_xml')
57
+ clear_attribute_changes("ng_xml")
58
58
  end
59
59
 
60
60
  # don't want content eagerly loaded by proxy, so implementing methods that would be implemented by define_attribute_methods
61
61
  def ng_xml_changed?
62
- changed_attributes.key? 'ng_xml'
62
+ changed_attributes.include?("ng_xml")
63
63
  end
64
64
 
65
65
  def remote_content
@@ -108,7 +108,7 @@ module ActiveFedora
108
108
  end
109
109
 
110
110
  def autocreate?
111
- changed_attributes.key? :profile
111
+ changed_attributes.include? :profile
112
112
  end
113
113
 
114
114
  def xml_loaded
@@ -1,5 +1,5 @@
1
1
  module ActiveFedora
2
2
  module Datastreams
3
- VERSION = "0.1.0".freeze
3
+ VERSION = "0.4.0".freeze
4
4
  end
5
5
  end
@@ -1,3 +1,5 @@
1
+ require 'tempfile'
2
+
1
3
  module ActiveFedora
2
4
  class RDFDatastream < File
3
5
  include ActiveTriples::NestedAttributes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_fedora-datastreams
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-18 00:00:00.000000000 Z
11
+ date: 2022-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active-fedora
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 11.0.0.pre
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '12'
22
+ version: '14'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,21 @@ dependencies:
29
29
  version: 11.0.0.pre
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '12'
32
+ version: '14'
33
+ - !ruby/object:Gem::Dependency
34
+ name: activemodel
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "<"
38
+ - !ruby/object:Gem::Version
39
+ version: '6.1'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '6.1'
33
47
  - !ruby/object:Gem::Dependency
34
48
  name: om
35
49
  requirement: !ruby/object:Gem::Requirement
@@ -73,19 +87,19 @@ dependencies:
73
87
  - !ruby/object:Gem::Version
74
88
  version: '2.0'
75
89
  - !ruby/object:Gem::Dependency
76
- name: bundler
90
+ name: rdf
77
91
  requirement: !ruby/object:Gem::Requirement
78
92
  requirements:
79
- - - "~>"
93
+ - - "<"
80
94
  - !ruby/object:Gem::Version
81
- version: '1.12'
82
- type: :development
95
+ version: '3.2'
96
+ type: :runtime
83
97
  prerelease: false
84
98
  version_requirements: !ruby/object:Gem::Requirement
85
99
  requirements:
86
- - - "~>"
100
+ - - "<"
87
101
  - !ruby/object:Gem::Version
88
- version: '1.12'
102
+ version: '3.2'
89
103
  - !ruby/object:Gem::Dependency
90
104
  name: rake
91
105
  requirement: !ruby/object:Gem::Requirement
@@ -114,34 +128,76 @@ dependencies:
114
128
  - - "~>"
115
129
  - !ruby/object:Gem::Version
116
130
  version: '3.0'
131
+ - !ruby/object:Gem::Dependency
132
+ name: rspec_junit_formatter
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: '0'
138
+ type: :development
139
+ prerelease: false
140
+ version_requirements: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: '0'
145
+ - !ruby/object:Gem::Dependency
146
+ name: coveralls
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ type: :development
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
159
+ - !ruby/object:Gem::Dependency
160
+ name: simplecov
161
+ requirement: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - ">="
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: '0'
117
173
  - !ruby/object:Gem::Dependency
118
174
  name: solr_wrapper
119
175
  requirement: !ruby/object:Gem::Requirement
120
176
  requirements:
121
177
  - - "~>"
122
178
  - !ruby/object:Gem::Version
123
- version: '0.4'
179
+ version: '2.1'
124
180
  type: :development
125
181
  prerelease: false
126
182
  version_requirements: !ruby/object:Gem::Requirement
127
183
  requirements:
128
184
  - - "~>"
129
185
  - !ruby/object:Gem::Version
130
- version: '0.4'
186
+ version: '2.1'
131
187
  - !ruby/object:Gem::Dependency
132
188
  name: fcrepo_wrapper
133
189
  requirement: !ruby/object:Gem::Requirement
134
190
  requirements:
135
191
  - - "~>"
136
192
  - !ruby/object:Gem::Version
137
- version: '0.2'
193
+ version: '0.9'
138
194
  type: :development
139
195
  prerelease: false
140
196
  version_requirements: !ruby/object:Gem::Requirement
141
197
  requirements:
142
198
  - - "~>"
143
199
  - !ruby/object:Gem::Version
144
- version: '0.2'
200
+ version: '0.9'
145
201
  - !ruby/object:Gem::Dependency
146
202
  name: rubocop
147
203
  requirement: !ruby/object:Gem::Requirement
@@ -191,6 +247,7 @@ executables: []
191
247
  extensions: []
192
248
  extra_rdoc_files: []
193
249
  files:
250
+ - ".circleci/config.yml"
194
251
  - ".gitignore"
195
252
  - ".rspec"
196
253
  - ".rubocop.yml"
@@ -232,8 +289,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
232
289
  - !ruby/object:Gem::Version
233
290
  version: '0'
234
291
  requirements: []
235
- rubyforge_project:
236
- rubygems_version: 2.5.1
292
+ rubygems_version: 3.1.6
237
293
  signing_key:
238
294
  specification_version: 4
239
295
  summary: Datastreams for ActiveFedora