annotot 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0a6e68f92ce603c2706ef989f9633763baf55a32
4
- data.tar.gz: bad9ec21f4eea7c65e3f45ddaec9ad58e0090143
2
+ SHA256:
3
+ metadata.gz: f30142a82474f3723a5d0e041a7b26bce696b1aa975d6b4dc3da81b7cc89ad43
4
+ data.tar.gz: 1f3d9a4ebb62364cb8ca4a2eea465abc6e4a461b397a61949afe4380c0c2f200
5
5
  SHA512:
6
- metadata.gz: 9b8933b78ef7a1545dde3507f42581b47b3faaab50b4d121e3eebe384bc686bb1386c416512f839a41589ceb53ab340b7977fa4ef8468da5fc6f1b8405b0cd28
7
- data.tar.gz: b9d4374f43d1999d59dd92b289925d4cd539ef39e2c2ff8b0a8dca484167518ec0d65d66c13485a7656641436cd42ec47904eea835e7d8a4e093933b3919a131
6
+ metadata.gz: bfbefc765005d29ab2ec2810941692a93a2d02111701c86648ba9e08efd4b21ee6f639ebf6ea209a185777e7b8020d013b1244c34dedbaff4a3b48ee5dd39421
7
+ data.tar.gz: 0a93107a49bf745413b4f515e6ceb072d62159f9c5d47919bf615b7b22eef27e4e1af984cf10ea647a0664491552f5f58dbcd666562a0bd3dccf784bf7442059
@@ -2,18 +2,26 @@ require_dependency "annotot/application_controller"
2
2
 
3
3
  module Annotot
4
4
  class AnnotationsController < ApplicationController
5
- before_action :set_annotation, only: %i[update destroy]
5
+ before_action :set_annotation, only: %i[update destroy show]
6
6
 
7
7
  # GET /annotations
8
8
  def index
9
9
  @annotations = Annotation.where(canvas: annotation_search_params)
10
10
  end
11
11
 
12
+ # GET /annotations
13
+ def show; end
14
+
12
15
  # Get /annotations/lists
13
16
  def lists
14
17
  @annotations = Annotation.where(canvas: annotation_search_params)
15
18
  end
16
19
 
20
+ # Get /annotations/pages
21
+ def pages
22
+ @annotations = Annotation.where(canvas: annotation_search_params)
23
+ end
24
+
17
25
  # POST /annotations
18
26
  def create
19
27
  @annotation = Annotation.new(annotation_params)
@@ -0,0 +1,4 @@
1
+ json.set! '@context', 'http://iiif.io/api/presentation/3/context.json'
2
+ json.set! 'id', request.original_url
3
+ json.set! 'type', 'AnnotationPage'
4
+ json.items(@annotations.map { |a| JSON.parse(a.data) })
@@ -0,0 +1 @@
1
+ <%= JSON.parse(@annotation.data).to_json.html_safe %>
@@ -1,7 +1,8 @@
1
1
  Annotot::Engine.routes.draw do
2
- resources :annotations, path: '/', except: %i[new edit show], defaults: { format: :json } do
2
+ resources :annotations, path: '/', except: %i[new edit], defaults: { format: :json } do
3
3
  collection do
4
4
  get 'lists'
5
+ get 'pages'
5
6
  end
6
7
  end
7
8
  end
@@ -1,3 +1,3 @@
1
1
  module Annotot
2
- VERSION = '0.6.0'
2
+ VERSION = '0.7.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: annotot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Reed
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-05 00:00:00.000000000 Z
11
+ date: 2020-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -117,6 +117,8 @@ files:
117
117
  - app/models/annotot/application_record.rb
118
118
  - app/views/annotot/annotations/index.json.erb
119
119
  - app/views/annotot/annotations/lists.json.jbuilder
120
+ - app/views/annotot/annotations/pages.json.jbuilder
121
+ - app/views/annotot/annotations/show.json.erb
120
122
  - app/views/layouts/annotot/application.html.erb
121
123
  - config/routes.rb
122
124
  - db/migrate/20180215183225_create_annotot_annotations.rb
@@ -144,8 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
146
  - !ruby/object:Gem::Version
145
147
  version: '0'
146
148
  requirements: []
147
- rubyforge_project:
148
- rubygems_version: 2.6.11
149
+ rubygems_version: 3.1.2
149
150
  signing_key:
150
151
  specification_version: 4
151
152
  summary: Annotot. Open annotations in Rails.