apoptosis 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,26 +1,20 @@
1
1
  = apoptosis
2
2
 
3
- * http://github.com/#{github_username}/#{project_name}
3
+ http://github.com/swerner/apoptosis
4
4
 
5
- == DESCRIPTION:
6
-
7
- FIX (describe your package)
8
-
9
- == FEATURES/PROBLEMS:
10
-
11
- * FIX (list of features or problems)
5
+ Navigate to a project directory which is also a git repository and run
6
+ the command:
12
7
 
13
- == SYNOPSIS:
8
+ apoptosis
14
9
 
15
- FIX (code sample of usage)
10
+ This command will create a DeathRow.md file in the directory with a list
11
+ of files and lines in your project which have not been touched in a
12
+ year. The idea is that you should re-evaluate and/or refactor them.
16
13
 
17
- == REQUIREMENTS:
18
-
19
- * FIX (list of requirements)
20
-
21
- == INSTALL:
14
+ == DESCRIPTION:
22
15
 
23
- * FIX (sudo gem install, anything else)
16
+ A little gem for helping you figure out which lines of code may need
17
+ killed off and replaced with newer ones.
24
18
 
25
19
  == LICENSE:
26
20
 
@@ -45,4 +39,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
45
39
  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
46
40
  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
47
41
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
48
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
42
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -33,12 +33,16 @@ module Apoptosis
33
33
  def process_contents
34
34
  outfile = File.open("DeathRow.md", "w+")
35
35
  @contents.each do |f|
36
- unless is_binary?(f)
37
- outfile.puts(@basedir+'/'+f)
38
- outfile.puts("=====")
39
- process_blame(get_blame(f)).each do |l|
40
- outfile.puts(l)
36
+ begin
37
+ lines = process_blame(get_blame(f))
38
+ if lines.length > 0
39
+ outfile.puts(@basedir+'/'+f)
40
+ outfile.puts("=====")
41
+ lines.each do |l|
42
+ outfile.puts(l)
43
+ end
41
44
  end
45
+ rescue
42
46
  end
43
47
  end
44
48
  outfile.close
@@ -48,10 +52,5 @@ module Apoptosis
48
52
  line.scan(/[0-9]{4}-[0-9]{2}-[0-9]{2}/)[0]
49
53
  end
50
54
 
51
- def is_binary?(f)
52
- badfiles = ['exe','png','jpg','jpeg','gif', 'jar']
53
- badfiles.include?(f.split('.')[1])
54
- end
55
-
56
55
  end
57
56
  end
data/lib/apoptosis.rb CHANGED
@@ -5,5 +5,5 @@ require 'date'
5
5
  require 'apoptosis/apoptosis.rb'
6
6
 
7
7
  module Apoptosis
8
- VERSION = '0.0.1'
8
+ VERSION = '0.0.2'
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apoptosis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,12 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-03 00:00:00.000000000 -04:00
12
+ date: 2011-08-04 00:00:00.000000000 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: hoe
17
- requirement: &70182945110440 !ruby/object:Gem::Requirement
17
+ requirement: &70185990432520 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,8 +22,10 @@ dependencies:
22
22
  version: '2.10'
23
23
  type: :development
24
24
  prerelease: false
25
- version_requirements: *70182945110440
26
- description: FIX (describe your package)
25
+ version_requirements: *70185990432520
26
+ description: ! 'A little gem for helping you figure out which lines of code may need
27
+
28
+ killed off and replaced with newer ones.'
27
29
  email:
28
30
  - stwerner@vt.edu
29
31
  executables:
@@ -49,7 +51,7 @@ files:
49
51
  - test/test_helper.rb
50
52
  - .gemtest
51
53
  has_rdoc: true
52
- homepage: http://github.com/#{github_username}/#{project_name}
54
+ homepage: http://github.com/swerner/apoptosis
53
55
  licenses: []
54
56
  post_install_message: PostInstall.txt
55
57
  rdoc_options:
@@ -74,7 +76,8 @@ rubyforge_project: apoptosis
74
76
  rubygems_version: 1.6.2
75
77
  signing_key:
76
78
  specification_version: 3
77
- summary: FIX (describe your package)
79
+ summary: A little gem for helping you figure out which lines of code may need killed
80
+ off and replaced with newer ones.
78
81
  test_files:
79
82
  - test/test_apoptosis.rb
80
83
  - test/test_helper.rb