washout_builder 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Appraisals +6 -0
- data/Gemfile +1 -3
- data/app/controllers/washout_builder/washout_builder_controller.rb +19 -5
- data/gemfiles/rails_4.0.0.gemfile +0 -1
- data/gemfiles/rails_4.1.1.gemfile +0 -1
- data/gemfiles/rails_4.2.0.gemfile +0 -1
- data/gemfiles/rails_5.0.0.gemfile +0 -1
- data/gemfiles/rails_api_4.2.7.gemfile +10 -0
- data/lib/washout_builder.rb +0 -1
- data/lib/washout_builder/router.rb +1 -0
- data/lib/washout_builder/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fe1dd0e350b2b774bced749c518da361850ac5d
|
4
|
+
data.tar.gz: f287b48238149fcb78f4309ce22d9238f30e6e62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f10ea25c537f16d6550fcc47c7c1d910390457eb7a3acb6119b6d48d0cfcab6a6fa6cf34bc18edf30a5f64033b10105c958c8ee82c4426d52c15b129c5ea758
|
7
|
+
data.tar.gz: cfeb202e25abcb242abcf31b7413ace6d6127df2c4d2737cc059e5850b80597fe6fdadf45ca2cf02d73c4d4c479e905ee1daa25c4d0f7c2e2172c0f29d4f8019
|
data/Appraisals
CHANGED
data/Gemfile
CHANGED
@@ -22,19 +22,33 @@ module WashoutBuilder
|
|
22
22
|
route_details = params[:name].present? ? controller_is_a_service?(params[:name]) : nil
|
23
23
|
if route_details.present? && defined?(controller_class(params[:name]))
|
24
24
|
@document = WashoutBuilder::Document::Generator.new(route_details, controller_class(params[:name]).controller_path)
|
25
|
-
|
26
|
-
content_type: 'text/html'
|
25
|
+
render_html('wash_with_html/doc')
|
27
26
|
elsif
|
28
27
|
@services = all_services
|
29
|
-
|
30
|
-
content_type: 'text/html'
|
28
|
+
render_html('wash_with_html/all_services')
|
31
29
|
end
|
32
30
|
end
|
33
31
|
|
34
32
|
private
|
35
33
|
|
36
34
|
def env_controller_path
|
37
|
-
|
35
|
+
request.env['washout_builder.controller_path']
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
def render_html(path, options= { layout: false, content_type: 'text/html' })
|
40
|
+
options = options.merge(template: path)
|
41
|
+
respond_to do |format|
|
42
|
+
format.json { render options }
|
43
|
+
render_html_format_all(format, options)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def render_html_format_all(format, options)
|
48
|
+
format.all do
|
49
|
+
response.content_type = 'text/html; charset=utf-8'
|
50
|
+
render options.merge(formats: [:html])
|
51
|
+
end
|
38
52
|
end
|
39
53
|
|
40
54
|
# tries to find all services by searching through the rails controller
|
data/lib/washout_builder.rb
CHANGED
@@ -25,7 +25,6 @@ ActionDispatch::Routing::Mapper.class_eval do
|
|
25
25
|
controller_class_name = controller_name.to_s.underscore
|
26
26
|
end
|
27
27
|
match "#{controller_name}/soap_doc" => WashoutBuilder::Router.new(controller_class_name), via: :get,
|
28
|
-
format: false,
|
29
28
|
as: "#{controller_class_name}_soap_doc"
|
30
29
|
end
|
31
30
|
original_wash_out(controller_name, options)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: washout_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bogdanRada
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: wash_out
|
@@ -360,6 +360,7 @@ files:
|
|
360
360
|
- gemfiles/rails_4.1.1.gemfile
|
361
361
|
- gemfiles/rails_4.2.0.gemfile
|
362
362
|
- gemfiles/rails_5.0.0.gemfile
|
363
|
+
- gemfiles/rails_api_4.2.7.gemfile
|
363
364
|
- init.rb
|
364
365
|
- lib/washout_builder.rb
|
365
366
|
- lib/washout_builder/document/complex_type.rb
|