mappd_rest 5.2.2 → 6.1.4
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 +4 -4
- data/.rubocop.yml +2 -1
- data/Dockerfile +1 -1
- data/Gemfile +3 -3
- data/Gemfile.lock +102 -95
- data/lib/mappd/rest.rb +6 -3
- data/lib/mappd/version.rb +1 -1
- data/mappd_rest.gemspec +4 -2
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54313ce9c9ca62b3838186f66236c601a56d5e35982ecea95b08037e6d2aa29b
|
4
|
+
data.tar.gz: 388a6288c26041a25059fed8bd1e4aa8037602b09ccda3f7121d62208a1fdad2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00b3acbe35e07e4ee8f5c26d78c2342d2165de1a55e11c4ca319c901c9387534ddca5158df64f6ab3ba7c254ee1064177eb865b4c5c9ef11d11f2c94182c74c1
|
7
|
+
data.tar.gz: 23de0ae5abe082b055573801be99a0743451f417cb30a2a17dde0db6cf436987be1a89849889309495245ef84438e6bfe1c70bd66c64652cac006b4a4bc67637
|
data/.rubocop.yml
CHANGED
data/Dockerfile
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,50 +1,58 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mappd_rest (
|
5
|
-
activerecord (>=
|
6
|
-
grape (>= 1.
|
4
|
+
mappd_rest (6.1.4)
|
5
|
+
activerecord (>= 6.1.4)
|
6
|
+
grape (>= 1.5.3)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: http://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activemodel (
|
12
|
-
activesupport (=
|
13
|
-
activerecord (
|
14
|
-
activemodel (=
|
15
|
-
activesupport (=
|
16
|
-
|
17
|
-
activesupport (5.2.2)
|
11
|
+
activemodel (6.1.4)
|
12
|
+
activesupport (= 6.1.4)
|
13
|
+
activerecord (6.1.4)
|
14
|
+
activemodel (= 6.1.4)
|
15
|
+
activesupport (= 6.1.4)
|
16
|
+
activesupport (6.1.4)
|
18
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
19
|
-
i18n (>=
|
20
|
-
minitest (
|
21
|
-
tzinfo (~>
|
22
|
-
|
23
|
-
ast (2.4.
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
18
|
+
i18n (>= 1.6, < 2)
|
19
|
+
minitest (>= 5.1)
|
20
|
+
tzinfo (~> 2.0)
|
21
|
+
zeitwerk (~> 2.3)
|
22
|
+
ast (2.4.2)
|
23
|
+
builder (3.2.4)
|
24
|
+
byebug (11.1.3)
|
25
|
+
coderay (1.1.3)
|
26
|
+
concurrent-ruby (1.1.9)
|
27
|
+
diff-lcs (1.4.4)
|
28
|
+
dry-configurable (0.12.1)
|
29
|
+
concurrent-ruby (~> 1.0)
|
30
|
+
dry-core (~> 0.5, >= 0.5.0)
|
31
|
+
dry-container (0.8.0)
|
32
|
+
concurrent-ruby (~> 1.0)
|
33
|
+
dry-configurable (~> 0.1, >= 0.1.3)
|
34
|
+
dry-core (0.7.1)
|
35
|
+
concurrent-ruby (~> 1.0)
|
36
|
+
dry-inflector (0.2.1)
|
37
|
+
dry-logic (1.2.0)
|
38
|
+
concurrent-ruby (~> 1.0)
|
39
|
+
dry-core (~> 0.5, >= 0.5)
|
40
|
+
dry-types (1.5.1)
|
41
|
+
concurrent-ruby (~> 1.0)
|
42
|
+
dry-container (~> 0.3)
|
43
|
+
dry-core (~> 0.5, >= 0.5)
|
44
|
+
dry-inflector (~> 0.1, >= 0.1.2)
|
45
|
+
dry-logic (~> 1.0, >= 1.0.2)
|
46
|
+
ffi (1.15.3)
|
47
|
+
formatador (0.3.0)
|
48
|
+
grape (1.5.3)
|
41
49
|
activesupport
|
42
50
|
builder
|
51
|
+
dry-types (>= 1.1)
|
43
52
|
mustermann-grape (~> 1.0.0)
|
44
53
|
rack (>= 1.3.0)
|
45
54
|
rack-accept
|
46
|
-
|
47
|
-
guard (2.14.2)
|
55
|
+
guard (2.17.0)
|
48
56
|
formatador (>= 0.2.4)
|
49
57
|
listen (>= 2.7, < 4.0)
|
50
58
|
lumberjack (>= 1.0.12, < 2.0)
|
@@ -58,90 +66,89 @@ GEM
|
|
58
66
|
guard (~> 2.1)
|
59
67
|
guard-compat (~> 1.1)
|
60
68
|
rspec (>= 2.99.0, < 4.0)
|
61
|
-
guard-rubocop (1.
|
69
|
+
guard-rubocop (1.4.0)
|
62
70
|
guard (~> 2.0)
|
63
|
-
rubocop (
|
64
|
-
i18n (1.
|
71
|
+
rubocop (< 2.0)
|
72
|
+
i18n (1.8.10)
|
65
73
|
concurrent-ruby (~> 1.0)
|
66
|
-
|
67
|
-
|
68
|
-
rb-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
mustermann (1.0.
|
77
|
-
|
78
|
-
mustermann (~> 1.0.0)
|
74
|
+
listen (3.5.1)
|
75
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
76
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
77
|
+
lumberjack (1.2.8)
|
78
|
+
mappd (6.1.4)
|
79
|
+
activerecord (>= 6.0.3)
|
80
|
+
method_source (1.0.0)
|
81
|
+
minitest (5.14.4)
|
82
|
+
mustermann (1.1.1)
|
83
|
+
ruby2_keywords (~> 0.0.1)
|
84
|
+
mustermann-grape (1.0.1)
|
85
|
+
mustermann (>= 1.0.0)
|
79
86
|
nenv (0.3.0)
|
80
|
-
notiffany (0.1.
|
87
|
+
notiffany (0.1.3)
|
81
88
|
nenv (~> 0.1)
|
82
89
|
shellany (~> 0.0)
|
83
|
-
parallel (1.
|
84
|
-
parser (
|
85
|
-
ast (~> 2.4.
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
rack (2.0.5)
|
90
|
+
parallel (1.20.1)
|
91
|
+
parser (3.0.2.0)
|
92
|
+
ast (~> 2.4.1)
|
93
|
+
pry (0.14.1)
|
94
|
+
coderay (~> 1.1)
|
95
|
+
method_source (~> 1.0)
|
96
|
+
rack (2.2.3)
|
91
97
|
rack-accept (0.4.5)
|
92
98
|
rack (>= 0.4)
|
93
|
-
rack-test (1.
|
99
|
+
rack-test (1.1.0)
|
94
100
|
rack (>= 1.0, < 3)
|
95
101
|
rainbow (3.0.0)
|
96
|
-
rake (
|
97
|
-
rb-fsevent (0.
|
98
|
-
rb-inotify (0.
|
99
|
-
ffi (
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
rspec-
|
104
|
-
|
105
|
-
rspec-
|
106
|
-
rspec-
|
102
|
+
rake (13.0.6)
|
103
|
+
rb-fsevent (0.11.0)
|
104
|
+
rb-inotify (0.10.1)
|
105
|
+
ffi (~> 1.0)
|
106
|
+
regexp_parser (2.1.1)
|
107
|
+
rexml (3.2.5)
|
108
|
+
rspec (3.10.0)
|
109
|
+
rspec-core (~> 3.10.0)
|
110
|
+
rspec-expectations (~> 3.10.0)
|
111
|
+
rspec-mocks (~> 3.10.0)
|
112
|
+
rspec-core (3.10.1)
|
113
|
+
rspec-support (~> 3.10.0)
|
114
|
+
rspec-expectations (3.10.1)
|
107
115
|
diff-lcs (>= 1.2.0, < 2.0)
|
108
|
-
rspec-support (~> 3.
|
109
|
-
rspec-mocks (3.
|
116
|
+
rspec-support (~> 3.10.0)
|
117
|
+
rspec-mocks (3.10.2)
|
110
118
|
diff-lcs (>= 1.2.0, < 2.0)
|
111
|
-
rspec-support (~> 3.
|
112
|
-
rspec-support (3.
|
113
|
-
rubocop (
|
119
|
+
rspec-support (~> 3.10.0)
|
120
|
+
rspec-support (3.10.2)
|
121
|
+
rubocop (1.18.3)
|
114
122
|
parallel (~> 1.10)
|
115
|
-
parser (>=
|
116
|
-
powerpack (~> 0.1)
|
123
|
+
parser (>= 3.0.0.0)
|
117
124
|
rainbow (>= 2.2.2, < 4.0)
|
125
|
+
regexp_parser (>= 1.8, < 3.0)
|
126
|
+
rexml
|
127
|
+
rubocop-ast (>= 1.7.0, < 2.0)
|
118
128
|
ruby-progressbar (~> 1.7)
|
119
|
-
unicode-display_width (
|
120
|
-
|
121
|
-
|
129
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
130
|
+
rubocop-ast (1.8.0)
|
131
|
+
parser (>= 3.0.1.1)
|
132
|
+
ruby-progressbar (1.11.0)
|
133
|
+
ruby2_keywords (0.0.5)
|
122
134
|
shellany (0.0.1)
|
123
|
-
sqlite3 (1.
|
124
|
-
thor (
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
virtus (1.0.5)
|
130
|
-
axiom-types (~> 0.1)
|
131
|
-
coercible (~> 1.0)
|
132
|
-
descendants_tracker (~> 0.0, >= 0.0.3)
|
133
|
-
equalizer (~> 0.0, >= 0.0.9)
|
135
|
+
sqlite3 (1.4.2)
|
136
|
+
thor (1.1.0)
|
137
|
+
tzinfo (2.0.4)
|
138
|
+
concurrent-ruby (~> 1.0)
|
139
|
+
unicode-display_width (2.0.0)
|
140
|
+
zeitwerk (2.4.2)
|
134
141
|
|
135
142
|
PLATFORMS
|
136
143
|
ruby
|
137
144
|
|
138
145
|
DEPENDENCIES
|
139
|
-
activerecord (>=
|
146
|
+
activerecord (>= 6.1.4)
|
140
147
|
byebug
|
141
|
-
grape (>= 1.
|
148
|
+
grape (>= 1.5.3)
|
142
149
|
guard-rspec
|
143
150
|
guard-rubocop
|
144
|
-
mappd (~>
|
151
|
+
mappd (~> 6.1.4)
|
145
152
|
mappd_rest!
|
146
153
|
rack-test
|
147
154
|
rake
|
data/lib/mappd/rest.rb
CHANGED
@@ -5,9 +5,7 @@ module Mappd
|
|
5
5
|
cattr_accessor :auth_method
|
6
6
|
|
7
7
|
before do
|
8
|
-
|
9
|
-
error!('Access Denied', 401)
|
10
|
-
end
|
8
|
+
error!('Access Denied', 401) unless access_token?
|
11
9
|
end
|
12
10
|
|
13
11
|
rescue_from ActiveRecord::RecordNotFound do |e|
|
@@ -19,6 +17,10 @@ module Mappd
|
|
19
17
|
end
|
20
18
|
|
21
19
|
helpers do
|
20
|
+
def access_token?
|
21
|
+
Rest.auth_method.call(request.headers['X-Access-Token'])
|
22
|
+
end
|
23
|
+
|
22
24
|
def resource
|
23
25
|
params[:resource].singularize.titlecase.constantize
|
24
26
|
end
|
@@ -29,6 +31,7 @@ module Mappd
|
|
29
31
|
|
30
32
|
def limiter(relation)
|
31
33
|
return relation unless relation.is_a?(ActiveRecord::Relation)
|
34
|
+
|
32
35
|
relation = relation.offset(params[:offset]) if params[:offset]
|
33
36
|
relation = relation.limit(params[:limit]) if params[:limit]
|
34
37
|
relation
|
data/lib/mappd/version.rb
CHANGED
data/mappd_rest.gemspec
CHANGED
@@ -20,6 +20,8 @@ Gem::Specification.new do |s|
|
|
20
20
|
.split("\n").map { |f| File.basename(f) }
|
21
21
|
s.require_paths = ['lib']
|
22
22
|
|
23
|
-
s.
|
24
|
-
|
23
|
+
s.required_ruby_version = '>= 2.6'
|
24
|
+
|
25
|
+
s.add_dependency 'activerecord', '>=6.1.4'
|
26
|
+
s.add_dependency 'grape', '>=1.5.3'
|
25
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mappd_rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Watson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 6.1.4
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 6.1.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: grape
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.5.3
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: 1.5.3
|
41
41
|
description: You can expose ActiveRecord objects over REST.
|
42
42
|
email:
|
43
43
|
- dan@paz.am
|
@@ -80,14 +80,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
80
80
|
requirements:
|
81
81
|
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
83
|
+
version: '2.6'
|
84
84
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - ">="
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
|
-
rubygems_version: 3.0.1
|
90
|
+
rubygems_version: 3.0.3.1
|
91
91
|
signing_key:
|
92
92
|
specification_version: 4
|
93
93
|
summary: Mappd Rest is a microframework for exposing ActiveRecord models over rest
|