express_admin 1.4.4 → 1.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/app/assets/stylesheets/express_admin/shared/_forms.sass +15 -2
- data/app/components/express_admin/definition_list.rb +8 -5
- data/app/components/express_admin/smart_form.rb +2 -1
- data/app/components/express_admin/smart_table.rb +3 -6
- data/app/views/layouts/express_admin/external.html.et +1 -1
- data/app/views/shared/express_admin/_messages.html.et +1 -1
- data/config/initializers/tinymce-rails.rb +1 -0
- data/config/tinymce.yml +4 -2
- data/lib/express_admin/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/test/components/definition_list_test.rb +71 -0
- data/test/dummy/test/components/definition_table_test.rb +72 -0
- data/test/dummy/test/components/flash_messages_test.rb +35 -0
- data/test/dummy/test/components/icon_link_test.rb +77 -0
- data/test/dummy/test/components/icon_test.rb +31 -0
- data/test/dummy/test/components/mega_menu_test.rb +45 -0
- data/test/dummy/test/components/module_sidebar_test.rb +56 -0
- data/test/dummy/test/components/widget_box_test.rb +30 -0
- data/vendor/gems/express_templates/Gemfile.lock +1 -1
- data/vendor/gems/express_templates/README.md +1 -1
- data/vendor/gems/express_templates/express_templates-0.9.3.gem +0 -0
- data/vendor/gems/express_templates/express_templates-0.9.4.gem +0 -0
- data/vendor/gems/express_templates/lib/core_extensions/proc.rb +13 -1
- data/vendor/gems/express_templates/lib/express_templates/components/capabilities/resourceful.rb +1 -0
- data/vendor/gems/express_templates/lib/express_templates/components/configurable.rb +10 -1
- data/vendor/gems/express_templates/lib/express_templates/components/forms/form_component.rb +2 -0
- data/vendor/gems/express_templates/lib/express_templates/components/tree_for.rb +1 -1
- data/vendor/gems/express_templates/lib/express_templates/template/handler.rb +17 -1
- data/vendor/gems/express_templates/lib/express_templates/version.rb +1 -1
- data/vendor/gems/express_templates/test/components/forms/basic_fields_test.rb +58 -0
- data/vendor/gems/express_templates/test/components/forms/submit_test.rb +4 -0
- data/vendor/gems/express_templates/test/components/tree_for_test.rb +1 -6
- data/vendor/gems/express_templates/test/core_extensions/proc_test.rb +10 -1
- data/vendor/gems/express_templates/test/dummy/log/test.log +4761 -0
- data/vendor/gems/express_templates/test/handler_test.rb +24 -0
- data/vendor/gems/express_templates/test/test_helper.rb +5 -5
- metadata +21 -3
- data/app/assets/stylesheets/express_admin/components/_modals.sass +0 -7
@@ -121,4 +121,28 @@ class HandlerTest < ActiveSupport::TestCase
|
|
121
121
|
assert_equal "<li>\n#{A_LINK}#{A_LINK}</li>\n", render
|
122
122
|
end
|
123
123
|
|
124
|
+
test "raises warning if template has conditional logic" do
|
125
|
+
temp = "dd(class: 'date') {
|
126
|
+
if blog_post.publish_at
|
127
|
+
blog_post.publish_at
|
128
|
+
else
|
129
|
+
link_to('Edit', '#'')
|
130
|
+
end
|
131
|
+
}"
|
132
|
+
keywords = %w(if unless until case for do loop while)
|
133
|
+
tokens = []
|
134
|
+
|
135
|
+
if Ripper.lex(temp).select do |element|
|
136
|
+
element[1]==:on_kw
|
137
|
+
end.each { |match| tokens.push(match) if keywords.include? match[2] }
|
138
|
+
tokens.each do |first|
|
139
|
+
out, @err = capture_io do
|
140
|
+
warn 'foo'
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
assert_equal @err, "foo\n"
|
146
|
+
end
|
147
|
+
|
124
148
|
end
|
@@ -44,16 +44,16 @@ end
|
|
44
44
|
|
45
45
|
module ActiveSupport
|
46
46
|
class TestCase
|
47
|
-
def arbre(&block)
|
48
|
-
Arbre::Context.new assigns, helpers, &block
|
47
|
+
def arbre(additional_assigns = {}, &block)
|
48
|
+
Arbre::Context.new assigns.merge(additional_assigns), helpers, &block
|
49
49
|
end
|
50
50
|
def assigns
|
51
|
-
{}
|
51
|
+
@arbre_assigns ||={}
|
52
52
|
end
|
53
53
|
def helpers
|
54
|
-
mock_action_view
|
54
|
+
mock_action_view
|
55
55
|
end
|
56
|
-
def mock_action_view
|
56
|
+
def mock_action_view
|
57
57
|
controller = ActionView::TestCase::TestController.new
|
58
58
|
ActionView::Base.send :include, ActionView::Helpers
|
59
59
|
ActionView::Base.send :include, ActionView::Helpers::UrlHelper
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: express_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Talcott Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bourbon
|
@@ -313,7 +313,6 @@ files:
|
|
313
313
|
- app/assets/stylesheets/express_admin/components/_empty_state.sass
|
314
314
|
- app/assets/stylesheets/express_admin/components/_h_box.sass
|
315
315
|
- app/assets/stylesheets/express_admin/components/_main_menu.sass
|
316
|
-
- app/assets/stylesheets/express_admin/components/_modals.sass
|
317
316
|
- app/assets/stylesheets/express_admin/components/_module_sidebar.sass
|
318
317
|
- app/assets/stylesheets/express_admin/components/_pane.sass
|
319
318
|
- app/assets/stylesheets/express_admin/components/_sub_menu.sass
|
@@ -378,6 +377,7 @@ files:
|
|
378
377
|
- app/views/shared/express_admin/_title.html.et
|
379
378
|
- config/initializers/gravatar_image_tag.rb
|
380
379
|
- config/initializers/request_store_current_user.rb
|
380
|
+
- config/initializers/tinymce-rails.rb
|
381
381
|
- config/tinymce.yml
|
382
382
|
- lib/core_extensions/string_promptify.rb
|
383
383
|
- lib/express_admin.rb
|
@@ -455,8 +455,16 @@ files:
|
|
455
455
|
- test/dummy/public/422.html
|
456
456
|
- test/dummy/public/500.html
|
457
457
|
- test/dummy/public/favicon.ico
|
458
|
+
- test/dummy/test/components/definition_list_test.rb
|
459
|
+
- test/dummy/test/components/definition_table_test.rb
|
460
|
+
- test/dummy/test/components/flash_messages_test.rb
|
461
|
+
- test/dummy/test/components/icon_link_test.rb
|
462
|
+
- test/dummy/test/components/icon_test.rb
|
463
|
+
- test/dummy/test/components/mega_menu_test.rb
|
464
|
+
- test/dummy/test/components/module_sidebar_test.rb
|
458
465
|
- test/dummy/test/components/smart_form_test.rb
|
459
466
|
- test/dummy/test/components/smart_table_test.rb
|
467
|
+
- test/dummy/test/components/widget_box_test.rb
|
460
468
|
- test/dummy/test/controllers/demo_controller_test.rb
|
461
469
|
- test/dummy/test/fixtures/categories.yml
|
462
470
|
- test/dummy/test/fixtures/tags.yml
|
@@ -503,6 +511,8 @@ files:
|
|
503
511
|
- vendor/gems/express_templates/express_templates-0.9.0.gem
|
504
512
|
- vendor/gems/express_templates/express_templates-0.9.1.gem
|
505
513
|
- vendor/gems/express_templates/express_templates-0.9.2.gem
|
514
|
+
- vendor/gems/express_templates/express_templates-0.9.3.gem
|
515
|
+
- vendor/gems/express_templates/express_templates-0.9.4.gem
|
506
516
|
- vendor/gems/express_templates/express_templates.gemspec
|
507
517
|
- vendor/gems/express_templates/lib/arbre/patches.rb
|
508
518
|
- vendor/gems/express_templates/lib/core_extensions/proc.rb
|
@@ -764,8 +774,16 @@ test_files:
|
|
764
774
|
- test/dummy/public/favicon.ico
|
765
775
|
- test/dummy/Rakefile
|
766
776
|
- test/dummy/README.rdoc
|
777
|
+
- test/dummy/test/components/definition_list_test.rb
|
778
|
+
- test/dummy/test/components/definition_table_test.rb
|
779
|
+
- test/dummy/test/components/flash_messages_test.rb
|
780
|
+
- test/dummy/test/components/icon_link_test.rb
|
781
|
+
- test/dummy/test/components/icon_test.rb
|
782
|
+
- test/dummy/test/components/mega_menu_test.rb
|
783
|
+
- test/dummy/test/components/module_sidebar_test.rb
|
767
784
|
- test/dummy/test/components/smart_form_test.rb
|
768
785
|
- test/dummy/test/components/smart_table_test.rb
|
786
|
+
- test/dummy/test/components/widget_box_test.rb
|
769
787
|
- test/dummy/test/controllers/demo_controller_test.rb
|
770
788
|
- test/dummy/test/fixtures/categories.yml
|
771
789
|
- test/dummy/test/fixtures/tags.yml
|