toadie 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -33,9 +33,11 @@ It will produce the html output into a folder called 'toadie', having a index.ht
33
33
 
34
34
  $ open toadie/index.html
35
35
 
36
- ## Configure team members
36
+ ## Configuration
37
37
 
38
- By default you will not need to configure anything. Toadie will detect authors by using git and display TODOs accordingly.
38
+ ### Configure team members
39
+
40
+ By default you will not need to configure any team members. Toadie will detect authors by using git and display TODOs accordingly.
39
41
 
40
42
  However, to have multiple mail addresses or assignment tags for each team member create a `.toadie.json` file.
41
43
 
@@ -66,6 +68,17 @@ The given nicknames will be used to find TODOs assigned to this person. For exam
66
68
 
67
69
  The TODO will be assigned to Riker.
68
70
 
71
+ ### Configure file extensions
72
+
73
+ By default toadie will try to find any TODOs in the given directory. Sometimes it might be helpful to reduce this search to files with a specific file ending. This can be done by setting the `file_extensions` configuration option:
74
+
75
+ ```json
76
+ {
77
+ "file_extensions": ["rb", "js", "py"]
78
+ }
79
+ ```
80
+
81
+ This example will only search for ruby, python and javascript files and skips e.g. log files.
69
82
 
70
83
  ## Contributing
71
84
 
@@ -77,10 +90,9 @@ The TODO will be assigned to Riker.
77
90
 
78
91
  ## Todos (haha)
79
92
 
80
- 1. Add customizable file endings to the configuration
81
- 2. Make output directory/format configurable
82
- 3. Do a little benchmarking and profiling
83
- 4. Refine descriptions and texts
84
- 5. Detect multiline TODOs
85
- 6. Support more languages
86
- 7. Link source to github
93
+ 1. Make output directory/format configurable
94
+ 2. Do a little benchmarking and profiling
95
+ 3. Refine descriptions and texts
96
+ 4. Detect multiline TODOs
97
+ 5. Support more languages
98
+ 6. Link source to github
data/bin/toadie CHANGED
@@ -19,10 +19,13 @@ end
19
19
 
20
20
  config_file = opts[:config] || File.join(Toadie.root, '.toadie.json')
21
21
  if File.exist?(config_file)
22
- config = JSON.parse(File.read(config_file))
22
+ config = JSON.parse(File.read(config_file))
23
+ Toadie.file_extensions = config["file_extensions"]
24
+ Toadie.todo_markers = config["todo_markers"]
25
+
23
26
  Array(config["authors"]).each do |attributes|
24
27
  Toadie::Author.create(attributes)
25
28
  end
26
29
  end
27
30
 
28
- Toadie::Run.new.start
31
+ Toadie::Run.new.start
@@ -0,0 +1,16 @@
1
+ require 'spec_helper'
2
+
3
+ describe Toadie::Configuration do
4
+ let(:config) { 'foo'.extend(Toadie::Configuration) }
5
+
6
+ describe "#todo_markers" do
7
+ it "returns default todo markers if nothing was provided" do
8
+ config.todo_markers.should eq Toadie.default_todo_markers
9
+ end
10
+
11
+ it "returns custom todo markers if provided" do
12
+ config.todo_markers = [:foo, :bar]
13
+ config.todo_markers.should eq [:foo, :bar]
14
+ end
15
+ end
16
+ end
data/views/CHANGES.md ADDED
@@ -0,0 +1,2 @@
1
+ 2013-03-09
2
+ Added file type extension configuration option.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toadie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-01 00:00:00.000000000 Z
12
+ date: 2013-03-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: slop
@@ -125,10 +125,12 @@ files:
125
125
  - lib/toadie/version.rb
126
126
  - spec/author_spec.rb
127
127
  - spec/blame_spec.rb
128
+ - spec/configuration_spec.rb
128
129
  - spec/spec_helper.rb
129
130
  - spec/todo_spec.rb
130
131
  - spec/todolist_spec.rb
131
132
  - toadie.gemspec
133
+ - views/CHANGES.md
132
134
  - views/report.slim
133
135
  homepage: http://github.com/xijo/toadie
134
136
  licenses: []
@@ -144,7 +146,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
144
146
  version: '0'
145
147
  segments:
146
148
  - 0
147
- hash: 24252476223764722
149
+ hash: 2154824783258185228
148
150
  required_rubygems_version: !ruby/object:Gem::Requirement
149
151
  none: false
150
152
  requirements:
@@ -153,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
155
  version: '0'
154
156
  segments:
155
157
  - 0
156
- hash: 24252476223764722
158
+ hash: 2154824783258185228
157
159
  requirements: []
158
160
  rubyforge_project:
159
161
  rubygems_version: 1.8.25
@@ -163,6 +165,7 @@ summary: Analyze your source code, find open todos and output a nice html report
163
165
  test_files:
164
166
  - spec/author_spec.rb
165
167
  - spec/blame_spec.rb
168
+ - spec/configuration_spec.rb
166
169
  - spec/spec_helper.rb
167
170
  - spec/todo_spec.rb
168
171
  - spec/todolist_spec.rb