graphiti-rails 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -1
- data/lib/generators/graphiti/resource_generator.rb +1 -4
- data/lib/graphiti/rails/exception_handlers.rb +10 -1
- data/lib/graphiti/rails/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff68e2699cc49f05cb555bf0bd0dc85cfa35f6d2a102716d7e81fa6460d22d67
|
4
|
+
data.tar.gz: c029899aa1580a13bd39def2dceadc479ca00ab269b365e4c482179aa184367f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70ae12095f5ac7f0a12583113656b00b1f0a9396a831c75ec82277125cbf8ba3bb4c604397ea2aa1985a052b3844da67df5dee46726d76457864357589629da7
|
7
|
+
data.tar.gz: 782ff6e41f1db5380b597bec1c44f323f306239f2c6fb00ae32590843d693e97cb81421407193fe5f23fdb77db90fd4ccb04dbc1e551035707e49ce2cb306e50
|
data/CHANGELOG.md
CHANGED
@@ -7,4 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
---
|
9
9
|
|
10
|
-
|
10
|
+
## [0.2.1] - 2019-05-27
|
11
|
+
### Added
|
12
|
+
- Include `__raw_errors__` in detailed error payloads for use by Vandal and Request Responses
|
13
|
+
|
14
|
+
### Fixed
|
15
|
+
- Do not depend on ActiveRecord for route generators
|
16
|
+
|
17
|
+
## [0.2.0] - 2019-05-27
|
18
|
+
|
19
|
+
Initial release
|
@@ -132,10 +132,7 @@ module Graphiti
|
|
132
132
|
end
|
133
133
|
|
134
134
|
def generate_route
|
135
|
-
|
136
|
-
plural_name = try(:plural_route_name) || plural_table_name
|
137
|
-
|
138
|
-
code = "resources :#{plural_name}"
|
135
|
+
code = "resources :#{file_name.pluralize}"
|
139
136
|
code << %(, only: [#{actions.map { |a| ":#{a}" }.join(", ")}]) if actions.length < 5
|
140
137
|
code << "\n"
|
141
138
|
inject_into_file "config/routes.rb", after: /ApplicationResource.*$\n/ do
|
@@ -5,7 +5,16 @@ module Graphiti
|
|
5
5
|
def build_payload(show_details: false, traces: nil, style: :rails)
|
6
6
|
case style
|
7
7
|
when :standard
|
8
|
-
super(show_details: show_details, traces: traces)
|
8
|
+
super(show_details: show_details, traces: traces).tap do |payload|
|
9
|
+
if show_details
|
10
|
+
# For Vandal and Request Responses
|
11
|
+
payload[:__raw_error__] = {
|
12
|
+
message: exception.message,
|
13
|
+
debug: exception.instance_variable_get(:@__graphiti_debug),
|
14
|
+
backtrace: exception.backtrace
|
15
|
+
}
|
16
|
+
end
|
17
|
+
end
|
9
18
|
when :rails
|
10
19
|
# TODO: Find way to not duplicate RailsExceptionHandler
|
11
20
|
body = {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphiti-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Wagenet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphiti
|
@@ -237,8 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
237
237
|
- !ruby/object:Gem::Version
|
238
238
|
version: '0'
|
239
239
|
requirements: []
|
240
|
-
|
241
|
-
rubygems_version: 2.7.6
|
240
|
+
rubygems_version: 3.0.3
|
242
241
|
signing_key:
|
243
242
|
specification_version: 4
|
244
243
|
summary: Rails integration for Graphiti
|