washout_builder 1.6.2 → 1.6.3

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
  SHA1:
3
- metadata.gz: 9b3d142b1a6189844c4d2986e2be842d0dc2a204
4
- data.tar.gz: 24edd03060f36f0bd0b8f84c3408602ed504564b
3
+ metadata.gz: 3fe1dd0e350b2b774bced749c518da361850ac5d
4
+ data.tar.gz: f287b48238149fcb78f4309ce22d9238f30e6e62
5
5
  SHA512:
6
- metadata.gz: de9a85237b5536f8bb4bd7633aab49601a03c8e9361b4d433120b81e6c4acac4c29f1dd538154c9bb47c67d783748348ec1b9914e6169c2a1cecc576ee7275ab
7
- data.tar.gz: c8f599d47b778a2fcac902bcdc20e86446a9323c810d55fc7294e3342872011bfa0985a6347ab65da62583676dcbc8738f6c21ed95181c30f279b0e72f666e62
6
+ metadata.gz: 6f10ea25c537f16d6550fcc47c7c1d910390457eb7a3acb6119b6d48d0cfcab6a6fa6cf34bc18edf30a5f64033b10105c958c8ee82c4426d52c15b129c5ea758
7
+ data.tar.gz: cfeb202e25abcb242abcf31b7413ace6d6127df2c4d2737cc059e5850b80597fe6fdadf45ca2cf02d73c4d4c479e905ee1daa25c4d0f7c2e2172c0f29d4f8019
data/Appraisals CHANGED
@@ -14,3 +14,9 @@ appraise "rails-5.0.0" do
14
14
  gem "rails", "5.0.0"
15
15
  gem 'rails-controller-testing'
16
16
  end
17
+
18
+ appraise "rails-api-4.2.7" do
19
+ gem 'rails', '4.2.7.1'
20
+ gem 'rails-api', '0.4.0'
21
+ gem 'actionpack' , '4.2.7.1'
22
+ end
data/Gemfile CHANGED
@@ -4,8 +4,6 @@ gemspec
4
4
 
5
5
  gem 'wash_out', github: 'inossidabile/wash_out'
6
6
 
7
- if RUBY_VERSION >= "2.2.0"
8
- gem 'activesupport', '>= 4.0', '>= 4.0'
9
- else
7
+ if RUBY_VERSION < "2.2.0"
10
8
  gem 'activesupport', '>= 4.0', '< 5.0'
11
9
  end
@@ -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
- render template: 'wash_with_html/doc', layout: false,
26
- content_type: 'text/html'
25
+ render_html('wash_with_html/doc')
27
26
  elsif
28
27
  @services = all_services
29
- render template: 'wash_with_html/all_services', layout: false,
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
- request.env['washout_builder.controller_path']
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
@@ -3,7 +3,6 @@
3
3
  source "http://rubygems.org"
4
4
 
5
5
  gem "wash_out", :github => "inossidabile/wash_out"
6
- gem "activesupport", ">= 4.0", ">= 4.0"
7
6
  gem "rails", "4.0.0"
8
7
 
9
8
  gemspec :path => "../"
@@ -3,7 +3,6 @@
3
3
  source "http://rubygems.org"
4
4
 
5
5
  gem "wash_out", :github => "inossidabile/wash_out"
6
- gem "activesupport", ">= 4.0", ">= 4.0"
7
6
  gem "rails", "4.1.1"
8
7
 
9
8
  gemspec :path => "../"
@@ -3,7 +3,6 @@
3
3
  source "http://rubygems.org"
4
4
 
5
5
  gem "wash_out", :github => "inossidabile/wash_out"
6
- gem "activesupport", ">= 4.0", ">= 4.0"
7
6
  gem "rails", "4.2.0"
8
7
 
9
8
  gemspec :path => "../"
@@ -3,7 +3,6 @@
3
3
  source "http://rubygems.org"
4
4
 
5
5
  gem "wash_out", :github => "inossidabile/wash_out"
6
- gem "activesupport", ">= 4.0", ">= 4.0"
7
6
  gem "rails", "5.0.0"
8
7
  gem "rails-controller-testing"
9
8
 
@@ -0,0 +1,10 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "wash_out", :github => "inossidabile/wash_out"
6
+ gem "rails", "4.2.7.1"
7
+ gem "rails-api", "0.4.0"
8
+ gem "actionpack", "4.2.7.1"
9
+
10
+ gemspec :path => "../"
@@ -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)
@@ -9,6 +9,7 @@ module WashoutBuilder
9
9
 
10
10
  def call(env)
11
11
  env['washout_builder.controller_path'] = @controller_path
12
+ env["action_dispatch.request.content_type"] = Mime[:html]
12
13
  ::WashoutBuilder::WashoutBuilderController.action(:all).call(env)
13
14
  end
14
15
 
@@ -12,7 +12,7 @@ module WashoutBuilder
12
12
  # the minor version of the gem
13
13
  MINOR = 6
14
14
  # the tiny version of the gem
15
- TINY = 2
15
+ TINY = 3
16
16
  # if the version should be a prerelease
17
17
  PRE = nil
18
18
 
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.2
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-29 00:00:00.000000000 Z
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