marty 2.5.5 → 2.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +14 -9
- data/Gemfile +1 -1
- data/Gemfile.lock +7 -9
- data/app/components/marty/main_auth_app.rb +7 -7
- data/lib/marty/version.rb +1 -1
- data/spec/dummy/bin/delayed_job +6 -0
- data/spec/models/data_grid_spec.rb +14 -32
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89ed116d83e4c492715b16521b670d8cb76b7e26c24c50ae80e7feb15c0647f0
|
4
|
+
data.tar.gz: 966828b387e0fde5e25d089955c24d17455803ccf374fe281de4d8267851456e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 422d57c6920da447203117add2a24298b754aa8bc4d08deb4476e5610a5b76be20ab324752966a5144f0221a8d14c036e43c7e6d39ab33841f6c03332b908f8f
|
7
|
+
data.tar.gz: 6891166c6703a0149ba2c548da687ff041c1ad1ef472d2c47a778b3fa46040b7c9eed1cbee7a3ad1186e18585b20bd22246282e49be9d55f2264ab70b54025b9
|
data/.gitlab-ci.yml
CHANGED
@@ -1,30 +1,33 @@
|
|
1
|
-
image:
|
1
|
+
image: 415596832415.dkr.ecr.us-west-2.amazonaws.com/cm_tech/docker-ruby-ci-image:2.4.2-20190129
|
2
2
|
|
3
3
|
services:
|
4
4
|
- "clkao/postgres-plv8:9.6-2.0"
|
5
5
|
|
6
6
|
before_script:
|
7
|
-
- bundle install --jobs $(nproc) --path vendor "${FLAGS[@]}"
|
7
|
+
- time bundle install --jobs $(nproc) --path vendor "${FLAGS[@]}"
|
8
8
|
- cp ./spec/dummy/config/database.ci.yml ./spec/dummy/config/database.yml
|
9
9
|
- RAILS_ENV=test bundle exec rails db:create db:migrate
|
10
10
|
|
11
|
-
|
11
|
+
.base-test:
|
12
12
|
stage: test
|
13
|
+
# Use only the following CI runners
|
14
|
+
tags:
|
15
|
+
- cf-gitlabci-runner-eks-shared-dev
|
16
|
+
|
17
|
+
rubocop:
|
18
|
+
extends: .base-test
|
13
19
|
script:
|
14
20
|
- bundle exec rubocop
|
15
21
|
|
16
22
|
rspec-without-features:
|
17
|
-
|
23
|
+
extends: .base-test
|
18
24
|
script:
|
19
25
|
- bundle exec rspec --exclude-pattern "spec/features/**/*_spec.rb"
|
20
26
|
|
21
27
|
rspec-features:
|
22
|
-
|
28
|
+
extends: .base-test
|
23
29
|
script:
|
24
|
-
-
|
25
|
-
cd spec/dummy/public && \
|
26
|
-
git clone --single-branch --branch version_6_5_3 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.pnmac.com/cm_tech/extjs.git && \
|
27
|
-
cd -
|
30
|
+
- ln -s /opt/support/extjs /cm_tech/marty/spec/dummy/public/extjs
|
28
31
|
# - bundle exec rspec --pattern "spec/features/**/*_spec.rb"
|
29
32
|
# FIXME: rule_spec is excluded, because chrome doesn't work with big window size in docker
|
30
33
|
# And test fails with 1400/1400 resolution
|
@@ -45,4 +48,6 @@ variables:
|
|
45
48
|
PGTZ: "America/Los_Angeles"
|
46
49
|
HEADLESS: "true"
|
47
50
|
HEADLESS_WINDOW_SIZE: "1400,1400"
|
51
|
+
REPOSITORY_URL: '415596832415.dkr.ecr.us-west-2.amazonaws.com/cm_tech/docker-ruby-ci-image'
|
52
|
+
DOCKER_AUTH_CONFIG: '{ "credsStore": "ecr-login" }'
|
48
53
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
marty (2.5.
|
4
|
+
marty (2.5.6)
|
5
5
|
aws-sigv4 (~> 1.0, >= 1.0.2)
|
6
6
|
axlsx (= 3.0.0pre)
|
7
7
|
coderay
|
@@ -69,14 +69,13 @@ GEM
|
|
69
69
|
nokogiri (~> 1.8, >= 1.8.2)
|
70
70
|
rubyzip (~> 1.2, >= 1.2.1)
|
71
71
|
builder (3.2.3)
|
72
|
-
capybara (
|
72
|
+
capybara (2.18.0)
|
73
73
|
addressable
|
74
74
|
mini_mime (>= 0.1.3)
|
75
|
-
nokogiri (
|
76
|
-
rack (>= 1.
|
77
|
-
rack-test (>= 0.
|
78
|
-
|
79
|
-
xpath (~> 3.2)
|
75
|
+
nokogiri (>= 1.3.3)
|
76
|
+
rack (>= 1.0.0)
|
77
|
+
rack-test (>= 0.5.4)
|
78
|
+
xpath (>= 2.0, < 4.0)
|
80
79
|
childprocess (0.9.0)
|
81
80
|
ffi (~> 1.0, >= 1.0.11)
|
82
81
|
chromedriver-helper (2.1.0)
|
@@ -188,7 +187,6 @@ GEM
|
|
188
187
|
thor (>= 0.18.1, < 2.0)
|
189
188
|
rainbow (3.0.0)
|
190
189
|
rake (12.3.2)
|
191
|
-
regexp_parser (1.3.0)
|
192
190
|
rspec (3.8.0)
|
193
191
|
rspec-core (~> 3.8.0)
|
194
192
|
rspec-expectations (~> 3.8.0)
|
@@ -255,7 +253,7 @@ PLATFORMS
|
|
255
253
|
ruby
|
256
254
|
|
257
255
|
DEPENDENCIES
|
258
|
-
capybara
|
256
|
+
capybara (~> 2.18.0)
|
259
257
|
chromedriver-helper
|
260
258
|
connection_pool
|
261
259
|
daemons
|
@@ -293,33 +293,33 @@ class Marty::MainAuthApp < Marty::AuthApp
|
|
293
293
|
|
294
294
|
######################################################################
|
295
295
|
|
296
|
-
def bg_command(
|
296
|
+
def bg_command(subcmd)
|
297
|
+
params = Marty::Config['DELAYED_JOB_PARAMS'] || ''
|
297
298
|
e, root, p = ENV['RAILS_ENV'], Rails.root, Marty::Config['RUBY_PATH']
|
298
299
|
dj_path = Marty::Config['DELAYED_JOB_PATH'] || 'bin/delayed_job'
|
299
300
|
cmd = "export RAILS_ENV=#{e};"
|
300
301
|
# FIXME: Environment looks to be setup incorrectly - this is a hack
|
301
302
|
cmd += "export PATH=#{p}:$PATH;" if p
|
302
303
|
# 2>&1 redirects STDERR to STDOUT since backticks only captures STDOUT
|
303
|
-
cmd += "#{root}/#{dj_path} #{
|
304
|
+
cmd += "#{root}/#{dj_path} #{subcmd} #{params} 2>&1"
|
304
305
|
cmd
|
305
306
|
end
|
306
307
|
|
307
|
-
endpoint :bg_status do |
|
308
|
+
endpoint :bg_status do |_|
|
308
309
|
cmd = bg_command('status')
|
309
310
|
res = `#{cmd}`
|
310
311
|
client.show_detail res.html_safe.gsub("\n", '<br/>'), 'Delayed Job Status'
|
311
312
|
end
|
312
313
|
|
313
|
-
endpoint :bg_stop do |
|
314
|
+
endpoint :bg_stop do |_|
|
314
315
|
cmd = bg_command('stop')
|
315
316
|
res = `#{cmd}`
|
316
317
|
res = 'delayed_job: no instances running. Nothing to stop.' if res.empty?
|
317
318
|
client.show_detail res.html_safe.gsub("\n", '<br/>'), 'Delayed Job Stop'
|
318
319
|
end
|
319
320
|
|
320
|
-
endpoint :bg_restart do |
|
321
|
-
|
322
|
-
cmd = bg_command("restart #{params}")
|
321
|
+
endpoint :bg_restart do |_|
|
322
|
+
cmd = bg_command('restart')
|
323
323
|
res = `#{cmd}`
|
324
324
|
client.show_detail res.html_safe.gsub("\n", '<br/>'), 'Delayed Job Restart'
|
325
325
|
end
|
data/lib/marty/version.rb
CHANGED
@@ -558,10 +558,7 @@ describe 'lookups for infinity' do
|
|
558
558
|
to eq 'Marty::DataGrid'
|
559
559
|
g1 = Marty::DataGrid.lookup('infinity', 'G1')
|
560
560
|
|
561
|
-
res = lookup_grid_helper('infinity',
|
562
|
-
'G8',
|
563
|
-
'ltv' => 80,
|
564
|
-
)
|
561
|
+
res = lookup_grid_helper('infinity', 'G8', 'ltv' => 80)
|
565
562
|
expect(res).to eq [g1, 'G8']
|
566
563
|
end
|
567
564
|
|
@@ -578,44 +575,31 @@ describe 'lookups for infinity' do
|
|
578
575
|
g1_res = lookup_grid_helper('infinity', 'G1', h)
|
579
576
|
expect(g1_res).to eq [11, 'G1']
|
580
577
|
|
581
|
-
res = lookup_grid_helper('infinity',
|
582
|
-
|
583
|
-
h, true
|
584
|
-
)
|
578
|
+
res = lookup_grid_helper('infinity', 'G8', h, true)
|
579
|
+
|
585
580
|
expect(g1_res).to eq res
|
586
581
|
end
|
587
582
|
|
588
583
|
it 'should handle DataGrid typed data grids' do
|
589
584
|
g1 = Marty::DataGrid.find_by(obsoleted_dt: 'infinity', name: 'G1')
|
590
585
|
|
591
|
-
res = lookup_grid_helper('infinity',
|
592
|
-
'Ga',
|
593
|
-
'dg' => g1,
|
594
|
-
)
|
586
|
+
res = lookup_grid_helper('infinity', 'Ga', 'dg' => g1)
|
595
587
|
expect(res).to eq [7, 'Ga']
|
596
588
|
|
597
589
|
# should be able to lookup bu name as well
|
598
|
-
res = lookup_grid_helper('infinity',
|
599
|
-
|
600
|
-
'dg' => 'G2',
|
601
|
-
)
|
590
|
+
res = lookup_grid_helper('infinity', 'Ga', 'dg' => 'G2')
|
591
|
+
|
602
592
|
expect(res).to eq [7, 'Ga']
|
603
593
|
end
|
604
594
|
|
605
595
|
it 'should handle DataGrid typed data grids -- non mcfly' do
|
606
596
|
ca = Gemini::State.find_by_name('CA')
|
607
597
|
|
608
|
-
res = lookup_grid_helper('infinity',
|
609
|
-
'Gb',
|
610
|
-
'property_state' => ca,
|
611
|
-
)
|
598
|
+
res = lookup_grid_helper('infinity', 'Gb', 'property_state' => ca)
|
612
599
|
expect(res).to eq [70, 'Gb']
|
613
600
|
|
614
601
|
# should be able to lookup bu name as well
|
615
|
-
res = lookup_grid_helper('infinity',
|
616
|
-
'Gb',
|
617
|
-
'property_state' => 'CA',
|
618
|
-
)
|
602
|
+
res = lookup_grid_helper('infinity', 'Gb', 'property_state' => 'CA')
|
619
603
|
expect(res).to eq [70, 'Gb']
|
620
604
|
end
|
621
605
|
|
@@ -748,18 +732,16 @@ describe 'updates' do
|
|
748
732
|
|
749
733
|
dgch = dgc.attributes.
|
750
734
|
slice('id', 'group_id', 'created_dt', 'metadata', 'data_type')
|
751
|
-
res = Marty::DataGrid.lookup_grid_distinct_entry_h(
|
752
|
-
|
735
|
+
res = Marty::DataGrid.lookup_grid_distinct_entry_h(
|
736
|
+
'2/2/2014', { 'property_state' => 'CA' }, dgch)
|
753
737
|
expect(res['result']).to eq(70)
|
754
738
|
|
755
|
-
res = Marty::DataGrid.lookup_grid_distinct_entry_h(
|
756
|
-
|
757
|
-
|
739
|
+
res = Marty::DataGrid.lookup_grid_distinct_entry_h(
|
740
|
+
'2/2/2015', { 'property_state' => 'CA' }, dgch)
|
758
741
|
expect(res['result']).to eq(333)
|
759
742
|
|
760
|
-
res = Marty::DataGrid.lookup_grid_distinct_entry_h(
|
761
|
-
|
762
|
-
|
743
|
+
res = Marty::DataGrid.lookup_grid_distinct_entry_h(
|
744
|
+
'2/2/2016', { 'property_state' => 'CA' }, dgch)
|
763
745
|
expect(res['result']).to eq(444)
|
764
746
|
end
|
765
747
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arman Bostani
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2019-02-
|
17
|
+
date: 2019-02-21 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: pg
|
@@ -483,6 +483,7 @@ files:
|
|
483
483
|
- spec/dummy/app/models/gemini/xyz_rule.rb
|
484
484
|
- spec/dummy/app/models/gemini/xyz_rule_type.rb
|
485
485
|
- spec/dummy/app/views/layouts/application.html.erb
|
486
|
+
- spec/dummy/bin/delayed_job
|
486
487
|
- spec/dummy/config.ru
|
487
488
|
- spec/dummy/config/application.rb
|
488
489
|
- spec/dummy/config/boot.rb
|