robot_remote_server 2.5.5.1 → 2.5.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -0
- data/README.rdoc +15 -9
- data/lib/robot_remote_server.rb +5 -5
- data/robot_remote_server.gemspec +1 -1
- metadata +3 -3
data/CHANGELOG
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
v2.5.5.2. Change extra options to multi-dimensional array, to preserve insertion order.
|
2
|
+
|
1
3
|
v2.5.5.1. Implement extra options to pass to YARD for generating more flexible documentation for keywords.
|
2
4
|
|
3
5
|
v2.5.5. Implement better argument and documentation handling. Require YARD gem.
|
data/README.rdoc
CHANGED
@@ -23,7 +23,7 @@ If you want to hack on the remote server directly and then build your own gem, y
|
|
23
23
|
gem build robot_remote_server
|
24
24
|
gem install robot_remote_server-{version}.gem
|
25
25
|
|
26
|
-
Or by installing
|
26
|
+
Or by installing the +echoe+ gem and using the following rake tasks:
|
27
27
|
|
28
28
|
rake build
|
29
29
|
rake install
|
@@ -38,16 +38,22 @@ In your test library, you need to include the gem:
|
|
38
38
|
|
39
39
|
require 'robot_remote_server'
|
40
40
|
|
41
|
-
Then you'll have the RobotRemoteServer class available to your code.
|
42
|
-
|
43
|
-
require 'robot_remote_server'
|
44
|
-
RobotRemoteServer.new(ExampleTestLibrary.new)
|
45
|
-
|
46
|
-
Per the example in Robot Framework itself, you could include that in a file as follows:
|
41
|
+
Then you'll have the RobotRemoteServer class available to your code. Per the example in Robot Framework itself, you could include that in a file as follows:
|
47
42
|
|
48
43
|
if __FILE__ == $0
|
44
|
+
require 'rubygems'
|
49
45
|
require 'robot_remote_server'
|
50
|
-
|
46
|
+
require 'example_library'
|
47
|
+
RobotRemoteServer.new(ExampleLibrary.new,
|
48
|
+
host = 'localhost',
|
49
|
+
port = 8270,
|
50
|
+
yardoc_file = '.yardoc'),
|
51
|
+
yardoc_options = [[:docstring, ''], [:file, 'File'], [:source, 'Source Code']])
|
51
52
|
end
|
52
53
|
|
53
|
-
|
54
|
+
You'll notice a few options are available to you:
|
55
|
+
|
56
|
+
host:: The domain name or address at which the server will serve content. If you're unsure, use 'localhost'
|
57
|
+
port:: You can optionally change the port on which the server runs. It default to 8270, as those are the ASCII character codes for R and F (Robot Framework)
|
58
|
+
yardoc_file:: The file-based cache that yardoc generated when you ran it for your testing library. Without this, the remote library cannot access documentation or method signatures from your remote testing library.
|
59
|
+
yardoc_options:: A multi-dimensional array of options, which allow you to tweak which parts of the documentation are printed and in what order. The first element of each child array is a symbol representing a method to which YARD::CodeObject::Base will respond. The second value is an "optional" human-readable label to be printed just before the output of the method. If you don't want a lable, provide an empty string '' as the second value.
|
data/lib/robot_remote_server.rb
CHANGED
@@ -30,7 +30,7 @@ class RobotRemoteServer < XMLRPC::Server
|
|
30
30
|
# @param [Integer] port the port at which this server will serve content
|
31
31
|
# @param [String] yardoc_file the file which YARD expects when loading its Registry
|
32
32
|
# @param [Hash] yardoc_options a hash of YARD::CodeObject::Base.method => human-readable label for docs
|
33
|
-
def initialize(library, host='localhost', port=8270, yardoc_file = '.yardoc', yardoc_options =
|
33
|
+
def initialize(library, host='localhost', port=8270, yardoc_file = '.yardoc', yardoc_options = [[:docstring, '']])
|
34
34
|
@library = library
|
35
35
|
# Get YARD registry loaded into memory
|
36
36
|
@reg = YARD::Registry
|
@@ -87,11 +87,11 @@ class RobotRemoteServer < XMLRPC::Server
|
|
87
87
|
def get_keyword_documentation(name)
|
88
88
|
parent_class = @library.method(name).owner.to_s
|
89
89
|
# Allow custom inclusion/exclusion of parts of the documentation
|
90
|
-
# The
|
90
|
+
# The first element is the method, the second is the human-readable label
|
91
91
|
doc = ''
|
92
|
-
@reg_options.
|
93
|
-
doc <<
|
94
|
-
doc << @reg.resolve(P(parent_class), "#" + name).send(
|
92
|
+
@reg_options.each do |opt|
|
93
|
+
doc << opt[1] + ":\n" if opt[1] != ''
|
94
|
+
doc << @reg.resolve(P(parent_class), "#" + name).send(opt[0])
|
95
95
|
doc << "\n\n"
|
96
96
|
end
|
97
97
|
|
data/robot_remote_server.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: robot_remote_server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 87
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 5
|
9
9
|
- 5
|
10
|
-
-
|
11
|
-
version: 2.5.5.
|
10
|
+
- 2
|
11
|
+
version: 2.5.5.2
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Daniel Gregoire
|