Skip to content

Commit

Permalink
Merge branch 'release/0.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuhito committed Feb 29, 2012
2 parents 798f20e + cd618bd commit 650303c
Show file tree
Hide file tree
Showing 528 changed files with 10,444 additions and 2,675 deletions.
49 changes: 44 additions & 5 deletions .gitignore
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
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--color --format documentation --profile
3 changes: 3 additions & 0 deletions .yardopts
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
ruby
-
features/**/*.feature

32 changes: 21 additions & 11 deletions Gemfile
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
62 changes: 35 additions & 27 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ GEM
remote: http://rubygems.org/
specs:
builder (3.0.0)
cucumber (1.1.4)
cucumber (1.1.9)
builder (>= 2.1.2)
diff-lcs (>= 1.1.2)
gherkin (~> 2.7.1)
gherkin (~> 2.9.0)
json (>= 1.4.6)
term-ansicolor (>= 1.0.6)
diff-lcs (1.1.3)
Expand All @@ -15,49 +15,57 @@ GEM
flog (2.5.3)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
gherkin (2.7.1)
gherkin (2.9.0)
json (>= 1.4.6)
json (1.6.3)
git (1.2.5)
jeweler (1.8.3)
bundler (~> 1.0)
git (>= 1.2.5)
rake
rdoc
json (1.6.5)
rake (0.9.2.2)
rcov (0.9.11)
rdoc (3.11)
rcov (1.0.0)
rdoc (3.12)
json (~> 1.4)
redcarpet (2.0.0)
redcarpet (2.1.0)
reek (1.2.8)
ruby2ruby (~> 1.2)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
roodi (2.1.0)
ruby_parser
rspec (2.7.0)
rspec-core (~> 2.7.0)
rspec-expectations (~> 2.7.0)
rspec-mocks (~> 2.7.0)
rspec-core (2.7.1)
rspec-expectations (2.7.0)
rspec (2.8.0)
rspec-core (~> 2.8.0)
rspec-expectations (~> 2.8.0)
rspec-mocks (~> 2.8.0)
rspec-core (2.8.0)
rspec-expectations (2.8.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.7.0)
rspec-mocks (2.8.0)
ruby2ruby (1.3.1)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
ruby_parser (2.3.1)
sexp_processor (~> 3.0)
sexp_processor (3.0.9)
sexp_processor (3.0.10)
term-ansicolor (1.0.7)
yard (0.7.4)
yard (0.7.5)

PLATFORMS
ruby

DEPENDENCIES
cucumber
flay
flog
rake
rcov
rdoc
redcarpet
reek
roodi
rspec
yard
bundler (~> 1.0.0)
cucumber (~> 1.1.9)
flay (~> 1.4.3)
flog (~> 2.5.3)
jeweler (~> 1.8.3)
rake (~> 0.9.2.2)
rcov (~> 1.0.0)
rdoc (~> 3.12)
redcarpet (~> 2.1.0)
reek (~> 1.2.8)
roodi (~> 2.1.0)
rspec (~> 2.8.0)
yard (~> 0.7)
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
95 changes: 63 additions & 32 deletions Rakefile
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
Expand All @@ -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
Expand All @@ -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 )
Expand All @@ -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
Loading

0 comments on commit 650303c

Please sign in to comment.