sdp 0.2.4 → 0.2.5

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.
@@ -1,3 +1,10 @@
1
+ === 0.2.5 / 2011-12-01
2
+
3
+ * Improvements:
4
+ * gh-18[https://github.com/turboladen/sdp/issues/18]: Added SDP::ParseError
5
+ to convey SDP couldn't parse.
6
+ * Relaxed version enforcement on parslet.
7
+
1
8
  === 0.2.4 / 2011-10-25
2
9
 
3
10
  * Bug Fixes:
@@ -1,8 +1,8 @@
1
1
  = sdp
2
2
 
3
- * {Homepage}[http://rubygems.org/gems/sdp]
3
+ * http://rubygems.org/gems/sdp
4
4
  * {Documentation}[http://rubydoc.info/gems/sdp]
5
- * {Email}[steve.loveless at gmail.com]
5
+ * {Email}[mailto://steve.loveless@gmail.com]
6
6
 
7
7
  == Description
8
8
 
@@ -126,16 +126,12 @@ to use for an SDP description.
126
126
  == Requirements
127
127
 
128
128
  * Rubies (tested, at least):
129
- * 1.8.7-p334
130
- * 1.9.1-p378
131
- * 1.9.2-p180
132
- * JRuby 1.5.6
129
+ * 1.8.7-p352
130
+ * 1.9.2-p290
131
+ * 1.9.3-p0
132
+ * JRuby 1.6.5
133
133
  * Gems:
134
- * parslet, ~> 1.1.0
135
- * Gems (development):
136
- * bundler, ~> 1.0.0
137
- * rspec, >= 2.6.0
138
- * yard, >= 0.6.0
134
+ * parslet, >= 1.1.0
139
135
 
140
136
  == Install
141
137
 
data/Rakefile CHANGED
@@ -2,14 +2,26 @@ require 'rubygems'
2
2
  require 'bundler/gem_tasks'
3
3
  require 'rspec/core/rake_task'
4
4
  require 'yard'
5
+ require 'code_statistics'
5
6
 
7
+ # RSpec & `gem test`
6
8
  RSpec::Core::RakeTask.new(:spec) do |t|
7
9
  t.ruby_opts = "-w"
8
10
  t.rspec_opts = ['--format', 'documentation', '--color']
9
11
  end
10
12
  task :test => :spec
11
13
 
14
+ # Yard
12
15
  YARD::Rake::YardocTask.new
13
16
 
14
- # Load all extra rake tasks
15
- Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].each { |ext| load ext }
17
+ # code_statistics
18
+ STATS_DIRECTORIES = [
19
+ %w(Library lib/),
20
+ %w(Behavior\ tests features/),
21
+ %w(Unit\ tests spec/)
22
+ ].collect { |name, dir| [ name, "#{dir}" ] }.select { |name, dir| File.directory?(dir) }
23
+
24
+ desc "Report code statistics (KLOCs, etc) from the application"
25
+ task :stats do
26
+ CodeStatistics.new(*STATS_DIRECTORIES).to_s
27
+ end
data/lib/sdp.rb CHANGED
@@ -1,23 +1,28 @@
1
- require 'sdp/version'
2
- require 'sdp/description'
3
- require 'sdp/parser'
1
+ require File.expand_path(File.dirname(__FILE__) + '/sdp/version')
2
+ require File.expand_path(File.dirname(__FILE__) + '/sdp/description')
3
+ require File.expand_path(File.dirname(__FILE__) + '/sdp/parser')
4
+ require File.expand_path(File.dirname(__FILE__) + '/sdp/parse_error')
4
5
 
5
- # The only use for this class is the #parse method, which is in this
6
+ # The only use for this class is the +#parse+ method, which is in this
6
7
  # base class solely for convenience. Other than this method, this
7
8
  # base class doesn't really do anything.
8
9
  class SDP
9
10
 
10
- # Creates a parser and parses the given text in to an SDP::Description
11
+ # Creates a parser and parses the given text in to an +SDP::Description+
11
12
  # object.
12
13
  #
13
14
  # @param [String] sdp_text The text from an SDP description.
14
15
  # @return [SDP::Description] The object that represents the description
15
- # that was parsed.
16
+ # that was parsed.
17
+ # @raise [SDP::ParseError] If parsing fails, raise an SDP::ParseError instead
18
+ # of a Parslet exception that might confuse SDP users.
16
19
  def self.parse sdp_text
17
- sdp_hash = SDP::Parser.new.parse sdp_text
20
+ begin
21
+ sdp_hash = SDP::Parser.new.parse sdp_text
22
+ rescue Parslet::UnconsumedInput => ex
23
+ raise SDP::ParseError, ex
24
+ end
25
+
18
26
  SDP::Description.new(sdp_hash)
19
27
  end
20
28
  end
21
-
22
- # Reclass so we can raise our own Exceptions.
23
- class SDP::RuntimeError < StandardError; end;
@@ -1,17 +1,19 @@
1
1
  # encoding: utf-8
2
2
  require 'erb'
3
+ require File.expand_path(File.dirname(__FILE__) + '/runtime_error')
3
4
 
4
5
  class SDP
5
6
  PROTOCOL_VERSION = 0
6
7
 
7
- # Represents an SDP description as defined in RFC 4566. This class allows
8
+ # Represents an SDP description as defined in
9
+ # {RFC 4566}[http://tools.ietf.org/html/rfc4566]. This class allows
8
10
  # for creating an object so you can, in turn, create a String that
9
11
  # represents an SDP description. The String, then can be used by
10
12
  # other protocols that depend on an SDP description.
11
13
  #
12
- # SDP::Description objects are initialized empty (i.e. no fields are
14
+ # +SDP::Description+ objects are initialized empty (i.e. no fields are
13
15
  # defined), putting the onus on you to add fields in the proper order.
14
- # After building the description up, call #to_s to render it. This
16
+ # After building the description up, call +#to_s+ to render it. This
15
17
  # will render the String with fields in order that they were added
16
18
  # to the object, so be sure to add them according to spec!
17
19
  class Description < Hash
@@ -31,7 +33,7 @@ class SDP
31
33
  #
32
34
  # @param [Symbol] field_type
33
35
  # @return [] Returns whatever type the value is that's stored
34
- # in the Hash key.
36
+ # in the Hash key.
35
37
  def define_read_field_method(field_type)
36
38
  define_method field_type do
37
39
  if field_type == :media_sections
@@ -99,7 +101,7 @@ class SDP
99
101
  end
100
102
 
101
103
  # @param [Hash] session_as_hash Pass this in to use these values instead
102
- # of building your own from scratch.
104
+ # of building your own from scratch.
103
105
  def initialize(session_as_hash=nil)
104
106
  if session_as_hash.nil?
105
107
  self[:session_section] = {}
@@ -122,7 +124,7 @@ class SDP
122
124
  super
123
125
  end
124
126
 
125
- # Turns the current SDP::Description object into the SDP description,
127
+ # Turns the current +SDP::Description+ object into the SDP description,
126
128
  # ready to be used.
127
129
  #
128
130
  # @return [String] The SDP description.
@@ -0,0 +1,2 @@
1
+ # Reclass so we can raise our own Exceptions.
2
+ class SDP::ParseError < StandardError; end;
@@ -1,4 +1,5 @@
1
- require 'sdp'
1
+ require File.expand_path(File.dirname(__FILE__) + '/../sdp')
2
+ require 'rubygems'
2
3
  require 'parslet'
3
4
 
4
5
  # Class for parsing SDP description text, ideally when receiving as some sort
@@ -10,6 +11,11 @@ require 'parslet'
10
11
  # the RFC 4566 implies that this description isn't valid (because that field is
11
12
  # required). Instead ofraising an exception, the parser lets the
12
13
  # SDP::Description class deal with this.
14
+ #
15
+ # Also, an object of this class parses key/value pairs, where, as a by-product
16
+ # of using +Parslet+, values end up being +Parslet::Slice+ objects. It's worth
17
+ # pointing out that while those are not Strings, they mostly behave like
18
+ # Strings. See the Parslet docs for more info.
13
19
  class SDP::Parser < Parslet::Parser
14
20
  # All of the fields
15
21
  rule(:version) { str('v=') >> field_value.as(:protocol_version) >> eol }
@@ -0,0 +1,2 @@
1
+ # Reclass so we can raise our own Exceptions.
2
+ class SDP::RuntimeError < StandardError; end;
@@ -1,4 +1,3 @@
1
1
  class SDP
2
- # sdp version
3
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
4
3
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  that can be converted to text using}
13
13
  s.email = %q{steve.loveless@gmail.com}
14
14
  s.extra_rdoc_files = Dir.glob("*.rdoc")
15
- s.files = Dir.glob("{features,lib,spec,tasks}/**/*") + Dir.glob("*.rdoc") +
15
+ s.files = Dir.glob("{features,lib,spec}/**/*") + Dir.glob("*.rdoc") +
16
16
  %w(.gemtest .rspec .yardopts Gemfile Rakefile sdp.gemspec)
17
17
  s.homepage = %q{http://github.com/turboladen/sdp}
18
18
  s.licenses = %w(MIT)
@@ -20,13 +20,13 @@ Gem::Specification.new do |s|
20
20
  s.summary = %q{Parse and create SDP (Session Description Protocol) text based on RFC4566.}
21
21
  s.test_files = Dir.glob("spec/**/*")
22
22
 
23
- s.add_runtime_dependency(%q<parslet>, ["~> 1.1.0"])
23
+ s.add_runtime_dependency(%q<parslet>, [">= 1.1.0"])
24
24
 
25
25
  s.add_development_dependency(%q<bundler>, ["> 1.0.0"])
26
26
  s.add_development_dependency(%q<code_statistics>, ["~> 0.2.13"])
27
27
  s.add_development_dependency(%q<cucumber>, ["~> 1.1.0"])
28
- s.add_development_dependency(%q<metric_fu>, [">= 2.1.0"])
29
28
  s.add_development_dependency(%q<rake>, [">= 0"])
30
29
  s.add_development_dependency(%q<rspec>, [">= 2.6.0"])
30
+ s.add_development_dependency(%q<simplecov>, [">= 0.5.0"])
31
31
  s.add_development_dependency(%q<yard>, [">= 0.6.0"])
32
32
  end
@@ -170,25 +170,22 @@ describe SDP::Parser do
170
170
  it "all possible fields in 1 section" do
171
171
  sdp = "m=audio 0 RTP/AVP 96\r\ni=Test info\r\nc=IN IP4 0.0.0.0\r\nb=AS:40\r\nk=prompt\r\na=rtpmap:96 MP4A-LATM/44100/2\r\na=fmtp:96 cpresent=0;config=400027200000\r\n"
172
172
  sdp_hash = @parser.parse sdp
173
- sdp_hash[:media_sections].first[:media].should == "audio"
174
- sdp_hash[:media_sections].first[:port].should == "0"
175
- sdp_hash[:media_sections].first[:protocol].should == "RTP/AVP"
176
- sdp_hash[:media_sections].first[:format].should == "96"
177
- sdp_hash[:media_sections].first[:information].should == "Test info"
178
- sdp_hash[:media_sections].first[:connection_network_type].should == "IN"
179
- sdp_hash[:media_sections].first[:connection_address_type].should == "IP4"
180
- sdp_hash[:media_sections].first[:connection_address].should == "0.0.0.0"
181
- sdp_hash[:media_sections].first[:bandwidth_type].should == "AS"
182
- sdp_hash[:media_sections].first[:bandwidth].should == "40"
183
- sdp_hash[:media_sections].first[:encryption_method].should == "prompt"
184
- sdp_hash[:media_sections].first[:attributes].first[:attribute].should ==
185
- "rtpmap"
186
- sdp_hash[:media_sections].first[:attributes].first[:value].should ==
187
- "96 MP4A-LATM/44100/2"
188
- sdp_hash[:media_sections].first[:attributes].last[:attribute].should ==
189
- "fmtp"
190
- sdp_hash[:media_sections].first[:attributes].last[:value].should ==
191
- "96 cpresent=0;config=400027200000"
173
+ first_media_section = sdp_hash[:media_sections].first
174
+ first_media_section[:media].should == "audio"
175
+ first_media_section[:port].should == "0"
176
+ first_media_section[:protocol].should == "RTP/AVP"
177
+ first_media_section[:format].should == "96"
178
+ first_media_section[:information].should == "Test info"
179
+ first_media_section[:connection_network_type].should == "IN"
180
+ first_media_section[:connection_address_type].should == "IP4"
181
+ first_media_section[:connection_address].should == "0.0.0.0"
182
+ first_media_section[:bandwidth_type].should == "AS"
183
+ first_media_section[:bandwidth].should == "40"
184
+ first_media_section[:encryption_method].should == "prompt"
185
+ first_media_section[:attributes].first[:attribute].should == "rtpmap"
186
+ first_media_section[:attributes].first[:value].should == "96 MP4A-LATM/44100/2"
187
+ first_media_section[:attributes].last[:attribute].should == "fmtp"
188
+ first_media_section[:attributes].last[:value].should == "96 cpresent=0;config=400027200000"
192
189
  end
193
190
  end
194
191
 
@@ -23,144 +23,152 @@ a=rtpmap:99 h263-1998/90000
23
23
  EOF
24
24
 
25
25
  describe SDP do
26
- it "should have a VERSION constant" do
27
- SDP.const_get('VERSION').should_not be_empty
26
+ it "VERSION is 0.2.5" do
27
+ SDP.const_get('VERSION').should eql '0.2.5'
28
+ end
29
+
30
+ it "raises when parsing malformed SDP text" do
31
+ expect { SDP.parse("pants") }.to raise_error SDP::ParseError
28
32
  end
29
33
 
30
34
  context "parses SDP text into a Hash" do
31
35
  before do
32
- @parsed_sdp = SDP.parse SDP_TEXT
36
+ begin
37
+ @parsed_sdp = SDP.parse SDP_TEXT
38
+ rescue Parslet::ParseFailed => error
39
+ puts error, parser.root.error_tree
40
+ end
33
41
  end
34
42
 
35
43
  it "has a version number of 0" do
36
44
  @parsed_sdp.protocol_version.should == "0"
37
- @parsed_sdp.protocol_version.class.should == String
45
+ @parsed_sdp.protocol_version.should be_a Parslet::Slice
38
46
  end
39
47
 
40
48
  context "origin" do
41
49
  it "has a username of 'jdoe'" do
42
50
  @parsed_sdp.username.should == 'jdoe'
43
- @parsed_sdp.username.class.should == String
51
+ @parsed_sdp.username.should be_a Parslet::Slice
44
52
  end
45
53
 
46
54
  it "has a session_id of '2890844526'" do
47
55
  @parsed_sdp.id.should == "2890844526"
48
- @parsed_sdp.id.class.should == String
56
+ @parsed_sdp.id.should be_a Parslet::Slice
49
57
  end
50
58
 
51
59
  it "has a session_version of '2890842807'" do
52
60
  @parsed_sdp.version.should == '2890842807'
53
- @parsed_sdp.version.class.should == String
61
+ @parsed_sdp.version.should be_a Parslet::Slice
54
62
  end
55
63
 
56
64
  it "has a net_type of 'IN'" do
57
65
  @parsed_sdp.network_type.should == "IN"
58
- @parsed_sdp.network_type.class.should == String
66
+ @parsed_sdp.network_type.should be_a Parslet::Slice
59
67
  end
60
68
 
61
69
  it "has a address_type of 'IP4'" do
62
70
  @parsed_sdp.address_type.should == "IP4"
63
- @parsed_sdp.address_type.class.should == String
71
+ @parsed_sdp.address_type.should be_a Parslet::Slice
64
72
  end
65
73
 
66
74
  it "has a unicast_address of '10.47.16.5'" do
67
75
  @parsed_sdp.unicast_address.should == "10.47.16.5"
68
- @parsed_sdp.unicast_address.class.should == String
76
+ @parsed_sdp.unicast_address.should be_a Parslet::Slice
69
77
  end
70
78
  end
71
79
 
72
80
  it "has a session name of 'SDP Seminar'" do
73
81
  @parsed_sdp.name.should == "SDP Seminar"
74
- @parsed_sdp.name.class.should == String
82
+ @parsed_sdp.name.should be_a Parslet::Slice
75
83
  end
76
84
 
77
85
  it "has a session information of 'A Seminar on the session description protocol'" do
78
86
  @parsed_sdp.information.should == "A Seminar on the session description protocol"
79
- @parsed_sdp.information.class.should == String
87
+ @parsed_sdp.information.should be_a Parslet::Slice
80
88
  end
81
89
 
82
90
  it "has a URI of 'http://www.example.com/seminars/sdp.pdf'" do
83
91
  @parsed_sdp.uri.should == "http://www.example.com/seminars/sdp.pdf"
84
- @parsed_sdp.uri.class.should == String
92
+ @parsed_sdp.uri.should be_a Parslet::Slice
85
93
  end
86
94
 
87
95
  it "has an email address of 'j.doe@example.com (Jane Doe)'" do
88
96
  @parsed_sdp.email_address.should == "j.doe@example.com (Jane Doe)"
89
- @parsed_sdp.email_address.class.should == String
97
+ @parsed_sdp.email_address.should be_a Parslet::Slice
90
98
  end
91
99
 
92
100
  it "has a phone number of '+1 617 555-6011'" do
93
101
  @parsed_sdp.phone_number.should == "+1 617 555-6011"
94
- @parsed_sdp.phone_number.class.should == String
102
+ @parsed_sdp.phone_number.should be_a Parslet::Slice
95
103
  end
96
104
 
97
105
  context "bandwidth" do
98
106
  it "has a bandwidth type of 'CT'" do
99
107
  @parsed_sdp.bandwidth_type.should == "CT"
100
- @parsed_sdp.bandwidth_type.class.should == String
108
+ @parsed_sdp.bandwidth_type.should be_a Parslet::Slice
101
109
  end
102
110
 
103
111
  it "has a bandwidth of '1000'" do
104
112
  @parsed_sdp.bandwidth.should == "1000"
105
- @parsed_sdp.bandwidth.class.should == String
113
+ @parsed_sdp.bandwidth.should be_a Parslet::Slice
106
114
  end
107
115
  end
108
116
 
109
117
  context "timing" do
110
118
  it "has a start time of '2873397496'" do
111
119
  @parsed_sdp.start_time.should == '2873397496'
112
- @parsed_sdp.start_time.class.should == String
120
+ @parsed_sdp.start_time.should be_a Parslet::Slice
113
121
  end
114
122
 
115
123
  it "has a stop time of '2873404696'" do
116
124
  @parsed_sdp.stop_time.should == '2873404696'
117
- @parsed_sdp.stop_time.class.should == String
125
+ @parsed_sdp.stop_time.should be_a Parslet::Slice
118
126
  end
119
127
  end
120
128
 
121
129
  context "repeat times" do
122
130
  it "has a repeat interval of '604800'" do
123
131
  @parsed_sdp.repeat_interval.should == '604800'
124
- @parsed_sdp.repeat_interval.class.should == String
132
+ @parsed_sdp.repeat_interval.should be_a Parslet::Slice
125
133
  end
126
134
 
127
135
  it "has an active duration of '3600'" do
128
136
  @parsed_sdp.active_duration.should == '3600'
129
- @parsed_sdp.active_duration.class.should == String
137
+ @parsed_sdp.active_duration.should be_a Parslet::Slice
130
138
  end
131
139
 
132
140
  it "has a offsets from start time of '0 90000'" do
133
141
  @parsed_sdp.offsets_from_start_time.should == '0 90000'
134
- @parsed_sdp.offsets_from_start_time.class.should == String
142
+ @parsed_sdp.offsets_from_start_time.should be_a Parslet::Slice
135
143
  end
136
144
  end
137
145
 
138
146
  context "time zones" do
139
147
  it "has a time zone adjustment of '2882844526'" do
140
148
  @parsed_sdp.time_zones[:adjustment_time].should == '2882844526'
141
- @parsed_sdp.time_zones[:adjustment_time].class.should == String
149
+ @parsed_sdp.time_zones[:adjustment_time].should be_a Parslet::Slice
142
150
  end
143
151
 
144
152
  it "has a time zone offset of '-1h'" do
145
153
  @parsed_sdp.time_zones[:offset].should == '-1h'
146
- @parsed_sdp.time_zones[:offset].class.should == String
154
+ @parsed_sdp.time_zones[:offset].should be_a Parslet::Slice
147
155
  end
148
156
  end
149
157
 
150
158
  context "connection data" do
151
159
  it "has a connection network type of 'IN'" do
152
160
  @parsed_sdp.connection_network_type.should == "IN"
153
- @parsed_sdp.connection_network_type.class.should == String
161
+ @parsed_sdp.connection_network_type.should be_a Parslet::Slice
154
162
  end
155
163
 
156
164
  it "has a addrtype of :IP4" do
157
165
  @parsed_sdp.connection_address_type.should == "IP4"
158
- @parsed_sdp.connection_address_type.class.should == String
166
+ @parsed_sdp.connection_address_type.should be_a Parslet::Slice
159
167
  end
160
168
 
161
169
  it "has a connection address of '224.2.17.12/127'" do
162
170
  @parsed_sdp.connection_address.should == '224.2.17.12/127'
163
- @parsed_sdp.connection_address.class.should == String
171
+ @parsed_sdp.connection_address.should be_a Parslet::Slice
164
172
  end
165
173
  end
166
174
 
@@ -177,7 +185,7 @@ describe SDP do
177
185
  end
178
186
  end
179
187
 
180
- context "PROTOCOL_VERSION" do
188
+ describe "PROTOCOL_VERSION" do
181
189
  it "has an PROTOCOL_VERSION constant defined" do
182
190
  SDP.const_defined?('PROTOCOL_VERSION').should be_true
183
191
  end
@@ -1,5 +1,7 @@
1
- require 'rspec'
1
+ require 'simplecov'
2
+ SimpleCov.start
3
+
2
4
  $:.unshift(File.dirname(__FILE__) + '/../lib')
3
5
  require 'sdp/version'
4
6
 
5
- SDP_MISSING_TIME = "v=0\r\no=- 1809368942 3379601213 IN IP4 127.0.0.1\r\ns=Secret Agent from SomaFM\r\ni=Downtempo Spy Lounge\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\na=x-qt-text-cmt:Orban Opticodec-PCx-qt-text-nam:Secret Agent from SomaFMx-qt-text-inf:Downtempo Spy Loungecontrol:*\r\nm=audio 0 RTP/AVP 96\r\na=rtpmap:96 MP4A-LATM/44100/2a=fmtp:96 cpresent=0;config=400027200000a=control:trackID=1\r\n"
7
+ SDP_MISSING_TIME = "v=0\r\no=- 1809368942 3379601213 IN IP4 127.0.0.1\r\ns=Secret Agent from SomaFM\r\ni=Downtempo Spy Lounge\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\na=x-qt-text-cmt:Orban Opticodec-PCx-qt-text-nam:Secret Agent from SomaFMx-qt-text-inf:Downtempo Spy Loungecontrol:*\r\nm=audio 0 RTP/AVP 96\r\na=rtpmap:96 MP4A-LATM/44100/2a=fmtp:96 cpresent=0;config=400027200000a=control:trackID=1\r\n"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sdp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-25 00:00:00.000000000Z
12
+ date: 2011-12-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parslet
16
- requirement: &70178035798640 !ruby/object:Gem::Requirement
16
+ requirement: &70223149043040 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ~>
19
+ - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
21
  version: 1.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70178035798640
24
+ version_requirements: *70223149043040
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: bundler
27
- requirement: &70178035798120 !ruby/object:Gem::Requirement
27
+ requirement: &70223149042480 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>'
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70178035798120
35
+ version_requirements: *70223149042480
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: code_statistics
38
- requirement: &70178035797640 !ruby/object:Gem::Requirement
38
+ requirement: &70223149041980 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.2.13
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70178035797640
46
+ version_requirements: *70223149041980
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: cucumber
49
- requirement: &70178035797160 !ruby/object:Gem::Requirement
49
+ requirement: &70223149041460 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,43 +54,43 @@ dependencies:
54
54
  version: 1.1.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70178035797160
57
+ version_requirements: *70223149041460
58
58
  - !ruby/object:Gem::Dependency
59
- name: metric_fu
60
- requirement: &70178035796680 !ruby/object:Gem::Requirement
59
+ name: rake
60
+ requirement: &70223149040940 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
64
64
  - !ruby/object:Gem::Version
65
- version: 2.1.0
65
+ version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70178035796680
68
+ version_requirements: *70223149040940
69
69
  - !ruby/object:Gem::Dependency
70
- name: rake
71
- requirement: &70178035796200 !ruby/object:Gem::Requirement
70
+ name: rspec
71
+ requirement: &70223149040440 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
75
75
  - !ruby/object:Gem::Version
76
- version: '0'
76
+ version: 2.6.0
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70178035796200
79
+ version_requirements: *70223149040440
80
80
  - !ruby/object:Gem::Dependency
81
- name: rspec
82
- requirement: &70178035795720 !ruby/object:Gem::Requirement
81
+ name: simplecov
82
+ requirement: &70223149039920 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
86
86
  - !ruby/object:Gem::Version
87
- version: 2.6.0
87
+ version: 0.5.0
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70178035795720
90
+ version_requirements: *70223149039920
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: yard
93
- requirement: &70178035795240 !ruby/object:Gem::Requirement
93
+ requirement: &70223149039400 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: 0.6.0
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70178035795240
101
+ version_requirements: *70223149039400
102
102
  description: ! "This gem allows for parsing SDP (Session Description\n Protocol)
103
103
  information in to a Ruby object, making it easy to read \n and work with that
104
104
  data. It also allows for easily creating SDP objects \n that can be converted
@@ -120,7 +120,9 @@ files:
120
120
  - features/support/env.rb
121
121
  - features/support/sdp_file.txt
122
122
  - lib/sdp/description.rb
123
+ - lib/sdp/parse_error.rb
123
124
  - lib/sdp/parser.rb
125
+ - lib/sdp/runtime_error.rb
124
126
  - lib/sdp/session_template.erb
125
127
  - lib/sdp/version.rb
126
128
  - lib/sdp.rb
@@ -128,9 +130,6 @@ files:
128
130
  - spec/sdp/parser_spec.rb
129
131
  - spec/sdp_spec.rb
130
132
  - spec/spec_helper.rb
131
- - tasks/metrics.rake
132
- - tasks/roodi_config.yml
133
- - tasks/stats.rake
134
133
  - ChangeLog.rdoc
135
134
  - LICENSE.rdoc
136
135
  - README.rdoc
@@ -161,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
160
  version: '0'
162
161
  requirements: []
163
162
  rubyforge_project:
164
- rubygems_version: 1.8.11
163
+ rubygems_version: 1.8.10
165
164
  signing_key:
166
165
  specification_version: 3
167
166
  summary: Parse and create SDP (Session Description Protocol) text based on RFC4566.
@@ -1,25 +0,0 @@
1
- require 'metric_fu'
2
-
3
- MetricFu::Configuration.run do |config|
4
- #define which metrics you want to use
5
- config.metrics = [:churn, :flog, :flay, :reek, :roodi, :rcov, :stats]
6
- config.graphs = [:flog, :flay, :reek, :roodi, :rcov, :stats]
7
- config.churn = { :start_date => "1 year ago", :minimum_churn_count => 10 }
8
- config.flay = { :dirs_to_flay => ['lib'],
9
- :minimum_score => 10,
10
- :filetypes => ['rb', 'erb'] }
11
- config.flog = { :dirs_to_flog => ['lib'] }
12
- config.rcov = { :environment => 'test',
13
- :test_files => ["spec/**/*_spec.rb"],
14
- :rcov_opts => ["--sort coverage",
15
- "--no-html",
16
- "--text-coverage",
17
- "--spec-only",
18
- "--no-color",
19
- "--profile",
20
- "--exclude /gems/,/Library/"]
21
- }
22
- config.reek = { :dirs_to_reek => ['lib'] }
23
- config.roodi = { :dirs_to_roodi => ['lib'], :roodi_config => "tasks/roodi_config.yml" }
24
- config.graph_engine = :bluff
25
- end
@@ -1,14 +0,0 @@
1
- ---
2
- AssignmentInConditionalCheck: { }
3
- CaseMissingElseCheck: { }
4
- ClassLineCountCheck: { line_count: 300 }
5
- ClassNameCheck: { pattern: !ruby/regexp /^[A-Z][a-zA-Z0-9]*$/ }
6
- CyclomaticComplexityBlockCheck: { complexity: 4 }
7
- CyclomaticComplexityMethodCheck: { complexity: 8 }
8
- EmptyRescueBodyCheck: { }
9
- ForLoopCheck: { }
10
- MethodLineCountCheck: { line_count: 30 }
11
- MethodNameCheck: { pattern: !ruby/regexp /^[_a-z<>=\[\]|+-\/\*`]+[_a-z0-9_<>=~@\[\]]*[=!\?]?$/ }
12
- ModuleLineCountCheck: { line_count: 300 }
13
- ModuleNameCheck: { pattern: !ruby/regexp /^[A-Z][a-zA-Z0-9]*$/ }
14
- ParameterNumberCheck: { parameter_count: 5 }
@@ -1,13 +0,0 @@
1
- require 'code_statistics'
2
-
3
- STATS_DIRECTORIES = [
4
- %w(Library lib/),
5
- %w(Behavior\ tests features/),
6
- %w(Unit\ tests spec/)
7
- ].collect { |name, dir| [ name, "#{dir}" ] }.select { |name, dir| File.directory?(dir) }
8
-
9
- desc "Report code statistics (KLOCs, etc) from the application"
10
- task :stats do
11
- CodeStatistics.new(*STATS_DIRECTORIES).to_s
12
- end
13
-