Commit Graph

22 Commits

Author SHA1 Message Date
Kapil Sachdev b7e02184d9 fix(rubocop): Fix Layout/LineLength
- bump rubocop to v1.0
- Fix Layout/MultilineAssignmentLayout and other remaining offences
- Exculde appraisal generated gemfiles in rubocop
- Replace NON_NUMERIC_VALUE constant with instance method against 
failing test case in  rails <= 5.1 and postgres adapter.
This is a defect in rails where a frozen string is modified in 
https://github.com/rails/rails/blob/v5.1.7/activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb#L25
2020-11-03 10:05:25 -07:00
Kapil Sachdev 3e88500318 fix(rubocop): Fix Style, Layout, Lint and other offenses [ci skip]
Updated Layout/LineLength cop to Max 120 lenght and ignore everything 
inside specs/**/*

Added rules for below cops in .rubocop.yml
Lint/AmbiguousBlockAssociation
Naming/HeredocDelimiterNaming
Rails/SkipsModelValidations
Style/FormatStringToken


Fixed below mentioned cops:
- Layout/CaseIndentation
- Layout/DotPosition
- Layout/ElseAlignment
- Layout/IndentationWidth
- Layout/LineLength
- Layout/MultilineBlockLayout
- Layout/MultilineOperationIndentation
- Lint/AmbiguousBlockAssociation
- Lint/MissingCopEnableDirective
- Lint/NestedMethodDefinition
- Lint/RedundantCopDisableDirective
- Lint/RedundantRequireStatement
- Lint/UnusedBlockArgument
- Lint/UnusedMethodArgument
- Metrics/ModuleLength
- Naming/MemoizedInstanceVariableName
- Naming/RescuedExceptionsVariableName
- Rails/Output
- Rails/Presence
- Security/Eval
- Security/Open
- Style/ClassCheck
- Style/CollectionMethods
- Style/ConditionalAssignment
- Style/EvalWithLocation
- Style/FormatStringToken
- Style/InverseMethods
- Style/MutableConstant
- Style/ParallelAssignment
- Style/RedundantBegin
- Style/RedundantCondition
- Style/RedundantInterpolation
- Style/RedundantSelf
- Style/RedundantSort
- Style/RescueStandardError
- Style/SafeNavigation
- Style/StringLiteralsInInterpolation
- Style/SymbolProc
2020-11-03 10:05:25 -07:00
Kapil Sachdev a4b61370c8 fix(rubocop): Use Ruby 1.9 hash syntax [ci skip]
- Fix Style/HashSyntax Offenses
2020-11-03 10:05:25 -07:00
Kapil Sachdev 97722f67cb fix(rubocop): Satisfy Style/StringLiterals with single_quotes [ci skip] 2020-11-03 10:05:25 -07:00
Utkarsh Gupta 4ab77e8b46 Use require over require_relative for cross-lib calls
Avoid using `require_relative` with relative path to
lib. Use `require` instead.

More details about this cop can be found at:
https://docs.rubocop.org/rubocop-packaging/cops_packaging.html#packagingrequirerelativehardcodinglib

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
2020-09-12 19:41:15 -06:00
Kapil Sachdev c4f9add764 fix(docs): Rename remaining NEWS to CHANGELOG [ci skip]
- Related to #1308 which renamed NEWS.md to CHANGELOG.md
2020-08-27 08:59:47 -06:00
Elliot Winkler e224e1dd88 Extend list of files to watch to regen docs
Now updating these files will regenerate the docs:

* NEWS.md
* .yardopts
* docs/
* .rb, .js, .css, and .erb files inside of doc_config/
2015-10-08 21:30:42 -06:00
Elliot Winkler 15009c16c3 Manually autogenerate docs
Why:

* The guard-yard gem doesn't seem to work so well anymore. In fact, the
  problem is with `yard server` -- it doesn't seem to use our custom
  template files.

To satisfy the above:

* Instead of using Guard and guard-yard, use the fssm gem to manually
  watch various files.
* Instead of using `yard server`, run `yard doc`, which *does* honor our
  custom template files.
* You can run `rake autogenerate_docs` to make this happen; update the
  README accordingly.

[ci skip]
2015-09-23 14:04:59 -06:00
Elliot Winkler 99a68fe14a Prefix temporary gh pages dir with username 2015-01-23 16:05:32 -07:00
Elliot Winkler 4da3ecf6bb Raise an error if version or latest_version missing 2015-01-23 14:59:49 -07:00
Elliot Winkler f4bfed358b Fix docs:generate and docs:publish with custom latest version 2015-01-23 14:13:31 -07:00
Elliot Winkler 50b8cb868d Use custom github username in /docs/index.html for better testing 2015-01-23 14:13:31 -07:00
Elliot Winkler 6925773b71 Extract documentation tasks to a separate file 2015-01-23 14:13:31 -07:00
Joe Ferris 6aca71765a Extracted the context framework, switched to rspec 2010-12-14 17:02:03 -05:00
Ryan McGeary c33610ab97 Fix for new shoulda/tasks organization when shoulda is used solely as a plugin [#75] 2008-09-15 09:42:24 -04:00
Josh Nichols 2629a9a64b Moved tasks/* to shoulda/tasks/*
* Will better support shoulda when used as a gem
 * Added shoulda/tasks.rb to automate loading the tasks
 * Added tasks/shoulda.rake for backwards compatibility
 * Modified Rakefile to support new task location
2008-09-14 08:50:38 -04:00
Ryan McGeary 2f510684f2 Fixed shoulda:list rake task for Rails 2.1 by adding the 'test' directory to the load path 2008-08-18 23:37:13 -04:00
tsaleh 4ae2cea036 small refactorings
git-svn-id: https://svn.thoughtbot.com/plugins/shoulda/trunk@389 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
2008-03-17 14:03:11 +00:00
tsaleh 53b1bb818a tweak to rake task
git-svn-id: https://svn.thoughtbot.com/plugins/shoulda/trunk@387 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
2008-03-14 14:21:31 +00:00
tsaleh 4b39f0076a - moved rake tasks to shoulda namespace
- added shoulda:from_yaml task from David.Lowenfels@gmail.com



git-svn-id: https://svn.thoughtbot.com/plugins/shoulda/trunk@237 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
2007-11-08 21:45:27 +00:00
tsaleh 0f194fb28a fixed rake file
git-svn-id: https://svn.thoughtbot.com/plugins/shoulda/trunk@190 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
2007-08-24 17:30:53 +00:00
tsaleh f2ea40a11b moved tasks dir
git-svn-id: https://svn.thoughtbot.com/plugins/shoulda/trunk@189 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
2007-08-24 16:19:59 +00:00