Skip to content

Commit f86127c

Browse files
authored
Merge pull request #519 from matestack/next_release
1.4 Release
2 parents 829eb2f + a1d7005 commit f86127c

39 files changed

+836
-177
lines changed

.dockerignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
node_modules/
2+
spec/dummy/db/*.sqlite3
3+
spec/dummy/db/*.sqlite3-journal
4+
spec/dummy/log/*.log
5+
spec/dummy/node_modules/
6+
spec/dummy/public/packs/
7+
spec/dummy/public/packs-test/
8+
spec/dummy/yarn-error.log
9+
spec/dummy/storage/
10+
spec/dummy/tmp/
11+
builder/db/*.sqlite3
12+
builder/db/*.sqlite3-journal
13+
builder/log/*.log
14+
builder/node_modules/
15+
builder/yarn-error.log
16+
builder/storage/
17+
builder/tmp/
18+
builder/public/packs
19+
.idea/
20+
.vscode
21+
.byebug_history
22+
23+
/coverage

.github/workflows/dockerpush.yml

+51-5
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,59 @@ name: specs
33
on: [push]
44

55
jobs:
6-
test:
6+
test_6_1_ruby_3_0:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Run tests
11+
run: |
12+
docker-compose -f ./ci/docker-compose.ci.yml run --rm test_6_1_ruby_3_0
13+
- name: Upload lock files
14+
uses: actions/upload-artifact@v2
15+
with:
16+
name: lockfiles_test_6_1_ruby_3_0
17+
path: |
18+
./ci/artifacts/yarn.lock
19+
./ci/artifacts/Gemfile.lock
20+
test_6_1_ruby_2_7:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Run tests
25+
run: |
26+
docker-compose -f ./ci/docker-compose.ci.yml run --rm test_6_1_ruby_2_7
27+
- name: Upload lock files
28+
uses: actions/upload-artifact@v2
29+
with:
30+
name: lockfiles_test_6_1_ruby_2_7
31+
path: |
32+
./ci/artifacts/yarn.lock
33+
./ci/artifacts/Gemfile.lock
34+
test_6_0_ruby_2_6:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v2
38+
- name: Run tests
39+
run: |
40+
docker-compose -f ./ci/docker-compose.ci.yml run --rm test_6_0_ruby_2_6
41+
- name: Upload lock files
42+
uses: actions/upload-artifact@v2
43+
with:
44+
name: lockfiles_test_6_0_ruby_2_6
45+
path: |
46+
./ci/artifacts/yarn.lock
47+
./ci/artifacts/Gemfile.lock
48+
test_5_2_ruby_2_6:
749
runs-on: ubuntu-latest
8-
950
steps:
1051
- uses: actions/checkout@v2
11-
1252
- name: Run tests
1353
run: |
14-
docker-compose run --rm test bundle exec rake db:schema:load
15-
docker-compose run --rm test bundle exec rspec spec/test
54+
docker-compose -f ./ci/docker-compose.ci.yml run --rm test_5_2_ruby_2_6
55+
- name: Upload lock files
56+
uses: actions/upload-artifact@v2
57+
with:
58+
name: lockfiles_test_5_2_ruby_2_6
59+
path: |
60+
./ci/artifacts/yarn.lock
61+
./ci/artifacts/Gemfile.lock

CHANGELOG.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Changelog
22

3+
## v1.4.0 Release - 2021-02-05
4+
5+
### Improvements
6+
7+
- Ruby 3 support
8+
- Vue update to 2.6.12
9+
- Vuex update to 3.6.2
10+
- Gemspec update clarifying that Rails below 5.2 is not supported (EOL versions anyway!)
11+
- CI test runs against multiple Rails/Ruby version combination
12+
13+
### Bugfixes
14+
15+
- Webpacker 6 support #500
16+
17+
### Security bumps
18+
19+
- Various version bumps triggered through dependabot
20+
321
## v1.3.2 Release - 2021-01-11
422

523
### Bugfixes

Dockerfile.test

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:2.7.2-alpine3.12
1+
FROM ruby:3.0-alpine3.12
22

33
RUN gem install bundler:2.1.4
44

Gemfile.lock

+66-64
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
11
PATH
22
remote: .
33
specs:
4-
matestack-ui-core (1.0.1)
5-
cells-haml
6-
cells-rails
7-
haml
8-
rails (>= 5.0)
9-
trailblazer-cells
4+
matestack-ui-core (1.3.2)
5+
cells-haml (>= 0.0.10)
6+
cells-rails (>= 0.1.0)
7+
haml (>= 4.1.0.beta.1)
8+
rails (>= 5.2)
9+
trailblazer-cells (>= 0.0.3)
1010

1111
GEM
1212
remote: https://rubygems.org/
1313
specs:
14-
actioncable (6.0.3.3)
15-
actionpack (= 6.0.3.3)
14+
actioncable (6.0.3.2)
15+
actionpack (= 6.0.3.2)
1616
nio4r (~> 2.0)
1717
websocket-driver (>= 0.6.1)
18-
actionmailbox (6.0.3.3)
19-
actionpack (= 6.0.3.3)
20-
activejob (= 6.0.3.3)
21-
activerecord (= 6.0.3.3)
22-
activestorage (= 6.0.3.3)
23-
activesupport (= 6.0.3.3)
18+
actionmailbox (6.0.3.2)
19+
actionpack (= 6.0.3.2)
20+
activejob (= 6.0.3.2)
21+
activerecord (= 6.0.3.2)
22+
activestorage (= 6.0.3.2)
23+
activesupport (= 6.0.3.2)
2424
mail (>= 2.7.1)
25-
actionmailer (6.0.3.3)
26-
actionpack (= 6.0.3.3)
27-
actionview (= 6.0.3.3)
28-
activejob (= 6.0.3.3)
25+
actionmailer (6.0.3.2)
26+
actionpack (= 6.0.3.2)
27+
actionview (= 6.0.3.2)
28+
activejob (= 6.0.3.2)
2929
mail (~> 2.5, >= 2.5.4)
3030
rails-dom-testing (~> 2.0)
31-
actionpack (6.0.3.3)
32-
actionview (= 6.0.3.3)
33-
activesupport (= 6.0.3.3)
31+
actionpack (6.0.3.2)
32+
actionview (= 6.0.3.2)
33+
activesupport (= 6.0.3.2)
3434
rack (~> 2.0, >= 2.0.8)
3535
rack-test (>= 0.6.3)
3636
rails-dom-testing (~> 2.0)
3737
rails-html-sanitizer (~> 1.0, >= 1.2.0)
38-
actiontext (6.0.3.3)
39-
actionpack (= 6.0.3.3)
40-
activerecord (= 6.0.3.3)
41-
activestorage (= 6.0.3.3)
42-
activesupport (= 6.0.3.3)
38+
actiontext (6.0.3.2)
39+
actionpack (= 6.0.3.2)
40+
activerecord (= 6.0.3.2)
41+
activestorage (= 6.0.3.2)
42+
activesupport (= 6.0.3.2)
4343
nokogiri (>= 1.8.5)
44-
actionview (6.0.3.3)
45-
activesupport (= 6.0.3.3)
44+
actionview (6.0.3.2)
45+
activesupport (= 6.0.3.2)
4646
builder (~> 3.1)
4747
erubi (~> 1.4)
4848
rails-dom-testing (~> 2.0)
4949
rails-html-sanitizer (~> 1.1, >= 1.2.0)
50-
activejob (6.0.3.3)
51-
activesupport (= 6.0.3.3)
50+
activejob (6.0.3.2)
51+
activesupport (= 6.0.3.2)
5252
globalid (>= 0.3.6)
53-
activemodel (6.0.3.3)
54-
activesupport (= 6.0.3.3)
55-
activerecord (6.0.3.3)
56-
activemodel (= 6.0.3.3)
57-
activesupport (= 6.0.3.3)
58-
activestorage (6.0.3.3)
59-
actionpack (= 6.0.3.3)
60-
activejob (= 6.0.3.3)
61-
activerecord (= 6.0.3.3)
53+
activemodel (6.0.3.2)
54+
activesupport (= 6.0.3.2)
55+
activerecord (6.0.3.2)
56+
activemodel (= 6.0.3.2)
57+
activesupport (= 6.0.3.2)
58+
activestorage (6.0.3.2)
59+
actionpack (= 6.0.3.2)
60+
activejob (= 6.0.3.2)
61+
activerecord (= 6.0.3.2)
6262
marcel (~> 0.3.1)
63-
activesupport (6.0.3.3)
63+
activesupport (6.0.3.2)
6464
concurrent-ruby (~> 1.0, >= 1.0.2)
6565
i18n (>= 0.7, < 2)
6666
minitest (~> 5.1)
@@ -91,7 +91,7 @@ GEM
9191
cells (>= 4.1.6, < 5.0.0)
9292
childprocess (3.0.0)
9393
coderay (1.1.2)
94-
concurrent-ruby (1.1.7)
94+
concurrent-ruby (1.1.6)
9595
crack (0.4.3)
9696
safe_yaml (~> 1.0.0)
9797
crass (1.0.6)
@@ -110,9 +110,9 @@ GEM
110110
temple (>= 0.8.0)
111111
tilt
112112
hashdiff (1.0.0)
113-
i18n (1.8.5)
113+
i18n (1.8.3)
114114
concurrent-ruby (~> 1.0)
115-
loofah (2.7.0)
115+
loofah (2.6.0)
116116
crass (~> 1.0.2)
117117
nokogiri (>= 1.5.9)
118118
mail (2.7.1)
@@ -122,11 +122,12 @@ GEM
122122
method_source (0.9.2)
123123
mimemagic (0.3.5)
124124
mini_mime (1.0.2)
125-
mini_portile2 (2.4.0)
125+
mini_portile2 (2.5.0)
126126
minitest (5.14.2)
127127
nio4r (2.5.3)
128-
nokogiri (1.10.10)
129-
mini_portile2 (~> 2.4.0)
128+
nokogiri (1.11.1)
129+
mini_portile2 (~> 2.5.0)
130+
racc (~> 1.4)
130131
pg (1.2.3)
131132
pry (0.12.2)
132133
coderay (~> 1.1.0)
@@ -139,34 +140,35 @@ GEM
139140
public_suffix (4.0.3)
140141
puma (4.3.5)
141142
nio4r (~> 2.0)
143+
racc (1.5.2)
142144
rack (2.2.3)
143145
rack-proxy (0.6.5)
144146
rack
145147
rack-test (1.1.0)
146148
rack (>= 1.0, < 3)
147-
rails (6.0.3.3)
148-
actioncable (= 6.0.3.3)
149-
actionmailbox (= 6.0.3.3)
150-
actionmailer (= 6.0.3.3)
151-
actionpack (= 6.0.3.3)
152-
actiontext (= 6.0.3.3)
153-
actionview (= 6.0.3.3)
154-
activejob (= 6.0.3.3)
155-
activemodel (= 6.0.3.3)
156-
activerecord (= 6.0.3.3)
157-
activestorage (= 6.0.3.3)
158-
activesupport (= 6.0.3.3)
149+
rails (6.0.3.2)
150+
actioncable (= 6.0.3.2)
151+
actionmailbox (= 6.0.3.2)
152+
actionmailer (= 6.0.3.2)
153+
actionpack (= 6.0.3.2)
154+
actiontext (= 6.0.3.2)
155+
actionview (= 6.0.3.2)
156+
activejob (= 6.0.3.2)
157+
activemodel (= 6.0.3.2)
158+
activerecord (= 6.0.3.2)
159+
activestorage (= 6.0.3.2)
160+
activesupport (= 6.0.3.2)
159161
bundler (>= 1.3.0)
160-
railties (= 6.0.3.3)
162+
railties (= 6.0.3.2)
161163
sprockets-rails (>= 2.0.0)
162164
rails-dom-testing (2.0.3)
163165
activesupport (>= 4.2.0)
164166
nokogiri (>= 1.6)
165167
rails-html-sanitizer (1.3.0)
166168
loofah (~> 2.3)
167-
railties (6.0.3.3)
168-
actionpack (= 6.0.3.3)
169-
activesupport (= 6.0.3.3)
169+
railties (6.0.3.2)
170+
actionpack (= 6.0.3.2)
171+
activesupport (= 6.0.3.2)
170172
method_source
171173
rake (>= 0.8.7)
172174
thor (>= 0.20.3, < 2.0)
@@ -209,7 +211,7 @@ GEM
209211
sprockets (4.0.2)
210212
concurrent-ruby (~> 1.0)
211213
rack (> 1, < 3)
212-
sprockets-rails (3.2.1)
214+
sprockets-rails (3.2.2)
213215
actionpack (>= 4.0)
214216
activesupport (>= 4.0)
215217
sprockets (>= 3.0.0)
@@ -238,7 +240,7 @@ GEM
238240
websocket-extensions (0.1.5)
239241
xpath (3.2.0)
240242
nokogiri (~> 1.8)
241-
zeitwerk (2.4.0)
243+
zeitwerk (2.3.1)
242244

243245
PLATFORMS
244246
ruby

README.md

+22
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Reactivity included if desired.
1515

1616
You end up writing 50% less code while increasing productivity, maintainability and developer happiness. Work with pure Ruby. If necessary, extend with pure JavaScript. No Opal involved.
1717

18+
[<img src="https://img.youtube.com/vi/Mue5gs6Wtq4/0.jpg" width="350">](https://www.youtube.com/watch?v=Mue5gs6Wtq4)
19+
1820
The main goals are:
1921

2022
- More maintainable UI code, using a component-based structure written in Ruby
@@ -25,6 +27,26 @@ The main goals are:
2527
it alongside your classic views and incrementally turn your Rails-App into a
2628
dynamic Web-App.
2729

30+
## Compatibility
31+
32+
### Ruby/Rails
33+
34+
`matestack-ui-core` is tested against:
35+
36+
- Rails 6.1.1 + Ruby 3.0.0
37+
- Rails 6.1.1 + Ruby 2.7.2
38+
- Rails 6.0.3.4 + Ruby 2.6.6
39+
- Rails 5.2.4.4 + Ruby 2.6.6
40+
41+
Rails versions below 5.2 are not supported.
42+
43+
### Vue.js
44+
45+
`matestack-ui-core` currently uses Vue.js 2.6.12 and Vuex 3.6.2 for its reactivity features.
46+
Custom reactive components are bound to these versions as well.
47+
48+
Vue 3 / Vuex 4 update is planned for Q2 2021.
49+
2850
## Documentation/Installation
2951

3052
Documentation can be found [here](https://docs.matestack.io)

app/concepts/matestack/ui/core/collection/helper.rb

+7-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,13 @@ def get_collection_order collection_id, key=nil
9191
end
9292
end
9393

94-
def set_collection id: nil, init_offset: 0, init_limit: nil, base_count: nil, filtered_count: nil, data: nil
94+
# since ruby 3 changed hash <-> keyword argument transformation, we need to
95+
# adjust this method call in order to stay compatible with ruby 2.x and ruby 3.x
96+
def set_collection options_hash
97+
_set_collection **options_hash
98+
end
99+
100+
def _set_collection id: nil, init_offset: 0, init_limit: nil, base_count: nil, filtered_count: nil, data: nil
95101
@collections = {} if @collections.nil?
96102

97103
collection_config = CollectionConfig.new(

app/concepts/matestack/ui/core/view/view.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require_dependency "cell/partial"
1+
require "cell/partial"
22

33
module Matestack::Ui::Core::View
44
class View < Matestack::Ui::Core::Component::Static
@@ -15,7 +15,7 @@ def include_partial
1515
controller.render_to_string view_path, layout: false, locals: locals
1616
elsif partial_path
1717
controller.render_to_string partial: partial_path, layout: false, locals: locals
18-
else
18+
else
1919
raise 'view or partial param missing for RailsView Component'
2020
end
2121
end

0 commit comments

Comments
 (0)