Skip to content

remove empty lines and reduce LOC #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/concepts/matestack/ui/core/app/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def self.views_dir
return ""
end


def initialize(model=nil, options={})
super
@nodes = {}
Expand Down
1 change: 0 additions & 1 deletion app/concepts/matestack/ui/core/app/store.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Vue from 'vue/dist/vue.esm'
import Vuex from 'vuex'
import axios from 'axios'

import matestackEventHub from 'js/event-hub'

Vue.use(Vuex)
Expand Down
11 changes: 5 additions & 6 deletions app/concepts/matestack/ui/core/async/async.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
module Matestack::Ui::Core::Async
class Async < Matestack::Ui::Core::Component::Dynamic

def setup
@rerender = true
end

class Async < Matestack::Ui::Core::Component::Dynamic

def setup
@rerender = true
end

end
end
2 changes: 2 additions & 0 deletions app/concepts/matestack/ui/core/blockquote/blockquote.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
module Matestack::Ui::Core::Blockquote
class Blockquote < Matestack::Ui::Core::Component::Static

def setup
@tag_attributes.merge!({
"cite": options[:cite]
})
end

end
end
10 changes: 4 additions & 6 deletions app/concepts/matestack/ui/core/button/button.haml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
- if options[:text].nil?
%button{@tag_attributes}
- if block_given?
= yield
- else
%button{@tag_attributes}
%button{@tag_attributes}
- if options[:text].nil? && block_given?
= yield
- else
= options[:text]
5 changes: 2 additions & 3 deletions app/concepts/matestack/ui/core/caption/caption.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
%caption{@tag_attributes}
- if options[:text].nil?
- if block_given?
= yield
- if options[:text].nil? && block_given?
= yield
- else
= options[:text]
1 change: 0 additions & 1 deletion app/concepts/matestack/ui/core/component/component.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Vue from 'vue/dist/vue.esm'
import axios from 'axios'
import VRuntimeTemplate from "v-runtime-template"

import matestackEventHub from 'js/event-hub'

const componentMixin = {
Expand Down
4 changes: 0 additions & 4 deletions app/concepts/matestack/ui/core/component/dynamic.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module Matestack::Ui::Core::Component
class Dynamic < Trailblazer::Cell


include ActionView::Helpers::ActiveModelHelper
include ActionView::Helpers::ActiveModelInstanceTag
include ActionView::Helpers::AssetTagHelper
Expand All @@ -26,8 +25,6 @@ class Dynamic < Trailblazer::Cell
include ActionView::Helpers::TextHelper
include ActionView::Helpers::TranslationHelper
include ActionView::Helpers::UrlHelper
# include ActionView::Helpers::UrlHelper
# include ActionView::Helpers::TranslationHelper
include ::Cell::Haml
include Matestack::Ui::Core::ApplicationHelper
include Matestack::Ui::Core::ToCell
Expand Down Expand Up @@ -193,7 +190,6 @@ def modifiers
result.join(" ")
end


private

def generate_children_cells
Expand Down
1 change: 1 addition & 0 deletions app/concepts/matestack/ui/core/details/details.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module Matestack::Ui::Core::Details
class Details < Matestack::Ui::Core::Component::Static

end
end
1 change: 0 additions & 1 deletion app/concepts/matestack/ui/core/div/div.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module Matestack::Ui::Core::Div
class Div < Matestack::Ui::Core::Component::Static


end
end
5 changes: 2 additions & 3 deletions app/concepts/matestack/ui/core/icon/icon.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
%i{@tag_attributes}
- if options[:text].blank?
- if block_given?
= yield
- if options[:text].nil? && block_given?
= yield
- else
= options[:text]
10 changes: 4 additions & 6 deletions app/concepts/matestack/ui/core/label/label.haml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
- if options[:text].blank?
%label{@tag_attributes}
- if block_given?
= yield
- else
%label{@tag_attributes}
%label{@tag_attributes}
- if options[:text].nil? && block_given?
= yield
- else
= options[:text]
5 changes: 2 additions & 3 deletions app/concepts/matestack/ui/core/li/li.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
%li{@tag_attributes}
- if options[:text].blank?
- if block_given?
= yield
- if options[:text].nil? && block_given?
= yield
- else
= options[:text]
3 changes: 1 addition & 2 deletions app/concepts/matestack/ui/core/onclick/onclick.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module Matestack::Ui::Core::Onclick
class Onclick < Matestack::Ui::Core::Component::Dynamic


end
end
end
4 changes: 0 additions & 4 deletions app/concepts/matestack/ui/core/page/page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def slot(&block)
Matestack::Ui::Core::PageNode.build(self, nil, &block)
end


def show(component_key=nil, only_page=false)
prepare
response
Expand Down Expand Up @@ -108,7 +107,6 @@ def show(component_key=nil, only_page=false)
end
end


def page_id
@custom_page_id ||= @page_id
end
Expand Down Expand Up @@ -147,7 +145,5 @@ def set_app_class
end
end


end

end
11 changes: 4 additions & 7 deletions app/concepts/matestack/ui/core/paragraph/paragraph.haml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
- if options[:text].nil?
%p{@tag_attributes}
- if block_given?
= yield

- else
%p{@tag_attributes}
%p{@tag_attributes}
- if options[:text].nil? && block_given?
= yield
- else
= options[:text]
11 changes: 4 additions & 7 deletions app/concepts/matestack/ui/core/pg/pg.haml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
- if options[:text].nil?
%p{@tag_attributes}
- if block_given?
= yield

- else
%p{@tag_attributes}
%p{@tag_attributes}
- if options[:text].nil? && block_given?
= yield
- else
= options[:text]
1 change: 0 additions & 1 deletion app/concepts/matestack/ui/core/plain/plain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ def show
end

end

end
5 changes: 2 additions & 3 deletions app/concepts/matestack/ui/core/summary/summary.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
%summary{@tag_attributes}
- if options[:text].blank?
- if block_given?
= yield
- if options[:text].nil? && block_given?
= yield
- else
= options[:text]
1 change: 1 addition & 0 deletions app/concepts/matestack/ui/core/summary/summary.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module Matestack::Ui::Core::Summary
class Summary < Matestack::Ui::Core::Component::Static

end
end
11 changes: 4 additions & 7 deletions app/concepts/matestack/ui/core/td/td.haml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
- if options[:text].nil?
%td{@tag_attributes}
- if block_given?
= yield

- else
%td{@tag_attributes}
%td{@tag_attributes}
- if options[:text].nil? && block_given?
= yield
- else
= options[:text]
11 changes: 4 additions & 7 deletions app/concepts/matestack/ui/core/th/th.haml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
- if options[:text].nil?
%th{@tag_attributes}
- if block_given?
= yield

- else
%th{@tag_attributes}
%th{@tag_attributes}
- if options[:text].nil? && block_given?
= yield
- else
= options[:text]
10 changes: 4 additions & 6 deletions app/concepts/matestack/ui/core/transition/transition.haml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
- if options[:text].nil?
%a{@tag_attributes}
- if block_given?
= yield
- else
%a{@tag_attributes}
%a{@tag_attributes}
- if options[:text].nil? && block_given?
= yield
- else
= options[:text]
4 changes: 1 addition & 3 deletions app/concepts/matestack/ui/core/view/view.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
module Matestack::Ui::Core::View::Cell
class View < Matestack::Ui::Core::Component::Dynamic


end
end
end
2 changes: 1 addition & 1 deletion coverage/.last_run.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"result": {
"covered_percent": 61.28
"covered_percent": 52.24
}
}
Loading