churn 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -12,10 +12,10 @@ begin
12
12
  gem.homepage = "http://github.com/danmayer/churn"
13
13
  gem.authors = ["Dan Mayer"]
14
14
  gem.add_development_dependency "thoughtbot-shoulda"
15
- gem.add_development_dependency "devver-construct"
15
+ gem.add_development_dependency "test-construct"
16
16
  gem.add_development_dependency "mocha", '~> 0.9.5'
17
17
  gem.add_dependency "main"
18
- gem.add_dependency "json"
18
+ gem.add_dependency "json_pure"
19
19
  gem.add_dependency "chronic", '~> 0.2.3'
20
20
  gem.add_dependency "sexp_processor", '~> 3.0.3'
21
21
  gem.add_dependency "ruby_parser", '~> 2.0.4'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.10
1
+ 0.0.11
@@ -46,14 +46,14 @@ module Churn
46
46
 
47
47
  # Analyze the source control data, filter, sort, and find more information on the editted files
48
48
  def analyze
49
- @changes = @changes.to_a.sort {|x,y| y[1] <=> x[1]}
49
+ @changes = sort_changes(@changes)
50
50
  @changes = @changes.map {|file_path, times_changed| {:file_path => file_path, :times_changed => times_changed }}
51
51
 
52
52
  calculate_revision_changes
53
53
 
54
- @method_changes = @method_changes.to_a.sort {|x,y| y[1] <=> x[1]}
54
+ @method_changes = sort_changes(@method_changes)
55
55
  @method_changes = @method_changes.map {|method, times_changed| {'method' => method, 'times_changed' => times_changed }}
56
- @class_changes = @class_changes.to_a.sort {|x,y| y[1] <=> x[1]}
56
+ @class_changes = sort_changes(@class_changes)
57
57
  @class_changes = @class_changes.map {|klass, times_changed| {'klass' => klass, 'times_changed' => times_changed }}
58
58
  end
59
59
 
@@ -101,6 +101,10 @@ module Churn
101
101
 
102
102
  private
103
103
 
104
+ def sort_changes(changes)
105
+ changes.to_a.sort! {|x,y| y[1] <=> x[1]}
106
+ end
107
+
104
108
  def filters
105
109
  /.*\.rb/
106
110
  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.10
4
+ version: 0.0.11
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-20 00:00:00 -05:00
12
+ date: 2010-02-05 00:00:00 -05:00
13
13
  default_executable: churn
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -23,7 +23,7 @@ dependencies:
23
23
  version: "0"
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
- name: devver-construct
26
+ name: test-construct
27
27
  type: :development
28
28
  version_requirement:
29
29
  version_requirements: !ruby/object:Gem::Requirement
@@ -53,7 +53,7 @@ dependencies:
53
53
  version: "0"
54
54
  version:
55
55
  - !ruby/object:Gem::Dependency
56
- name: json
56
+ name: json_pure
57
57
  type: :runtime
58
58
  version_requirement:
59
59
  version_requirements: !ruby/object:Gem::Requirement