Skip to content

Commit f42974e

Browse files
authored
Merge pull request #368 from matestack/dockerized_core_dev
Dockerized core dev
2 parents 92a7a30 + 50c2ee7 commit f42974e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+721
-382
lines changed

.circleci/config.yml

Lines changed: 0 additions & 70 deletions
This file was deleted.

.github/workflows/dockerpush.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: specs
2+
3+
on: [push]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- name: Run tests
13+
run: |
14+
docker-compose run --rm test bundle exec rake db:schema:load
15+
docker-compose run --rm test bundle exec rspec spec/usage

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.6.1

Dockerfile.dev

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM ruby:2.6.5-alpine3.9
2+
3+
RUN gem install bundler:2.1.4
4+
5+
RUN apk update --no-cache && \
6+
apk add build-base git nodejs yarn tzdata bash sqlite-dev && \
7+
mkdir -p /app
8+
9+
WORKDIR /app
10+
11+
COPY ./lib/ /app/lib/
12+
COPY matestack-ui-core.gemspec /app/
13+
COPY Gemfile* /app/
14+
RUN bundle install
15+
16+
COPY package.json yarn* /app/
17+
RUN yarn install

Dockerfile.test

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
FROM ruby:2.6.5-alpine3.9
2+
3+
RUN gem install bundler:2.1.4
4+
5+
RUN apk update --no-cache && \
6+
apk add build-base git nodejs yarn tzdata bash sqlite-dev && \
7+
mkdir -p /app
8+
9+
WORKDIR /app
10+
11+
COPY ./lib/ /app/lib/
12+
COPY matestack-ui-core.gemspec /app/
13+
COPY Gemfile* /app/
14+
RUN bundle install
15+
16+
COPY package.json yarn* /app/
17+
RUN yarn install
18+
19+
RUN apk update && apk upgrade \
20+
&& echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \
21+
&& echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \
22+
&& apk add --no-cache \
23+
chromium@edge=72.0.3626.121-r0 \
24+
nss@edge \
25+
&& rm -rf /var/lib/apt/lists/* \
26+
/var/cache/apk/* \
27+
/usr/share/man \
28+
/tmp/*
29+
30+
RUN apk add chromium-chromedriver@edge=72.0.3626.121-r0
31+
32+
ENV CHROME_BIN=/usr/bin/chromium-browser \
33+
CHROME_PATH=/usr/lib/chromium/

Gemfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@ group :development, :test do
2222
gem 'capybara'
2323
gem 'webpacker', '~> 4.0'
2424
gem 'sqlite3', '~> 1.3.13'
25-
gem 'selenium-webdriver'
25+
gem 'selenium-webdriver', '~> 3.142', '>= 3.142.7'
2626
gem 'puma'
2727
gem 'simplecov', require: false, group: :test
2828
gem 'byebug'
2929
gem 'pry-byebug'
3030
gem 'webmock'
31-
gem 'webdrivers', '~> 4.1'
31+
# gem 'webdrivers', '~> 4.1'
3232
end
3333

3434
group :test do
3535
gem "generator_spec"
36+
gem "rspec-retry" # repeating flaky tests
37+
gem "rspec-wait", "~> 0.0.9"
3638
end

Gemfile.lock

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,18 @@ GEM
5454
i18n (>= 0.7, < 2)
5555
minitest (~> 5.1)
5656
tzinfo (~> 1.1)
57-
addressable (2.5.2)
58-
public_suffix (>= 2.0.2, < 4.0)
57+
addressable (2.7.0)
58+
public_suffix (>= 2.0.2, < 5.0)
5959
arel (9.0.0)
6060
builder (3.2.3)
6161
byebug (11.0.0)
62-
capybara (3.10.0)
62+
capybara (3.31.0)
6363
addressable
6464
mini_mime (>= 0.1.3)
6565
nokogiri (~> 1.8)
6666
rack (>= 1.6.0)
6767
rack-test (>= 0.6.3)
68-
regexp_parser (~> 1.2)
68+
regexp_parser (~> 1.5)
6969
xpath (~> 3.2)
7070
cells (4.1.7)
7171
declarative-builder (< 0.2.0)
@@ -78,8 +78,7 @@ GEM
7878
cells-rails (0.0.9)
7979
actionpack (>= 3.0)
8080
cells (>= 4.1.6, < 5.0.0)
81-
childprocess (0.9.0)
82-
ffi (~> 1.0, >= 1.0.11)
81+
childprocess (3.0.0)
8382
coderay (1.1.2)
8483
concurrent-ruby (1.1.5)
8584
crack (0.4.3)
@@ -98,7 +97,6 @@ GEM
9897
uber (< 0.2.0)
9998
docile (1.3.2)
10099
erubi (1.8.0)
101-
ffi (1.9.25)
102100
generator_spec (0.9.4)
103101
activesupport (>= 3.0.0)
104102
railties (>= 3.0.0)
@@ -119,11 +117,11 @@ GEM
119117
mimemagic (~> 0.3.2)
120118
method_source (0.9.2)
121119
mimemagic (0.3.3)
122-
mini_mime (1.0.1)
120+
mini_mime (1.0.2)
123121
mini_portile2 (2.4.0)
124122
minitest (5.11.3)
125123
nio4r (2.5.2)
126-
nokogiri (1.10.5)
124+
nokogiri (1.10.7)
127125
mini_portile2 (~> 2.4.0)
128126
pipetree (0.1.1)
129127
pry (0.12.2)
@@ -132,10 +130,10 @@ GEM
132130
pry-byebug (3.8.0)
133131
byebug (~> 11.0)
134132
pry (~> 0.10)
135-
public_suffix (3.0.3)
133+
public_suffix (4.0.3)
136134
puma (4.3.1)
137135
nio4r (~> 2.0)
138-
rack (2.0.8)
136+
rack (2.1.2)
139137
rack-proxy (0.6.5)
140138
rack
141139
rack-test (1.1.0)
@@ -171,11 +169,15 @@ GEM
171169
reform-rails (0.1.7)
172170
activemodel (>= 3.2)
173171
reform (>= 2.2.0)
174-
regexp_parser (1.2.0)
172+
regexp_parser (1.6.0)
175173
representable (3.0.4)
176174
declarative (< 0.1.0)
177175
declarative-option (< 0.2.0)
178176
uber (< 0.2.0)
177+
rspec (3.8.0)
178+
rspec-core (~> 3.8.0)
179+
rspec-expectations (~> 3.8.0)
180+
rspec-mocks (~> 3.8.0)
179181
rspec-core (3.8.0)
180182
rspec-support (~> 3.8.0)
181183
rspec-expectations (3.8.2)
@@ -192,12 +194,16 @@ GEM
192194
rspec-expectations (~> 3.8.0)
193195
rspec-mocks (~> 3.8.0)
194196
rspec-support (~> 3.8.0)
197+
rspec-retry (0.6.2)
198+
rspec-core (> 3.3)
195199
rspec-support (3.8.0)
196-
rubyzip (1.3.0)
200+
rspec-wait (0.0.9)
201+
rspec (>= 3, < 4)
202+
rubyzip (2.2.0)
197203
safe_yaml (1.0.5)
198-
selenium-webdriver (3.14.1)
199-
childprocess (~> 0.5)
200-
rubyzip (~> 1.2, >= 1.2.2)
204+
selenium-webdriver (3.142.7)
205+
childprocess (>= 0.5, < 4.0)
206+
rubyzip (>= 1.2.2)
201207
simplecov (0.18.0)
202208
docile (~> 1.1)
203209
simplecov-html (~> 0.11.0)
@@ -232,10 +238,6 @@ GEM
232238
tzinfo (1.2.5)
233239
thread_safe (~> 0.1)
234240
uber (0.1.0)
235-
webdrivers (4.1.2)
236-
nokogiri (~> 1.6)
237-
rubyzip (~> 1.0)
238-
selenium-webdriver (>= 3.0, < 4.0)
239241
webmock (3.5.1)
240242
addressable (>= 2.3.6)
241243
crack (>= 0.3.2)
@@ -263,13 +265,14 @@ DEPENDENCIES
263265
pry-byebug
264266
puma
265267
rspec-rails (~> 3.8)
266-
selenium-webdriver
268+
rspec-retry
269+
rspec-wait (~> 0.0.9)
270+
selenium-webdriver (~> 3.142, >= 3.142.7)
267271
simplecov
268272
sqlite3 (~> 1.3.13)
269273
trailblazer
270274
trailblazer-cells
271275
trailblazer-rails
272-
webdrivers (~> 4.1)
273276
webmock
274277
webpacker (~> 4.0)
275278

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![CircleCI](https://circleci.com/gh/basemate/matestack-ui-core/tree/master.svg?style=shield)](https://circleci.com/gh/basemate/matestack-ui-core/tree/master)
1+
![](https://github.com/matestack/matestack-ui-core/workflows/specs/badge.svg)
22
[![Gitter](https://badges.gitter.im/basemate/community.svg)](https://gitter.im/basemate/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
33
[![Gem Version](https://badge.fury.io/rb/matestack-ui-core.svg)](https://badge.fury.io/rb/matestack-ui-core)
44

app/concepts/matestack/ui/core/app/app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ const componentDef = {
2323
}
2424
}
2525

26+
27+
2628
let component = Vue.component('matestack-ui-core-app', componentDef)
2729

2830
export default componentDef

app/lib/matestack/ui/core/component_node.rb

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ def method_missing meth, *args, &block
3636
@hash[current_node]["argument"] = nil
3737
@hash[current_node]["included_config"] = @included_config
3838

39+
if args.second == :include
40+
included = args.first
41+
else
42+
unless @included_config.nil?
43+
included = @included_config
44+
else
45+
included = nil
46+
end
47+
end
48+
3949
if meth == :isolate
4050
raise("isolate > only works on page level currently. component support is comming soon!")
4151
end
@@ -52,15 +62,15 @@ def method_missing meth, *args, &block
5262
@hash[current_node]["argument"] = args.first
5363
end
5464

55-
if args.second == :include
56-
included = args.first
57-
else
58-
unless @included_config.nil?
59-
included = @included_config
60-
else
61-
included = nil
62-
end
63-
end
65+
# if args.second == :include
66+
# included = args.first
67+
# else
68+
# unless @included_config.nil?
69+
# included = @included_config
70+
# else
71+
# included = nil
72+
# end
73+
# end
6474

6575
if block_given?
6676
@hash[current_node]["components"] = ComponentNode.build(@component_instance, included, &block)

0 commit comments

Comments
 (0)