Skip to content

Commit

Permalink
fix(gemspec): include vendor folder and fix model_tree display (#159)
Browse files Browse the repository at this point in the history
* fix(gemspec): include vendor folder

* fix: model_tree display
  • Loading branch information
tian-im committed Dec 11, 2019
1 parent 20b3753 commit 0b87548
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 17 deletions.
30 changes: 19 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
.bundle/
.yardoc/
# folders
/.bundle/
/.yardoc/
/_yardoc/
/coverage/
/doc/
/pkg/
/spec/reports/
doc/
pkg/
spec/dummy/db/*.sqlite3
spec/dummy/db/*.sqlite3-journal
spec/dummy/tmp/
spec/dummy/.sass-cache
.byebug_history
*.log
.DS_Store
cc-test-reporter
tmp/
log/

coverage/
deep_cover/
storage/

# files
cc-test-reporter
.rspec_status
.byebug_history
Gemfile.lock
*.gem
*.sqlite3
*.sqlite3-journal
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ N/A

# History:

## 5.2.0
## 6.0.0

- feat: Rails 6 support ([issue 158](#158))
- chore: extract files to separate gems (wallaby-core/wallaby-active_record/wallaby-her) ([issue 156](#156))
- [Chore] Document update for 5.2 ([issue 155](#155))
- [Feature] Make sure Wallaby still works without specifying resources_name in routes ([issue 154](#154))
- [Feature] Namespace ([issue 153](#153))
- [Chore] Change authorizer's initialize to take away the dependence of context ([issue 152](#152))
Expand Down
2 changes: 1 addition & 1 deletion app/views/wallaby/resources/_navs.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<% if current_engine %>
<ul class="navbar-nav mr-auto">
<li class="nav-item dropdown">
<a id="model_tree" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" class="nav-link dropdown-toggle">
<a id="model_tree" href="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" class="nav-link dropdown-toggle">
Data <span class="caret"></span>
</a>
<%= model_tree model_classes, 'model_tree' %>
Expand Down
2 changes: 1 addition & 1 deletion lib/wallaby/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

module Wallaby
# Semantic version number
VERSION = '6.0.0'
VERSION = '6.0.1'
end
4 changes: 2 additions & 2 deletions spec/helpers/wallaby/base_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ def helper.current_resources_name
context 'when root only' do
it 'returns HTML' do
classes = [Product, Order]
expect(helper.model_tree(model_classes(classes))).to eq '<ul class="dropdown-menu"><li><a class="dropdown-item" title="Order" href="/admin/orders">Order</a></li><li><a class="dropdown-item" title="Order" href="/admin/products">Product</a></li></ul>'
expect(helper.model_tree(model_classes(classes))).to eq '<ul class="dropdown-menu"><li><a class="dropdown-item" title="Order" href="/admin/orders">Order</a></li><li><a class="dropdown-item" title="Product" href="/admin/products">Product</a></li></ul>'
end
end

context 'when tree structure' do
it 'returns HTML' do
classes = [Product, Order, Person, Staff, Customer]
expect(helper.model_tree(model_classes(classes))).to eq '<ul class="dropdown-menu"><li><a class="dropdown-item" title="Order" href="/admin/orders">Order</a></li><li><a class="dropdown-item" title="Order" href="/admin/people">Person</a><ul class="dropdown-menu"><li><a class="dropdown-item" title="Customer" href="/admin/customers">Customer</a></li><li><a class="dropdown-item" title="Customer" href="/admin/staffs">Staff</a></li></ul></li><li><a class="dropdown-item" title="Order" href="/admin/products">Product</a></li></ul>'
expect(helper.model_tree(model_classes(classes))).to eq '<ul class="dropdown-menu"><li><a class="dropdown-item" title="Order" href="/admin/orders">Order</a></li><li><a class="dropdown-item" title="Person" href="/admin/people">Person</a><ul class="dropdown-menu"><li><a class="dropdown-item" title="Customer" href="/admin/customers">Customer</a></li><li><a class="dropdown-item" title="Staff" href="/admin/staffs">Staff</a></li></ul></li><li><a class="dropdown-item" title="Product" href="/admin/products">Product</a></li></ul>'
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion wallaby.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Gem::Specification.new do |s|
s.license = 'MIT'

s.files = Dir[
'{app,config,db,lib}/**/*',
'{app,config,db,lib,vendor}/**/*',
'LICENSE',
'README.rdoc'
]
Expand Down

0 comments on commit 0b87548

Please sign in to comment.