roodi 3.3.1 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fc33fc4ceea81bb312b54f0485994e14aa315dac
4
- data.tar.gz: 62ca6f6de0138291b1b8e4d9128a832dc04776ad
3
+ metadata.gz: 2ab2ed299bfa842d1d9277298e935a13031c3c8e
4
+ data.tar.gz: f6dea634c1ac06362efa77deaa69a2d345124073
5
5
  SHA512:
6
- metadata.gz: abce6f656a1f21ecfcfa3c9e111a7e243e8202b04e165a5f21c84ad31295e278d5e179503c7d2351850748bfe318c2399122efaaba18998de1200bd239a3ecf6
7
- data.tar.gz: 0f074d7b05e870398cd2c73f984e2157f425dba6a13e5fd65940d4b813392d10521a165976e55c98fc97d27bdb592121d015f82d880c29fa7a88481ec3deb5fc
6
+ metadata.gz: ca825a45d5228fae1e4433434b6b7e23b43a5555082ecee52056ed57c56ff6ee29fae6de60a6cdaade1b885f9c2d505860a841d89b65c94b0e07a14ea40e2494
7
+ data.tar.gz: ce3b701a23cf3f5a14e9d826e28a7f0f23fce0073a49f24350328e2b3f6e288b57aff18da7c34086d9078c1c8e72f284620a7582e347dd668fff2a55ce37a7df
data/.gitignore CHANGED
@@ -2,3 +2,6 @@ doc
2
2
  pkg
3
3
  Gemfile.lock
4
4
  coverage
5
+
6
+ # Editor files
7
+ .idea
data/.travis.yml CHANGED
@@ -4,4 +4,3 @@ rvm:
4
4
  - 1.9.3
5
5
  - 2.0.0
6
6
  - jruby-19mode # JRuby in 1.9 mode
7
- - rbx-19mode
data/History.txt CHANGED
@@ -1,3 +1,6 @@
1
+ = 4.0.0
2
+ * Send args to roodi_task will make it easier to add custom configuration (breaking backwards compatibility)
3
+
1
4
  = 3.3.1
2
5
  * Not checking .erb files by default
3
6
 
data/README.md CHANGED
@@ -57,6 +57,12 @@ Add the following to your Rakefile:
57
57
  RoodiTask.new
58
58
  task :default => [:roodi]
59
59
 
60
+ or if you want to supply your own config file...
61
+
62
+ require 'roodi_task'
63
+ RoodiTask.new :config => 'config/roodi.yml'
64
+ task :default => [:roodi]
65
+
60
66
  ## Custom Configuration
61
67
 
62
68
  To change the set of checks included, or to change the default values of the checks, you can provide your own config file. The config file 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:
@@ -122,7 +128,7 @@ Fantastic! Please follow this procedure:
122
128
 
123
129
  (The MIT License)
124
130
 
125
- Copyright (c) 2013 Peter Evjan
131
+ Copyright (c) 2014 Peter Evjan
126
132
 
127
133
  Permission is hereby granted, free of charge, to any person obtaining
128
134
  a copy of this software and associated documentation files (the
data/lib/roodi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Roodi
2
- VERSION = '3.3.1'
2
+ VERSION = '4.0.0'
3
3
  end
data/lib/roodi_task.rb CHANGED
@@ -7,11 +7,11 @@ class RoodiTask < Rake::TaskLib
7
7
  attr_accessor :config
8
8
  attr_accessor :verbose
9
9
 
10
- def initialize name = :roodi, patterns = nil, config = nil
11
- @name = name
12
- @patterns = patterns || []
13
- @config = config
14
- @verbose = Rake.application.options.trace
10
+ def initialize(args = {})
11
+ @name = args[:name] || :roodi
12
+ @patterns = args[:patterns] || []
13
+ @config = args[:config]
14
+ @verbose = Rake.application.options.trace
15
15
 
16
16
  yield self if block_given?
17
17
 
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+ require 'roodi_task'
3
+
4
+ describe RoodiTask do
5
+
6
+ it 'allows setting the config' do
7
+ roodi_task = RoodiTask.new :config => "config/roodi.yml"
8
+ expect(roodi_task.config).to eq "config/roodi.yml"
9
+ end
10
+
11
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roodi
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.1
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marty Andrews
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-09 00:00:00.000000000 Z
12
+ date: 2014-04-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby_parser
@@ -104,6 +104,7 @@ files:
104
104
  - spec/roodi/checks/parameter_number_check_spec.rb
105
105
  - spec/roodi/core/runner_spec.rb
106
106
  - spec/roodi/roodi.yml
107
+ - spec/roodi_task_spec.rb
107
108
  - spec/spec_helper.rb
108
109
  homepage: http://github.com/roodi/roodi
109
110
  licenses:
@@ -125,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
126
  version: '0'
126
127
  requirements: []
127
128
  rubyforge_project:
128
- rubygems_version: 2.0.3
129
+ rubygems_version: 2.0.14
129
130
  signing_key:
130
131
  specification_version: 4
131
132
  summary: Roodi stands for Ruby Object Oriented Design Inferometer
@@ -150,4 +151,5 @@ test_files:
150
151
  - spec/roodi/checks/parameter_number_check_spec.rb
151
152
  - spec/roodi/core/runner_spec.rb
152
153
  - spec/roodi/roodi.yml
154
+ - spec/roodi_task_spec.rb
153
155
  - spec/spec_helper.rb