trema 0.3.10 → 0.3.11

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -15,17 +15,14 @@ gemspec
15
15
  group :development do
16
16
  gem "aruba", "~> 0.5.1"
17
17
  gem "cucumber", "~> 1.2.1"
18
- gem "flay", "~> 1.4.3"
19
- gem "flog", "~> 2.5.3"
20
- gem "rake", "~> 10.0.2"
18
+ gem "flay", "~> 2.0.1"
19
+ gem "flog", "~> 3.2.2"
21
20
  gem "rcov", "~> 1.0.0"
22
- gem "rdoc", "~> 3.12"
23
21
  gem "redcarpet", "~> 2.2.2"
24
- gem "reek", "~> 1.2.13"
22
+ gem "reek", "~> 1.3.1"
25
23
  gem "relish", "~> 0.6"
26
- gem "roodi", "~> 2.1.0"
27
24
  gem "rspec", "~> 2.12.0"
28
- gem "yard", "~> 0.8.3"
25
+ gem "yard", "~> 0.8.4.1"
29
26
  end
30
27
 
31
28
 
data/README.md CHANGED
@@ -256,7 +256,7 @@ Project Status
256
256
 
257
257
  * Build Status [![Build Status](https://secure.travis-ci.org/trema/trema.png?branch=develop)](http://travis-ci.org/trema/trema)
258
258
  * Dependency Status [![Dependency Status](https://gemnasium.com/trema/trema.png)](https://gemnasium.com/trema/trema)
259
- * Code Quality [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/trema/trema)
259
+ * Code Quality [![Code Climate](https://codeclimate.com/github/trema/trema.png)](https://codeclimate.com/github/trema/trema)
260
260
 
261
261
 
262
262
  License
data/Rakefile CHANGED
@@ -114,7 +114,7 @@ $quality_targets = if ENV[ "QUALITY_TARGETS" ]
114
114
 
115
115
 
116
116
  desc "Enforce Ruby code quality with static analysis of code"
117
- task :quality => [ :reek, :roodi, :flog, :flay ]
117
+ task :quality => [ :reek, :flog, :flay ]
118
118
 
119
119
 
120
120
  begin
@@ -131,20 +131,6 @@ rescue LoadError
131
131
  $stderr.puts $!.to_s
132
132
  end
133
133
 
134
-
135
- begin
136
- require "roodi"
137
- require "roodi_task"
138
-
139
- RoodiTask.new do | t |
140
- t.verbose = false
141
- t.patterns = $quality_targets
142
- end
143
- rescue LoadError
144
- $stderr.puts $!.to_s
145
- end
146
-
147
-
148
134
  begin
149
135
  require "flog"
150
136
 
@@ -17,7 +17,7 @@
17
17
 
18
18
 
19
19
  Before do
20
- @aruba_timeout_seconds = 5
20
+ @aruba_timeout_seconds = 10
21
21
  run "trema killall"
22
22
  sleep 5
23
23
  end
@@ -73,7 +73,7 @@ module Trema
73
73
  if ruby_controller?
74
74
  require "trema"
75
75
  include Trema
76
- ARGV.replace ARGV[ 0 ].split
76
+ ARGV.replace ARGV[ 0 ].split[ 1..-1 ]
77
77
  $LOAD_PATH << File.dirname( controller_file )
78
78
  load controller_file
79
79
  else
@@ -1087,8 +1087,6 @@ Init_packet_in() {
1087
1087
  rb_define_const( cPacketIn, "OFPR_NO_MATCH", INT2NUM( OFPR_NO_MATCH ) );
1088
1088
  rb_define_const( cPacketIn, "OFPR_ACTION", INT2NUM( OFPR_ACTION ) );
1089
1089
 
1090
- rb_define_method( cPacketIn, "initialize_copy", packet_in_init_copy, 1 );
1091
-
1092
1090
  rb_define_method( cPacketIn, "datapath_id", packet_in_datapath_id, 0 );
1093
1091
  rb_define_method( cPacketIn, "transaction_id", packet_in_transaction_id, 0 );
1094
1092
  rb_define_method( cPacketIn, "buffer_id", packet_in_buffer_id, 0 );
@@ -1171,6 +1169,8 @@ Init_packet_in() {
1171
1169
  rb_define_method( cPacketIn, "udp_dst_port", packet_in_udp_dst_port, 0 );
1172
1170
  rb_define_method( cPacketIn, "udp_checksum", packet_in_udp_checksum, 0 );
1173
1171
  rb_define_method( cPacketIn, "udp_len", packet_in_udp_len, 0 );
1172
+
1173
+ rb_define_private_method( cPacketIn, "initialize_copy", packet_in_init_copy, 1 );
1174
1174
  }
1175
1175
 
1176
1176
 
@@ -118,12 +118,14 @@ stats_reply_flags( VALUE self ) {
118
118
  /*
119
119
  * A list of reply type objects for this message.
120
120
  *
121
+ * @return [Array<DescStatsReply>]
122
+ * an array of {DescStatsReply} objects if type is +OFPST_DESC+.
121
123
  * @return [Array<FlowStatsReply>]
122
124
  * an array of {FlowStatsReply} objects if type is +OFPST_FLOW+.
123
- * @return [Array<TableStatsReply>]
124
- * an array of {TableStatsReply} objects if type is +OFPST_TABLE+.
125
125
  * @return [AggregateStatsReply]
126
126
  * a {AggregateStatsReply} object if type is +OFPST_AGGREGATE+.
127
+ * @return [Array<TableStatsReply>]
128
+ * an array of {TableStatsReply} objects if type is +OFPST_TABLE+.
127
129
  * @return [Array<PortStatsReply>]
128
130
  * an array of {PortStatsReply} objects if type is +OFPST_PORT+.
129
131
  * @return [Array<QueueStatsReply>]
@@ -17,7 +17,7 @@
17
17
 
18
18
 
19
19
  module Trema
20
- VERSION = "0.3.10"
20
+ VERSION = "0.3.11"
21
21
  end
22
22
 
23
23
 
@@ -20,11 +20,10 @@
20
20
 
21
21
  module Example
22
22
  class << self
23
- attr_accessor :exec_name, :count, :datapath_id
23
+ attr_accessor :count, :datapath_id
24
24
 
25
25
 
26
26
  def options_parse args
27
- @exec_name = args.shift
28
27
  case args.length
29
28
  when 2
30
29
  @datapath_id = args[ 0 ] =~ /^0x/ ? args[ 0 ].hex : args[ 0 ].to_i
@@ -36,7 +35,7 @@ module Example
36
35
 
37
36
 
38
37
  def cmd_usage
39
- "Usage: #{ @exec_name } datapath_id, count"
38
+ "Usage: #{ File.basename __FILE__ } datapath_id, count"
40
39
  end
41
40
  end
42
41
 
@@ -20,11 +20,11 @@
20
20
 
21
21
  class HelloController < Controller
22
22
  def start
23
- if ARGV.size < 2
24
- STDERR.puts "Usage: #{ File.basename ARGV[ 0 ] } COUNT"
23
+ if ARGV.size != 1
24
+ STDERR.puts "Usage: #{ File.basename __FILE__ } COUNT"
25
25
  shutdown!
26
26
  end
27
- @count = ARGV[ 1 ].to_i
27
+ @count = ARGV[ 0 ].to_i
28
28
  end
29
29
 
30
30
 
data/trema.gemspec CHANGED
@@ -1,34 +1,35 @@
1
1
  $:.push File.expand_path( "../ruby", __FILE__ )
2
2
  require "trema/version"
3
3
 
4
+
4
5
  Gem::Specification.new do | gem |
5
6
  gem.name = "trema"
6
7
  gem.version = Trema::VERSION
8
+ gem.summary = "Full-stack OpenFlow framework."
9
+ gem.description = "Trema is a full-stack, easy-to-use framework for developing OpenFlow controllers in Ruby and C."
10
+
11
+ gem.required_ruby_version = "~> 1.8.7"
12
+
13
+ gem.license = "GPL2"
14
+
7
15
  gem.authors = [ "Yasuhito Takamiya" ]
8
16
  gem.email = [ "yasuhito@gmail.com" ]
9
17
  gem.homepage = "http://github.com/trema/trema"
10
- gem.summary = %q{Full-Stack OpenFlow Framework for Ruby and C}
11
- gem.description = %q{Trema is a full-stack, easy-to-use framework for developing OpenFlow controllers in Ruby and C}
12
- gem.license = "GPL2"
13
- gem.required_ruby_version = "~> 1.8.7"
14
18
 
15
- gem.files = `git ls-files`.split( "\n" )
16
- gem.test_files = `git ls-files -- {spec,features}/*`.split( "\n" )
17
19
  gem.bindir = "."
18
20
  gem.executables = [ "trema", "trema-config" ]
21
+ gem.files = `git ls-files`.split( "\n" )
22
+
19
23
  gem.require_path = "ruby"
20
24
  gem.extensions = [ "Rakefile" ]
21
- gem.extra_rdoc_files = [ "README.md" ]
22
25
 
23
- # specify any dependencies here; for example:
24
- # gem.add_development_dependency "rspec"
25
- gem.add_runtime_dependency "rake"
26
- gem.add_runtime_dependency "gli", "~> 2.5.4"
27
- gem.add_runtime_dependency "rdoc", "~> 3.12"
26
+ gem.extra_rdoc_files = [ "README.md" ]
27
+ gem.test_files = `git ls-files -- {spec,features}/*`.split( "\n" )
28
28
 
29
- gem.add_development_dependency "rake"
30
- gem.add_development_dependency "rdoc"
31
- gem.add_development_dependency "aruba"
29
+ gem.add_dependency "bundler", "~> 1.2.3"
30
+ gem.add_dependency "gli", "~> 2.5.4"
31
+ gem.add_dependency "rake", "~> 10.0.3"
32
+ gem.add_dependency "rdoc", "~> 3.12.1"
32
33
  end
33
34
 
34
35
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trema
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 10
10
- version: 0.3.10
9
+ - 11
10
+ version: 0.3.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - Yasuhito Takamiya
@@ -15,20 +15,22 @@ autorequire:
15
15
  bindir: .
16
16
  cert_chain: []
17
17
 
18
- date: 2013-02-08 00:00:00 Z
18
+ date: 2013-02-14 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  prerelease: false
22
- name: rake
22
+ name: bundler
23
23
  version_requirements: &id001 !ruby/object:Gem::Requirement
24
24
  none: false
25
25
  requirements:
26
- - - ">="
26
+ - - ~>
27
27
  - !ruby/object:Gem::Version
28
- hash: 3
28
+ hash: 25
29
29
  segments:
30
- - 0
31
- version: "0"
30
+ - 1
31
+ - 2
32
+ - 3
33
+ version: 1.2.3
32
34
  requirement: *id001
33
35
  type: :runtime
34
36
  - !ruby/object:Gem::Dependency
@@ -49,62 +51,37 @@ dependencies:
49
51
  type: :runtime
50
52
  - !ruby/object:Gem::Dependency
51
53
  prerelease: false
52
- name: rdoc
54
+ name: rake
53
55
  version_requirements: &id003 !ruby/object:Gem::Requirement
54
56
  none: false
55
57
  requirements:
56
58
  - - ~>
57
59
  - !ruby/object:Gem::Version
58
- hash: 31
60
+ hash: 73
59
61
  segments:
62
+ - 10
63
+ - 0
60
64
  - 3
61
- - 12
62
- version: "3.12"
65
+ version: 10.0.3
63
66
  requirement: *id003
64
67
  type: :runtime
65
68
  - !ruby/object:Gem::Dependency
66
69
  prerelease: false
67
- name: rake
70
+ name: rdoc
68
71
  version_requirements: &id004 !ruby/object:Gem::Requirement
69
72
  none: false
70
73
  requirements:
71
- - - ">="
74
+ - - ~>
72
75
  - !ruby/object:Gem::Version
73
- hash: 3
76
+ hash: 53
74
77
  segments:
75
- - 0
76
- version: "0"
78
+ - 3
79
+ - 12
80
+ - 1
81
+ version: 3.12.1
77
82
  requirement: *id004
78
- type: :development
79
- - !ruby/object:Gem::Dependency
80
- prerelease: false
81
- name: rdoc
82
- version_requirements: &id005 !ruby/object:Gem::Requirement
83
- none: false
84
- requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- hash: 3
88
- segments:
89
- - 0
90
- version: "0"
91
- requirement: *id005
92
- type: :development
93
- - !ruby/object:Gem::Dependency
94
- prerelease: false
95
- name: aruba
96
- version_requirements: &id006 !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ">="
100
- - !ruby/object:Gem::Version
101
- hash: 3
102
- segments:
103
- - 0
104
- version: "0"
105
- requirement: *id006
106
- type: :development
107
- description: Trema is a full-stack, easy-to-use framework for developing OpenFlow controllers in Ruby and C
83
+ type: :runtime
84
+ description: Trema is a full-stack, easy-to-use framework for developing OpenFlow controllers in Ruby and C.
108
85
  email:
109
86
  - yasuhito@gmail.com
110
87
  executables:
@@ -813,7 +790,7 @@ rubyforge_project:
813
790
  rubygems_version: 1.8.24
814
791
  signing_key:
815
792
  specification_version: 3
816
- summary: Full-Stack OpenFlow Framework for Ruby and C
793
+ summary: Full-stack OpenFlow framework.
817
794
  test_files: []
818
795
 
819
796
  has_rdoc: