annotot 0.6.0 → 0.7.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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f30142a82474f3723a5d0e041a7b26bce696b1aa975d6b4dc3da81b7cc89ad43
|
4
|
+
data.tar.gz: 1f3d9a4ebb62364cb8ca4a2eea465abc6e4a461b397a61949afe4380c0c2f200
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 @@
|
|
1
|
+
<%= JSON.parse(@annotation.data).to_json.html_safe %>
|
data/config/routes.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
Annotot::Engine.routes.draw do
|
2
|
-
resources :annotations, path: '/', except: %i[new edit
|
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
|
data/lib/annotot/version.rb
CHANGED
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.
|
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:
|
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
|
-
|
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.
|