active_annotations 0.2.2 → 0.3.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: d34f9e85da537d14ac22967ea3592c74810f3fb9
4
- data.tar.gz: 96ca561d94834c2d73e938c7347eb091ed605933
2
+ SHA256:
3
+ metadata.gz: f0f1ea037351be5831903cc878555dd6a649f2a2f446497c92b2390aa50e94e6
4
+ data.tar.gz: 44a3c8f11dd2f4ff7a6fdf6182e7581a1b78dd2b257de4324956679dfcfb2aa9
5
5
  SHA512:
6
- metadata.gz: ccb6b7fcf53e6ff98b5558c1e2708cddfe460014c801e955c3e498f8ceeec80bc493a252a1ca7ea5b90980aaca4b28cd7d9c1ca2c5c569a8bd2a3d3f9f6093fd
7
- data.tar.gz: 32b2d972f14e2ba6ce9c836113b9fc2ddd6768180801df53a7818d3a67f8e3b3e6b242095c50684a865de939812f140a223abeb530464ded1c3feec6e7077391
6
+ metadata.gz: 0e9bb68b9cad2a487aa320f591fe7531c6c7abc5d365ccea2b0001354afbcbab9481f42c0dd7b631c9a7143d49865c89651daf59b824c235e1dca2923d206f42
7
+ data.tar.gz: 5c9e1f6157a5a7c0fd6c38e0c419a2908eadb6566b2b4038932685d94e15bb63d7e9accb13ceef7021d55825d5b2d39cf83ef20391de8ef6dcb7645c5464d95d
@@ -0,0 +1,54 @@
1
+ version: 2.1
2
+ orbs:
3
+ samvera: samvera/circleci-orb@1.0.0
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
+ executor:
15
+ name: 'samvera/ruby'
16
+ ruby_version: << parameters.ruby_version >>
17
+ environment:
18
+ RAILS_VERSION: << parameters.rails_version >>
19
+ steps:
20
+ - samvera/cached_checkout
21
+ - run:
22
+ name: Check for 'master' branch
23
+ command: |
24
+ git fetch --all --quiet --prune --prune-tags
25
+ if [[ -n "$(git branch --all --list master */master)" ]]; then
26
+ echo "A branch named 'master' was found. Please remove it."
27
+ echo "$(git branch --all --list master */master)"
28
+ fi
29
+ [[ -z "$(git branch --all --list master */master)" ]]
30
+
31
+ - samvera/bundle:
32
+ ruby_version: << parameters.ruby_version >>
33
+ bundler_version: << parameters.bundler_version >>
34
+
35
+ - samvera/engine_cart_generate:
36
+ cache_key: v1-internal-test-app-{{ checksum "active_annotations.gemspec" }}-{{ checksum "spec/test_app_templates/lib/generators/test_app_generator.rb" }}-<< parameters.rails_version >>-<< parameters.ruby_version >>
37
+
38
+ - samvera/bundle:
39
+ ruby_version: << parameters.ruby_version >>
40
+ bundler_version: << parameters.bundler_version >>
41
+
42
+ - samvera/parallel_rspec
43
+
44
+ workflows:
45
+ ci:
46
+ jobs:
47
+ - bundle_lint_test:
48
+ name: ruby2-7_rails5-2
49
+ ruby_version: 2.7.5
50
+ rails_version: 5.2.6
51
+ - bundle_lint_test:
52
+ name: ruby2-6_rails5-2
53
+ ruby_version: 2.6.9
54
+ rails_version: 5.2.6
data/Gemfile CHANGED
@@ -2,6 +2,10 @@ source 'https://rubygems.org'
2
2
  # Specify your gem's dependencies in active_annotations.gemspec
3
3
  gemspec
4
4
 
5
+ group :test do
6
+ gem 'rspec_junit_formatter'
7
+ end
8
+
5
9
  # BEGIN ENGINE_CART BLOCK
6
10
  # engine_cart: 1.0.1
7
11
  # engine_cart stanza: 0.10.0
@@ -20,19 +24,20 @@ else
20
24
  if ENV['RAILS_VERSION']
21
25
  if ENV['RAILS_VERSION'] == 'edge'
22
26
  gem 'rails', github: 'rails/rails'
23
- ENV['ENGINE_CART_RAILS_OPTIONS'] = '--edge --skip-turbolinks'
27
+ ENV['ENGINE_CART_RAILS_OPTIONS'] = '--edge --skip-turbolinks --skip-javascript'
24
28
  else
25
29
  gem 'rails', ENV['RAILS_VERSION']
30
+ ENV['ENGINE_CART_RAILS_OPTIONS'] = '--skip-turbolinks --skip-javascript'
31
+ end
32
+ case ENV['RAILS_VERSION']
33
+ when /^6.0/
34
+ gem 'sass-rails', '>= 6'
35
+ gem 'webpacker', '~> 4.0'
36
+ when /^5.[12]/
37
+ gem 'sass-rails', '~> 5.0'
38
+ gem 'sprockets', '~> 3.7'
39
+ gem 'thor', '~> 0.20'
26
40
  end
27
- end
28
-
29
- case ENV['RAILS_VERSION']
30
- when /^4.2/
31
- gem 'responders', '~> 2.0'
32
- gem 'sass-rails', '>= 5.0'
33
- gem 'coffee-rails', '~> 4.1.0'
34
- when /^4.[01]/
35
- gem 'sass-rails', '< 5.0'
36
41
  end
37
42
  end
38
43
  # END ENGINE_CART BLOCK
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # ActiveAnnotations
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/active_annotations.png)](http://badge.fury.io/rb/active_annotations)
4
- [![Build Status](https://travis-ci.org/avalonmediasystem/active_annotations.svg?branch=master)](https://travis-ci.org/avalonmediasystem/active_annotations)
4
+ [![Build Status](https://circleci.com/gh/avalonmediasystem/active_annotations.svg?style=svg)](https://circleci.com/gh/avalonmediasystem/active_annotations)
5
5
  [![Coverage Status](https://coveralls.io/repos/avalonmediasystem/active_annotations/badge.svg?branch=master&service=github)](https://coveralls.io/github/avalonmediasystem/active_annotations?branch=master)
6
6
 
7
7
  ActiveAnnotations is a gem for modeling simple [OpenAnnotation](http://www.openannotation.org/)-compatible annotations to Rails. It is ActiveRecord compatible, but is backed by an RDF graph that serializes (by default) to [JSON-LD](http://json-ld.org/).
@@ -19,13 +19,13 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
+ spec.add_dependency 'rails', '~> 5.2'
22
23
  spec.add_dependency "json-ld"
23
- spec.add_dependency "rdf-vocab", "~> 2.1.0"
24
- spec.add_development_dependency "bundler", "~> 1.11"
25
- spec.add_development_dependency "rake", "~> 11.0"
26
- spec.add_development_dependency "rspec", "~> 3.0"
27
- spec.add_development_dependency "engine_cart", "~> 1.0.1"
24
+ spec.add_dependency "rdf-vocab", ">= 2.1.0"
25
+ spec.add_development_dependency "bundler"
26
+ spec.add_development_dependency "rake"
27
+ spec.add_development_dependency "rspec"
28
+ spec.add_development_dependency "engine_cart"
28
29
  spec.add_development_dependency "faker"
29
- spec.add_development_dependency "coveralls"
30
30
  spec.add_development_dependency "simplecov"
31
31
  end
@@ -1,4 +1,4 @@
1
- class CreateAnnotations < ActiveRecord::Migration
1
+ class CreateAnnotations < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :annotations do |t|
4
4
  t.string :uuid
@@ -3,7 +3,7 @@ module ActiveAnnotations
3
3
  class << self
4
4
  def local_document_loader(url, options={}, &block)
5
5
  if RDF::URI(url) == RDF::URI(RDFAnnotation::CONTEXT_URI)
6
- remote_document = JSON::LD::API::RemoteDocument.new(url, File.read(File.expand_path('../oa.jsonld',__FILE__)))
6
+ remote_document = JSON::LD::API::RemoteDocument.new(File.read(File.expand_path('../oa.jsonld',__FILE__)), base: url)
7
7
  block_given? ? yield(remote_document) : remote_document
8
8
  else
9
9
  # :nocov:
@@ -29,7 +29,8 @@ module ActiveAnnotations
29
29
  input = JSON.parse(graph.dump :jsonld, standard_prefixes: true, prefixes: { oa: RDF::Vocab::OA.to_iri.value })
30
30
  frame = YAML.load(File.read(File.expand_path('../frame.yml',__FILE__)))
31
31
  output = JSON::LD::API.frame(input, frame, validate: false, omitDefault: true, documentLoader: DocumentLoader.document_loader)
32
- output.merge!(output.delete('@graph')[0])
32
+ graph = output.delete('@graph').try(:first)
33
+ output.merge!(graph) if graph
33
34
  if opts[:pretty_json]
34
35
  JSON.pretty_generate output
35
36
  else
@@ -1,3 +1,3 @@
1
1
  module ActiveAnnotations
2
- VERSION = "0.2.2"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -5,8 +5,6 @@ RSpec::Core::RakeTask.new(:spec) do |t|
5
5
  t.pattern = 'spec/**/*_spec.rb'
6
6
  end
7
7
 
8
- EngineCart.fingerprint_proc = EngineCart.rails_fingerprint_proc
9
-
10
8
  desc "Run test suite"
11
9
  task :ci => ['engine_cart:generate'] do
12
10
  Rake::Task['spec'].invoke
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_annotations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael B. Klein
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-08 00:00:00.000000000 Z
11
+ date: 2021-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '5.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '5.2'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: json-ld
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -28,74 +42,60 @@ dependencies:
28
42
  name: rdf-vocab
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
- - - "~>"
45
+ - - ">="
32
46
  - !ruby/object:Gem::Version
33
47
  version: 2.1.0
34
48
  type: :runtime
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
- - - "~>"
52
+ - - ">="
39
53
  - !ruby/object:Gem::Version
40
54
  version: 2.1.0
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - "~>"
59
+ - - ">="
46
60
  - !ruby/object:Gem::Version
47
- version: '1.11'
61
+ version: '0'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - "~>"
66
+ - - ">="
53
67
  - !ruby/object:Gem::Version
54
- version: '1.11'
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rake
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - "~>"
73
+ - - ">="
60
74
  - !ruby/object:Gem::Version
61
- version: '11.0'
75
+ version: '0'
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - "~>"
80
+ - - ">="
67
81
  - !ruby/object:Gem::Version
68
- version: '11.0'
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: rspec
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
- - - "~>"
87
+ - - ">="
74
88
  - !ruby/object:Gem::Version
75
- version: '3.0'
89
+ version: '0'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
- - - "~>"
94
+ - - ">="
81
95
  - !ruby/object:Gem::Version
82
- version: '3.0'
96
+ version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: engine_cart
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: 1.0.1
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: 1.0.1
97
- - !ruby/object:Gem::Dependency
98
- name: faker
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -109,7 +109,7 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: coveralls
112
+ name: faker
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
@@ -143,10 +143,9 @@ executables: []
143
143
  extensions: []
144
144
  extra_rdoc_files: []
145
145
  files:
146
- - ".coveralls.yml"
146
+ - ".circleci/config.yml"
147
147
  - ".gitignore"
148
148
  - ".rspec"
149
- - ".travis.yml"
150
149
  - Gemfile
151
150
  - LICENSE
152
151
  - README.md
@@ -182,8 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
181
  - !ruby/object:Gem::Version
183
182
  version: '0'
184
183
  requirements: []
185
- rubyforge_project:
186
- rubygems_version: 2.5.1
184
+ rubygems_version: 3.1.2
187
185
  signing_key:
188
186
  specification_version: 4
189
187
  summary: OpenAnnontations + JSON-LD + ActiveRecord
data/.coveralls.yml DELETED
@@ -1 +0,0 @@
1
- repo_token: W7waugqQH8STNmsf9kX0CldGQPeB0A4wM
data/.travis.yml DELETED
@@ -1,17 +0,0 @@
1
- language: ruby
2
- sudo: false
3
- rvm:
4
- - 2.2.5
5
- - 2.3.1
6
- env:
7
- global:
8
- - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
9
- matrix:
10
- - RAILS_VERSION='~>4.1.10'
11
- - RAILS_VERSION='~>4.2.5'
12
-
13
- before_install:
14
- - gem install bundler
15
-
16
- notifications:
17
- irc: "irc.freenode.org#projectvov"