swaggard 1.1.0 → 1.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3dd5439e8bfa3577b6585d2f5bc85eca2de86b7f41df02425f7d3083f97db6c4
4
- data.tar.gz: 472f444aa3a5f99f0d6f867d55a80141a81848a24af6ca29366f979dfc8c4656
3
+ metadata.gz: 57f3251f22ae437dfa4a4030dc6e1929def89936e209bd9fdef0b6d7ed92c554
4
+ data.tar.gz: 859c0573aee509bf0f6c376e20d451c5f97729c3b6cf03f988f450d90041ae4d
5
5
  SHA512:
6
- metadata.gz: d7ccfd568ffde678cafae6be6b2551823d24ba2e3f2d5ecaf8f04231c14d271b25223c9dcaab12ab4dd97ac1b93d1490045f6b6812af662def8d3faf628443c0
7
- data.tar.gz: 7c08c85b64918c6fe0806af1e224e0e3daeec20704f1617f65b21f8908bc79881d1a9ae01f4b25afe14efd7d7070bb97603a0523bbaf685724679f15b866998f
6
+ metadata.gz: 4d7f32e8aef8e8f5edfd761982e8a9b845364de71a042f1e56ebae621a00ea7193c1d6377991a22c021d5a1316466031aeb25204fc23d388a4ba96cca9c30f2f
7
+ data.tar.gz: d9b0b90737efd86097f61bbcc06ac9c3b51881a83bfff8ad1f726940c2140f640adff9e549d81dec907b3f221a2fa21737cbeab76fd0c80ca9f450e91315f756
@@ -1,19 +1,23 @@
1
- unless Rails::Application.instance_methods.include?(:assets_manifest)
2
- warn <<~END
3
- [Swaggard] It seems you are using an api only rails setup, but swaggard
4
- [Swaggard] web app needs sprockets in order to work. Make sure to add
5
- [Swaggard] require 'sprockets/railtie'.
6
- [Swaggard] If you plan to use it
7
- END
8
- end
9
-
10
1
  module Swaggard
11
2
  class Engine < ::Rails::Engine
12
3
  isolate_namespace Swaggard
13
4
 
5
+ def rake?
6
+ File.basename($PROGRAM_NAME) == 'rake'
7
+ end
8
+
14
9
  initializer 'swaggard.finisher_hook', after: :finisher_hook do |app|
15
10
  app.reload_routes!
16
11
 
12
+ if Rails.env.development? && !rake? && !app.methods.include?(:assets_manifest)
13
+ warn <<~END
14
+ [Swaggard] It seems you are using an api only rails setup, but swaggard
15
+ [Swaggard] web app needs sprockets in order to work. Make sure to add
16
+ [Swaggard] require 'sprockets/railtie'.
17
+ [Swaggard] If you plan to use it
18
+ END
19
+ end
20
+
17
21
  Swaggard.configure do |config|
18
22
  unless config.controllers_path
19
23
  config.controllers_path = "#{app.root}/app/controllers/**/*.rb"
@@ -1,3 +1,3 @@
1
1
  module Swaggard
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swaggard
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Gomez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-23 00:00:00.000000000 Z
11
+ date: 2020-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails