linkage-viewer 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source "http://rubygems.org"
2
2
 
3
3
  gem "highline"
4
4
  gem "terminal-table"
5
- gem "linkage", "> 0.0.3"
5
+ gem "linkage", "> 0.0.5"
6
6
 
7
7
  # Add dependencies to develop your gem here.
8
8
  # Include everything needed to run rake, tests, features, etc.
@@ -3,7 +3,7 @@ GEM
3
3
  specs:
4
4
  ffi (1.0.11)
5
5
  git (1.2.5)
6
- guard (1.0.1)
6
+ guard (1.0.2)
7
7
  ffi (>= 0.5.0)
8
8
  thor (~> 0.14.6)
9
9
  guard-test (0.4.3)
@@ -14,14 +14,14 @@ GEM
14
14
  bundler (~> 1.0)
15
15
  git (>= 1.2.5)
16
16
  rake
17
- linkage (0.0.4)
17
+ linkage (0.0.6)
18
18
  sequel
19
19
  metaclass (0.0.1)
20
- mocha (0.10.5)
20
+ mocha (0.11.3)
21
21
  metaclass (~> 0.0.1)
22
22
  rake (0.9.2.2)
23
- sequel (3.33.0)
24
- sqlite3 (1.3.5)
23
+ sequel (3.35.0)
24
+ sqlite3 (1.3.6)
25
25
  terminal-table (1.4.5)
26
26
  test-unit (2.4.8)
27
27
  thor (0.14.6)
@@ -34,7 +34,7 @@ DEPENDENCIES
34
34
  guard-test
35
35
  highline
36
36
  jeweler (~> 1.6.4)
37
- linkage (> 0.0.3)
37
+ linkage (> 0.0.5)
38
38
  mocha
39
39
  sqlite3
40
40
  terminal-table
data/Rakefile CHANGED
@@ -51,3 +51,5 @@ Rake::RDocTask.new do |rdoc|
51
51
  rdoc.rdoc_files.include('README*')
52
52
  rdoc.rdoc_files.include('lib/**/*.rb')
53
53
  end
54
+
55
+ task :build => :gemspec
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -7,8 +7,7 @@ module Linkage
7
7
  @result_set = @config.result_set
8
8
  @groups_dataset = @result_set.groups_dataset
9
9
  @group_count = @groups_dataset.count
10
- @groups_records_dataset = @result_set.groups_records_dataset
11
- @datasets = [@config.dataset_1, @config.dataset_2]
10
+ @datasets = @config.datasets_with_applied_expectations
12
11
 
13
12
  common_fields = [[], []]
14
13
  @config.expectations.each do |exp|
@@ -68,27 +67,24 @@ module Linkage
68
67
 
69
68
  def set_group_index(index)
70
69
  @group_index = index
71
- @group = @groups_dataset.order(:id).limit(1, index).first
70
+ @group = @result_set.get_group(index)
72
71
  @records = []
73
72
  @records_index = [0, 0]
74
73
 
75
74
  if @config.linkage_type == :self
76
75
  expressions = @field_expressions[0] | @field_expressions[1]
77
- @records << get_records(@group[:id], 1, expressions)
76
+ @records << get_records(@group, 1, expressions)
78
77
  @records << @records[0]
79
78
  @records_index[1] = 1
80
79
  else
81
- @records << get_records(@group[:id], 1, @field_expressions[0])
82
- @records << get_records(@group[:id], 2, @field_expressions[1])
80
+ @records << get_records(@group, 1, @field_expressions[0])
81
+ @records << get_records(@group, 2, @field_expressions[1])
83
82
  end
84
83
  end
85
84
 
86
- def get_records(group_id, dataset_id, record_expressions)
87
- record_ids = @groups_records_dataset.filter(:group_id => group_id, :dataset => dataset_id).select_map(:record_id)
85
+ def get_records(group, dataset_id, record_expressions)
88
86
  dataset = dataset_id == 1 ? @datasets[0] : @datasets[1]
89
- primary_key = dataset.field_set.primary_key.to_expr
90
-
91
- dataset.select(*record_expressions).filter(primary_key => record_ids).all
87
+ dataset.dataset_for_group(group).select(*record_expressions).all
92
88
  end
93
89
  end
94
90
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "linkage-viewer"
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jeremy Stephens"]
12
- s.date = "2012-03-30"
12
+ s.date = "2012-05-08"
13
13
  s.description = "Visualization tool for viewing results from the Linkage library"
14
14
  s.email = "jeremy.f.stephens@vanderbilt.edu"
15
15
  s.extra_rdoc_files = [
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
39
39
  s.homepage = "http://github.com/coupler/linkage-viewer"
40
40
  s.licenses = ["MIT"]
41
41
  s.require_paths = ["lib"]
42
- s.rubygems_version = "1.8.18"
42
+ s.rubygems_version = "1.8.23"
43
43
  s.summary = "Addon for viewing results from the Linkage library"
44
44
 
45
45
  if s.respond_to? :specification_version then
@@ -48,7 +48,7 @@ Gem::Specification.new do |s|
48
48
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
49
49
  s.add_runtime_dependency(%q<highline>, [">= 0"])
50
50
  s.add_runtime_dependency(%q<terminal-table>, [">= 0"])
51
- s.add_runtime_dependency(%q<linkage>, ["> 0.0.3"])
51
+ s.add_runtime_dependency(%q<linkage>, ["> 0.0.5"])
52
52
  s.add_development_dependency(%q<bundler>, [">= 0"])
53
53
  s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
54
54
  s.add_development_dependency(%q<guard-test>, [">= 0"])
@@ -58,7 +58,7 @@ Gem::Specification.new do |s|
58
58
  else
59
59
  s.add_dependency(%q<highline>, [">= 0"])
60
60
  s.add_dependency(%q<terminal-table>, [">= 0"])
61
- s.add_dependency(%q<linkage>, ["> 0.0.3"])
61
+ s.add_dependency(%q<linkage>, ["> 0.0.5"])
62
62
  s.add_dependency(%q<bundler>, [">= 0"])
63
63
  s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
64
64
  s.add_dependency(%q<guard-test>, [">= 0"])
@@ -69,7 +69,7 @@ Gem::Specification.new do |s|
69
69
  else
70
70
  s.add_dependency(%q<highline>, [">= 0"])
71
71
  s.add_dependency(%q<terminal-table>, [">= 0"])
72
- s.add_dependency(%q<linkage>, ["> 0.0.3"])
72
+ s.add_dependency(%q<linkage>, ["> 0.0.5"])
73
73
  s.add_dependency(%q<bundler>, [">= 0"])
74
74
  s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
75
75
  s.add_dependency(%q<guard-test>, [">= 0"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linkage-viewer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-30 00:00:00.000000000 Z
12
+ date: 2012-05-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: highline
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - ! '>'
52
52
  - !ruby/object:Gem::Version
53
- version: 0.0.3
53
+ version: 0.0.5
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
@@ -58,7 +58,7 @@ dependencies:
58
58
  requirements:
59
59
  - - ! '>'
60
60
  - !ruby/object:Gem::Version
61
- version: 0.0.3
61
+ version: 0.0.5
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: bundler
64
64
  requirement: !ruby/object:Gem::Requirement
@@ -196,7 +196,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
196
196
  version: '0'
197
197
  segments:
198
198
  - 0
199
- hash: 1156770905248646491
199
+ hash: 1067688954718411258
200
200
  required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  none: false
202
202
  requirements:
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  version: '0'
206
206
  requirements: []
207
207
  rubyforge_project:
208
- rubygems_version: 1.8.18
208
+ rubygems_version: 1.8.23
209
209
  signing_key:
210
210
  specification_version: 3
211
211
  summary: Addon for viewing results from the Linkage library