swaggard 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/swaggard/engine.rb +13 -9
- data/lib/swaggard/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57f3251f22ae437dfa4a4030dc6e1929def89936e209bd9fdef0b6d7ed92c554
|
4
|
+
data.tar.gz: 859c0573aee509bf0f6c376e20d451c5f97729c3b6cf03f988f450d90041ae4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d7f32e8aef8e8f5edfd761982e8a9b845364de71a042f1e56ebae621a00ea7193c1d6377991a22c021d5a1316466031aeb25204fc23d388a4ba96cca9c30f2f
|
7
|
+
data.tar.gz: d9b0b90737efd86097f61bbcc06ac9c3b51881a83bfff8ad1f726940c2140f640adff9e549d81dec907b3f221a2fa21737cbeab76fd0c80ca9f450e91315f756
|
data/lib/swaggard/engine.rb
CHANGED
@@ -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"
|
data/lib/swaggard/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2020-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|