locat 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.ruby +1 -1
- data/HISTORY.rdoc +24 -0
- data/lib/locat.rb +4 -0
- data/lib/locat/command.rb +1 -1
- data/spec/applique/locat.rb +12 -0
- data/spec/fixtures/.locat +18 -0
- data/spec/fixtures/lib/example.rb +7 -0
- data/spec/testrun.rdoc +21 -0
- metadata +6 -2
data/.ruby
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
name: locat
|
3
|
-
version: 0.1.
|
3
|
+
version: 0.1.2
|
4
4
|
title: LOCat
|
5
5
|
summary: Lines of Code Attache
|
6
6
|
description: LOCat is a customizable Lines-Of-Code analysis tool. LOC might not be the most useful metric in the universe, but it still provides useful information and can be a lot of fun.
|
data/HISTORY.rdoc
CHANGED
@@ -1,5 +1,29 @@
|
|
1
1
|
= RELEASE HISTORY
|
2
2
|
|
3
|
+
== 0.1.2 | 2011-07-11
|
4
|
+
|
5
|
+
Doh. Eoughg said.
|
6
|
+
|
7
|
+
Changes:
|
8
|
+
|
9
|
+
* Fix missing bracket in cli options parsing.
|
10
|
+
* Set default encoding.
|
11
|
+
|
12
|
+
|
13
|
+
== 0.1.1 | 2011-07-10
|
14
|
+
|
15
|
+
This release fixes a few issues reported by friendly cats.
|
16
|
+
It also adds a new command line option to set the document
|
17
|
+
title.
|
18
|
+
|
19
|
+
Changes:
|
20
|
+
|
21
|
+
* Title can now be set via cli.
|
22
|
+
* Fix Time#to_date missing method. #3
|
23
|
+
* Fix metadata['title'] nil value. #3
|
24
|
+
* Add grit dependency. #2
|
25
|
+
|
26
|
+
|
3
27
|
== 0.1.0 | 2011-07-08 | The Cat's Meow
|
4
28
|
|
5
29
|
This is the first release of LOCat a
|
data/lib/locat.rb
CHANGED
data/lib/locat/command.rb
CHANGED
@@ -18,7 +18,7 @@ module LOCat
|
|
18
18
|
options[:config] ||= []
|
19
19
|
options[:config] << name
|
20
20
|
end
|
21
|
-
opt.on('-t', '--title TITLE', 'title to put on report' do |title|
|
21
|
+
opt.on('-t', '--title TITLE', 'title to put on report') do |title|
|
22
22
|
options[:title] = title
|
23
23
|
end
|
24
24
|
opt.on('-D', '--debug', 'run in debug mode') do
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'locat'
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
When 'Given an example ruby project' do
|
5
|
+
FileUtils.rm 'locat.html' if File.exist?('locat.html')
|
6
|
+
FileUtils.cp_r(File.dirname(__FILE__) + '/../fixtures/.', '.')
|
7
|
+
end
|
8
|
+
|
9
|
+
When 'with a `.locat` file' do |text|
|
10
|
+
File.open('.locat', 'w'){ |f| f << text }
|
11
|
+
end
|
12
|
+
|
data/spec/testrun.rdoc
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
== Test Run
|
2
|
+
|
3
|
+
Given an example ruby project with a `.locat` file:
|
4
|
+
|
5
|
+
match 'lib/**.rb' do |file, line|
|
6
|
+
case line
|
7
|
+
when /^\s*#/
|
8
|
+
'Comment'
|
9
|
+
when /^\s*$/
|
10
|
+
'Blank'
|
11
|
+
else
|
12
|
+
'Code'
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
Running the locat command should produce the expected HTML file.
|
17
|
+
|
18
|
+
LOCat.cli('--output', 'locat.html')
|
19
|
+
|
20
|
+
File.assert.exist?('locat.html')
|
21
|
+
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: locat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Thomas Sawyer
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-07-
|
13
|
+
date: 2011-07-11 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: grit
|
@@ -76,6 +76,10 @@ files:
|
|
76
76
|
- lib/locat/template/javascript.js
|
77
77
|
- lib/locat/template.rb
|
78
78
|
- lib/locat.rb
|
79
|
+
- spec/applique/locat.rb
|
80
|
+
- spec/fixtures/.locat
|
81
|
+
- spec/fixtures/lib/example.rb
|
82
|
+
- spec/testrun.rdoc
|
79
83
|
- HISTORY.rdoc
|
80
84
|
- README.rdoc
|
81
85
|
- COPYING.rdoc
|