debian/0000755000000000000000000000000012176172011007164 5ustar debian/rules0000755000000000000000000000100212170011321010223 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 # # Uncomment to ignore all test failures (but the tests will run anyway) #export DH_RUBY_IGNORE_TESTS=all # # Uncomment to ignore some test failures (but the tests will run anyway). # Valid values: #export DH_RUBY_IGNORE_TESTS=ruby1.8 ruby1.9.1 require-rubygems # # If you need to specify the .gemspec (eg there is more than one) #export DH_RUBY_GEMSPEC=gem.gemspec %: dh $@ --buildsystem=ruby --with ruby override_dh_installchangelogs: dh_installchangelogs History.txtdebian/watch0000644000000000000000000000013712170011321010204 0ustar version=3 http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/roodi .*/roodi-(.*).tar.gz debian/source/0000755000000000000000000000000012170011321010452 5ustar debian/source/format0000644000000000000000000000001412170011321011660 0ustar 3.0 (quilt) debian/source/patch-header0000644000000000000000000000061012170011321012717 0ustar Subject: Collected Debian patches for roodi Author: David Suarez The roodi package is maintained in Git rather than maintaining patches as separate files, and separating the patches doesn't seem to be worth the effort. They are therefore all included in this single Debian patch. For full commit history and separated commits, see the packaging Git repository. debian/source/options0000644000000000000000000000002512170011321012065 0ustar single-debian-patch debian/roodi.10000644000000000000000000000435212175672130010374 0ustar .TH ROODI 1 .SH NAME roodi - Roodi stands for Ruby Object Oriented Design Inferometer. .SH SYNOPSIS \fBroodi\fP [\fIoptions\fP] [\fIpattern\fP ...] .SH DESCRIPTION \fBRoodi\fP stands for Ruby Object Oriented Design Inferometer. It parses your Ruby code and warns you about design issues you have based on the checks that is has configured. .SH OPTIONS .TP \fB-config=\fP\fIconfig-file\fP Provide your own \fIconfig-file\fP. The \fIconfig-file\fP is a YAML file that lists the checks to be included. Each check can optionally include a hash of options that are passed to the check to configure it. For example, the default config file looks like this: AssignmentInConditionalCheck: { } CaseMissingElseCheck: { } ClassLineCountCheck: { line_count: 300 } ClassNameCheck: { pattern: !ruby/regexp /^[A-Z][a-zA-Z0-9]*$/ } CyclomaticComplexityBlockCheck: { complexity: 4 } CyclomaticComplexityMethodCheck: { complexity: 8 } EmptyRescueBodyCheck: { } ForLoopCheck: { } MethodLineCountCheck: { line_count: 20 } MethodNameCheck: { pattern: !ruby/regexp /^[_a-z<>=\\[\\]|+-\/\\*`]+[_a-z0-9_<>=~@\\[\\]]*[=!\\?]?$/ } ModuleLineCountCheck: { line_count: 300 } ModuleNameCheck: { pattern: !ruby/regexp /^[A-Z][a-zA-Z0-9]*$/ } ParameterNumberCheck: { parameter_count: 5 } .SH EXAMPLE USAGE Check all ruby files in a rails app: roodi "rails_app/**/*.rb" Check one controller and one model file in a rails app: roodi app/controller/sample_controller.rb app/models/sample.rb Check one controller and all model files in a rails app: roodi app/controller/sample_controller.rb "app/models/*.rb" Check all ruby files in a rails app with a custom configuration file: roodi \-config=my_roodi_config.yml "rails_app/**/*.rb" If you're writing a check, it is useful to see the structure of a file the way that Roodi tokenizes it (via ruby_parser). Use: \fBroodi-describe\fP [filename] .SH SEE ALSO .BR roodi-describe (1) .br .IR http://roodi.rubyforge.org .SH FILES .TP /etc/roodi.yml Roodi default \fIconfig-file\fP. .SH AUTHOR Marty Andrews .SH VERSION \fBRoodi\fP, version 2.2.0 .br debian/ruby-tests.rake0000644000000000000000000000022012170011321012131 0ustar require 'rspec/core/rake_task' RSpec::Core::RakeTask.new('spec') do |t| t.pattern = FileList['spec/**/*spec.rb'] end task :default => :spec debian/roodi.manpages0000644000000000000000000000004712175672130012024 0ustar debian/roodi.1 debian/roodi-describe.1 debian/copyright0000644000000000000000000000264512170011321011114 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: roodi Source: http://roodi.rubyforge.org Files: * Copyright: 2008-2013 Marty Andrews License: Expat Files: debian/* Copyright: 2013 David Suárez License: Expat Comment: the Debian packaging is licensed under the same terms as the original package. License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. debian/control0000644000000000000000000000162212175672130010576 0ustar Source: roodi Section: ruby Priority: optional Maintainer: Debian Ruby Extras Maintainers Uploaders: David Suárez Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.4.1~), ruby-rspec (>= 2.13.0), ruby-parser (>= 2.3.0), rake Standards-Version: 3.9.4 Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/roodi.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-ruby-extras/roodi.git;a=summary Homepage: http://roodi.rubyforge.org XS-Ruby-Versions: all Package: roodi Architecture: all XB-Ruby-Versions: ${ruby:Versions} Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter, ruby-parser (>= 2.3.0) Description: Ruby object oriented design inferometer Roodi stands for Ruby Object Oriented Design Inferometer. It parses your Ruby code and warns you about design issues you have based on the configured checks. debian/patches/0000755000000000000000000000000012176172011010613 5ustar debian/patches/series0000644000000000000000000000001712176172011012026 0ustar debian-changes debian/patches/debian-changes0000644000000000000000000000571212176172173013404 0ustar Subject: Collected Debian patches for roodi Author: David Suarez The roodi package is maintained in Git rather than maintaining patches as separate files, and separating the patches doesn't seem to be worth the effort. They are therefore all included in this single Debian patch. For full commit history and separated commits, see the packaging Git repository. --- roodi-2.2.0.orig/Gemfile +++ roodi-2.2.0/Gemfile @@ -3,4 +3,4 @@ source :rubygems gemspec gem "rake" -gem "rspec", "~> 1.3.2" +gem "rspec", "~> 2.13.0" --- roodi-2.2.0.orig/Gemfile.lock +++ roodi-2.2.0/Gemfile.lock @@ -7,8 +7,16 @@ PATH GEM remote: http://rubygems.org/ specs: + diff-lcs (1.2.4) rake (10.0.3) - rspec (1.3.2) + rspec (2.13.0) + rspec-core (~> 2.13.0) + rspec-expectations (~> 2.13.0) + rspec-mocks (~> 2.13.0) + rspec-core (2.13.1) + rspec-expectations (2.13.0) + diff-lcs (>= 1.1.3, < 2.0) + rspec-mocks (2.13.1) ruby_parser (2.3.0) sexp_processor (~> 3.0) sexp_processor (3.2.0) @@ -19,4 +27,4 @@ PLATFORMS DEPENDENCIES rake roodi! - rspec (~> 1.3.2) + rspec (~> 2.13.0) --- roodi-2.2.0.orig/Rakefile +++ roodi-2.2.0/Rakefile @@ -1,5 +1,5 @@ require 'rake' -require 'spec/rake/spectask' +require "rspec/core/rake_task" require 'bundler' require 'roodi' @@ -13,8 +13,8 @@ def roodi(ruby_files) end desc "Run all specs" -Spec::Rake::SpecTask.new('spec') do |t| - t.spec_files = FileList['spec/**/*spec.rb'] +RSpec::Core::RakeTask.new('spec') do |t| + t.pattern = FileList['spec/**/*spec.rb'] end desc "Run Roodi against all source files" --- roodi-2.2.0.orig/bin/roodi +++ roodi-2.2.0/bin/roodi @@ -1,7 +1,5 @@ #!/usr/bin/env ruby -$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../lib")) - require 'roodi' runner = Roodi::Core::Runner.new --- roodi-2.2.0.orig/bin/roodi-describe +++ roodi-2.2.0/bin/roodi-describe @@ -1,6 +1,5 @@ #!/usr/bin/env ruby -$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../lib")) require 'roodi' roodi = Roodi::Core::Runner.new --- roodi-2.2.0.orig/lib/roodi/core/parser.rb +++ roodi-2.2.0/lib/roodi/core/parser.rb @@ -1,4 +1,3 @@ -require 'rubygems' require 'ruby_parser' module Roodi --- roodi-2.2.0.orig/lib/roodi/core/runner.rb +++ roodi-2.2.0/lib/roodi/core/runner.rb @@ -8,7 +8,7 @@ require 'roodi/core/visitable_sexp' module Roodi module Core class Runner - DEFAULT_CONFIG = File.join(File.dirname(__FILE__), "..", "..", "..", "roodi.yml") + DEFAULT_CONFIG = "/etc/roodi.yml" attr_writer :config --- roodi-2.2.0.orig/lib/roodi/core/visitable_sexp.rb +++ roodi-2.2.0/lib/roodi/core/visitable_sexp.rb @@ -1,4 +1,3 @@ -require 'rubygems' require 'sexp' class Sexp --- roodi-2.2.0.orig/spec/spec_helper.rb +++ roodi-2.2.0/spec/spec_helper.rb @@ -1,3 +1,3 @@ $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../lib")) require 'roodi' -require 'spec' +require 'rspec' debian/install0000644000000000000000000000001612170011321010540 0ustar roodi.yml etc/debian/compat0000644000000000000000000000000212170011321010350 0ustar 7 debian/changelog0000644000000000000000000000034012176171114011036 0ustar roodi (2.2.0-1) unstable; urgency=low * Initial release (Closes: #715293) * Add manpages * Use rcov 2.13.0 * Remove rubygems references -- David Suárez Mon, 29 Jul 2013 18:30:26 +0200 debian/roodi.docs0000644000000000000000000000001212175672130011151 0ustar README.txtdebian/roodi-describe.10000644000000000000000000000067312170011321012134 0ustar .TH ROODI-DESCRIBE 1 .SH NAME roodi-describe - Roodi stands for Ruby Object Oriented Design Inferometer. .SH SYNOPSIS \fBroodi-describe\fP [\fIfilename\fP ...] .SH DESCRIPTION \fBRoodi-describe\fP describes the structure of a file the way that \fBroodi\fP tokenizes it (via ruby_parser). .SH SEE ALSO .BR roodi (1) .br .IR http://roodi.rubyforge.org .SH AUTHOR Marty Andrews .SH VERSION \fBRoodi\fP, version 2.2.0 .br