Skip to content

Commit

Permalink
Merge pull request #175 from jrgriffiniii/issues-173-jrgriffiniii-bixby
Browse files Browse the repository at this point in the history
Introduces the bixby Gem as a dependency
  • Loading branch information
Tom Johnson authored Jul 29, 2019
2 parents 73cc9d5 + d3f8835 commit e260be4
Show file tree
Hide file tree
Showing 17 changed files with 227 additions and 128 deletions.
72 changes: 65 additions & 7 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
inherit_gem:
bixby: bixby_default.yml
inherit_from: .rubocop_todo.yml

AllCops:
Expand All @@ -10,17 +12,75 @@ AllCops:
- 'script/**/*'
- 'spec/test_app_templates/**/*'

Metrics/LineLength:
Max: 400
Bundler/DuplicatedGem:
Exclude:
- 'Gemfile'

Layout/IndentationConsistency:
EnforcedStyle: rails

Metrics/AbcSize:
Max: 50

Metrics/BlockLength:
Exclude:
- 'hydra-editor.gemspec'
- 'spec/views/records/_form.html.erb_spec.rb'
- 'spec/helpers/records_helper_spec.rb'
- 'spec/inputs/multi_value_input_spec.rb'
- 'spec/controllers/records_controller_spec.rb'
- 'spec/routing/records_routing_spec.rb'
- 'spec/presenters/hydra_editor_presenter_spec.rb'
- 'spec/forms/hydra_editor_form_permissions_spec.rb'
- 'spec/forms/hydra_editor_form_spec.rb'
- 'spec/features/record_editing_spec.rb'

Metrics/LineLength:
Max: 400

Metrics/MethodLength:
Max: 30

Style/IndentationConsistency:
EnforcedStyle: rails
Naming/FileName:
Exclude:
- 'lib/tasks/hydra-editor_tasks.rake'
- 'lib/hydra-editor.rb'
- 'hydra-editor.gemspec'
- 'Gemfile'
- 'spec/hydra-editor_spec.rb'

Rails:
Enabled: true

RSpec/AnyInstance:
Exclude:
- 'spec/features/record_editing_spec.rb'
- 'spec/features/create_record_spec.rb'

RSpec/DescribeClass:
Exclude:
- 'spec/views/records/edit_fields/_default.html.erb_spec.rb'
- 'spec/views/records/_form.html.erb_spec.rb'
- 'spec/routing/records_routing_spec.rb'
- 'spec/javascripts/jasmine_spec.rb'
- 'spec/features/record_editing_spec.rb'

RSpec/ExampleLength:
Exclude:
- 'spec/helpers/records_helper_spec.rb'
- 'spec/javascripts/jasmine_spec.rb'
- 'spec/features/record_editing_spec.rb'
- 'spec/features/create_record_spec.rb'

RSpec/InstanceVariable:
Exclude:
- 'spec/controllers/records_controller_spec.rb'

RSpec/VerifiedDoubles:
Exclude:
- 'spec/inputs/multi_value_input_spec.rb'
- 'spec/helpers/records_helper_spec.rb'
- 'spec/forms/hydra_editor_form_spec.rb'

Style/CollectionMethods:
PreferredMethods:
Expand All @@ -30,11 +90,9 @@ Style/CollectionMethods:
detect: 'find'
find_all: 'select'


Style/RegexpLiteral:
Enabled: false

Style/SingleLineBlockParams:
Enabled: false

Rails:
Enabled: true
20 changes: 10 additions & 10 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ Metrics/MethodLength:
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: outdent, indent
Style/AccessModifierIndentation:
Layout/AccessModifierIndentation:
Enabled: false

# Offense count: 1
Style/AccessorMethodName:
Naming/AccessorMethodName:
Exclude:
- 'app/controllers/concerns/records_controller_behavior.rb'

Expand All @@ -65,7 +65,7 @@ Style/BlockDelimiters:

# Offense count: 1
# Cop supports --auto-correct.
Style/BlockEndNewline:
Layout/BlockEndNewline:
Exclude:
- 'spec/forms/hydra_editor_form_permissions_spec.rb'

Expand Down Expand Up @@ -98,7 +98,7 @@ Style/Documentation:
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: leading, trailing
Style/DotPosition:
Layout/DotPosition:
Enabled: false

# Offense count: 1
Expand All @@ -109,34 +109,34 @@ Style/EachWithObject:
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AllowAdjacentOneLineDefs.
Style/EmptyLineBetweenDefs:
Layout/EmptyLineBetweenDefs:
Exclude:
- 'app/controllers/concerns/records_controller_behavior.rb'

# Offense count: 1
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts.
Style/FileName:
Naming/FileName:
Exclude:
- 'lib/hydra-editor.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
Style/IndentArray:
Layout/IndentArray:
Enabled: false

# Offense count: 1
# Cop supports --auto-correct.
Style/MultilineBlockLayout:
Layout/MultilineBlockLayout:
Exclude:
- 'spec/forms/hydra_editor_form_permissions_spec.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: aligned, indented
Style/MultilineMethodCallIndentation:
Layout/MultilineMethodCallIndentation:
Enabled: false

# Offense count: 1
Expand All @@ -150,7 +150,7 @@ Style/MutableConstant:
# NamePrefix: is_, has_, have_
# NamePrefixBlacklist: is_, has_, have_
# NameWhitelist: is_a?
Style/PredicateName:
Naming/PredicateName:
Exclude:
- 'app/controllers/concerns/records_controller_behavior.rb'
- 'lib/hydra_editor/controller_resource.rb'
Expand Down
4 changes: 1 addition & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,4 @@ else
end
# END ENGINE_CART BLOCK

if !ENV['RAILS_VERSION'] || ENV['RAILS_VERSION'] =~ /^5.0/
gem 'rails-controller-testing'
end
gem 'rails-controller-testing' if !ENV['RAILS_VERSION'] || ENV['RAILS_VERSION'] =~ /^5.0/
4 changes: 1 addition & 3 deletions app/presenters/hydra/presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ def to_model

module ClassMethods
def model_name
if model_class.nil?
raise "You must set `self.model_class = ' after including Hydra::Presenter on #{self}."
end
raise "You must set `self.model_class = ' after including Hydra::Presenter on #{self}." if model_class.nil?
model_class.model_name
end
end
Expand Down
1 change: 1 addition & 0 deletions hydra-editor.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Gem::Specification.new do |s|
s.add_dependency 'sprockets-es6'
s.add_dependency 'thor', '~> 0.19'

s.add_development_dependency "bixby"
s.add_development_dependency "capybara", '~> 2.4'
s.add_development_dependency "devise", '~> 4.0'
s.add_development_dependency "engine_cart", '~> 2.2'
Expand Down
4 changes: 2 additions & 2 deletions lib/hydra_editor/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ class Engine < ::Rails::Engine
require 'sprockets/es6'
require 'almond-rails'
engine_name 'hydra_editor'
config.eager_load_paths += %W(
config.eager_load_paths += %W[
#{config.root}/app/helpers/concerns
#{config.root}/app/presenters
)
]
initializer 'hydra-editor.initialize' do
require 'cancan'
Sprockets::ES6.configuration = { 'modules' => 'amd', 'moduleIds' => true }
Expand Down
Loading

0 comments on commit e260be4

Please sign in to comment.