churn 0.0.8 → 0.0.9

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.8
1
+ 0.0.9
@@ -1,7 +1,7 @@
1
1
  require 'chronic'
2
- require 'json'
3
2
  require 'sexp_processor'
4
3
  require 'ruby_parser'
4
+ require 'json'
5
5
  require 'hirb'
6
6
  require 'fileutils'
7
7
 
@@ -11,11 +11,15 @@ module Churn
11
11
  #load revision data from scratch folder if it exists
12
12
  filename = "tmp/#{revision}.json"
13
13
  if File.exists?(filename)
14
- json_data = File.read(filename)
15
- data = JSON.parse(json_data)
16
- changed_files = data['churn']['changed_files']
17
- changed_classes = data['churn']['changed_classes']
18
- changed_methods = data['churn']['changed_methods']
14
+ begin
15
+ json_data = File.read(filename)
16
+ data = JSON.parse(json_data)
17
+ changed_files = data['churn']['changed_files']
18
+ changed_classes = data['churn']['changed_classes']
19
+ changed_methods = data['churn']['changed_methods']
20
+ rescue JSON::ParserError
21
+ #leave all of the objects nil
22
+ end
19
23
  end
20
24
  [changed_files, changed_classes, changed_methods]
21
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: churn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Mayer
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-15 00:00:00 -05:00
12
+ date: 2010-01-19 00:00:00 -05:00
13
13
  default_executable: churn
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency