rails_spotlight 0.2.2 → 0.2.3

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: 811024ca98d1eff1d90ec498134b41d547c19f0a731074f0f76b85f42d34ae62
4
- data.tar.gz: fde226acfcae18f43435d64cccd3fae6b0651b0a606d3d196cd08bdaffa60403
3
+ metadata.gz: 78a4ca508d34706a04ef8d1b7e61cee43a76b9127555a30846156166b41c2c88
4
+ data.tar.gz: 444e8776ccbdf9840b9ef77cb80bf57d1e1ef99477e7b7c21915e062a3216903
5
5
  SHA512:
6
- metadata.gz: b4d436897c9ede10af86c7878abb46cccc119c0c2de60d68bab667ab88b58891108a875d259e64461dbcad36822ac6d5cb9793351a5ac63e88ee3aa7dd98cd52
7
- data.tar.gz: ad6cea7c5217d8be6e9487aaa927ef9e90214a890d241000d89602ad9c1339186a90a5d1ee15578d9a09825e8e5e557e308243c3131170a4ea13ca6429892473
6
+ metadata.gz: c37ba527e29e187dd4f7dac324bbcebbabf1380f0192813b6100eaf9290dc6a3423f5a1477673d266150ccbe8549644cd5643ff0526c817992d28649e0b3033f
7
+ data.tar.gz: 61ca4aff8b9a1f575ed502e167f6024af5db8146c659239728f6efa9636bc98732bd23016a9db4cd09a90a12543fd693c113095f8c3bdfc2c5a1c53c1cfc6d0c
@@ -52,7 +52,7 @@ module RailsSpotlight
52
52
  project: ::RailsSpotlight.config.project_name
53
53
  }
54
54
  else
55
- executor.result_as_json
55
+ executor.result_as_json.merge(project: ::RailsSpotlight.config.project_name)
56
56
  end
57
57
  rescue => e # rubocop:disable Style/RescueStandardError
58
58
  { error: e.message }
@@ -38,8 +38,14 @@ module RailsSpotlight
38
38
  end
39
39
 
40
40
  def json_response_body
41
- executor.result_as_json(inspect_types: inspect_types)
42
- .merge(project: ::RailsSpotlight.config.project_name)
41
+ if executor.execution_successful?
42
+ {
43
+ result: executor.result_as_json(inspect_types: inspect_types),
44
+ project: ::RailsSpotlight.config.project_name
45
+ }
46
+ else
47
+ executor.result_as_json.merge(project: ::RailsSpotlight.config.project_name)
48
+ end
43
49
  end
44
50
  end
45
51
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsSpotlight
4
- VERSION = '0.2.2'
4
+ VERSION = '0.2.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_spotlight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pawel Niemczyk
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-24 00:00:00.000000000 Z
11
+ date: 2024-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack-contrib