Skip to content

Commit 2e436e3

Browse files
committed
cleanup dummy app
1 parent 7274c60 commit 2e436e3

Some content is hidden

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

55 files changed

+178
-586
lines changed

spec/dummy/app/controllers/api_controller.rb

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

spec/dummy/app/controllers/components_tests_controller.rb

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

spec/dummy/app/controllers/components_tests_with_app_controller.rb

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,14 @@
11
class DemoController < ActionController::Base
22
include Matestack::Ui::Core::Helper
3+
34
matestack_app Demo::App
45

56
def first
6-
render Demo::FirstPage, user: 'Nils'
7+
render Demo::Pages::FirstPage
78
end
89

910
def second
10-
render Demo::SecondPage
11-
end
12-
13-
def collection
14-
render Demo::Pages::Collection
15-
end
16-
17-
def action
18-
if params[:test][:foo]
19-
render json: {}, status: :ok
20-
else
21-
render json: { errors: { foo: ['missing'] } }, status: :unprocessable_entity
22-
end
23-
ActionCable.server.broadcast('matestack_ui_core', {
24-
event: 'replace',
25-
data: Demo::Components::Time.()
26-
})
27-
end
28-
29-
def speed
30-
render Demo::Index
31-
end
32-
33-
def index
34-
# view_context.javascript_pack_tag 'application'
35-
render 'rails/index', layout: 'application'
11+
render Demo::Pages::SecondPage
3612
end
3713

3814
end

spec/dummy/app/controllers/form_tests_controller.rb

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

spec/dummy/app/controllers/legacy_views/0_USED_IN_SPECS_DONT_TOUCH

Whitespace-only changes.

spec/dummy/app/controllers/legacy_views/pages_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# used in specs
2+
13
class LegacyViews::PagesController < ApplicationController
24
include Matestack::Ui::Core::Helper
35
include Matestack::Ui::VueJs::Components::Collection::Helper

spec/dummy/app/matestack/app.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# used within specs only
1+
# used in specs only, look for the demo app here: ./demo/app.rb
2+
23
class App < Matestack::Ui::App
34

45
def response

spec/dummy/app/matestack/application_component.rb

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

spec/dummy/app/matestack/application_page.rb

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

spec/dummy/app/matestack/components/card.rb

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

spec/dummy/app/matestack/components/demo/component.js

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

spec/dummy/app/matestack/components/demo/component.rb

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

spec/dummy/app/matestack/components/fancy/card.haml

Lines changed: 0 additions & 1 deletion
This file was deleted.

spec/dummy/app/matestack/components/fancy/card.rb

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

spec/dummy/app/matestack/components/legacy_views/pages/0_USED_IN_SPECS_DONT_TOUCH

Whitespace-only changes.

spec/dummy/app/matestack/components/legacy_views/pages/action.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# used in specs
2+
13
class Components::LegacyViews::Pages::Action < Matestack::Ui::Component
24
required :time
35

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
# used in specs
2+
13
class Components::LegacyViews::Pages::Async < Matestack::Ui::Component
24

35
def response
46
div id: 'foobar' do
57
paragraph 'Im a custom component'
6-
async rerender_on: 'update_time', id: 'async-legacy-integratable' do
8+
async rerender_on: 'update_time', id: 'async-legacy-integratable' do
79
paragraph I18n.l(DateTime.now)
810
end
911
onclick emit: 'update_time' do
@@ -12,4 +14,4 @@ def response
1214
end
1315
end
1416

15-
end
17+
end

spec/dummy/app/matestack/components/legacy_views/pages/collection.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# used in specs
2+
13
class Components::LegacyViews::Pages::Collection < Matestack::Ui::Component
24

35
requires :collection_config

spec/dummy/app/matestack/components/legacy_views/pages/form.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# used in specs
2+
13
class Components::LegacyViews::Pages::Form < Matestack::Ui::Component
24

35
def response
@@ -30,4 +32,4 @@ def form_config
3032
}
3133
end
3234

33-
end
35+
end

spec/dummy/app/matestack/components/legacy_views/pages/isolated.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# used in specs
2+
13
class Components::LegacyViews::Pages::Isolated < Matestack::Ui::IsolatedComponent
24

35
def response
@@ -15,4 +17,4 @@ def authorized?
1517
true
1618
end
1719

18-
end
20+
end

spec/dummy/app/matestack/components/legacy_views/pages/onclick.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# used in specs
2+
13
class Components::LegacyViews::Pages::Onclick < Matestack::Ui::Component
24

35
def response
@@ -9,4 +11,4 @@ def response
911
end
1012
end
1113

12-
end
14+
end

spec/dummy/app/matestack/components/legacy_views/pages/viewcontext.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# used in specs
2+
13
class Components::LegacyViews::Pages::Viewcontext < Matestack::Ui::Component
24

35
def response

spec/dummy/app/matestack/components/my_form_input.js

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

spec/dummy/app/matestack/components/my_form_input.rb

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

spec/dummy/app/matestack/components/my_form_select.js

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

spec/dummy/app/matestack/components/my_form_select.rb

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

spec/dummy/app/matestack/components/my_list_item.rb

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

spec/dummy/app/matestack/components/registry.rb

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

spec/dummy/app/matestack/demo/app.rb

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
11
class Demo::App < Matestack::Ui::App
22

33
def response
4-
h1 'App'
5-
yield
4+
h1 "Demo App"
5+
6+
paragraph do
7+
plain "play around! --> spec/dummy/app/matestack/demo/app.rb"
8+
end
9+
10+
nav do
11+
transition path: first_page_path do
12+
button "First Page"
13+
end
14+
transition path: second_page_path do
15+
button "Second Page"
16+
end
17+
end
18+
19+
main do
20+
yield
21+
end
622
end
723

824
end

0 commit comments

Comments
 (0)