rtsp 0.0.1.alpha → 0.1.0
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.
- data/.document +3 -0
- data/.infinity_test +1 -1
- data/.yardopts +4 -0
- data/ChangeLog.rdoc +9 -0
- data/Gemfile +15 -6
- data/Gemfile.lock +78 -40
- data/LICENSE.rdoc +20 -0
- data/PostInstall.txt +0 -3
- data/README.rdoc +85 -36
- data/Rakefile +33 -49
- data/bin/rtsp_client +129 -0
- data/features/client_changes_state.feature +58 -0
- data/features/client_requests.feature +27 -0
- data/features/control_streams_as_client.feature +26 -0
- data/features/step_definitions/client_changes_state_steps.rb +46 -0
- data/features/step_definitions/client_requests_steps.rb +74 -0
- data/features/step_definitions/control_streams_as_client_steps.rb +34 -0
- data/features/support/env.rb +31 -29
- data/features/support/hooks.rb +3 -0
- data/gemspec.yml +30 -0
- data/lib/ext/logger.rb +8 -0
- data/lib/rtsp.rb +3 -6
- data/lib/rtsp/capturer.rb +105 -0
- data/lib/rtsp/client.rb +446 -204
- data/lib/rtsp/error.rb +6 -0
- data/lib/rtsp/global.rb +63 -0
- data/lib/rtsp/helpers.rb +28 -0
- data/lib/rtsp/message.rb +270 -0
- data/lib/rtsp/response.rb +89 -29
- data/lib/rtsp/transport_parser.rb +64 -0
- data/lib/rtsp/version.rb +4 -0
- data/nsm_test.rb +26 -0
- data/rtsp.gemspec +284 -0
- data/sarix_test.rb +23 -0
- data/soma_test.rb +39 -0
- data/spec/rtsp/client_spec.rb +302 -27
- data/spec/rtsp/helpers_spec.rb +53 -0
- data/spec/rtsp/message_spec.rb +420 -0
- data/spec/rtsp/response_spec.rb +144 -58
- data/spec/rtsp/transport_parser_spec.rb +54 -0
- data/spec/rtsp_spec.rb +3 -3
- data/spec/spec_helper.rb +66 -7
- data/spec/support/fake_rtsp_server.rb +123 -0
- data/tasks/metrics.rake +27 -0
- data/tasks/roodi_config.yml +14 -0
- data/tasks/stats.rake +12 -0
- metadata +174 -183
- data/.autotest +0 -23
- data/History.txt +0 -4
- data/Manifest.txt +0 -26
- data/bin/rtsp +0 -121
- data/features/step_definitions/stream_steps.rb +0 -50
- data/features/stream.feature +0 -17
- data/features/support/common.rb +0 -1
- data/features/support/world.rb +0 -1
- data/lib/rtsp/request_messages.rb +0 -104
- data/lib/rtsp/status_code.rb +0 -7
data/.document
ADDED
data/.infinity_test
CHANGED
data/.yardopts
ADDED
data/ChangeLog.rdoc
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
=== 0.1.0 / 2011-04-12
|
2
|
+
|
3
|
+
* Happy birthday!
|
4
|
+
* All standard RTSP methods supported.
|
5
|
+
* Captures RTP data to a file, but doesn't ensure RTP sequencing before putting to file.
|
6
|
+
* One client object can only handle 1 stream; use a client per stream until this functionality
|
7
|
+
gets implemented.
|
8
|
+
* Only handles unicast, UDP streams.
|
9
|
+
* RTSP exceptions are all +RTSP::Error+s; this will change.
|
data/Gemfile
CHANGED
@@ -1,12 +1,21 @@
|
|
1
|
+
require 'ore/specification'
|
2
|
+
|
1
3
|
source :rubygems
|
2
4
|
|
3
|
-
|
5
|
+
gemspec
|
6
|
+
gem 'sdp', '~> 0.2.2'
|
7
|
+
|
8
|
+
gem 'simplecov', '>= 0.4.0', :require => false, :group => :test
|
4
9
|
|
5
10
|
group :development do
|
6
|
-
gem "rspec", '~> 2.4.0'
|
7
|
-
gem "hoe-yard", :require => "hoe/yard"
|
8
|
-
gem 'yard', '~> 0.6.0'
|
9
|
-
gem 'infinity_test'
|
10
|
-
gem 'metric_fu'
|
11
11
|
gem 'code_statistics', '~> 0.2.13'
|
12
|
+
gem 'cucumber'
|
13
|
+
gem 'jeweler', '~> 1.5.0'
|
14
|
+
gem 'metric_fu', '>= 2.0.0'
|
15
|
+
gem 'ore', '~> 0.7.2'
|
16
|
+
gem 'ore-core', '~> 0.1.5'
|
17
|
+
gem 'ore-tasks', '~> 0.5.0'
|
18
|
+
gem 'rake', '~> 0.8.7'
|
19
|
+
gem "rspec", '~> 2.5.0'
|
20
|
+
gem 'yard', '~> 0.6.0'
|
12
21
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,13 +1,21 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rtsp (0.1.0)
|
5
|
+
rtsp
|
6
|
+
sdp (~> 0.2.2)
|
7
|
+
sdp (~> 0.2.0)
|
8
|
+
|
1
9
|
GEM
|
2
10
|
remote: http://rubygems.org/
|
3
11
|
specs:
|
4
12
|
Saikuro (1.1.0)
|
5
13
|
abstract (1.0.0)
|
6
|
-
activesupport (3.0.
|
14
|
+
activesupport (3.0.6)
|
7
15
|
arrayfields (4.7.4)
|
8
|
-
blankslate (2.1.2.
|
9
|
-
|
10
|
-
|
16
|
+
blankslate (2.1.2.4)
|
17
|
+
builder (3.0.0)
|
18
|
+
chronic (0.3.0)
|
11
19
|
churn (0.0.13)
|
12
20
|
chronic (>= 0.2.3)
|
13
21
|
hirb
|
@@ -17,45 +25,61 @@ GEM
|
|
17
25
|
sexp_processor (~> 3.0.3)
|
18
26
|
code_statistics (0.2.13)
|
19
27
|
colored (1.2)
|
28
|
+
cucumber (0.10.2)
|
29
|
+
builder (>= 2.1.2)
|
30
|
+
diff-lcs (>= 1.1.2)
|
31
|
+
gherkin (>= 2.3.5)
|
32
|
+
json (>= 1.4.6)
|
33
|
+
term-ansicolor (>= 1.0.5)
|
20
34
|
diff-lcs (1.1.2)
|
21
35
|
erubis (2.6.6)
|
22
36
|
abstract (>= 1.0.0)
|
23
37
|
fattr (2.2.0)
|
24
|
-
flay (1.4.
|
38
|
+
flay (1.4.2)
|
25
39
|
ruby_parser (~> 2.0)
|
26
40
|
sexp_processor (~> 3.0)
|
27
|
-
flog (2.5.
|
41
|
+
flog (2.5.1)
|
28
42
|
ruby_parser (~> 2.0)
|
29
43
|
sexp_processor (~> 3.0)
|
44
|
+
gherkin (2.3.5)
|
45
|
+
json (>= 1.4.6)
|
46
|
+
gherkin (2.3.5-java)
|
47
|
+
json (>= 1.4.6)
|
48
|
+
git (1.2.5)
|
30
49
|
haml (3.0.25)
|
31
|
-
hirb (0.3
|
32
|
-
hoe (2.8.0)
|
33
|
-
rake (>= 0.8.7)
|
34
|
-
hoe-yard (0.1.2)
|
35
|
-
yard (>= 0.2.3.1)
|
50
|
+
hirb (0.4.3)
|
36
51
|
i18n (0.5.0)
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
52
|
+
jeweler (1.5.2)
|
53
|
+
bundler (~> 1.0.0)
|
54
|
+
git (>= 1.2.5)
|
55
|
+
rake
|
56
|
+
json (1.5.1)
|
57
|
+
json (1.5.1-java)
|
58
|
+
json_pure (1.5.1)
|
41
59
|
main (4.4.0)
|
42
60
|
arrayfields (>= 4.7.4)
|
43
61
|
fattr (>= 2.1.0)
|
44
|
-
metric_fu (2.
|
62
|
+
metric_fu (2.1.1)
|
45
63
|
Saikuro (>= 1.1.0)
|
46
64
|
activesupport (>= 2.0.0)
|
47
|
-
chronic (~> 0.
|
65
|
+
chronic (~> 0.3.0)
|
48
66
|
churn (>= 0.0.7)
|
49
67
|
flay (>= 1.2.1)
|
50
|
-
flog (>= 2.
|
51
|
-
rails_best_practices (>= 0.
|
68
|
+
flog (>= 2.3.0)
|
69
|
+
rails_best_practices (>= 0.6.4)
|
52
70
|
rcov (>= 0.8.3.3)
|
53
71
|
reek (>= 1.2.6)
|
54
72
|
roodi (>= 2.1.0)
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
73
|
+
syntax
|
74
|
+
ore (0.7.2)
|
75
|
+
ore-core (>= 0.1.4, ~> 0.1)
|
76
|
+
thor (~> 0.14.3)
|
77
|
+
ore-core (0.1.5)
|
78
|
+
ore-tasks (0.5.0)
|
79
|
+
ore-core (>= 0.1.3, ~> 0.1)
|
80
|
+
parslet (1.1.1)
|
81
|
+
blankslate (~> 2.0)
|
82
|
+
rails_best_practices (0.7.5)
|
59
83
|
activesupport
|
60
84
|
colored (~> 1.2)
|
61
85
|
erubis (~> 2.6.6)
|
@@ -65,40 +89,54 @@ GEM
|
|
65
89
|
ruby_parser (~> 2.0.4)
|
66
90
|
rake (0.8.7)
|
67
91
|
rcov (0.9.9)
|
92
|
+
rcov (0.9.9-java)
|
68
93
|
reek (1.2.8)
|
69
94
|
ruby2ruby (~> 1.2)
|
70
95
|
ruby_parser (~> 2.0)
|
71
96
|
sexp_processor (~> 3.0)
|
72
97
|
roodi (2.1.0)
|
73
98
|
ruby_parser
|
74
|
-
rspec (2.
|
75
|
-
rspec-core (~> 2.
|
76
|
-
rspec-expectations (~> 2.
|
77
|
-
rspec-mocks (~> 2.
|
78
|
-
rspec-core (2.
|
79
|
-
rspec-expectations (2.
|
99
|
+
rspec (2.5.0)
|
100
|
+
rspec-core (~> 2.5.0)
|
101
|
+
rspec-expectations (~> 2.5.0)
|
102
|
+
rspec-mocks (~> 2.5.0)
|
103
|
+
rspec-core (2.5.1)
|
104
|
+
rspec-expectations (2.5.0)
|
80
105
|
diff-lcs (~> 1.1.2)
|
81
|
-
rspec-mocks (2.
|
106
|
+
rspec-mocks (2.5.0)
|
82
107
|
ruby-progressbar (0.0.9)
|
83
108
|
ruby2ruby (1.2.5)
|
84
109
|
ruby_parser (~> 2.0)
|
85
110
|
sexp_processor (~> 3.0)
|
86
|
-
ruby_parser (2.0.
|
111
|
+
ruby_parser (2.0.6)
|
87
112
|
sexp_processor (~> 3.0)
|
88
|
-
sdp (0.2.
|
89
|
-
parslet (~> 1.
|
113
|
+
sdp (0.2.2)
|
114
|
+
parslet (~> 1.1.0)
|
90
115
|
sexp_processor (3.0.5)
|
91
|
-
|
92
|
-
|
116
|
+
simplecov (0.4.2)
|
117
|
+
simplecov-html (~> 0.4.4)
|
118
|
+
simplecov-html (0.4.4)
|
119
|
+
syntax (1.0.0)
|
120
|
+
term-ansicolor (1.0.5)
|
121
|
+
thor (0.14.6)
|
122
|
+
yard (0.6.7)
|
93
123
|
|
94
124
|
PLATFORMS
|
125
|
+
java
|
95
126
|
ruby
|
96
127
|
|
97
128
|
DEPENDENCIES
|
129
|
+
bundler (~> 1.0.0)
|
98
130
|
code_statistics (~> 0.2.13)
|
99
|
-
|
100
|
-
|
101
|
-
metric_fu
|
102
|
-
|
103
|
-
|
131
|
+
cucumber
|
132
|
+
jeweler (~> 1.5.0)
|
133
|
+
metric_fu (>= 2.0.0)
|
134
|
+
ore (~> 0.7.2)
|
135
|
+
ore-core (~> 0.1.5)
|
136
|
+
ore-tasks (~> 0.5.0)
|
137
|
+
rake (~> 0.8.7)
|
138
|
+
rspec (~> 2.5.0)
|
139
|
+
rtsp!
|
140
|
+
sdp (~> 0.2.2)
|
141
|
+
simplecov (>= 0.4.0)
|
104
142
|
yard (~> 0.6.0)
|
data/LICENSE.rdoc
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 sloveless, mkirby
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/PostInstall.txt
CHANGED
data/README.rdoc
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
=
|
1
|
+
= rtsp
|
2
2
|
|
3
3
|
* https://github.com/turboladen/rtsp
|
4
4
|
|
@@ -16,24 +16,91 @@ SDP: http://tools.ietf.org/html/rfc4566
|
|
16
16
|
|
17
17
|
== FEATURES/PROBLEMS:
|
18
18
|
|
19
|
-
* RTSP
|
20
|
-
*
|
19
|
+
* All standard RTSP methods supported.
|
20
|
+
* Captures RTP data to a file, but doesn't ensure RTP sequencing before putting to file.
|
21
|
+
* One client object can only handle 1 stream; use a client per stream until this functionality
|
22
|
+
gets implemented.
|
23
|
+
* Only handles unicast, UDP streams.
|
24
|
+
* RTSP exceptions are all +RTSP::Error+s; this will change.
|
21
25
|
|
22
26
|
== SYNOPSIS:
|
23
27
|
|
24
|
-
The
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
28
|
+
The quick get started:
|
29
|
+
|
30
|
+
RTSP::Client.log? # => true
|
31
|
+
RTSP::Client.log = false
|
32
|
+
client = RTSP::Client.new "rtsp://64.202.98.91/sa.sdp" do |connection, capturer|
|
33
|
+
connection.timeout = 5
|
34
|
+
capturer.rtp_port = 8554
|
35
|
+
capturer.rtp_file = File.open("captured_stuff.rtp", "wb")
|
36
|
+
end
|
37
|
+
|
38
|
+
client.server_uri # => #<URI::Generic:0x00000100ba4db0 URL:rtsp://64.202.98.91:554/sa.sdp>
|
39
|
+
client.session_state # => :init
|
40
|
+
client.cseq # => 1
|
41
|
+
client.connection.do_capture # => true
|
42
|
+
client.connection.interleave # => false
|
43
|
+
client.connection.timeout # => 5
|
44
|
+
client.capturer.broadcast_type # => :unicast
|
45
|
+
client.capturer.rtp_port # => 8554
|
46
|
+
client.capturer.rtp_file # => #<File:captured_stuff.rtp>
|
47
|
+
client.capturer.transport_protocol # => :UDP
|
48
|
+
|
49
|
+
response = client.options
|
50
|
+
response.class # => RTSP::Response
|
51
|
+
response.code # => 200
|
52
|
+
response.message # => "OK"
|
53
|
+
client.cseq # => 2
|
54
|
+
|
55
|
+
response = client.describe
|
56
|
+
response.body.class # => SDP::Description
|
57
|
+
response.content_type # => "application/sdp"
|
58
|
+
response.server # => "DSS/5.5 (Build/489.7; Platform/Linux; Release/Darwin; )"
|
59
|
+
client.aggregate_control_track # => "rtsp://64.202.98.91:554/sa.sdp/"
|
60
|
+
client.media_control_tracks # => ["rtsp://64.202.98.91:554/sa.sdp/trackID=1"]
|
61
|
+
client.cseq # => 3
|
62
|
+
|
63
|
+
response = client.setup(client.media_control_tracks.first)
|
64
|
+
response.session # => 7098486223178290313
|
65
|
+
client.session # => 7098486223178290313
|
66
|
+
client.cseq # => 4
|
67
|
+
client.session_state # => :ready
|
68
|
+
|
69
|
+
|
70
|
+
response = client.play(client.aggregate_control_track)
|
71
|
+
response.range # => "npt=now="
|
72
|
+
resposne.rtp_info # => "url=rtsp://64.202.98.91:554/sa.sdp/trackID=1"
|
73
|
+
client.session_state # => :playing
|
74
|
+
|
75
|
+
# Wait while the video streams
|
76
|
+
sleep 5
|
77
|
+
|
78
|
+
client.pause(client.aggregate_control_track)
|
79
|
+
client.session_state # => :ready
|
80
|
+
|
81
|
+
# Wait while the video is paused
|
82
|
+
sleep 2
|
83
|
+
|
84
|
+
client.teardown(client.aggregate_control_track)
|
85
|
+
client.session # => 0
|
86
|
+
client.session_state # => :init
|
87
|
+
|
88
|
+
# Check the streamed file's contents
|
89
|
+
puts client.capturer.rtp_file # => (Lots of data)
|
30
90
|
|
31
91
|
== REQUIREMENTS:
|
32
92
|
|
33
|
-
*
|
34
|
-
* 1.
|
35
|
-
|
36
|
-
*
|
93
|
+
* (Tested) Rubies
|
94
|
+
* 1.9.2-p180
|
95
|
+
* RubyGems
|
96
|
+
* sdp, '~> 0.2.2'
|
97
|
+
* RubyGems (development)
|
98
|
+
* ore-core, '~> 0.1.0'
|
99
|
+
* jeweler, '~> 1.5.0'
|
100
|
+
* ore-tasks, '~> 0.3.0'
|
101
|
+
* yard, '~> 0.6.0'
|
102
|
+
* metric_fu
|
103
|
+
* code_statistics, '~> 0.2.13'
|
37
104
|
|
38
105
|
== INSTALL:
|
39
106
|
|
@@ -43,32 +110,14 @@ The uber-quick get started:
|
|
43
110
|
|
44
111
|
After checking out the source, run:
|
45
112
|
|
46
|
-
$
|
113
|
+
$ bundle install
|
47
114
|
|
48
|
-
This task will install any missing dependencies
|
49
|
-
and generate the RDoc.
|
115
|
+
This task will install any missing dependencies.
|
50
116
|
|
51
117
|
== LICENSE:
|
52
118
|
|
53
119
|
(The MIT License)
|
54
120
|
|
55
|
-
Copyright (c)
|
56
|
-
|
57
|
-
|
58
|
-
a copy of this software and associated documentation files (the
|
59
|
-
'Software'), to deal in the Software without restriction, including
|
60
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
61
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
62
|
-
permit persons to whom the Software is furnished to do so, subject to
|
63
|
-
the following conditions:
|
64
|
-
|
65
|
-
The above copyright notice and this permission notice shall be
|
66
|
-
included in all copies or substantial portions of the Software.
|
67
|
-
|
68
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
69
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
70
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
71
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
72
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
73
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
74
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
121
|
+
Copyright (c) 2011 Steve Loveless, Mike Kirby
|
122
|
+
|
123
|
+
See LICENSE.rdoc for details.
|
data/Rakefile
CHANGED
@@ -1,57 +1,41 @@
|
|
1
1
|
require 'rubygems' if RUBY_VERSION < "1.9.0"
|
2
|
-
require '
|
3
|
-
|
4
|
-
|
5
|
-
require '
|
6
|
-
|
7
|
-
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'bundler'
|
6
|
+
rescue LoadError => e
|
7
|
+
STDERR.puts e.message
|
8
|
+
STDERR.puts "Run `gem install bundler` to install Bundler."
|
9
|
+
exit e.status_code
|
10
|
+
end
|
8
11
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
12
|
+
begin
|
13
|
+
Bundler.setup(:development)
|
14
|
+
rescue Bundler::BundlerError => e
|
15
|
+
STDERR.puts e.message
|
16
|
+
STDERR.puts "Run `bundle install` to install missing gems."
|
17
|
+
exit e.status_code
|
18
|
+
end
|
13
19
|
|
14
|
-
|
15
|
-
|
16
|
-
|
20
|
+
require 'ore/specification'
|
21
|
+
require 'jeweler'
|
22
|
+
Jeweler::Tasks.new(Ore::Specification.new)
|
17
23
|
|
18
|
-
|
19
|
-
|
24
|
+
require 'ore/tasks'
|
25
|
+
Ore::Tasks.new
|
20
26
|
|
21
|
-
|
22
|
-
|
27
|
+
require 'rspec/core/rake_task'
|
28
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
29
|
+
t.ruby_opts = "-w"
|
30
|
+
t.rspec_opts = ['--format', 'documentation', '--color']
|
23
31
|
end
|
32
|
+
task :default => :spec
|
24
33
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
self.developer('Steve Loveless & Mike Kirby', 'steve.loveless@gmail.com, mkirby@gmail.com')
|
29
|
-
self.post_install_message = File.readlines 'PostInstall.txt'
|
30
|
-
self.version = RTSP::VERSION
|
31
|
-
self.url = RTSP::WWW
|
32
|
-
self.description = get_descr_from_readme
|
33
|
-
self.readme_file = 'README.rdoc'
|
34
|
-
self.history_file = 'History.txt'
|
35
|
-
self.rspec_options += ['--color', '--format', 'documentation']
|
36
|
-
self.extra_deps += [
|
37
|
-
['sdp', '~>0.2.0']
|
38
|
-
]
|
39
|
-
self.extra_dev_deps += [
|
40
|
-
['rspec', ">=2.0.1"],
|
41
|
-
['yard', '>=0.6.4'],
|
42
|
-
['cucumber'],
|
43
|
-
['hoe-yard', '>=0.1.2']
|
44
|
-
]
|
45
|
-
|
46
|
-
self.test_globs = 'spec/*.rb'
|
47
|
-
|
48
|
-
# Extra Yard options
|
49
|
-
self.yard_title = "#{self.name} Documentation (#{self.version})"
|
50
|
-
self.yard_opts += ['--output-dir', 'doc']
|
51
|
-
self.yard_opts += ['--private']
|
52
|
-
self.yard_opts += ['--protected']
|
53
|
-
self.yard_opts += ['--verbose']
|
54
|
-
self.yard_opts += ['--files',
|
55
|
-
[self.history_file, 'Manifest.txt', self.readme_file]
|
56
|
-
]
|
34
|
+
require 'yard'
|
35
|
+
YARD::Rake::YardocTask.new do |t|
|
36
|
+
t.options = ['--verbose']
|
57
37
|
end
|
38
|
+
|
39
|
+
# Load all extra rake tasks
|
40
|
+
Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].each { |ext| load ext }
|
41
|
+
|