Permalink
Browse files

release of ruby controller

  • Loading branch information...
1 parent 3682436 commit d75e96ae7783a729366381d37ce492d828df6ccd @nickkaranatsios nickkaranatsios committed Mar 15, 2013
Showing 447 changed files with 18,068 additions and 13,979 deletions.
View
23 Gemfile
@@ -1,23 +0,0 @@
-source "http://rubygems.org"
-
-gemspec
-
-# 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 "cucumber", "~> 1.2.1"
- gem "flay", "~> 1.4.3"
- gem "flog", "~> 2.5.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.10.0"
- gem "yard", "~> 0.7"
-end
View
@@ -1,81 +0,0 @@
-Welcome to Trema
-================
-
-Trema is a OpenFlow controller framework that includes everything
-needed to create OpenFlow controllers in Ruby and C.
-
-This distribution includes all the source code of Trema you need to
-develop your own OpenFlow controllers. The source tree includes basic
-libraries and functional modules that work as an interface to OpenFlow
-switches.
-
-Several sample applications developed on top of Trema are also
-provided, so you can run them as a sample of OpenFlow
-controllers. Additionally, a simple but powerful framework that
-emulates an OpenFlow-based network and end-hosts is provided for
-testing your own controllers. For debugging, a wireshark plug-in to
-diagnose internal data-flows among functional modules is provided.
-
-
-Getting Started
----------------
-
-1.Install the prerequisites at the command prompt:
-
- $ sudo apt-get install gcc make ruby rubygems ruby-dev irb libpcap-dev libsqlite3-dev
-
-2.Install Trema at the command prompt:
-
- $ sudo gem install trema
-
-3.Follow the guidelines to start developing your OpenFlow controller. You may find the following resources handy:
-
-* The [Getting Started with Trema](https://github.com/trema/trema/wiki/Quick-start).
-* The [Trema in 10 Minutes Tutorial](http://trema-10min.heroku.com/).
-* The [Trema Tutorial](http://trema-tutorial.heroku.com/).
-* The [Trema Ruby API documents](http://rubydoc.info/github/trema/trema/master/frames).
-* The [Programming Trema Article (in Japanese)](http://gihyo.jp/dev/serial/01/openflow_sd/0007).
-
-
-Meta
-----
-
-* Web Page: http://trema.github.com/trema/
-* Bugs: https://github.com/trema/trema/issues
-* Mailing List: https://groups.google.com/group/trema-dev
-* Twitter: http://twitter.com/trema_news
-
-
-Supported Platforms
--------------------
-
-Trema has been tested ONLY on the following environments:
-
-* Ubuntu 12.04, 11.10, 11.04, 10.10, and 10.04 (i386/amd64, Desktop Edition)
-* Debian GNU/Linux 6.0 (i386/amd64)
-
-It may also run on other GNU/Linux distributions but is not tested and
-NOT SUPPORTED at this moment.
-
-
-Contributors
-------------
-
-Special thanks to all contributors for submitting patches. A full list of contributors including their patches can be found at:
-
-https://github.com/trema/trema/contributors
-
-
-Project Status
---------------
-
-* Build Status [![Build Status](https://secure.travis-ci.org/trema/trema.png?branch=develop)](http://travis-ci.org/trema/trema)
-* Dependency Status [![Dependency Status](https://gemnasium.com/trema/trema.png)](https://gemnasium.com/trema/trema)
-
-
-License
--------
-
-Trema is released under the GNU General Public License version 2.0:
-
-* http://www.gnu.org/licenses/gpl-2.0.html
View
212 Rakefile
@@ -1,212 +0,0 @@
-#
-# 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
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-
-
-require "rubygems"
-
-
-require "rake"
-
-task :default do
- sh "./build.rb"
-end
-
-
-task :travis => [ :default, "spec:travis" ]
-
-
-begin
- require "bundler/gem_tasks"
-rescue LoadError
- $stderr.puts $!.to_s
-end
-
-
-begin
- 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( "spec:travis" ) do | spec |
- spec.pattern = FileList[ "spec/**/*_spec.rb" ]
- # FIXME: use --tag ~sudo
- spec.rspec_opts = "--tag nosudo -fs -c"
- end
-
- RSpec::Core::RakeTask.new( :rcov ) do | spec |
- spec.pattern = "spec/**/*_spec.rb"
- spec.rcov = true
- end
-rescue LoadError
- $stderr.puts $!.to_s
-end
-
-
-begin
- require "cucumber/rake/task"
- Cucumber::Rake::Task.new( :features )
-rescue LoadError
- $stderr.puts $!.to_s
-end
-
-
-desc "Enforce Ruby code quality with static analysis of code"
-task :quality => [ :reek, :roodi, :flog, :flay ]
-
-
-begin
- require "reek/rake/task"
-
- Reek::Rake::Task.new do | t |
- t.fail_on_error = true
- t.verbose = false
- t.ruby_opts = [ "-rubygems" ]
- t.reek_opts = "--quiet"
- t.source_files = "ruby/**/*.rb"
- end
-rescue LoadError
- $stderr.puts $!.to_s
-end
-
-
-begin
- require "roodi"
- require "roodi_task"
-
- RoodiTask.new do | t |
- t.verbose = false
- t.patterns = %w(ruby/**/*.rb spec/**/*.rb features/**/*.rb)
- end
-rescue LoadError
- $stderr.puts $!.to_s
-end
-
-
-begin
- require "flog"
-
- desc "Analyze for code complexity"
- task :flog do
- flog = Flog.new( :continue => true )
- flog.flog [ "ruby" ]
- threshold = 10
-
- bad_methods = flog.totals.select do | name, score |
- name != "main#none" && score > threshold
- end
- bad_methods.sort do | a, b |
- a[ 1 ] <=> b[ 1 ]
- end.each do | name, score |
- puts "%8.1f: %s" % [ score, name ]
- end
- unless bad_methods.empty?
- raise "#{ bad_methods.size } methods have a flog complexity > #{ threshold }"
- end
- end
-rescue LoadError
- $stderr.puts $!.to_s
-end
-
-
-begin
- 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
-rescue LoadError
- $stderr.puts $!.to_s
-end
-
-
-desc "Generate a monolithic rant file"
-task "build.rb" do
- sh "rant-import --force --auto .mono.rant"
-end
-
-
-begin
- require "yard"
-
- YARD::Rake::YardocTask.new do | t |
- t.files = [ "ruby/trema/**/*.c", "ruby/trema/**/*.rb" ]
- t.options = []
- t.options << "--debug" << "--verbose" if $trace
- end
-
- yardoc_i18n = "./vendor/yard.i18n/bin/yardoc"
-
- namespace :yard do
- desc "Generate YARD Documentation in Japanese"
- task :ja => "yard:po" do
- sh "#{ yardoc_i18n } --language ja ruby/trema"
- end
- end
-
- locale_base_dir = "locale"
- locale_dir = "#{ locale_base_dir }/ja"
- pot = "#{ locale_base_dir }/yard.pot"
- po = "#{ locale_dir }/yard.po"
-
- namespace :yard do
- desc "generate .pot file"
- task :pot => pot
-
- desc "Generate .po file"
- task :po => po
-
- file pot => FileList[ "ruby/trema/**/*.rb", "ruby/trema/**/*.c" ] do
- Rake::Task[ "yard:pot:generate" ].invoke
- end
-
- namespace :pot do
- task :generate do
- sh( yardoc_i18n, "--no-yardopts", "--output", locale_base_dir, "--format", "pot", "ruby/trema" )
- end
- end
-
- directory locale_dir
- file po => [ locale_dir, pot ] do
- Rake::Task[ "yard:po:generate" ].invoke
- end
-
- namespace :po do
- task :generate do
- if File.exist?( po )
- sh( "msgmerge", "--update", "--sort-by-file", po, pot )
- else
- sh( "msginit", "--input", pot, "--output", po, "--locale", "ja.UTF-8" )
- end
- end
- end
- end
-rescue LoadError
- $stderr.puts $!.to_s
-end
-
-
-### Local variables:
-### mode: Ruby
-### coding: utf-8-unix
-### indent-tabs-mode: nil
-### End:
Oops, something went wrong.

0 comments on commit d75e96a

Please sign in to comment.