Skip to content

Commit

Permalink
Hush up houndci-bot
Browse files Browse the repository at this point in the history
Add frozen_string_literal magic comment to every .rb file
  • Loading branch information
morygonzalez committed Mar 4, 2018
1 parent 52bdadc commit 406a128
Show file tree
Hide file tree
Showing 159 changed files with 2,037 additions and 1,766 deletions.
5 changes: 5 additions & 0 deletions .haml-lint.yml
@@ -0,0 +1,5 @@
inherit_from: .haml-lint_todo.yml

linters:
LineLength:
enabled: false
10 changes: 10 additions & 0 deletions .haml-lint_todo.yml
@@ -0,0 +1,10 @@
linters:
IdNames:
enabled: false

InlineStyles:
enabled: false

ViewLength:
exclude:
- public/theme/harmaa/layout.haml
8 changes: 8 additions & 0 deletions .hound.yml
@@ -0,0 +1,8 @@
ruby:
config_file: .rubocop.yml

haml:
config_file: .haml-lint.yml

jshint:
enabled: false
80 changes: 80 additions & 0 deletions .rubocop.yml
@@ -0,0 +1,80 @@
inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: 2.2
Exclude:
- 'lokka.gemspec'
- 'db/seeds.rb'

Style/Documentation:
Enabled: false

Naming/MethodName:
Exclude:
- 'lib/lokka/models/**/*'

Style/MethodMissing:
Exclude:
- 'lib/lokka/models/entry.rb'
- 'lib/lokka/models/site.rb'
- 'lib/lokka/models/option.rb'
- 'lib/lokka/helpers/helpers.rb'

Style/StringLiterals:
EnforcedStyle: single_quotes
SupportedStyles:
- single_quotes
- double_quotes

Layout/AlignParameters:
EnforcedStyle: with_fixed_indentation
SupportedStyles:
- with_first_parameter
- with_fixed_indentation

Layout/DotPosition:
EnforcedStyle: trailing

Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented_relative_to_receiver

Layout/MultilineOperationIndentation:
EnforcedStyle: indented

Layout/SpaceInsideBlockBraces:
EnforcedStyleForEmptyBraces: space
SpaceBeforeBlockParameters: false

Lint/AmbiguousBlockAssociation:
Exclude:
- 'spec/**/*'

Lint/UselessAssignment:
Exclude:
- 'lib/lokka/helpers/helpers.rb'
- 'public/theme/Farikal/config.rb'

Metrics/BlockLength:
Exclude:
- 'lokka.gemspec'
- 'spec/**/*'
- 'lib/lokka/before.rb'
- 'lib/lokka/app.rb'
- 'lib/lokka/importer.rb'

Metrics/LineLength:
Exclude:
- 'lokka.gemspec'
- 'Gemfile'
- 'public/**/*'
IgnoredPatterns:
- '%r'
- '%q'
- '%Q'
- '/\/.+\//'

Metrics/PerceivedComplexity:
Exclude:
- 'lib/lokka/before.rb'
- 'lib/lokka/importer.rb'
- 'public/plugin/**/*'
25 changes: 25 additions & 0 deletions .rubocop_todo.yml
@@ -0,0 +1,25 @@
Metrics/AbcSize:
Enabled: false

Metrics/ClassLength:
Exclude:
- 'lib/lokka/app/entries.rb'
- 'lib/lokka/app/admin.rb'
- 'lib/lokka/models/entry.rb'

Metrics/CyclomaticComplexity:
Exclude:
- 'lib/lokka/importer.rb'
- 'lib/lokka/helpers/helpers.rb'
- 'lib/lokka/before.rb'
- 'public/plugin/**/*'

Metrics/LineLength:
Max: 120

Metrics/ModuleLength:
Exclude:
- 'lib/lokka/helpers/helpers.rb'

Metrics/MethodLength:
Enabled: false
68 changes: 35 additions & 33 deletions Gemfile
@@ -1,48 +1,48 @@
source 'https://rubygems.org'

gem 'activesupport', '~> 4.2'
gem 'aws-sdk-s3'
gem 'backports', '2.3.0'
gem 'builder'
gem 'bundler'
gem 'rack'
gem 'rack-flash', '~> 0.1.2'
gem 'sinatra-flash', '~> 0.3.0'
gem 'i18n', '~> 0.7'
gem 'sinatra', '~> 1.4.2'
gem 'sinatra-contrib', '~> 1.4.0'
gem 'coderay', '1.0.5'
gem 'coffee-script'
gem 'compass'
gem 'data_objects', '0.10.17'
gem 'dm-aggregates', '~> 1.2.0'
gem 'dm-core', '~> 1.2.1'
gem 'dm-is-searchable', '~> 1.2.0'
gem 'dm-is-tree', '~> 1.2.0'
gem 'dm-migrations', '~> 1.2.0'
gem 'dm-pager', git: 'https://github.com/lokka/dm-pagination'
gem 'dm-tags', '~> 1.2.0'
gem 'dm-timestamps', '~> 1.2.0'
gem 'dm-validations', '~> 1.2.0'
gem 'dm-types', '~> 1.2.2'
gem 'dm-is-tree', '~> 1.2.0'
gem 'dm-tags', '~> 1.2.0'
gem 'dm-is-searchable', '~> 1.2.0'
gem 'dm-pager', git: 'https://github.com/lokka/dm-pagination'
gem 'dm-aggregates', '~> 1.2.0'
gem 'data_objects', '0.10.17'
gem 'builder'
gem 'haml', '~> 5.0'
gem 'sass'
gem 'tilt', '~> 2.0'
gem 'compass'
gem 'slim', '~> 3.0.7'
gem 'rake', '~> 11.0'
gem 'dm-validations', '~> 1.2.0'
gem 'erubis', '~> 2.7.0'
gem 'activesupport', '~> 4.2'
gem 'haml', '~> 5.0'
gem 'i18n', '~> 0.7'
gem 'kramdown'
gem 'mimemagic'
gem 'nokogiri'
gem 'tux'
gem 'padrino-helpers', '~> 0.14.1.1'
gem 'coderay', '1.0.5'
gem 'kramdown'
gem 'rack'
gem 'rack-flash', '~> 0.1.2'
gem 'rake', '~> 11.0'
gem 'redcarpet'
gem 'RedCloth', '4.2.9'
gem 'request_store'
gem 'sass'
gem 'sinatra', '~> 1.4.2'
gem 'sinatra-contrib', '~> 1.4.0'
gem 'sinatra-flash', '~> 0.3.0'
gem 'slim', '~> 3.0.7'
gem 'tilt', '~> 2.0'
gem 'tux'
gem 'wikicloth', '0.8.3'
gem 'redcarpet'
gem 'yard-sinatra', '1.0.0'
gem 'backports', '2.3.0'
gem 'coffee-script'
gem 'request_store'
gem 'aws-sdk-s3'
gem 'mimemagic'

Dir["public/plugin/lokka-*/Gemfile"].each {|path| eval(open(path) {|f| f.read }) }
Dir['public/plugin/lokka-*/Gemfile'].each {|path| load(path) }

group :production do
end
Expand All @@ -53,15 +53,17 @@ end

group :development do
gem 'dm-sqlite-adapter', '1.2.0'
gem 'haml-lint'
gem 'rubocop'
end

group :test do
gem 'database_cleaner', '0.7.1'
gem 'dm-transactions', '~> 1.2.0'
gem 'factory_girl', '~> 4.0'
gem 'rack-test', '0.6.1', require: 'rack/test'
gem 'rspec', '2.14.1'
gem 'simplecov', require: false
gem 'factory_girl', '~> 4.0'
gem 'database_cleaner', '0.7.1'
end

group :mysql do
Expand Down
26 changes: 26 additions & 0 deletions Gemfile.lock
Expand Up @@ -17,6 +17,7 @@ GEM
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
ast (2.4.0)
aws-partitions (1.39.0)
aws-sdk-core (3.9.0)
aws-partitions (~> 1.0)
Expand Down Expand Up @@ -114,6 +115,14 @@ GEM
haml (5.0.4)
temple (>= 0.8.0)
tilt
haml-lint (0.999.999)
haml_lint
haml_lint (0.27.0)
haml (>= 4.0, < 5.1)
rainbow
rake (>= 10, < 13)
rubocop (>= 0.50.0)
sysexits (~> 1.1)
htmlentities (4.3.4)
i18n (0.9.1)
concurrent-ruby (~> 1.0)
Expand All @@ -131,6 +140,10 @@ GEM
padrino-support (= 0.14.1.1)
tilt (>= 1.4.1, < 3)
padrino-support (0.14.1.1)
parallel (1.12.1)
parser (2.5.0.2)
ast (~> 2.4.0)
powerpack (0.1.1)
public_suffix (3.0.1)
rack (1.6.8)
rack-flash (0.1.2)
Expand All @@ -139,6 +152,7 @@ GEM
rack
rack-test (0.6.1)
rack (>= 1.0)
rainbow (3.0.0)
rake (11.3.0)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
Expand All @@ -161,6 +175,14 @@ GEM
rspec-expectations (2.14.5)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.6)
rubocop (0.52.1)
parallel (~> 1.10)
parser (>= 2.4.0.2, < 3.0)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.9.0)
sass (3.4.25)
simplecov (0.15.1)
docile (~> 1.1.0)
Expand All @@ -184,6 +206,7 @@ GEM
temple (>= 0.7.6, < 0.9)
tilt (>= 1.3.3, < 2.1)
stringex (1.5.1)
sysexits (1.2.0)
tapp (1.3.0)
thor
temple (0.8.0)
Expand All @@ -202,6 +225,7 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.7.4)
unicode-display_width (1.3.0)
uuidtools (2.1.5)
wikicloth (0.8.3)
builder
Expand Down Expand Up @@ -245,6 +269,7 @@ DEPENDENCIES
erubis (~> 2.7.0)
factory_girl (~> 4.0)
haml (~> 5.0)
haml-lint
i18n (~> 0.7)
kramdown
mimemagic
Expand All @@ -257,6 +282,7 @@ DEPENDENCIES
redcarpet
request_store
rspec (= 2.14.1)
rubocop
sass
simplecov
sinatra (~> 1.4.2)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -42,7 +42,7 @@ to your terminal

## How to make a theme

Make a directory for theme in public/theme and you need to create entries.erb and entry.erb at least. (erb, haml and slim is available.)
Make a directory for theme in public/theme and you need to create entries.erb and entry.erb at least. (erb, haml :and slim is available.)

### Index page

Expand Down
15 changes: 8 additions & 7 deletions Rakefile
@@ -1,8 +1,7 @@
require './init'
require 'yard'
include Rake::DSL if defined? Rake::DSL

task :default => ['spec:setup', 'db:delete', :spec]
task default: ['spec:setup', 'db:delete', :spec]

desc 'Migrate the Lokka database'
task 'db:migrate' do
Expand All @@ -14,7 +13,7 @@ desc 'Execute seed script'
task 'db:seed' do
puts 'Initializing Database...'
DataMapper::Logger.new(STDOUT, :debug)
DataMapper.logger.set_log STDERR, :debug, "SQL: ", true
DataMapper.logger.set_log STDERR, :debug, 'SQL: ', true
Lokka::Database.new.connect.seed
end

Expand All @@ -25,18 +24,18 @@ task 'db:delete' do
end

desc 'Reset database'
task 'db:reset' => %w(db:delete db:seed)
task 'db:reset' => %w[db:delete db:seed]

desc 'Set up database'
task 'db:setup' => %w(db:migrate db:seed)
task 'db:setup' => %w[db:migrate db:seed]

desc 'Install gems'
task :bundle do
`bundle install --path vendor/bundle --without production test`
end

desc 'Install'
task :install => %w(bundle db:setup)
task install: %w[bundle db:setup]

desc 'Generate documentation for Lokka'
task :doc do
Expand All @@ -50,9 +49,11 @@ end

begin
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec => 'spec:setup') do |spec|
RSpec::Core::RakeTask.new(spec: 'spec:setup') do |spec|
spec.pattern = 'spec/**/*_spec.rb'
spec.rspec_opts = ['-cfs']
end
rescue LoadError => e
puts e.message
puts e.backtrace
end
2 changes: 1 addition & 1 deletion bin/autospec
Expand Up @@ -7,7 +7,7 @@
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
Pathname.new(__FILE__).realpath)

require 'rubygems'
Expand Down

0 comments on commit 406a128

Please sign in to comment.