todos_export 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -2
- data/lib/todos_export.rb +2 -0
- data/lib/todos_export/std_out.rb +35 -0
- data/lib/todos_export/version.rb +1 -1
- data/spec/lib/todos_export/std_out_spec.rb +30 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d36d1c59cff0bc00d88df56fc5ca88dee539137
|
4
|
+
data.tar.gz: 43583313e185006c5541c1ae75bff6d57187a734
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b49728256721a58a25f7731e40c83457f85f015c84b123d9c7fe828d72b3f4e0f17ffe0c046021ead8d0e06cdec0fa9c6916577352d69b5478f74958dcd20be0
|
7
|
+
data.tar.gz: 348f7d5c184c89f88bb73f10533cf0484d84f79c80224064f50e333c19ed98ad047bcce49e4043df5c7de56e5e3d8fbf6e75e31625632406724790feb2cd0d37
|
data/README.md
CHANGED
@@ -2,13 +2,21 @@
|
|
2
2
|
|
3
3
|
Export comment TODO's, FIXME's and BUG's from your code.
|
4
4
|
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/todos_export.png)](http://badge.fury.io/rb/todos_export)
|
5
6
|
[![Build Status](https://travis-ci.org/rcaught/todos_export.png?branch=master)](https://travis-ci.org/rcaught/todos_export)
|
6
7
|
[![Dependency Status](https://gemnasium.com/rcaught/todos_export.png)](https://gemnasium.com/rcaught/todos_export)
|
7
8
|
[![Coverage Status](https://coveralls.io/repos/rcaught/todos_export/badge.png)](https://coveralls.io/r/rcaught/todos_export)
|
8
9
|
[![Code Climate](https://codeclimate.com/github/rcaught/todos_export.png)](https://codeclimate.com/github/rcaught/todos_export)
|
9
10
|
|
10
|
-
|
11
|
-
-
|
11
|
+
Current available export locations:
|
12
|
+
- STDOUT
|
13
|
+
- Github Issues: Turning [this](https://github.com/rcaught/todos_export/blob/c70712b22220c1e098c22bd9e3efc1aa028f2690/spec/resources/ruby_file_with_todos.rb#L2)
|
14
|
+
into [this](https://github.com/rcaught/todos_export/issues/14)
|
15
|
+
|
16
|
+
## Screenshots
|
17
|
+
|
18
|
+
![screen shot 2013-06-26 at 12 47 49 am](https://f.cloud.github.com/assets/144163/707443/9d5337cc-de1b-11e2-8cb4-3cc3984f6d7e.png)
|
19
|
+
![screen shot 2013-06-26 at 12 38 34 am](https://f.cloud.github.com/assets/144163/707438/357ea4c4-de1b-11e2-9d7a-0cdacba94123.png)
|
12
20
|
|
13
21
|
## Installation
|
14
22
|
|
data/lib/todos_export.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require "todos_export/version"
|
2
2
|
require 'todos_export/github_issues'
|
3
|
+
require 'todos_export/std_out'
|
3
4
|
require "highline/import"
|
4
5
|
require 'octokit'
|
5
6
|
require 'rugged'
|
@@ -109,6 +110,7 @@ module TodosExport
|
|
109
110
|
|
110
111
|
choose do |menu|
|
111
112
|
menu.prompt = "Export to: "
|
113
|
+
menu.choice('STDOUT') { TodosExport::StdOut.new(self).run }
|
112
114
|
menu.choice('Github Issues') { TodosExport::GithubIssues.new(self).run }
|
113
115
|
end
|
114
116
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module TodosExport
|
2
|
+
class StdOut
|
3
|
+
attr_accessor :main
|
4
|
+
|
5
|
+
def initialize(main)
|
6
|
+
@main = main
|
7
|
+
end
|
8
|
+
|
9
|
+
def run
|
10
|
+
process_exportables
|
11
|
+
end
|
12
|
+
|
13
|
+
def output
|
14
|
+
out = "Todos\n====="
|
15
|
+
self.main.exportable_todos.each do |ex|
|
16
|
+
out += "\n- #{ex[:content]}"
|
17
|
+
end
|
18
|
+
out += "\n\nFixmes\n======"
|
19
|
+
self.main.exportable_fixmes.each do |ex|
|
20
|
+
out += "\n- #{ex[:content]}"
|
21
|
+
end
|
22
|
+
out += "\n\nBugs\n===="
|
23
|
+
self.main.exportable_bugs.each do |ex|
|
24
|
+
out += "\n- #{ex[:content]}"
|
25
|
+
end
|
26
|
+
|
27
|
+
return out
|
28
|
+
end
|
29
|
+
|
30
|
+
def process_exportables
|
31
|
+
say("\n")
|
32
|
+
say(self.output)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/lib/todos_export/version.rb
CHANGED
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'todos_export/std_out'
|
3
|
+
|
4
|
+
describe TodosExport::StdOut do
|
5
|
+
it '#output' do
|
6
|
+
main = TodosExport::Main.new('spec/resources')
|
7
|
+
main.find_exportables
|
8
|
+
|
9
|
+
s = TodosExport::StdOut.new(main)
|
10
|
+
s.output.should ==
|
11
|
+
"Todos
|
12
|
+
=====
|
13
|
+
- Find a kinder message
|
14
|
+
- Make a list
|
15
|
+
- Add more cheese types
|
16
|
+
- Add more region cheeses
|
17
|
+
- Personalize the class to your taste
|
18
|
+
- Be a better Ruby file
|
19
|
+
|
20
|
+
Fixmes
|
21
|
+
======
|
22
|
+
- This is a useless class, what we really need to do is sit down and eat some cheese
|
23
|
+
- Use case statement
|
24
|
+
|
25
|
+
Bugs
|
26
|
+
====
|
27
|
+
- This should be false
|
28
|
+
- This should say it's a Ruby file"
|
29
|
+
end
|
30
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: todos_export
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Caught
|
@@ -153,8 +153,10 @@ files:
|
|
153
153
|
- bin/todos_export
|
154
154
|
- lib/todos_export.rb
|
155
155
|
- lib/todos_export/github_issues.rb
|
156
|
+
- lib/todos_export/std_out.rb
|
156
157
|
- lib/todos_export/version.rb
|
157
158
|
- spec/lib/todos_export/github_isses_spec.rb
|
159
|
+
- spec/lib/todos_export/std_out_spec.rb
|
158
160
|
- spec/lib/todos_export_spec.rb
|
159
161
|
- spec/resources/python_file.py
|
160
162
|
- spec/resources/ruby_file_with_todos.rb
|
@@ -188,6 +190,7 @@ specification_version: 4
|
|
188
190
|
summary: Export comment Todo's, Fixme's and Bug's from your code
|
189
191
|
test_files:
|
190
192
|
- spec/lib/todos_export/github_isses_spec.rb
|
193
|
+
- spec/lib/todos_export/std_out_spec.rb
|
191
194
|
- spec/lib/todos_export_spec.rb
|
192
195
|
- spec/resources/python_file.py
|
193
196
|
- spec/resources/ruby_file_with_todos.rb
|