washout_builder 0.13.3 → 0.13.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.rdoc +1 -0
- data/app/helpers/washout_builder_complex_type_helper.rb +6 -6
- data/app/helpers/washout_builder_fault_type_helper.rb +22 -15
- data/app/helpers/washout_builder_method_list_helper.rb +1 -13
- data/app/views/wash_with_html/_complex_type.builder +4 -2
- data/app/views/wash_with_html/_fault_type.builder +3 -1
- data/app/views/wash_with_html/_public_method.builder +4 -2
- data/lib/washout_builder/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDQ2NDJjNmVkNDNiOWViZDgzYTA1YzYxYTg1NGIzNDUwYjEyZTZhMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDYzMWY4Y2FkOGFiYjlmZmQ4MjBhZmQ5MDBjYjMzZmY1MzMwMzQ3Zg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDc0ZjI3MzgzYTlhMmYzZWJkY2ZlMTU5YThmN2FkOWUyYTIyNGI4YjE0N2U4
|
10
|
+
ZDk0ZmZlMGRjY2NlYTE1NjUzOGFjODk3NGU1YmYwOTIzZWNkMjRmZGVmMDlj
|
11
|
+
N2RhNDNkMWNmOTk0ZWVmNWJmZDEzM2VjOTdkZTA4NTA0MDBiMWM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTIzODA2NmQwNWUyYWY4Mjk2YmFhNGUzMDUzMTc2M2ExMGQyNTZiMTc5N2U4
|
14
|
+
N2M1ZGU0MTJmZThkNGNkYTkzZjhhNGUyZjg1MTA3NDc1OTc0YTE2ZmIzZjU4
|
15
|
+
N2ZjNDRhZDFhYjE3NTU4MmQwMDMxMTU3OWJhODEyMTEyMGZkZjI=
|
data/README.rdoc
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
{<img src="https://travis-ci.org/bogdanRada/washout_builder.png?branch=master,develop" />}[https://travis-ci.org/bogdanRada/washout_builder]
|
3
3
|
{<img src="https://www.versioneye.com/user/projects/52fc7297ec1375346600007d/badge.png" alt="Dependency Status" />}[https://www.versioneye.com/user/projects/52fc7297ec1375346600007d]{<img src="https://www.versioneye.com/user/projects/52fc7297ec1375346600007d/badge.png" alt="Dependency Status" />}[https://www.versioneye.com/user/projects/52fc7297ec1375346600007d]
|
4
4
|
{<img src="https://coveralls.io/repos/bogdanRada/washout_builder/badge.png" alt="Coverage Status" />}[https://coveralls.io/r/bogdanRada/washout_builder]
|
5
|
+
{<img src="https://codeclimate.com/github/bogdanRada/washout_builder.png" />}[https://codeclimate.com/github/bogdanRada/washout_builder]
|
5
6
|
{<img src="https://reposs.herokuapp.com/?path=bogdanRada/washout_builder" alt="Repo Size"/>}[https://github.com/bogdanRada/washout_builder]
|
6
7
|
{<img src="https://gem-download-badge.herokuapp.com/?gem=washout_builder&type=total" alt="Version Downloads"/>}[https://rubygems.org/gems/washout_builder]
|
7
8
|
= Overview
|
@@ -1,18 +1,18 @@
|
|
1
1
|
module WashoutBuilderComplexTypeHelper
|
2
2
|
|
3
|
-
|
3
|
+
|
4
|
+
def create_element_type_html(pre, element)
|
4
5
|
element.type = "string" if element.type == "text"
|
5
6
|
element.type = "integer" if element.type == "int"
|
6
|
-
|
7
|
-
if WashoutBuilder::Type::BASIC_TYPES.include?(element.type)
|
7
|
+
if WashoutBuilder::Type::BASIC_TYPES.include?(element.type)
|
8
8
|
pre << "<span class='blue'>#{element.type}</span> <span class='bold'>#{element.name}</span>"
|
9
9
|
else
|
10
|
-
|
10
|
+
create_complex_element_type_html(pre, element)
|
11
11
|
end
|
12
|
-
}
|
13
12
|
end
|
14
13
|
|
15
|
-
|
14
|
+
|
15
|
+
def create_complex_element_type_html(pre, element)
|
16
16
|
complex_class = element.get_complex_class_name
|
17
17
|
unless complex_class.nil?
|
18
18
|
complex_class_content = element.multiplied == false ? "#{complex_class}" : "Array of #{complex_class}"
|
@@ -6,20 +6,27 @@ module WashoutBuilderFaultTypeHelper
|
|
6
6
|
end
|
7
7
|
|
8
8
|
|
9
|
-
def
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
9
|
+
def member_type_is_basic?(attr_details)
|
10
|
+
WashoutBuilder::Type::BASIC_TYPES.include?(attr_details[:member_type].to_s.downcase) ? attr_details[:member_type].to_s.downcase : attr_details[:member_type]
|
11
|
+
end
|
12
|
+
|
13
|
+
def primitive_type_is_basic?(attr_details)
|
14
|
+
WashoutBuilder::Type::BASIC_TYPES.include?(attr_details[:primitive].to_s.downcase)
|
15
|
+
end
|
16
|
+
|
17
|
+
def get_primitive_type_string(attr_details)
|
18
|
+
attr_details[:primitive].to_s.downcase == "nilclass" ? "string" : attr_details[:primitive].to_s.downcase
|
19
|
+
end
|
20
|
+
|
21
|
+
def get_member_type_string(attr_details)
|
22
|
+
attr_details[:primitive].to_s.downcase == "array" ? member_type_is_basic?(attr_details) : attr_details[:primitive]
|
23
|
+
end
|
24
|
+
|
25
|
+
def create_html_fault_model_element_type(pre, attribute, attr_details)
|
26
|
+
if primitive_type_is_basic?(attr_details) || attr_details[:primitive] == "nilclass"
|
27
|
+
pre << "<span class='blue'>#{get_primitive_type_string(attr_details)}</span> <span class='bold'>#{attribute}</span>"
|
28
|
+
else
|
29
|
+
create_fault_model_complex_element_type(pre, get_member_type_string(attr_details), attribute, true )
|
30
|
+
end
|
24
31
|
end
|
25
32
|
end
|
@@ -1,18 +1,6 @@
|
|
1
1
|
module WashoutBuilderMethodListHelper
|
2
2
|
|
3
|
-
|
4
|
-
xml.li("class" => "pre"){ |y| y<< "<a href='##{p.to_s}'><span class='lightBlue'> #{p.to_s}</span></a>" }
|
5
|
-
end
|
6
|
-
|
7
|
-
def create_parameters_element_list_html(xml, param)
|
8
|
-
xml.li("class" => "pre") { |pre|
|
9
|
-
if WashoutBuilder::Type::BASIC_TYPES.include?(param.type)
|
10
|
-
pre << "<span class='blue'>#{param.type}</span> <span class='bold'>#{param.name}</span>"
|
11
|
-
else
|
12
|
-
create_element_type_html(pre, param)
|
13
|
-
end
|
14
|
-
}
|
15
|
-
end
|
3
|
+
|
16
4
|
|
17
5
|
def create_return_complex_type_list_html(xml, complex_class, builder_out)
|
18
6
|
return_content = builder_out[0].multiplied == false ? "#{complex_class}" : "Array of #{complex_class}"
|
@@ -1,13 +1,15 @@
|
|
1
1
|
|
2
2
|
unless object.blank?
|
3
3
|
xml.a( "name" => "#{class_name}") { }
|
4
|
-
|
4
|
+
xml.h3 { |pre| pre << "#{class_name} #{ancestors.blank? ? "" : "<small>(extends <a href='##{ancestors[0].to_s.classify}'>#{ancestors[0].to_s.classify}</a>)</small>" } " }
|
5
5
|
|
6
6
|
|
7
7
|
if object.is_a?(WashOut::Param)
|
8
8
|
xml.ul("class" => "pre") {
|
9
9
|
object.map.each do |element|
|
10
|
-
|
10
|
+
xml.li { |pre|
|
11
|
+
create_element_type_html(pre, element)
|
12
|
+
}
|
11
13
|
end
|
12
14
|
}
|
13
15
|
end
|
@@ -3,7 +3,9 @@ if object.is_a?(Class)
|
|
3
3
|
xml.a("name" => "#{object}") {}
|
4
4
|
xml.ul("class" => "pre") {
|
5
5
|
structure.each do |attribute, attr_details|
|
6
|
-
|
6
|
+
xml.li { |pre|
|
7
|
+
create_html_fault_model_element_type( pre, attribute, attr_details)
|
8
|
+
}
|
7
9
|
end
|
8
10
|
}
|
9
11
|
end
|
@@ -12,7 +12,9 @@ xml.p "#{description}" unless description.blank?
|
|
12
12
|
xml.p "Parameters:"
|
13
13
|
xml.ul {
|
14
14
|
input.each do |element|
|
15
|
-
|
15
|
+
xml.li("class" => "pre") { |pre|
|
16
|
+
create_element_type_html(pre, element)
|
17
|
+
}
|
16
18
|
end
|
17
19
|
}
|
18
20
|
|
@@ -30,7 +32,7 @@ unless operation_exceptions.blank?
|
|
30
32
|
xml.p "Exceptions:"
|
31
33
|
xml.ul {
|
32
34
|
operation_exceptions.each do |p|
|
33
|
-
|
35
|
+
xml.li("class" => "pre"){ |y| y<< "<a href='##{p.to_s}'><span class='lightBlue'> #{p.to_s}</span></a>" }
|
34
36
|
end
|
35
37
|
}
|
36
38
|
end
|