1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00
Commit graph

21 commits

Author SHA1 Message Date
Patrik Ragnarsson
c0ee2c3d84
Rename master branch to main (#1894)
Related to https://github.com/sinatra/sinatra/issues/1696
2023-03-06 07:43:29 +09:00
Vasiliy
8ae87a87f3
Setup Rubocop (#1537)
* Initialize rubocop

* Style/StringLiterals: prefer single quotes

* Style/AndOr: use `&&` and `||`, instead of `and` and `or`

* Style/HashSyntax: use new hash syntax

* Layout/EmptyLineAfterGuardClause: add empty lines after guard clause

* Style/SingleLineMethods: temporary disable

It breaks layout of the code, it is better to fix it manually

* Style/Proc: prefer `proc` vs `Proc.new`

* Disable Lint/AmbiguousBlockAssociation

It affects proc definitions for sinatra DSL

* Disable Style/CaseEquality

* Lint/UnusedBlockArgument: put underscore in front of it

* Style/Alias: prefer alias vs alias_method in a class body

* Layout/EmptyLineBetweenDefs: add empty lines between defs

* Style/ParallelAssignment: don't use parallel assigment

* Style/RegexpLiteral: prefer %r for regular expressions

* Naming/UncommunicativeMethodParamName: fix abbrevs

* Style/PerlBackrefs: disable cop

* Layout/SpaceAfterComma: add missing spaces

* Style/Documentation: disable cop

* Style/FrozenStringLiteralComment: add frozen_string_literal

* Layout/AlignHash: align hash

* Layout/ExtraSpacing: allow for alignment

* Layout/SpaceAroundOperators: add missing spaces

* Style/Not: prefer `!` instead of `not`

* Style/GuardClause: add guard conditions

* Style/MutableConstant: freeze contants

* Lint/IneffectiveAccessModifier: disable cop

* Lint/RescueException: disable cop

* Style/SpecialGlobalVars: disable cop

* Layout/DotPosition: fix position of dot for multiline method chains

* Layout/SpaceInsideArrayLiteralBrackets: don't use spaces inside arrays

* Layout/SpaceInsideBlockBraces: add space for blocks

* Layout/SpaceInsideHashLiteralBraces: add spaces for hashes

* Style/FormatString: use format string syntax

* Style/StderrPuts: `warn` is preferable to `$stderr.puts`

* Bundler/DuplicatedGem: disable cop

* Layout/AlignArray: fix warning

* Lint/AssignmentInCondition: remove assignments from conditions

* Layout/IndentHeredoc: disable cop

* Layout/SpaceInsideParens: remove extra spaces

* Lint/UnusedMethodArgument: put underscore in front of unused arg

* Naming/RescuedExceptionsVariableName: use `e` for exceptions

* Style/CommentedKeyword: put comments before the method

* Style/FormatStringToken: disable cop

* Style/MultilineIfModifier: move condition before the method

* Style/SignalException: prefer `raise` to `fail`

* Style/SymbolArray: prefer %i for array of symbols

* Gemspec/OrderedDependencies: Use alphabetical order for dependencies

* Lint/UselessAccessModifier: disable cop

* Naming/HeredocDelimiterNaming: change delimiter's name

* Style/ClassCheck: prefer `is_a?` to `kind_of?`

* Style/ClassVars: disable cop

* Style/Encoding: remove coding comment

* Style/RedundantParentheses: remove extra parentheses

* Style/StringLiteralsInInterpolation: prefer singl quotes

* Layout/AlignArguments: fix alignment

* Layout/ClosingHeredocIndentation: align heredoc

* Layout/EmptyLineAfterMagicComment: add empty line

* Set RubyVersion for rubocop

* Lint/UselessAssignment: disable cop

* Style/EmptyLiteral: disable cop

Causes test failures

* Minor code-style fixes with --safe-auto-correct option

* Disable the rest of the cops that cause warnings

It would be easier to re-enable them in separate PRs

* Add rubocop check to the default Rake task

* Update to rubocop 1.32.0

* Rubocop updates for rack-protection and sinatra-contrib

* Disable Style/SlicingWithRange cop

* Make suggested updates

Co-authored-by: Jordan Owens <jkowens@gmail.com>
2022-07-31 08:56:44 -04:00
Eloy Pérez
c922ffe2bc Use same rake task and config for tests in sinatra-contrib and rack-protection 2022-02-05 13:10:04 +01:00
Olle Jonsson
1559a20b06 refactor: use __dir__ in File.expand_path
__dir__ is nice, and available.
2022-02-02 15:58:11 -05:00
Zachary Scott
83c099505f Generate and linkify docs for contrib 2017-05-15 17:20:50 -07:00
Zachary Scott
88ede968ec Write readme to includes as well 2017-05-08 08:59:12 +09:00
Yuva
6d7fe54c39 [sinatra-contrib] Ignore decompile.rb while generating docs 2017-04-08 15:19:38 +05:30
Zachary Scott
ac9eb853d2 Remove duplicate tag command from release task 2016-04-12 10:42:28 +09:00
Zachary Scott
b5d11c3e22 Remove :travis task [ci skip] 2016-04-11 12:48:21 +09:00
Trevor Bramble
ddf527d083 Modify deploy task's git details
Hopefully avoid the bungle experienced with the last release. Use the
common remote name (origin) and provide a ref (master) so Git doesn't
buck and bray.
2015-06-30 20:07:51 -07:00
Vipul A M
9abc866fe7 Enable warnings when running specs. 2014-03-19 18:52:52 +05:30
Masahiro Fujiwara
9eef9585e1 remove version string replacement at updating .gemspec. 2013-04-18 23:33:50 +09:00
Konstantin Haase
f4cad346ae add release task 2011-09-30 21:29:39 -05:00
Konstantin Haase
df1063dca6 update for travis #2 2011-08-18 10:13:18 +02:00
Konstantin Haase
70e33eedbf prep for travis 2011-08-18 10:11:45 +02:00
Gabriel Andretta
60eba15e1f ignore white lines when extracting docs 2011-07-02 16:48:15 -03:00
Gabriel Andretta
db984c336e don't build docs for auxiliary modules 2011-07-02 16:38:24 -03:00
Gabriel Andretta
6014b44f67 fix doc:readmes task
Was failing with "private method `mkdir' called for File:Class" when the
doc directory didn't exist.
2011-07-02 16:21:29 -03:00
Konstantin Haase
972558e0ad dont add hidden and bundler files to gem 2011-04-22 13:48:20 +02:00
Konstantin Haase
aa80f18fe5 add task to update gemspec. also update gemspec. 2011-04-22 13:44:32 +02:00
Konstantin Haase
b9381b3f55 some rake tasks 2011-03-29 19:40:46 +02:00