forked from trema/trema
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
528 changed files
with
10,444 additions
and
2,675 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,54 @@ | ||
*.dependency | ||
*.swp | ||
*~ | ||
# rcov generated | ||
coverage | ||
coverage.data | ||
|
||
# rdoc generated | ||
rdoc | ||
|
||
# yard generated | ||
doc | ||
.yardoc | ||
|
||
# bundler | ||
.bundle | ||
|
||
# jeweler generated | ||
pkg | ||
|
||
# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore: | ||
# | ||
# * Create a file at ~/.gitignore | ||
# * Include files you want ignored | ||
# * Run: git config --global core.excludesfile ~/.gitignore | ||
# | ||
# After doing this, these files will be ignored in all your git projects, | ||
# saving you from having to 'pollute' every project you touch with them | ||
# | ||
# Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line) | ||
# | ||
# For MacOS: | ||
# | ||
#.DS_Store | ||
|
||
# For TextMate | ||
#*.tmproj | ||
#tmtags | ||
|
||
# For emacs: | ||
*~ | ||
#\#* | ||
#.\#* | ||
|
||
# For vim: | ||
*.swp | ||
|
||
*.dependency | ||
/tmp | ||
GPATH | ||
GRTAGS | ||
GSYMS | ||
GTAGS | ||
TAGS | ||
callgrind.out.* | ||
coverage | ||
doc | ||
html | ||
objects |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--color --format documentation --profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
ruby | ||
- | ||
features/**/*.feature | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
source "http://rubygems.org" | ||
gem "cucumber" | ||
gem "flay" | ||
gem "flog" | ||
gem "rake" | ||
gem "rcov" | ||
gem "rdoc" | ||
gem "redcarpet" | ||
gem "reek" | ||
gem "roodi" | ||
gem "rspec" | ||
gem "yard" | ||
# Add dependencies required to use your gem here. | ||
# Example: | ||
# gem "activesupport", ">= 2.3.5" | ||
|
||
# Add dependencies to develop your gem here. | ||
# Include everything needed to run rake, tests, features, etc. | ||
group :development do | ||
gem "bundler", "~> 1.0.0" | ||
gem "cucumber", "~> 1.1.9" | ||
gem "flay", "~> 1.4.3" | ||
gem "flog", "~> 2.5.3" | ||
gem "jeweler", "~> 1.8.3" | ||
gem "rake", "~> 0.9.2.2" | ||
gem "rcov", "~> 1.0.0" | ||
gem "rdoc", "~> 3.12" | ||
gem "redcarpet", "~> 2.1.0" | ||
gem "reek", "~> 1.2.8" | ||
gem "roodi", "~> 2.1.0" | ||
gem "rspec", "~> 2.8.0" | ||
gem "yard", "~> 0.7" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,14 +18,15 @@ Getting Started | |
Trema requires several third-party software. You can install the | ||
prerequisites as follows: | ||
|
||
$ sudo apt-get install gcc make ruby ruby-dev irb sudo file libpcap-dev libsqlite3-dev | ||
$ sudo apt-get install gcc make ruby ruby-dev irb file libpcap-dev libsqlite3-dev | ||
|
||
Download Trema source tree then run its build script: | ||
|
||
$ ./build.rb | ||
|
||
NOTE: Trema has been tested ONLY on the following environments: | ||
|
||
* Ubuntu 11.10 (i386/amd64, Desktop Edition) | ||
* Ubuntu 11.04 (i386/amd64, Desktop Edition) | ||
* Ubuntu 10.10 (i386/amd64, Desktop Edition) | ||
* Ubuntu 10.04 (i386/amd64, Desktop Edition) | ||
|
@@ -72,7 +73,6 @@ Please keep the list sorted. | |
* Kazushi Sugyo | ||
* Kazuya Suzuki | ||
* Lei Sun | ||
* Naoyoshi Tada | ||
* Nick Karanatsios <[email protected]> | ||
* Shin'ya Zenke | ||
* Shuji Ishii | ||
|
@@ -95,7 +95,7 @@ Thanks to: | |
License & Terms | ||
--------------- | ||
|
||
Copyright (C) 2008-2011 NEC Corporation | ||
Copyright (C) 2008-2012 NEC Corporation | ||
|
||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License, version 2, as | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# Author: Yasuhito Takamiya <[email protected]> | ||
# | ||
# Copyright (C) 2008-2011 NEC Corporation | ||
# Copyright (C) 2008-2012 NEC Corporation | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License, version 2, as | ||
|
@@ -19,46 +19,67 @@ | |
|
||
|
||
require "rubygems" | ||
require "bundler" | ||
|
||
require "rake/tasklib" | ||
require "cucumber/rake/task" | ||
require "flay" | ||
require "flay_task" | ||
require "flog" | ||
require "reek/rake/task" | ||
require "roodi" | ||
require "roodi_task" | ||
require "rspec/core/rake_task" | ||
require 'yard' | ||
require 'yard/rake/yardoc_task' | ||
|
||
begin | ||
Bundler.setup :default, :development | ||
rescue Bundler::BundlerError => e | ||
$stderr.puts e.message | ||
$stderr.puts "Run `bundle install` to install missing gems" | ||
exit e.status_code | ||
end | ||
|
||
desc "Generate a monolithic rant file" | ||
task "build.rb" do | ||
sh "rant-import --force --auto .mono.rant" | ||
|
||
require "rake" | ||
|
||
task :default do | ||
system "./build.rb" | ||
end | ||
|
||
|
||
YARD::Rake::YardocTask.new do | t | | ||
t.options << "--debug" << "--verbose" if $trace | ||
require "jeweler" | ||
|
||
Jeweler::Tasks.new do |gem| | ||
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options | ||
gem.name = "trema" | ||
gem.homepage = "http://github.com/trema/trema" | ||
gem.license = "GPL2" | ||
gem.summary = %Q{Full-Stack OpenFlow Framework for Ruby/C} | ||
gem.description = %Q{Trema is a full-stack, easy-to-use framework for developing OpenFlow controllers in Ruby/C} | ||
gem.email = "[email protected]" | ||
gem.authors = ["Yasuhito Takamiya"] | ||
gem.bindir = ["."] | ||
gem.executables = ["trema","trema-config"] | ||
gem.extensions = ["Rakefile"] | ||
# dependencies defined in Gemfile | ||
end | ||
Jeweler::RubygemsDotOrgTasks.new | ||
|
||
|
||
desc "Run all examples with RCov" | ||
RSpec::Core::RakeTask.new do | t | | ||
t.pattern = [ "spec/**/*_spec.rb", "src/examples/**/*_spec.rb" ] | ||
t.rspec_opts = "--color --format documentation --profile" | ||
require "rspec/core" | ||
require "rspec/core/rake_task" | ||
|
||
RSpec::Core::RakeTask.new( :spec ) do | spec | | ||
spec.pattern = FileList[ "spec/**/*_spec.rb" ] | ||
end | ||
|
||
RSpec::Core::RakeTask.new( :rcov ) do | spec | | ||
spec.pattern = "spec/**/*_spec.rb" | ||
spec.rcov = true | ||
end | ||
|
||
|
||
require "cucumber/rake/task" | ||
Cucumber::Rake::Task.new( :features ) | ||
|
||
|
||
desc "Enforce Ruby code quality with static analysis of code" | ||
task :quality => [ :reek, :roodi, :flog, :flay ] | ||
|
||
|
||
# | ||
# See the follwing URL for details: | ||
# http://wiki.github.com/kevinrutherford/reek/rake-task | ||
# | ||
require "reek/rake/task" | ||
|
||
Reek::Rake::Task.new do | t | | ||
t.fail_on_error = true | ||
t.verbose = false | ||
|
@@ -68,11 +89,17 @@ Reek::Rake::Task.new do | t | | |
end | ||
|
||
|
||
require "roodi" | ||
require "roodi_task" | ||
|
||
RoodiTask.new do | t | | ||
t.verbose = false | ||
t.patterns = %w(ruby/**/*.rb spec/**/*.rb features/**/*.rb) | ||
end | ||
|
||
|
||
require "flog" | ||
|
||
desc "Analyze for code complexity" | ||
task :flog do | ||
flog = Flog.new( :continue => true ) | ||
|
@@ -93,20 +120,24 @@ task :flog do | |
end | ||
|
||
|
||
require "flay" | ||
require "flay_task" | ||
|
||
FlayTask.new do | t | | ||
# add directories such as app, bin, spec and test if need be. | ||
t.dirs = %w( ruby ) | ||
t.threshold = 0 | ||
end | ||
|
||
|
||
Cucumber::Rake::Task.new do | t | | ||
t.cucumber_opts = [ "features" ] | ||
desc "Generate a monolithic rant file" | ||
task "build.rb" do | ||
sh "rant-import --force --auto .mono.rant" | ||
end | ||
|
||
|
||
### Local variables: | ||
### mode: Ruby | ||
### coding: utf-8-unix | ||
### indent-tabs-mode: nil | ||
### End: | ||
require "yard" | ||
|
||
YARD::Rake::YardocTask.new do | t | | ||
t.options << "--debug" << "--verbose" if $trace | ||
end |
Oops, something went wrong.