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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0546b042d2d512c700094de8be871f95f65488ae003c508ce522bb881dfccb2e
4
- data.tar.gz: 75dc08fb8add0c1a1eb6ef63c927ff83fdba84eb8cfa9d3b08197db4ee3dbae8
3
+ metadata.gz: ff68e2699cc49f05cb555bf0bd0dc85cfa35f6d2a102716d7e81fa6460d22d67
4
+ data.tar.gz: c029899aa1580a13bd39def2dceadc479ca00ab269b365e4c482179aa184367f
5
5
  SHA512:
6
- metadata.gz: e5d4a756cc7bd379e962830b1ff7171fdabae707799a2961e3df8d96746643a6061fe7b6cb1151aea0228fc1a34f42197e11c188a40976cbc0a6982ae09769c5
7
- data.tar.gz: cce0b7aff8cc4301068c6c1e367abb094cc1bed28d7a5203736b4f9cf747082a73fd54438ec15d1e45cdc8e79b7a3a1f1ca9b42a933706e1612ba0c12120f701
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
- No releases means no changes...
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
- # Rails 5.2 adds `plural_route_name`, fallback to `plural_table_name`
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 = {
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Graphiti
4
4
  module Rails
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.1'
6
6
  end
7
7
  end
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.0
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-05-27 00:00:00.000000000 Z
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
- rubyforge_project:
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