linting teh hamels

This commit is contained in:
Mark Moser 2015-10-03 08:57:06 -05:00
parent 8cdb204a94
commit c1f872e9a1
9 changed files with 57 additions and 36 deletions

3
.haml-lint.yml Normal file
View File

@ -0,0 +1,3 @@
linters:
LineLength:
max: 95

44
Gemfile
View File

@ -2,41 +2,43 @@ source 'https://rubygems.org'
ruby "2.2.2"
gem 'figaro', '~> 1.1.1'
gem 'rails', '~> 4.2.4'
gem 'thin', '~> 1.6.3'
gem 'responders', '~> 2.1.0'
gem 'mysql2', '~> 0.3.20'
gem 'bcrypt', '~> 3.1.7'
# gem 'rack-protection', '~> 1.5.3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'jquery-rails'
gem 'thin', '~> 1.6.3'
gem 'rails', '~> 4.2.4'
gem 'turbolinks'
gem 'haml-rails', "~> 0.9"
gem 'actionview-encoded_mail_to'
# gem 'rabl-rails', '~> 0.4.1'
# gem 'jbuilder', '~> 2.0'
gem 'actionview-encoded_mail_to'
gem 'haml-rails', "~> 0.9"
gem 'jquery-rails'
gem 'json', '~> 1.8.3'
gem 'mysql2', '~> 0.3.20'
gem 'responders', '~> 2.1.0'
gem 'sass-rails', '~> 5.0'
gem 'twilio-ruby', '~> 4.3.0'
gem 'uglifier', '>= 1.3.0'
# gem 'sorcery'
# gem 'faraday'
# gem 'faraday_middleware'
# gem 'rack-protection', '~> 1.5.3'
# gem 'rabl-rails', '~> 0.4.1'
# gem 'jbuilder', '~> 2.0'
group :development, :test do
gem 'web-console', '~> 2.0'
gem 'spring'
gem 'awesome_print'
gem 'pry-rails'
gem 'pry-byebug'
gem 'binding_of_caller'
gem 'rubocop'
gem 'rack-livereload'
gem 'minitest-reporters'
gem 'guard'
gem 'guard-livereload'
gem 'guard-minitest'
gem 'guard-rubocop'
gem 'guard-scss-lint'
gem 'guard-minitest'
gem 'guard-livereload'
gem 'guard-shell'
gem 'haml_lint'
gem 'minitest-reporters'
gem 'pry-byebug'
gem 'pry-rails'
gem 'rack-livereload'
gem 'rubocop'
gem 'spring'
gem 'web-console', '~> 2.0'
end

View File

@ -96,6 +96,9 @@ GEM
guard-scss-lint (0.0.1alpha)
guard (~> 2.0)
scss-lint (~> 0.30.0)
guard-shell (0.7.1)
guard (>= 2.0.0)
guard-compat (~> 1.0)
haml (4.0.6)
tilt
haml-rails (0.9.0)
@ -104,6 +107,10 @@ GEM
haml (>= 4.0.6, < 5.0)
html2haml (>= 1.0.1)
railties (>= 4.0.1)
haml_lint (0.15.2)
haml (~> 4.0)
rubocop (>= 0.25.0)
sysexits (~> 1.1)
html2haml (2.0.0)
erubis (~> 2.7.0)
haml (~> 4.0.0)
@ -219,6 +226,7 @@ GEM
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sysexits (1.2.0)
thin (1.6.3)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0)
@ -257,7 +265,9 @@ DEPENDENCIES
guard-minitest
guard-rubocop
guard-scss-lint
guard-shell
haml-rails (~> 0.9)
haml_lint
jquery-rails
json (~> 1.8.3)
minitest-reporters

View File

@ -15,12 +15,6 @@
#
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
guard :rubocop do
watch(/.+\.rb$/)
watch(/Rakefile/)
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
end
guard :minitest do
watch(%r{^test/test_helper\.rb$}) { 'test' }
watch(%r{^test/(.*)\/?(.*)_test\.rb$})
@ -42,6 +36,16 @@ guard 'livereload' do
end
end
guard :rubocop do
watch(/.+\.rb$/)
watch(/Rakefile/)
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
end
guard :scsslint do
watch(%r{app/assets/.+\.(scss)})
end
guard :shell do
watch(%r{app/views/.*\.haml}) { |m| `haml-lint --color #{m[0]}` }
end

View File

@ -1,4 +1,4 @@
%h2 Something helpful later
%p= raw( ap @doc )
%p= raw(ap @doc)

View File

@ -1,10 +1,10 @@
- unless flash.empty?
- if flash[:notice].present?
.alertbox.box-blue{'data-id' => 'alertbox', 'data-alert' => 'auto_close'}
.box-close{'data-id'=> 'alert_close'}
.alertbox.box-blue{ 'data-id' => 'alertbox', 'data-alert' => 'auto_close' }
.box-close{ 'data-id' => 'alert_close' }
= flash[:notice]
- if flash[:alert].present?
.alertbox.box-red{'data-id' => 'alertbox'}
.box-close{'data-id'=> 'alert_close'}
.alertbox.box-red{ 'data-id' => 'alertbox' }
.box-close{ 'data-id' => 'alert_close' }
%b= flash[:alert]

View File

@ -1,7 +1,7 @@
!!!
%html
%head
%meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
%meta{ content: "text/html; charset=UTF-8", "http-equiv" => "Content-Type" }/
%title SmsPager
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true

View File

@ -1,6 +1,8 @@
= form_for :page, url: send_page_path do |f|
= f.label :person_id
= f.select :person_id, options_from_collection_for_select(@people, :id, :name, @page.person_id), include_blank: true
:ruby
options = options_from_collection_for_select(@people, :id, :name, @page.person_id)
= f.select :person_id, options, include_blank: true
= f.label :to
= f.phone_field :to

View File

@ -9,7 +9,7 @@
- @parent.children.each do |child|
%li
= child.name
= link_to 'remove', del_parenthood_path(@parent, child), {method: :delete}
= link_to 'remove', del_parenthood_path(@parent, child), method: :delete
%p Add Child:
:ruby