linkage-viewer 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
@@ -8,8 +8,7 @@ module Linkage
8
8
  @groups_dataset = @result_set.groups_dataset
9
9
  @group_count = @groups_dataset.count
10
10
  @groups_records_dataset = @result_set.groups_records_dataset
11
- @dataset_1 = @config.dataset_1
12
- @dataset_2 = @config.dataset_2
11
+ @datasets = [@config.dataset_1, @config.dataset_2]
13
12
 
14
13
  common_fields = [[], []]
15
14
  @config.expectations.each do |exp|
@@ -28,8 +27,8 @@ module Linkage
28
27
 
29
28
  all_fields = if @config.visual_comparisons.empty?
30
29
  [
31
- common_fields[0] | @dataset_1.field_set.values,
32
- common_fields[1] | @dataset_2.field_set.values
30
+ common_fields[0] | @datasets[0].field_set.values,
31
+ common_fields[1] | @datasets[1].field_set.values
33
32
  ]
34
33
  else
35
34
  @config.visual_comparisons.inject(common_fields.dup) do |arr, vc|
@@ -48,7 +47,7 @@ module Linkage
48
47
  @field_names = [[], []]
49
48
  all_fields.each_with_index do |fields, i|
50
49
  fields.each do |field|
51
- expr = field.to_expr
50
+ expr = field.to_expr(@datasets[i].adapter_scheme)
52
51
  if expr.is_a?(Sequel::SQL::Function)
53
52
  name = field.name
54
53
  expr = expr.as(name)
@@ -86,7 +85,7 @@ module Linkage
86
85
 
87
86
  def get_records(group_id, dataset_id, record_expressions)
88
87
  record_ids = @groups_records_dataset.filter(:group_id => group_id, :dataset => dataset_id).select_map(:record_id)
89
- dataset = dataset_id == 1 ? @dataset_1 : @dataset_2
88
+ dataset = dataset_id == 1 ? @datasets[0] : @datasets[1]
90
89
  primary_key = dataset.field_set.primary_key.to_expr
91
90
 
92
91
  dataset.select(*record_expressions).filter(primary_key => record_ids).all
@@ -77,8 +77,8 @@ module Linkage
77
77
  end
78
78
 
79
79
  Linkage::Viewer::UI::Console::MENU = <<EOF
80
- Dataset 1: <%= @dataset_1.table_name %> (<%= @dataset_1.adapter_scheme %>)
81
- Dataset 2: <%= @dataset_2.table_name %> (<%= @dataset_2.adapter_scheme %>)
80
+ Dataset 1: <%= @datasets[0].table_name %> (<%= @datasets[0].adapter_scheme %>)
81
+ Dataset 2: <%= @datasets[1].table_name %> (<%= @datasets[1].adapter_scheme %>)
82
82
  Groups: <%= @groups_dataset.count %>
83
83
 
84
84
  <%= get_table %>
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "linkage-viewer"
8
- s.version = "0.0.1"
8
+ s.version = "0.0.2"
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-20"
12
+ s.date = "2012-03-30"
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 = [
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.1
4
+ version: 0.0.2
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-20 00:00:00.000000000 Z
12
+ date: 2012-03-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: highline
@@ -196,7 +196,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
196
196
  version: '0'
197
197
  segments:
198
198
  - 0
199
- hash: 1289887407956206137
199
+ hash: 1156770905248646491
200
200
  required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  none: false
202
202
  requirements: