dat-analysis 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. data/.gitignore +4 -0
  2. data/Gemfile +2 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +423 -0
  5. data/dat-analysis.gemspec +17 -0
  6. data/lib/dat/analysis.rb +446 -0
  7. data/lib/dat/analysis/library.rb +30 -0
  8. data/lib/dat/analysis/matcher.rb +43 -0
  9. data/lib/dat/analysis/registry.rb +50 -0
  10. data/lib/dat/analysis/result.rb +78 -0
  11. data/lib/dat/analysis/tally.rb +59 -0
  12. data/script/bootstrap +9 -0
  13. data/script/release +38 -0
  14. data/script/test +9 -0
  15. data/test/dat_analysis_subclassing_test.rb +119 -0
  16. data/test/dat_analysis_test.rb +822 -0
  17. data/test/fixtures/analysis/test-suite-experiment/matcher.rb +7 -0
  18. data/test/fixtures/experiment-with-classes/matcher_a.rb +5 -0
  19. data/test/fixtures/experiment-with-classes/matcher_b.rb +11 -0
  20. data/test/fixtures/experiment-with-classes/wrapper_a.rb +5 -0
  21. data/test/fixtures/experiment-with-classes/wrapper_b.rb +11 -0
  22. data/test/fixtures/experiment-with-good-and-extraneous-classes/matcher_w.rb +5 -0
  23. data/test/fixtures/experiment-with-good-and-extraneous-classes/matcher_y.rb +11 -0
  24. data/test/fixtures/experiment-with-good-and-extraneous-classes/matcher_z.rb +11 -0
  25. data/test/fixtures/experiment-with-good-and-extraneous-classes/wrapper_w.rb +5 -0
  26. data/test/fixtures/experiment-with-good-and-extraneous-classes/wrapper_y.rb +11 -0
  27. data/test/fixtures/experiment-with-good-and-extraneous-classes/wrapper_z.rb +11 -0
  28. data/test/fixtures/initialize-classes/matcher_m.rb +5 -0
  29. data/test/fixtures/initialize-classes/matcher_n.rb +11 -0
  30. data/test/fixtures/initialize-classes/wrapper_m.rb +5 -0
  31. data/test/fixtures/initialize-classes/wrapper_n.rb +11 -0
  32. data/test/fixtures/invalid-matcher/matcher.rb +1 -0
  33. metadata +128 -0
@@ -0,0 +1,7 @@
1
+ class MatcherA < Dat::Analysis::Matcher
2
+
3
+ end
4
+
5
+ class MatcherB < Dat::Analysis::Matcher
6
+
7
+ end
@@ -0,0 +1,5 @@
1
+ class MatcherA < Dat::Analysis::Matcher
2
+ def match?
3
+ result =~ /^known/
4
+ end
5
+ end
@@ -0,0 +1,11 @@
1
+ class MatcherB < Dat::Analysis::Matcher
2
+ def match?
3
+ result =~ /b/
4
+ end
5
+ end
6
+
7
+ class MatcherC < Dat::Analysis::Matcher
8
+ def match?
9
+ result =~ /c/
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ class WrapperA < Dat::Analysis::Result
2
+ def repository
3
+ 'wrapper-a-repository'
4
+ end
5
+ end
@@ -0,0 +1,11 @@
1
+ class WrapperB < Dat::Analysis::Result
2
+ def repository
3
+ 'wrapper-b-repository'
4
+ end
5
+ end
6
+
7
+ class WrapperC < Dat::Analysis::Result
8
+ def repository
9
+ 'wrapper-c-repository'
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ class MatcherW
2
+ def match?
3
+ true
4
+ end
5
+ end
@@ -0,0 +1,11 @@
1
+ class MatcherX < Dat::Analysis::Matcher
2
+ def match?
3
+ result =~ /b/
4
+ end
5
+ end
6
+
7
+ class MatcherY < Dat::Analysis::Matcher
8
+ def match?
9
+ result =~ /c/
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ class MatcherZ < Dat::Analysis::Matcher
2
+ def match?
3
+ result =~ /^known/
4
+ end
5
+ end
6
+
7
+ class MatcherV
8
+ def match?
9
+ true
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ class WrapperW
2
+ def match?
3
+ true
4
+ end
5
+ end
@@ -0,0 +1,11 @@
1
+ class WrapperX < Dat::Analysis::Result
2
+ def user
3
+ 'wrapper-x-user'
4
+ end
5
+ end
6
+
7
+ class WrapperY < Dat::Analysis::Result
8
+ def user
9
+ 'wrapper-y-user'
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ class WrapperZ < Dat::Analysis::Result
2
+ def user
3
+ 'wrapper-z-user'
4
+ end
5
+ end
6
+
7
+ class WrapperV
8
+ def user
9
+ 'wrapper-v-user'
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ class MatcherM < Dat::Analysis::Matcher
2
+ def match?
3
+ result =~ /^known/
4
+ end
5
+ end
@@ -0,0 +1,11 @@
1
+ class MatcherN < Dat::Analysis::Matcher
2
+ def match?
3
+ result =~ /n/
4
+ end
5
+ end
6
+
7
+ class MatcherO
8
+ def match?
9
+ true
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ class WrapperM < Dat::Analysis::Result
2
+ def repository
3
+ 'wrapper-m-repository'
4
+ end
5
+ end
@@ -0,0 +1,11 @@
1
+ class WrapperN < Dat::Analysis::Result
2
+ def repository
3
+ 'wrapper-n-repository'
4
+ end
5
+ end
6
+
7
+ class WrapperO
8
+ def repository
9
+ 'wrapper-o-repository'
10
+ end
11
+ end
@@ -0,0 +1 @@
1
+ raise Errno::EACCES
metadata ADDED
@@ -0,0 +1,128 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dat-analysis
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - John Barnette
9
+ - Rick Bradley
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2013-04-23 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: minitest
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: '0'
31
+ - !ruby/object:Gem::Dependency
32
+ name: mocha
33
+ requirement: !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ type: :development
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ description: Analyze results from dat-science
48
+ email:
49
+ - bradley@github.com
50
+ executables: []
51
+ extensions: []
52
+ extra_rdoc_files: []
53
+ files:
54
+ - .gitignore
55
+ - Gemfile
56
+ - LICENSE.txt
57
+ - README.md
58
+ - dat-analysis.gemspec
59
+ - lib/dat/analysis.rb
60
+ - lib/dat/analysis/library.rb
61
+ - lib/dat/analysis/matcher.rb
62
+ - lib/dat/analysis/registry.rb
63
+ - lib/dat/analysis/result.rb
64
+ - lib/dat/analysis/tally.rb
65
+ - script/bootstrap
66
+ - script/release
67
+ - script/test
68
+ - test/dat_analysis_subclassing_test.rb
69
+ - test/dat_analysis_test.rb
70
+ - test/fixtures/analysis/test-suite-experiment/matcher.rb
71
+ - test/fixtures/experiment-with-classes/matcher_a.rb
72
+ - test/fixtures/experiment-with-classes/matcher_b.rb
73
+ - test/fixtures/experiment-with-classes/wrapper_a.rb
74
+ - test/fixtures/experiment-with-classes/wrapper_b.rb
75
+ - test/fixtures/experiment-with-good-and-extraneous-classes/matcher_w.rb
76
+ - test/fixtures/experiment-with-good-and-extraneous-classes/matcher_y.rb
77
+ - test/fixtures/experiment-with-good-and-extraneous-classes/matcher_z.rb
78
+ - test/fixtures/experiment-with-good-and-extraneous-classes/wrapper_w.rb
79
+ - test/fixtures/experiment-with-good-and-extraneous-classes/wrapper_y.rb
80
+ - test/fixtures/experiment-with-good-and-extraneous-classes/wrapper_z.rb
81
+ - test/fixtures/initialize-classes/matcher_m.rb
82
+ - test/fixtures/initialize-classes/matcher_n.rb
83
+ - test/fixtures/initialize-classes/wrapper_m.rb
84
+ - test/fixtures/initialize-classes/wrapper_n.rb
85
+ - test/fixtures/invalid-matcher/matcher.rb
86
+ homepage: https://github.com/github/dat-analysis
87
+ licenses: []
88
+ post_install_message:
89
+ rdoc_options: []
90
+ require_paths:
91
+ - lib
92
+ required_ruby_version: !ruby/object:Gem::Requirement
93
+ none: false
94
+ requirements:
95
+ - - ! '>='
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ required_rubygems_version: !ruby/object:Gem::Requirement
99
+ none: false
100
+ requirements:
101
+ - - ! '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ requirements: []
105
+ rubyforge_project:
106
+ rubygems_version: 1.8.23
107
+ signing_key:
108
+ specification_version: 3
109
+ summary: HYPOTHESIZE THIS.
110
+ test_files:
111
+ - test/dat_analysis_subclassing_test.rb
112
+ - test/dat_analysis_test.rb
113
+ - test/fixtures/analysis/test-suite-experiment/matcher.rb
114
+ - test/fixtures/experiment-with-classes/matcher_a.rb
115
+ - test/fixtures/experiment-with-classes/matcher_b.rb
116
+ - test/fixtures/experiment-with-classes/wrapper_a.rb
117
+ - test/fixtures/experiment-with-classes/wrapper_b.rb
118
+ - test/fixtures/experiment-with-good-and-extraneous-classes/matcher_w.rb
119
+ - test/fixtures/experiment-with-good-and-extraneous-classes/matcher_y.rb
120
+ - test/fixtures/experiment-with-good-and-extraneous-classes/matcher_z.rb
121
+ - test/fixtures/experiment-with-good-and-extraneous-classes/wrapper_w.rb
122
+ - test/fixtures/experiment-with-good-and-extraneous-classes/wrapper_y.rb
123
+ - test/fixtures/experiment-with-good-and-extraneous-classes/wrapper_z.rb
124
+ - test/fixtures/initialize-classes/matcher_m.rb
125
+ - test/fixtures/initialize-classes/matcher_n.rb
126
+ - test/fixtures/initialize-classes/wrapper_m.rb
127
+ - test/fixtures/initialize-classes/wrapper_n.rb
128
+ - test/fixtures/invalid-matcher/matcher.rb