pax_global_header00006660000000000000000000000064135556440500014521gustar00rootroot0000000000000052 comment=2400b36dde1e49a27df2afcab5b4714bb2fc374a fuubar-releases-v2.5.0/000077500000000000000000000000001355564405000150005ustar00rootroot00000000000000fuubar-releases-v2.5.0/.chamber.pub.pem000066400000000000000000000007031355564405000177470ustar00rootroot00000000000000-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvNo8z+zTnOeMSdl5cYTe kGxSsOkuiZlmZOGvrHvg/xFH4EvRWpqsQ9ZzJPLH1luq6zO25fXsdifkcXpLMWc2 vSygsxqM1i7DLaGY+4RZokGtCE4KvbQ2tcvVfSuakmWum6Wh7Lcq86bz/OV2WEu+ 5WDJhbB8rvVkz1tkREEhGEPT2FQZGwXcEUxtWY3QQs/yF4U0V9051KriCubP6A7v IqaIACugmpZU4FjhHc/q3J+UiaexJQq/u6sqaQYxEB/eN44SggaF1SNwi52cb9d3 aLA6NDG/Zx15o2YSjdLdp4N3vHaqvJGm974wLFqToKfL2JgJjL/z4HfyRGdFzQ8l OQIDAQAB -----END PUBLIC KEY----- fuubar-releases-v2.5.0/.github/000077500000000000000000000000001355564405000163405ustar00rootroot00000000000000fuubar-releases-v2.5.0/.github/ISSUE_TEMPLATE/000077500000000000000000000000001355564405000205235ustar00rootroot00000000000000fuubar-releases-v2.5.0/.github/ISSUE_TEMPLATE/bug.md000066400000000000000000000027061355564405000216270ustar00rootroot00000000000000--- name: Bug about: Create a report to help us improve --- ## Current Behavior ### Steps to Reproduce 1. Sign in as "marty@hillvalley.net" 2. Click "Current Orders" 3. Try to remove "Flux Capacitor" from the cart ### Screenshot ## Expected Behavior ## Environment - Device: - OS: - [ ] Windows - [ ] macOS - [ ] iOS - [ ] Android - [ ] Linux - [ ] Other - OS Version: - Browser: - [ ] Chrome - [ ] Safari - [ ] Firefox - [ ] Internet Explorer - [ ] Edge - [ ] Opera - Browser Version: fuubar-releases-v2.5.0/.github/ISSUE_TEMPLATE/feature_request.md000066400000000000000000000016661355564405000242610ustar00rootroot00000000000000--- name: Feature Request about: Suggest an idea for this project --- ## Current Problem ## Potential Solution or New Behavior ### Mockups fuubar-releases-v2.5.0/.github/contributing.md000066400000000000000000000027411355564405000213750ustar00rootroot00000000000000# Contributing We love pull requests from everyone. By participating in this project, you agree to abide by the code of conduct. Here are some ways *you* can contribute: * by using alpha, beta, and prerelease versions * by reporting bugs * by suggesting new features * by writing or editing documentation * by writing specifications * by writing code * by fixing styling inconsistencies * by refactoring code * by closing issues * by reviewing patches ## Submitting an Issue We use the GitHub issue tracker to track bugs and features. Before submitting a bug report or feature request, check to make sure it hasn't already been submitted. When submitting a bug report, please include a [Gist][] that includes a stack trace and any details that may be necessary to reproduce the bug. Ideally, a bug report should include a pull request with failing specs. [gist]: https://gist.github.com/ ## Submitting a Pull Request 1. [Fork][fork] the official repository. 2. [Create a topic branch.][branch] 3. Implement your feature or bug fix. 4. Add, commit, and push your changes. 5. [Submit a pull request.][pr] ## Notes * Please add tests if you changed code. Contributions without tests won't be accepted. [fork]: https://help.github.com/articles/fork-a-repo/ [branch]: https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/ [pr]: https://help.github.com/articles/using-pull-requests/ Inspired by https://github.com/thoughtbot/factory_bot/blob/master/CONTRIBUTING.md fuubar-releases-v2.5.0/.github/pull_request_template.md000066400000000000000000000043421355564405000233040ustar00rootroot00000000000000Why This Change Is Necessary -------------------------------------------------------------------------------- - [ ] Bug Fix - [ ] New Feature How These Changes Address the Issue -------------------------------------------------------------------------------- Side Effects Caused By This Change -------------------------------------------------------------------------------- - [ ] This Causes a Breaking Change - [ ] This Does Not Cause Any Known Side Effects Screenshots -------------------------------------------------------------------------------- Checklist: -------------------------------------------------------------------------------- - [ ] I have run `rubocop` against the codebase - [ ] I have added tests to cover my changes - [ ] All new and existing tests passed fuubar-releases-v2.5.0/.gitignore000066400000000000000000000063751355564405000170030ustar00rootroot00000000000000# Vendored Dependencies Pods bower_components node_modules web/app/mu-plugins web/app/plugins web/app/upgrade web/app/uploads web/wp vendor # OS Files .AppleDB .AppleDesktop .AppleDouble .DS_Store .LSOverride .apdisk Thumbs.db # Testing Files *.gemfile.lock capybara* pickle-email-*.html public/uploads rerun.txt site/web/app/uploads test/data # Cache Files *.stTheme.cache *.tfstate *.tmPreferences.cache *.tmlanguage.cache .TAGS .byebug_history .divshot-cache .dropbox .dropbox.attr .dropbox.cache .rake_tasks .repl_history .sass-cache .tags .yardoc /variables.tf.json TAGS _yardoc disk_image_for_*.json disk_image_settings.json lambdas/*.js lambdas/*.py lambdas/*.zip packer_cache public/packs* public/system site/web/app/upgrade spec/reports tags terraform.tfvars test/tmp test/version_tmp tmtags variables.sls !TAGS/ !tags/ # Local Compiled Files **/cordova/platforms/android/CordovaLib/ant-build **/cordova/platforms/android/CordovaLib/ant-gen **/cordova/platforms/android/CordovaLib/bin **/cordova/platforms/android/CordovaLib/gen **/cordova/platforms/android/ant-build **/cordova/platforms/android/ant-gen **/cordova/platforms/android/assets/www **/cordova/platforms/android/bin **/cordova/platforms/android/gen **/cordova/platforms/browser/build **/cordova/platforms/browser/www **/cordova/platforms/ios/build/ **/cordova/platforms/ios/www/ **/cordova/platforms/wp8/*.csproj.user **/cordova/platforms/wp8/*.suo **/cordova/platforms/wp8/.staging **/cordova/platforms/wp8/bin **/cordova/platforms/wp8/obj **/cordova/platforms/wp8/www **/public/stylesheets/*.css *.a *.css.map *.elc *.gem *.hmap *.ipa *.o *.rbc *.sass.map *.scss.map *.so *.xccheckout *.xcuserdatad DerivedData build build-iPhoneOS build-iPhoneSimulator coverage coverage.data dist files/scripts/**/*.js files/scripts/**/*.py files/scripts/**/*.zip out pillars/files pkg profile rdoc target # Local Configuration Files **/cordova/platforms/android/CordovaLib/local.properties **/cordova/platforms/android/local.properties **/settings-local.yml **/settings/*-local.yml *.bundle *.iml *.ipr *.iws *.mode1v3 *.mode2v3 *.pbxuser *.perspectivev3 *.project *.sublime-project *.sublime-settings *.sublime-workspace *.tmproj .Rhistory .build .bundle .chamber*.enc .chamber*.enc.pass .chamber*.pem .emacs.desktop .emacs.desktop.lock .env .env.* .env.*.local .env.local .env.yml .foreman .htaccess .idea .idea_modules .powenv .powrc .pryrc .railsrc .rspec .rvmrc .secrets .shellwreck.sh .tern-port .terraform Gemfile.local Procfile.local atlassian-ide-plugin.xml com_crashlytics_export_strings.xml config.yml config/application.yml config/database.yml config/initializers/secret_token.rb config/master.key config/secrets.yml crashlytics-build.properties crashlytics.properties nbproject xcuserdata !.circleci/config.yml !.env.example !default.mode1v3 !default.mode2v3 !default.pbxuser !default.perspectivev3 # Temporary files *.backup *.bak *.gho *.lck *.lock *.log* *.moved-aside *.old *.ori *.orig *.rs.bk *.sqlite3 *.sqlite3-journal *.swo *.swp *.tmp *~ .\#* .netrwhist \#* db-sync dump.rdb log solr/* spec/examples.txt sql-dump-*.sql tmp # Vagrant .vagrant # Always keep chamber public keys !.chamber*.pub.pem # Always keep lock files !yarn.lock !Gemfile.lock !Cargo.lock !composer.lock # Always Version .keep and .gitkeep files !.gitkeep !.keep fuubar-releases-v2.5.0/.overcommit.yml000066400000000000000000000274751355564405000200040ustar00rootroot00000000000000# This is an opinionated list of which hooks are valuable to run and what their # out-of-the-box settings should be. # ------------------------------------------------------------------------------- # Loads Bundler context from a Gemfile. If false, does nothing (default). # # Specifying a Gemfile for Bundler to load allows you to control which gems are # available in the load path (i.e. loadable via `require`) within your hook # runs. Note that having a Gemfile requires you to include `overcommit` itself # in your Gemfile (otherwise Overcommit can't load itself!). # # This is useful if you want to: # # - Enforce a specific version of Overcommit to use for all hook runs # (or to use a version from the master branch that has not been released yet) # - Enforce a specific version or unreleased branch is used for a gem you want # to use in your git hooks # # WARNING: This makes your hook runs slower, but you can work around this! # # Loading a Bundler context necessarily adds a startup delay to your hook runs # as Bundler parses the Gemfile and checks that the dependencies are satisfied. # Thus for projects with many gems this can introduce a noticeable delay. # # The recommended workaround is to create a separate Gemfile in the root of your # repository (call it `.overcommit_gems.rb`), and include only the gems that # your Overcommit hooks need in order to run. This significantly reduces the # startup delay in your hook runs. Make sure to commit both # `.overcommit_gems.rb` and the resulting `.overcommit_gems.rb.lock` file to # your repository, and then set the `gemfile` option below to the name you gave # the file. # (Generate lock file by running `bundle install --gemfile=.overcommit_gems.rb`) gemfile: false # Where to store hook plugins specific to a repository. These are loaded in # addition to the default hooks Overcommit comes with. The location is relative # to the root of the repository. plugin_directory: '.git-hooks' # Whether to hide hook output by default. This results in completely silent hook # runs except in the case of warning or failure. quiet: false # Number of hooks that can be run concurrently. Typically this won't need to be # adjusted, but if you know that some of your hooks themselves use multiple # processors you can lower this value accordingly. You can define # single-operator mathematical expressions, e.g. '%{processors} * 2', or # '%{processors} / 2'. concurrency: '%{processors}' # Whether to check if a hook plugin has changed since Overcommit last ran it. # This is a defense mechanism when working with repositories which can contain # untrusted code (e.g. when you fetch a pull request from a third party). # See https://github.com/brigade/overcommit#security for more information. verify_signatures: true PreCommit: ALL: problem_on_unmodified_line: 'report' requires_files: true required: false exclude: - 'bower_components/**/*' - 'node_modules/**/*' - 'vendor/**/*' AuthorEmail: enabled: true AuthorName: enabled: true BerksfileCheck: enabled: true Brakeman: enabled: false BrokenSymlinks: enabled: true BundleAudit: enabled: true include: - 'Gemfile' - 'Gemfile.lock' - '*.gemspec' BundleCheck: enabled: true include: - 'Gemfile' - 'Gemfile.lock' - '*.gemspec' BundleOutdated: enabled: true include: - 'Gemfile' - 'Gemfile.lock' - '*.gemspec' CaseConflicts: enabled: true ChamberSecurity: enabled: true CoffeeLint: enabled: true CookStyle: enabled: false Credo: enabled: true include: - '**/*.ex' - '**/*.exs' CssLint: enabled: false Dogma: enabled: true EsLint: enabled: true ExecutePermissions: enabled: true exclude: - 'Rakefile' - 'bin/**/*' - 'scripts/**/*' Fasterer: enabled: false include: - '**/*.rb' FileSize: enabled: true size_limit_bytes: 1_000_000 FixMe: enabled: true exclude: - '.overcommit.yml' - '.rubocop_core.yml' - 'bin/deploy' keywords: - 'BROKEN' - 'BUG' - 'ERROR' - 'FIXME' - 'HACK' - 'NOTE' - 'OPTIMIZE' - 'REVIEW' - 'TODO' - 'WTF' - 'XXX' Flay: enabled: false Foodcritic: enabled: false ForbiddenBranches: enabled: false GoLint: enabled: true GoVet: enabled: true Hadolint: enabled: false HamlLint: enabled: false HardTabs: enabled: true exclude: - '**/*.svg' - '**/Info.plist' - '**/project.pbxproj' - '**/structure.sql' - '**/xcschememanagement.plist' Hlint: enabled: true HtmlHint: enabled: true HtmlTidy: enabled: false ImageOptim: enabled: false JavaCheckstyle: enabled: true Jscs: enabled: false JsHint: enabled: false JsLint: enabled: false Jsl: enabled: false JsonSyntax: enabled: true KtLint: enabled: false LicenseFinder: enabled: false LicenseHeader: enabled: false licence_file: 'LICENSE.txt' LineEndings: enabled: true LocalPathsInGemfile: enabled: true Mdl: enabled: false include: - '**/*.md' MergeConflicts: enabled: true NginxTest: enabled: true Pep257: enabled: false Pep8: enabled: false PhpCs: enabled: true PhpLint: enabled: false PhpStan: enabled: true Pronto: enabled: false PuppetLint: enabled: true PuppetMetadataJsonLint: enabled: true Pyflakes: enabled: false Pylint: enabled: false PythonFlake8: enabled: false RailsBestPractices: enabled: false RailsSchemaUpToDate: enabled: true include: - '**/db/migrate/*.rb' - '**/db/schema.rb' - '**/db/structure.sql' RakeTarget: enabled: false Reek: enabled: false RstLint: enabled: false RuboCop: enabled: true RubyLint: enabled: false Scalariform: enabled: false Scalastyle: enabled: false ScssLint: enabled: false SemiStandard: enabled: false ShellCheck: enabled: true flags: - '--format=gcc' - '-e SC1090' - '-e SC1117' - '-e SC2148' - '-e SC2155' - '-e SC2181' include: - '**/*.sh' - '**/*.bash' - '**/*.zsh' - '**/bash_profile' - '**/bashrc' - '**/zshrc' SlimLint: enabled: false Sqlint: enabled: true Standard: enabled: false Stylelint: enabled: true SwiftLint: enabled: true TerraformFormat: enabled: true TrailingWhitespace: enabled: true exclude: '**/structure.sql' TravisLint: enabled: true TsLint: enabled: true include: - '**/*.ts' Vint: enabled: true W3cCss: enabled: false W3cHtml: enabled: false XmlLint: enabled: true XmlSyntax: enabled: true YamlLint: enabled: true include: - '**/*.yaml' - '**/*.yml' on_warn: 'fail' YamlSyntax: enabled: true YardCoverage: enabled: false YarnCheck: enabled: true PrePush: ALL: requires_files: false required: false CargoTest: enabled: false GitLfs: enabled: true flags: - 'pre-push' Minitest: enabled: false ProtectedBranches: enabled: false RSpec: enabled: false PreRebase: ALL: requires_files: false required: false MergedCommits: enabled: false CommitMsg: ALL: requires_files: false CapitalizedSubject: enabled: true Commitplease: enabled: false EmptyMessage: enabled: false GerritChangeId: enabled: false HardTabs: enabled: true MessageFormat: enabled: true pattern: '(Add|Fix|Change|Remove|Deprecate|Security|Docs|Style|Tests|Chore|WIP):\s' expected_pattern_message: ': ' sample_message: 'Chore: Refactor onboarding flow' RussianNovel: enabled: false SingleLineSubject: enabled: true SpellCheck: enabled: false TextWidth: enabled: true max_subject_width: 72 max_body_width: 80 TrailingPeriod: enabled: true PostCheckout: ALL: required: false skip_file_checkout: true BowerInstall: enabled: false BundleCheck: enabled: true GitLfs: enabled: true flags: - 'post-checkout' IndexTags: enabled: false NpmInstall: enabled: false SubmoduleStatus: enabled: true PostCommit: ALL: requires_files: false required: false BowerInstall: enabled: false BundleInstall: enabled: false GitGuilt: enabled: false GitLfs: enabled: true flags: - 'post-commit' IndexTags: enabled: false NpmInstall: enabled: false SubmoduleStatus: enabled: true YarnInstall: enabled: false PostMerge: ALL: enabled: false requires_files: false BowerInstall: enabled: false BundleInstall: enabled: false GitLfs: enabled: true flags: - 'post-merge' IndexTags: enabled: false NpmInstall: enabled: false SubmoduleStatus: enabled: false YarnInstall: enabled: false PostRewrite: ALL: requires_files: false BowerInstall: enabled: false BundleInstall: enabled: false IndexTags: enabled: false NpmInstall: enabled: false SubmoduleStatus: enabled: false YarnInstall: enabled: false fuubar-releases-v2.5.0/.rspec000066400000000000000000000000301355564405000161060ustar00rootroot00000000000000--color --format Fuubar fuubar-releases-v2.5.0/.rubocop.yml000066400000000000000000000003001355564405000172430ustar00rootroot00000000000000inherit_from: - '.rubocop_core.yml' - '.rubocop_performance.yml' - '.rubocop_rspec.yml' - '.rubocop_local.yml' # Put your project-specific Rubocop configuration in .rubocop_local.yml fuubar-releases-v2.5.0/.rubocop_core.yml000066400000000000000000001445671355564405000203030ustar00rootroot00000000000000# Last updated to rubocop 0.71.0 AllCops: Include: - '**/*.arb' - '**/*.axlsx' - '**/*.builder' - '**/*.fcgi' - '**/*.gemfile' - '**/*.gemspec' - '**/*.god' - '**/*.jb' - '**/*.jbuilder' - '**/*.mspec' - '**/*.opal' - '**/*.pluginspec' - '**/*.podspec' - '**/*.rabl' - '**/*.rake' - '**/*.rb' - '**/*.rbuild' - '**/*.rbw' - '**/*.rbx' - '**/*.ru' - '**/*.ruby' - '**/*.spec' - '**/*.thor' - '**/*.watchr' - '**/*Fastfile' - '**/.irbrc' - '**/.pryrc' - '**/Appraisals' - '**/Berksfile' - '**/Brewfile' - '**/Buildfile' - '**/Capfile' - '**/Cheffile' - '**/Dangerfile' - '**/Deliverfile' - '**/Fastfile' - '**/Gemfile' - '**/Guardfile' - '**/Jarfile' - '**/Mavenfile' - '**/Podfile' - '**/Puppetfile' - '**/Rakefile' - '**/Snapfile' - '**/Thorfile' - '**/Vagabondfile' - '**/Vagrantfile' - '**/buildfile' - '**/config.ru' Exclude: - '**/*.gemspec' - '**/admin/**/*.rb' - '**/config/deploy.rb' - '**/config/unicorn.rb' - '**/db/migrate/**/*' - '**/db/schema.rb' - '**/node_modules/**/*' - '**/spec/dummy/**/*' - '**/vendor/**/*' - '.git/**/*' - 'bin/rails' - 'bin/rake' - 'bin/spring' - 'dist/**/*' - 'log/**/*' - 'tmp/**/*' DefaultFormatter: 'fuubar' DisplayCopNames: true ################################################################################ # BUNDLER ################################################################################ Bundler/GemComment: Enabled: false Whitelist: [] Bundler/DuplicatedGem: Enabled: true Bundler/InsecureProtocolSource: Enabled: true Bundler/OrderedGems: Enabled: true TreatCommentsAsGroupSeparators: true ################################################################################ # GEMSPEC ################################################################################ Gemspec/DuplicatedAssignment: Enabled: true Gemspec/OrderedDependencies: Enabled: true TreatCommentsAsGroupSeparators: true Gemspec/RequiredRubyVersion: Enabled: true ################################################################################ # LAYOUT ################################################################################ Layout/AccessModifierIndentation: Enabled: true EnforcedStyle: 'indent' IndentationWidth: ~ Layout/AlignArguments: Enabled: true EnforcedStyle: 'with_first_argument' Exclude: - '**/Gemfile' Layout/AlignArray: Enabled: true Layout/AlignHash: Enabled: true EnforcedHashRocketStyle: 'table' EnforcedColonStyle: 'table' EnforcedLastArgumentHashStyle: 'always_inspect' Layout/AlignParameters: Enabled: true EnforcedStyle: 'with_first_parameter' IndentationWidth: ~ Exclude: - '**/Gemfile' Layout/BlockAlignment: Enabled: true EnforcedStyleAlignWith: 'either' Exclude: - '**/spec/**/factories/**/*.rb' - '**/spec/factories.rb' - 'app/controllers/**/*.rb' Layout/BlockEndNewline: Enabled: true Layout/CaseIndentation: Enabled: true EnforcedStyle: 'end' IndentOneStep: false IndentationWidth: ~ Layout/ClassStructure: Enabled: true ExpectedOrder: - 'prepend' - 'include' - 'extend' - 'constants' - 'cattr_accessor' - 'cattr_reader' - 'cattr_writer' - 'attr_accessor' - 'attr_reader' - 'attr_writer' - 'delegate' - 'serialize' - 'belongs_to' - 'has_one' - 'has_many' - 'has_and_belongs_to_many' - 'default_scope' - 'scope' - 'validates' - 'validate' - 'before_action' - 'before_validation' - 'after_validation' - 'before_save' - 'before_create' - 'after_action' - 'after_create' - 'after_save' - 'after_commit' - 'accepts_nested_attributes_for' - 'protect_from_forgery' - 'layout' - 'friendly_id' - 'geocoded_by' - 'has_attached_file' - 'has_attached_files' - 'has_one_attached' - 'has_many_attached' - 'states' - 'state_transitions' - 'public_class_methods' - 'initializer' - 'public_methods' - 'protected_methods' - 'private_methods' Layout/ClosingHeredocIndentation: Enabled: true Layout/ClosingParenthesisIndentation: Enabled: true Exclude: - '**/spec/**/*_spec.rb' Layout/CommentIndentation: Enabled: true Exclude: - '**/config/initializers/middleware.rb' Layout/ConditionPosition: Enabled: true Layout/DefEndAlignment: Enabled: true EnforcedStyleAlignWith: 'start_of_line' AutoCorrect: true Layout/DotPosition: Enabled: true EnforcedStyle: 'leading' Layout/ElseAlignment: Enabled: true Layout/EmptyComment: Enabled: true AllowBorderComment: true AllowMarginComment: true Layout/EmptyLineAfterGuardClause: Enabled: true Layout/EmptyLineAfterMagicComment: Enabled: true Layout/EmptyLineBetweenDefs: Enabled: true AllowAdjacentOneLineDefs: true NumberOfEmptyLines: 1 Layout/EmptyLinesAroundAccessModifier: Enabled: true EnforcedStyle: 'around' Layout/EmptyLinesAroundArguments: Enabled: true Layout/EmptyLinesAroundBeginBody: Enabled: true Layout/EmptyLinesAroundBlockBody: Enabled: true EnforcedStyle: 'no_empty_lines' Exclude: - '**/engine.rb' - '**/spec/**/*.rb' Layout/EmptyLinesAroundClassBody: Enabled: true EnforcedStyle: 'no_empty_lines' Layout/EmptyLinesAroundExceptionHandlingKeywords: Enabled: true Layout/EmptyLinesAroundMethodBody: Enabled: true Layout/EmptyLinesAroundModuleBody: Enabled: true EnforcedStyle: 'no_empty_lines' Layout/EmptyLines: Enabled: true Layout/EndAlignment: Enabled: true EnforcedStyleAlignWith: 'keyword' AutoCorrect: true Layout/EndOfLine: Enabled: true EnforcedStyle: 'lf' Layout/ExtraSpacing: Enabled: true AllowBeforeTrailingComments: true AllowForAlignment: true ForceEqualSignAlignment: true Exclude: - '**/Gemfile' - '**/spec/**/factories/**/*.rb' - '**/spec/factories.rb' Layout/FirstArrayElementLineBreak: Enabled: true Layout/FirstHashElementLineBreak: Enabled: true Layout/FirstMethodArgumentLineBreak: # Disallows: my_method(foo, # bar) Enabled: false Layout/FirstMethodParameterLineBreak: # Disallows: def my_method(foo, # bar) Enabled: false Layout/HeredocArgumentClosingParenthesis: Enabled: true Layout/IndentationConsistency: Enabled: true EnforcedStyle: 'normal' Layout/IndentationWidth: Enabled: true Width: 2 IgnoredPatterns: - '^\s*(module|class)' Layout/IndentAssignment: Enabled: true IndentationWidth: ~ Layout/IndentFirstArgument: Enabled: true EnforcedStyle: 'consistent_relative_to_receiver' IndentationWidth: ~ Exclude: - '**/spec/**/*_spec.rb' Layout/IndentFirstArrayElement: Enabled: true EnforcedStyle: 'align_brackets' IndentationWidth: ~ Layout/IndentFirstHashElement: Enabled: true EnforcedStyle: 'special_inside_parentheses' IndentationWidth: ~ Layout/IndentFirstParameter: Enabled: true EnforcedStyle: 'align_parentheses' Layout/IndentHeredoc: Enabled: true EnforcedStyle: 'squiggly' Layout/InitialIndentation: Enabled: true Layout/LeadingBlankLines: Enabled: true Layout/LeadingCommentSpace: Enabled: true Layout/MultilineArrayBraceLayout: Enabled: true EnforcedStyle: 'symmetrical' Layout/MultilineArrayLineBreaks: Enabled: true Layout/MultilineAssignmentLayout: Enabled: true EnforcedStyle: 'same_line' Layout/MultilineBlockLayout: Enabled: true Layout/MultilineHashBraceLayout: Enabled: true EnforcedStyle: 'symmetrical' Layout/MultilineHashKeyLineBreaks: Enabled: true # https://github.com/rubocop-hq/rubocop/issues/6936 Layout/MultilineMethodArgumentLineBreaks: Enabled: false Exclude: - 'Gemfile' - 'config/routes.rb' Layout/MultilineMethodCallBraceLayout: Enabled: true EnforcedStyle: 'symmetrical' Layout/MultilineMethodCallIndentation: Enabled: true EnforcedStyle: 'indented_relative_to_receiver' IndentationWidth: ~ Layout/MultilineMethodDefinitionBraceLayout: Enabled: true EnforcedStyle: 'symmetrical' Layout/MultilineOperationIndentation: # Disallows: @expires_at ||= Time.now.utc + # 60 Enabled: false EnforcedStyle: 'aligned' IndentationWidth: ~ Layout/RescueEnsureAlignment: Enabled: true Layout/SpaceAfterColon: Enabled: true Layout/SpaceAfterComma: Enabled: true Layout/SpaceAfterMethodName: Enabled: true Layout/SpaceAfterNot: Enabled: true Layout/SpaceAfterSemicolon: Enabled: true Layout/SpaceAroundBlockParameters: Enabled: true EnforcedStyleInsidePipes: 'no_space' Layout/SpaceAroundEqualsInParameterDefault: Enabled: true EnforcedStyle: 'space' Layout/SpaceAroundKeyword: Enabled: true Layout/SpaceAroundOperators: Enabled: true AllowForAlignment: true Layout/SpaceBeforeBlockBraces: Enabled: true EnforcedStyle: 'space' Layout/SpaceBeforeComma: Enabled: true Layout/SpaceBeforeComment: Enabled: true Layout/SpaceBeforeFirstArg: Enabled: true AllowForAlignment: true Exclude: - '**/spec/**/factories/**/*.rb' - '**/spec/factories.rb' Layout/SpaceBeforeSemicolon: Enabled: true Layout/SpaceInLambdaLiteral: Enabled: true EnforcedStyle: 'require_no_space' Layout/SpaceInsideArrayLiteralBrackets: Enabled: true EnforcedStyle: 'no_space' EnforcedStyleForEmptyBrackets: 'no_space' Layout/SpaceInsideArrayPercentLiteral: Enabled: true Layout/SpaceInsideBlockBraces: Enabled: true EnforcedStyle: 'space' EnforcedStyleForEmptyBraces: 'no_space' SpaceBeforeBlockParameters: true Layout/SpaceInsideHashLiteralBraces: Enabled: true EnforcedStyle: 'space' EnforcedStyleForEmptyBraces: 'no_space' Layout/SpaceInsideParens: Enabled: true Layout/SpaceInsidePercentLiteralDelimiters: Enabled: true Layout/SpaceInsideRangeLiteral: Enabled: true Layout/SpaceInsideReferenceBrackets: Enabled: true EnforcedStyle: 'no_space' EnforcedStyleForEmptyBrackets: 'no_space' Layout/SpaceInsideStringInterpolation: Enabled: true EnforcedStyle: 'no_space' Layout/Tab: Enabled: true Layout/TrailingBlankLines: Enabled: true EnforcedStyle: 'final_newline' Layout/TrailingWhitespace: Enabled: true ################################################################################ # LINTS ################################################################################ Lint/AmbiguousBlockAssociation: Enabled: true Exclude: - '**/app/models/**/*.rb' - '**/spec/**/*_spec.rb' Lint/AmbiguousOperator: Enabled: true Lint/AmbiguousRegexpLiteral: Enabled: true Lint/AssignmentInCondition: Enabled: true AllowSafeAssignment: true Lint/BigDecimalNew: Enabled: true Lint/BooleanSymbol: Enabled: true Lint/CircularArgumentReference: Enabled: true Lint/Debugger: Enabled: true Lint/DeprecatedClassMethods: Enabled: true Lint/DisjunctiveAssignmentInConstructor: Enabled: true Lint/DuplicatedKey: Enabled: true Lint/DuplicateMethods: Enabled: true Lint/EachWithObjectArgument: Enabled: true Lint/ElseLayout: Enabled: true Lint/EmptyEnsure: Enabled: true Lint/EmptyInterpolation: Enabled: true Lint/EmptyWhen: Enabled: true Lint/EndInMethod: Enabled: true Lint/EnsureReturn: Enabled: true Lint/ErbNewArguments: Enabled: true Lint/FlipFlop: Enabled: true Lint/FloatOutOfRange: Enabled: true Lint/FormatParameterMismatch: Enabled: true Lint/HandleExceptions: Enabled: true AllowComments: true Lint/HeredocMethodCallPosition: Enabled: true Lint/ImplicitStringConcatenation: Enabled: true Lint/IneffectiveAccessModifier: Enabled: true Lint/InheritException: Enabled: true EnforcedStyle: 'standard_error' Lint/LiteralAsCondition: Enabled: true Lint/LiteralInInterpolation: Enabled: true Lint/Loop: Enabled: true Lint/MissingCopEnableDirective: Enabled: true Lint/MultipleCompare: Enabled: true Lint/NestedMethodDefinition: Enabled: true Lint/NonLocalExitFromIterator: Enabled: true Lint/OrderedMagicComments: Enabled: true Lint/ParenthesesAsGroupedExpression: Enabled: true Lint/PercentStringArray: Enabled: true Lint/PercentSymbolArray: Enabled: true Lint/RandOne: Enabled: true Lint/RedundantWithIndex: Enabled: true Lint/RedundantWithObject: Enabled: true Lint/RequireParentheses: Enabled: true Lint/RescueException: Enabled: true Lint/ReturnInVoidContext: Enabled: true Lint/SafeNavigationChain: Enabled: true Whitelist: - 'present?' - 'blank?' - 'presence' - 'try!' - 'try' Lint/SafeNavigationConsistency: Enabled: true Lint/SafeNavigationWithEmpty: Enabled: true Lint/ScriptPermission: Enabled: true Lint/ShadowedArgument: Enabled: true IgnoreImplicitReferences: false Lint/ShadowedException: Enabled: true Lint/ShadowingOuterLocalVariable: Enabled: true Lint/StringConversionInInterpolation: Enabled: true Lint/ToJSON: Enabled: true Lint/UnderscorePrefixedVariableName: Enabled: true Lint/UnifiedInteger: Enabled: true Lint/UnneededCopDisableDirective: Enabled: true Lint/UnneededCopEnableDirective: Enabled: true Lint/UnneededRequireStatement: Enabled: true Lint/UnneededSplatExpansion: Enabled: true Lint/UnreachableCode: Enabled: true Lint/UnusedBlockArgument: Enabled: true AllowUnusedKeywordArguments: true IgnoreEmptyBlocks: true Lint/UnusedMethodArgument: Enabled: true AllowUnusedKeywordArguments: true IgnoreEmptyMethods: true Lint/UriEscapeUnescape: Enabled: true Lint/UriRegexp: Enabled: true Lint/UselessAccessModifier: Enabled: true Lint/UselessAssignment: Enabled: true Lint/UselessComparison: Enabled: true Lint/UselessElseWithoutRescue: Enabled: true Lint/UselessSetterCall: Enabled: true Lint/Void: Enabled: true ################################################################################ # METRICS ################################################################################ Metrics/AbcSize: Enabled: true Max: 25.0 Exclude: - '**/db/sample.rb' Metrics/BlockNesting: Enabled: true CountBlocks: true Max: 3 Exclude: - '**/*.rake' - '**/config/routes.rb' - '**/db/sample.rb' - '**/refinements/*.rb' - '**/spec/**/*_spec.rb' - '**/spec/**/factories/**/*.rb' - '**/spec/factories.rb' - 'Rakefile' Metrics/BlockLength: CountComments: false Max: 25 Exclude: - '**/*.rake' - '**/config/routes.rb' - '**/db/sample.rb' - '**/db/scrub.rb' - '**/db/seed.rb' - '**/refinements/*.rb' - '**/spec/**/*_spec.rb' - '**/spec/**/factories/**/*.rb' - '**/spec/factories.rb' - '**/spec/shared/**/*.rb' - '**/spec/support/**/*.rb' - 'Rakefile' ExcludedMethods: - 'namespace' - 'draw' - 'context' - 'describe' - 'refine' - 'shared_examples' - 'shared_examples_for' Metrics/ClassLength: Enabled: true CountComments: false Max: 200 Exclude: - '**/spec/**/*_spec.rb' Metrics/ModuleLength: Enabled: true CountComments: false Max: 200 Exclude: - '**/spec/**/*_spec.rb' Metrics/CyclomaticComplexity: Enabled: true Max: 6 # yamllint disable rule:line-length Metrics/LineLength: Enabled: true Max: 90 AllowHeredoc: true AllowURI: true IgnoreCopDirectives: true IgnoredPatterns: - "\\s+raise_error\\([^)]+\\)$" # raise_error(LongClassName) - "^(\\s+|.*)'[^']+'\\s+=\\>\\s+'[^']+',$" # 'foo' => 'really_long_string', - "^(\\s+|.*)'[^']+'\\s+=\\>\\s+\\\"[^\\\"]+\\\",$" # 'foo' => "really_long_string", - "^(\\s+|.*)'[^']+'\\s+=\\>\\s+match\\(.*\\)," # 'foo' => match(/really_long_regex/), - "^(\\s+|.*):[\\w_]+\\s+=\\>\\s+'[^']+',$" # :foo => 'really_long_string', - "^(\\s+|.*):[\\w_]+\\s+=\\>\\s+\\\"[^\\\"]+\\\",$" # :foo => "really_long_string", - "^(\\s+|.*)[\\w_]+:\\s+'[^']+',$" # foo: 'really_long_string', - "^(\\s+|.*)[\\w_]+:\\s+\\\"[^\\\"]+\\\",$" # foo: "really_long_string", - "^\\s*(fail|raise)\\s+" # fail or raise an exception - "^\\s*class\\s+" # class definition with really long inherited class - "^\\s*require\\s+'[^']+'$" # require 'some_really_long_path_name' - "^\\s+expect\\([^\\)]+\\)+\\.(not_)?to\\s+[^\\s]+\\s+%[qQ]{[^}]+}$" # RSpec expectation line for a string with %q syntax - "^\\s+expect\\([^\\)]+\\)+\\.(not_)?to\\s+[^\\s]+\\s+'[^']+'$" # RSpec expectation line for a single-quoted string - "^\\s+expect\\([^\\)]+\\)+\\.(not_)?to\\s+[^\\s]+\\s+Time\\.(new|utc).*" # RSpec expectation line for a Time - "^\\s+expect\\([^\\)]+\\)+\\.(not_)?to\\s+[^\\s]+\\s+\\\"[^\\\"]+\\\"$" # RSpec expectation line for a double-quoted string - "^\\s+return\\s+.*(if|unless)" # Short circuiting returns - '^\s*((private|public|protected)\s+)?def\s+[\w\._]+\(?' # Method definitions - '^\s+belongs_to\s+.*' # Rails belongs_to relationships - '^\s+broadcast[\s\\(].*' # Wisper Broadcasts - '^\s+context\s+.*' # RSpec context lines - '^\s+describe\s+.*' # RSpec describe lines - '^\s+expose\(:[\w_]+\)\s+\{.*' # Controller exposures - '^\s+factory\s+.*' # FactoryBot factory definitions - '^\s+has_many\s+.*' # Rails has_many relationships - '^\s+has_one\s+.*' # Rails has_one relationships - '^\s+it\s+.*' # RSpec it lines - '^\s+let\(:[\w_]+\)\s+\{.*' # RSpec lets on single line - '^\s+scope\s+.*' # Rails scopes URISchemes: - 'http' - 'https' Exclude: - '**/Gemfile' - '**/config/environments/**/*' - '**/config/initializers/**/*' - '**/config/routes.rb' - '**/db/sample.rb' - '**/db/scrub.rb' - '**/db/seed.rb' - '**/spec/**/factories/**/*.rb' - '**/spec/factories.rb' # yamllint enable rule:line-length Metrics/MethodLength: Enabled: true CountComments: false Max: 30 ExcludedMethods: [] Exclude: - '**/db/sample.rb' - '**/db/scrub.rb' - '**/db/seed.rb' Metrics/ParameterLists: Enabled: true Max: 5 CountKeywordArgs: true Metrics/PerceivedComplexity: Enabled: true Max: 7 ################################################################################ # NAMING ################################################################################ Naming/AccessorMethodName: Enabled: true Naming/AsciiIdentifiers: Enabled: true Naming/BinaryOperatorParameterName: Enabled: true Naming/ClassAndModuleCamelCase: Enabled: true Naming/ConstantName: Enabled: true Naming/FileName: Enabled: true IgnoreExecutableScripts: true ExpectMatchingDefinition: false Exclude: - '**/Rakefile' - '**/Gemfile' - '**/Capfile' - '**/Vagrantfile' - '**/Podfile' - '**/Thorfile' Naming/HeredocDelimiterNaming: Enabled: true Blacklist: - 'END' - !ruby/regexp '/EO[A-Z]{1}/' Naming/HeredocDelimiterCase: Enabled: true EnforcedStyle: 'uppercase' Naming/MemoizedInstanceVariableName: Enabled: true EnforcedStyleForLeadingUnderscores: 'disallowed' Naming/MethodName: Enabled: true EnforcedStyle: 'snake_case' Naming/PredicateName: Enabled: true NamePrefix: - 'is_' - 'was_' - 'has_' - 'have_' NamePrefixBlacklist: - 'is_' - 'was_' - 'have_' NameWhitelist: - 'is_a?' MethodDefinitionMacros: - 'define_method' - 'define_singleton_method' Exclude: - '**/spec/**/*.rb' Naming/RescuedExceptionsVariableName: Enabled: true PreferredName: 'error' Naming/UncommunicativeBlockParamName: Enabled: true MinNameLength: 1 AllowNamesEndingInNumbers: true AllowedNames: [] ForbiddenNames: [] Naming/UncommunicativeMethodParamName: Enabled: true MinNameLength: 3 AllowNamesEndingInNumbers: true AllowedNames: - 'at' - 'by' - 'db' - 'id' - 'in' - 'io' - 'ip' - 'on' - 'to' ForbiddenNames: [] Naming/VariableName: Enabled: true EnforcedStyle: 'snake_case' Naming/VariableNumber: Enabled: true EnforcedStyle: 'snake_case' ################################################################################ # SECURITY ################################################################################ Security/Eval: Enabled: true Security/JSONLoad: Enabled: true Exclude: - '**/spec/**/*.rb' Security/Open: Enabled: true Security/YAMLLoad: Enabled: true Exclude: - '**/spec/**/*.rb' Security/MarshalLoad: Enabled: true Exclude: - '**/spec/**/*.rb' ################################################################################ # STYLE ################################################################################ Style/AccessModifierDeclarations: Enabled: true EnforcedStyle: 'group' Style/Alias: Enabled: true EnforcedStyle: 'prefer_alias' Style/AndOr: Enabled: true EnforcedStyle: 'always' Style/ArrayJoin: Enabled: true Style/AsciiComments: Enabled: true AllowedChars: [] Style/Attr: Enabled: true Style/AutoResourceCleanup: Enabled: true Style/BarePercentLiterals: Enabled: true EnforcedStyle: 'percent_q' Style/BeginBlock: Enabled: true Style/BlockComments: Enabled: true Style/BlockDelimiters: Enabled: true EnforcedStyle: 'braces_for_chaining' AllowBracesOnProceduralOneLiners: true Exclude: - '**/spec/**/factories/**/*.rb' - '**/spec/factories.rb' - 'app/controllers/**/*.rb' Style/BracesAroundHashParameters: Enabled: true EnforcedStyle: 'context_dependent' Style/CaseEquality: Enabled: true Style/CharacterLiteral: Enabled: true Style/ClassAndModuleChildren: Enabled: true EnforcedStyle: 'nested' Style/ClassCheck: Enabled: true EnforcedStyle: 'is_a?' Style/ClassMethods: Enabled: true Style/ClassVars: Enabled: true Style/CollectionMethods: Enabled: true PreferredMethods: collect: 'map' collect!: 'map!' reduce: 'inject' detect: 'find' find_all: 'select' Style/ColonMethodCall: Enabled: true Style/ColonMethodDefinition: Enabled: true Style/CommandLiteral: Enabled: true EnforcedStyle: 'backticks' AllowInnerBackticks: false Style/CommentAnnotation: Enabled: true Keywords: - 'TODO' - 'FIXME' - 'OPTIMIZE' - 'HACK' - 'REVIEW' Style/CommentedKeyword: Enabled: true Exclude: - '**/Gemfile' Style/ConditionalAssignment: Enabled: true EnforcedStyle: 'assign_to_condition' IncludeTernaryExpressions: true SingleLineConditionsOnly: false Style/ConstantVisibility: Enabled: true Style/Copyright: # Copyrights at the Top of Files are Noisy Enabled: false Style/DefWithParentheses: Enabled: true Style/Dir: Enabled: true Style/Documentation: # Use Some Other Tool Like `inch` to Enforce This Enabled: false Style/DocumentationMethod: RequireForNonPublicMethods: false Style/DoubleNegation: Enabled: true Style/EachForSimpleLoop: Enabled: true Style/EachWithObject: Enabled: true Style/EmptyBlockParameter: Enabled: true Style/EmptyCaseCondition: Enabled: true Style/EmptyElse: Enabled: true EnforcedStyle: 'both' Style/EmptyLiteral: Enabled: true Exclude: - '**/spec/**/factories/**/*.rb' - '**/spec/factories.rb' Style/EmptyMethod: Enabled: true EnforcedStyle: 'compact' Style/Encoding: Enabled: true Style/EndBlock: Enabled: true Style/ExpandPathArguments: Enabled: true Style/EvalWithLocation: Enabled: true Style/EvenOdd: Enabled: true Style/For: Enabled: true EnforcedStyle: 'each' Style/FormatString: Enabled: true EnforcedStyle: 'percent' Style/FormatStringToken: Enabled: true EnforcedStyle: 'annotated' Style/FrozenStringLiteralComment: Enabled: true EnforcedStyle: 'always' Style/GlobalVars: Enabled: true AllowedVariables: [] Style/GuardClause: Enabled: true MinBodyLength: 1 Style/HashSyntax: Enabled: true EnforcedStyle: 'ruby19' UseHashRocketsWithSymbolValues: false PreferHashRocketsForNonAlnumEndingSymbols: true Style/IdenticalConditionalBranches: Enabled: true Style/IfInsideElse: Enabled: true Style/IfUnlessModifier: Enabled: true Exclude: - '**/config/initializers/*.rb' Style/IfUnlessModifierOfIfUnless: Enabled: true Style/IfWithSemicolon: Enabled: true Style/ImplicitRuntimeError: Enabled: true Style/InfiniteLoop: Enabled: true Style/InlineComment: Enabled: true Exclude: - '**/Gemfile' - '**/config/boot.rb' - '**/config/initializers/*.rb' Style/InverseMethods: Enabled: true InverseMethods: :any?: :none? :even?: :odd? :==: :!= :=~: :!~ :<: :>= :>: :<= :present?: :blank?, :include?: :exclude? InverseBlocks: :select: :reject :select!: :reject! Style/IpAddresses: Enabled: true Whitelist: - '::' Exclude: - '**/spec/**/*_spec.rb' - '**/spec/**/factories/**/*.rb' - '**/spec/factories.rb' Style/Lambda: Enabled: true Style/LambdaCall: Enabled: true EnforcedStyle: 'call' Style/LineEndConcatenation: Enabled: true Style/MethodCalledOnDoEndBlock: Enabled: true Style/MethodCallWithArgsParentheses: # Would Require a *lot* of Effort Adding Ignored Methods Enabled: false AllowParenthesesInMultilineCall: true AllowParenthesesInChaining: true AllowParenthesesInCamelCaseMethod: true IgnoreMacros: true IncludedMacros: [] IgnoredMethods: - 'puts' Style/MethodCallWithoutArgsParentheses: Enabled: true IgnoredMethods: [] Style/MethodDefParentheses: Enabled: true EnforcedStyle: 'require_parentheses' Style/MethodMissingSuper: Enabled: true Style/MinMax: Enabled: true Style/MissingElse: # Decent Idea But Too Many Use Cases for `if` Without `else` Enabled: false EnforcedStyle: 'both' SupportedStyles: - 'if' - 'case' - 'both' Style/MissingRespondToMissing: Enabled: true Style/MixinGrouping: Enabled: true EnforcedStyle: 'separated' Exclude: - '**/spec/**/*_spec.rb' Style/MixinUsage: Enabled: true Style/ModuleFunction: Enabled: true EnforcedStyle: 'module_function' Style/MultilineBlockChain: Enabled: true Exclude: - '**/spec/**/*_spec.rb' Style/MultilineIfModifier: Enabled: true Style/MultilineIfThen: Enabled: true Style/MultilineMemoization: Enabled: true EnforcedStyle: 'keyword' Style/MultilineMethodSignature: # Disallows: my_method(foo, # bar) Enabled: false Style/MultilineTernaryOperator: Enabled: true Style/MultipleComparison: Enabled: true Style/MutableConstant: Enabled: true Style/NegatedIf: Enabled: true EnforcedStyle: 'both' Style/NegatedUnless: Enabled: true EnforcedStyle: 'both' Style/NegatedWhile: Enabled: true Style/NestedModifier: Enabled: true Style/NestedParenthesizedCalls: Enabled: true Whitelist: - 'be' - 'be_a' - 'be_an' - 'be_between' - 'be_falsey' - 'be_kind_of' - 'be_instance_of' - 'be_truthy' - 'be_within' - 'eq' - 'eql' - 'end_with' - 'include' - 'match' - 'raise_error' - 'respond_to' - 'start_with' Style/NestedTernaryOperator: Enabled: true Style/Next: Enabled: true EnforcedStyle: 'skip_modifier_ifs' MinBodyLength: 3 Style/NilComparison: Enabled: true EnforcedStyle: 'predicate' Style/NonNilCheck: Enabled: true IncludeSemanticChanges: false Style/Not: Enabled: true Style/NumericLiteralPrefix: Enabled: true EnforcedOctalStyle: 'zero_with_o' Style/NumericLiterals: Enabled: true MinDigits: 5 Strict: false Style/NumericPredicate: Enabled: true EnforcedStyle: 'predicate' IgnoredMethods: [] Exclude: - '**/spec/**/*_spec.rb' Style/OneLineConditional: Enabled: true Style/OptionalArguments: Enabled: true Style/OptionHash: Enabled: true Exclude: - '**/workers/**/*.rb' - '**/jobs/**/*.rb' SuspiciousParamNames: - 'options' - 'opts' - 'args' - 'params' - 'parameters' Style/OrAssignment: Enabled: true Style/ParallelAssignment: Enabled: true Style/ParenthesesAroundCondition: Enabled: true AllowSafeAssignment: true AllowInMultilineConditions: false Style/PercentLiteralDelimiters: Enabled: true PreferredDelimiters: '%': '{}' '%i': '{}' '%I': '{}' '%q': '{}' '%Q': '{}' '%r': '{}' '%s': '{}' '%w': '{}' '%W': '{}' '%x': '{}' Style/PercentQLiterals: Enabled: true EnforcedStyle: 'upper_case_q' Style/PerlBackrefs: Enabled: true Style/PreferredHashMethods: Enabled: true EnforcedStyle: 'verbose' Style/Proc: Enabled: true Style/RaiseArgs: Enabled: true EnforcedStyle: 'exploded' Style/RandomWithOffset: Enabled: true Style/RedundantBegin: Enabled: true Style/RedundantConditional: Enabled: true Style/RedundantException: Enabled: true Style/RedundantFreeze: Enabled: true Style/RedundantParentheses: Enabled: true Style/RedundantReturn: Enabled: true AllowMultipleReturnValues: true Style/RedundantSelf: Enabled: true Style/RedundantSortBy: Enabled: true Style/RegexpLiteral: Enabled: true EnforcedStyle: 'slashes' AllowInnerSlashes: false Style/RescueModifier: Enabled: true Style/RescueStandardError: Enabled: true Style/ReturnNil: Enabled: true EnforcedStyle: 'return' Style/SafeNavigation: Enabled: true ConvertCodeThatCanStartToReturnNil: false Whitelist: - 'blank?' - 'presence' - 'present?' - 'try!' - 'try' Style/Sample: Enabled: true Style/SelfAssignment: Enabled: true Style/Semicolon: Enabled: true AllowAsExpressionSeparator: false Style/Send: Enabled: true Exclude: - '**/spec/**/*_spec.rb' Style/SignalException: Enabled: true EnforcedStyle: 'semantic' Style/SingleLineBlockParams: Enabled: true Methods: - reduce: - 'm' - 'v' - inject: - 'm' - 'v' Style/SingleLineMethods: Enabled: true AllowIfMethodIsEmpty: true Exclude: - 'app/models/**/*.rb' Style/SpecialGlobalVars: Enabled: true EnforcedStyle: 'use_english_names' Style/StabbyLambdaParentheses: Enabled: true EnforcedStyle: 'require_parentheses' Style/StderrPuts: Enabled: true Style/StringHashKeys: Enabled: false # Requires Symbolized Hash Keys Style/StringLiterals: Enabled: true EnforcedStyle: 'single_quotes' ConsistentQuotesInMultiline: true Style/StringLiteralsInInterpolation: Enabled: true Style/StringMethods: Enabled: true PreferredMethods: intern: 'to_sym' Style/Strip: Enabled: true Style/StructInheritance: Enabled: true Style/SymbolArray: Enabled: true EnforcedStyle: 'percent' MinSize: 0 Style/SymbolLiteral: Enabled: true Style/SymbolProc: Enabled: true IgnoredMethods: - 'respond_to' - 'define_method' Style/TernaryParentheses: Enabled: true AllowSafeAssignment: true EnforcedStyle: 'require_parentheses_when_complex' Style/TrailingBodyOnClass: Enabled: true Style/TrailingBodyOnMethodDefinition: Enabled: true Style/TrailingBodyOnModule: Enabled: true Style/TrailingCommaInArguments: Enabled: true EnforcedStyleForMultiline: 'comma' Style/TrailingCommaInArrayLiteral: Enabled: true EnforcedStyleForMultiline: 'comma' Style/TrailingCommaInHashLiteral: Enabled: true EnforcedStyleForMultiline: 'comma' Style/TrailingMethodEndStatement: Enabled: true Style/TrailingUnderscoreVariable: Enabled: true AllowNamedUnderscoreVariables: true Style/TrivialAccessors: Enabled: true AllowPredicates: false Style/UnlessElse: Enabled: true Style/UnneededCapitalW: Enabled: true Style/UnneededCondition: Enabled: true Style/UnneededInterpolation: Enabled: true Style/UnneededPercentQ: Enabled: true Style/UnpackFirst: Enabled: true Style/VariableInterpolation: Enabled: true Style/WhenThen: Enabled: true Style/WhileUntilDo: Enabled: true Style/WhileUntilModifier: Enabled: true Style/WordArray: Enabled: true EnforcedStyle: 'percent' MinSize: 0 Style/YodaCondition: Enabled: true EnforcedStyle: 'forbid_for_all_comparison_operators' Style/ZeroLengthPredicate: Enabled: true fuubar-releases-v2.5.0/.rubocop_local.yml000066400000000000000000000017231355564405000204270ustar00rootroot00000000000000Layout/ClassStructure: Enabled: false Layout/ClosingParenthesisIndentation: Enabled: false Layout/DotPosition: EnforcedStyle: 'trailing' Layout/ExtraSpacing: Enabled: false Layout/IndentationWidth: Enabled: false Layout/MultilineMethodCallIndentation: Enabled: false Naming/FileName: Exclude: - 'lib/ruby-progressbar.rb' RSpec/NestedGroups: Enabled: false Style/ConstantVisibility: Enabled: false Style/FrozenStringLiteralComment: Enabled: false Style/HashSyntax: EnforcedStyle: hash_rockets Style/InverseMethods: Enabled: false Style/Lambda: Enabled: false Style/NumericPredicate: Enabled: false Style/OptionHash: Enabled: false Style/SafeNavigation: Enabled: false Style/SymbolArray: Enabled: false Style/TrailingCommaInArguments: EnforcedStyleForMultiline: 'no_comma' Style/TrailingCommaInArrayLiteral: EnforcedStyleForMultiline: 'no_comma' Style/TrailingCommaInHashLiteral: EnforcedStyleForMultiline: 'no_comma' fuubar-releases-v2.5.0/.rubocop_performance.yml000066400000000000000000000044541355564405000216420ustar00rootroot00000000000000# Last updated to 1.3.0 require: - 'rubocop-performance' ################################################################################ # PERFORMANCE ################################################################################ Performance/Caller: Enabled: true Performance/Casecmp: Enabled: true Performance/CaseWhenSplat: Enabled: true Performance/ChainArrayAllocation: Enabled: true Performance/CompareWithBlock: Enabled: true Performance/Count: Enabled: true Performance/Detect: Enabled: true Performance/DoubleStartEndWith: Enabled: true IncludeActiveSupportAliases: true Performance/EndWith: Enabled: true Performance/FixedSize: Enabled: true Performance/FlatMap: Enabled: true Performance/InefficientHashSearch: Enabled: true Performance/OpenStruct: Enabled: true Exclude: - '**/spec/**/*.rb' Performance/RangeInclude: Enabled: true Performance/RedundantBlockCall: Enabled: true Performance/RedundantMatch: Enabled: true Performance/RedundantMerge: Enabled: true Performance/RegexpMatch: Enabled: true Performance/ReverseEach: Enabled: true Performance/Size: Enabled: true Performance/StartWith: Enabled: true Performance/StringReplacement: Enabled: true Performance/TimesMap: Enabled: true AutoCorrect: true Performance/UnfreezeString: Enabled: true Performance/UriDefaultParser: Enabled: true fuubar-releases-v2.5.0/.rubocop_rspec.yml000066400000000000000000000142021355564405000204450ustar00rootroot00000000000000# Last updated to 1.33.0 require: - 'rubocop-rspec' ################################################################################ # RSPEC ################################################################################ Capybara/FeatureMethods: Enabled: true Capybara/CurrentPathExpectation: Enabled: true FactoryBot/CreateList: Enabled: true FactoryBot/AttributeDefinedStatically: Enabled: true Rails/HttpStatus: Enabled: true EnforcedStyle: 'numeric' RSpec/AlignLeftLetBrace: Enabled: true RSpec/AlignRightLetBrace: Enabled: false RSpec/AnyInstance: Enabled: true RSpec/AroundBlock: Enabled: true RSpec/Be: Enabled: true RSpec/BeEql: Enabled: true RSpec/BeforeAfterAll: Enabled: true Exclude: - 'spec/spec_helper.rb' - 'spec/rails_helper.rb' - 'spec/support/**/*.rb' RSpec/ContextWording: Enabled: true Prefixes: - 'administrators' - 'and' - 'anyone' - 'but' - 'or' - 'regular users' - 'when' - 'with' - 'without' RSpec/DescribeClass: Enabled: true RSpec/DescribeMethod: Enabled: true RSpec/DescribeSymbol: Enabled: true RSpec/DescribedClass: Enabled: true SkipBlocks: false EnforcedStyle: 'explicit' RSpec/Dialect: Enabled: true PreferredMethods: {} RSpec/EmptyExampleGroup: Enabled: false CustomIncludeMethods: [] RSpec/EmptyLineAfterExampleGroup: Enabled: true RSpec/EmptyLineAfterFinalLet: Enabled: true RSpec/EmptyLineAfterHook: Enabled: true RSpec/EmptyLineAfterSubject: Enabled: true Exclude: - '**/factories/*.rb' RSpec/ExampleLength: Enabled: false Max: 50 RSpec/ExampleWithoutDescription: Enabled: true EnforcedStyle: 'single_line_only' RSpec/ExampleWording: Enabled: true IgnoredWords: [] RSpec/ExpectActual: Enabled: true Exclude: - 'spec/routing/**/*' RSpec/ExpectChange: Enabled: true EnforcedStyle: 'method_call' RSpec/ExpectInHook: Enabled: true RSpec/ExpectOutput: Enabled: true RSpec/FilePath: Enabled: false IgnoreMethods: false CustomTransform: RuboCop: 'rubocop' RSpec: 'rspec' RSpec/Focus: Enabled: true RSpec/HookArgument: Enabled: true EnforcedStyle: 'each' RSpec/HooksBeforeExamples: Enabled: true RSpec/ImplicitExpect: Enabled: true EnforcedStyle: 'is_expected' RSpec/ImplicitSubject: Enabled: true EnforcedStyle: 'single_statement_only' RSpec/InstanceSpy: Enabled: true RSpec/InstanceVariable: Enabled: true RSpec/InvalidPredicateMatcher: Enabled: true RSpec/ItBehavesLike: Enabled: true EnforcedStyle: 'it_behaves_like' RSpec/IteratedExpectation: Enabled: true RSpec/LeadingSubject: Enabled: true RSpec/LetBeforeExamples: Enabled: true RSpec/LetSetup: Enabled: true RSpec/MessageChain: Enabled: true RSpec/MessageExpectation: Enabled: true EnforcedStyle: 'allow' RSpec/MessageSpies: Enabled: true EnforcedStyle: 'have_received' RSpec/MissingExampleGroupArgument: Enabled: true RSpec/MultipleDescribes: Enabled: true RSpec/MultipleExpectations: Enabled: false AggregateFailuresByDefault: true Max: 5 RSpec/MultipleSubjects: Enabled: true RSpec/NamedSubject: Enabled: true IgnoreSharedExamples: true RSpec/NestedGroups: Enabled: true Max: 2 RSpec/NotToNot: Enabled: true EnforcedStyle: 'not_to' RSpec/OverwritingSetup: Enabled: true RSpec/Pending: Enabled: false RSpec/PredicateMatcher: Enabled: true Strict: true EnforcedStyle: 'inflected' RSpec/ReceiveCounts: Enabled: true RSpec/ReceiveNever: Enabled: true RSpec/RepeatedDescription: Enabled: true RSpec/RepeatedExample: Enabled: true RSpec/ReturnFromStub: Enabled: true EnforcedStyle: 'and_return' RSpec/ScatteredLet: Enabled: true RSpec/ScatteredSetup: Enabled: true RSpec/SharedContext: Enabled: true RSpec/SharedExamples: Enabled: true RSpec/SingleArgumentMessageChain: Enabled: true RSpec/SubjectStub: Enabled: true RSpec/UnspecifiedException: Enabled: true RSpec/VerifiedDoubles: Enabled: true IgnoreSymbolicNames: false IgnoreNameless: false RSpec/VoidExpect: Enabled: true RSpec/Yield: Enabled: true fuubar-releases-v2.5.0/.ruby-version000066400000000000000000000000061355564405000174410ustar00rootroot000000000000002.6.3 fuubar-releases-v2.5.0/.travis.yml000066400000000000000000000003111355564405000171040ustar00rootroot00000000000000language: ruby rvm: - 2.0.0 - 2.0 - 2.1.0 - 2.1 - 2.2.0 - 2.2 - 2.3.0 - 2.3 - 2.4.0 - 2.4 - 2.5 - 2.6.0 - 2.6 before_install: - gem update bundler script: bundle exec rspec fuubar-releases-v2.5.0/.yamllint000066400000000000000000000035741355564405000166430ustar00rootroot00000000000000rules: braces: min-spaces-inside: 1 max-spaces-inside: 1 min-spaces-inside-empty: 0 max-spaces-inside-empty: 0 brackets: min-spaces-inside: 0 max-spaces-inside: 0 min-spaces-inside-empty: 0 max-spaces-inside-empty: 0 colons: max-spaces-before: 0 max-spaces-after: -1 commas: max-spaces-before: 0 min-spaces-after: 1 max-spaces-after: 1 comments: require-starting-space: true min-spaces-from-content: 1 comments-indentation: "enable" document-end: present: false document-start: present: false empty-lines: max: 1 max-start: 0 max-end: 0 empty-values: forbid-in-block-mappings: true forbid-in-flow-mappings: true hyphens: max-spaces-after: 1 indentation: spaces: 2 indent-sequences: true check-multi-line-strings: false key-duplicates: "enable" key-ordering: "disable" line-length: max: 90 allow-non-breakable-words: true allow-non-breakable-inline-mappings: true new-line-at-end-of-file: "enable" new-lines: type: "unix" octal-values: forbid-implicit-octal: true forbid-explicit-octal: true trailing-spaces: "enable" truthy: "enable" fuubar-releases-v2.5.0/CHANGELOG.md000066400000000000000000000237611355564405000166220ustar00rootroot00000000000000Unreleased ================================================================================ Change -------------------------------------------------------------------------------- * Stop Auto-Refresh When A Pry Session Starts Version v2.4.1 - July 3, 2019 ================================================================================ Version v2.4.0 - June 3, 2019 ================================================================================ Add -------------------------------------------------------------------------------- * Option To Hide Pending Spec Summary * fuubar_auto_refresh Configuration Option Version v2.3.2 - August 3, 2018 ================================================================================ Version v2.3.1 - January 2, 2018 ================================================================================ Fix -------------------------------------------------------------------------------- * binding.pry continuing to show bar refreshes Version v2.3.0 - January 2, 2018 ================================================================================ Change -------------------------------------------------------------------------------- * Thread allocation to happen once per suite run Version v2.3.0 - December 31, 2017 ================================================================================ Fix -------------------------------------------------------------------------------- * Invalid inverse method Add -------------------------------------------------------------------------------- * Per-Second Bar Refresh for Long-Running Examples Uncategorized -------------------------------------------------------------------------------- * Updated README to reflect supported Ruby versions. Version v2.2.0 - August 23, 2016 ================================================================================ * travis CI: use container-based env, add jruby, `gem update` before testing * Add workaround for JRuby crash * Require only 'rspec/core' instead of full rspec Version v2.1.1 - July 14, 2016 ================================================================================ Fixed -------------------------------------------------------------------------------- * Explicitly require delegate Version v2.1.0 - July 12, 2016 ================================================================================ Changed -------------------------------------------------------------------------------- * RSpec dependency to support 3.5 final Fixed -------------------------------------------------------------------------------- * Delegator not found Version v2.1.0 - April 24, 2016 ================================================================================ Added -------------------------------------------------------------------------------- * Certificate verification to the gem * Output module Changed -------------------------------------------------------------------------------- * to use our custom Output object Version v2.0.0 - August 7, 2014 ================================================================================ Bugfix -------------------------------------------------------------------------------- * Fix duplicate constant warnings Uncategorized -------------------------------------------------------------------------------- * update to rspec3 final Version v2.0.0 - May 27, 2014 ================================================================================ Feature -------------------------------------------------------------------------------- * Bump to Ruby 2.1.2 for development Uncategorized -------------------------------------------------------------------------------- * Rewrite specs for RSpec 3.0.0.rc1 * bundle update * Support and require RSpec 3.0.0.rc1 Version v2.0.0 - May 11, 2014 ================================================================================ * Create the bar after 'start' is called so that we can make sure that we get any of the custom options that could be passed in with the RSpec configuration value - Closes #65 * Remove the intermediate 'progress' let call so we always get the most up-to-date one * Bump minimum ruby-progressbar version to 1.4 so we can get the '#started?' method * Add CodeClimate code coverage reporting * Fix badges due to repo move * Update badges * Update gemfiles and ruby version for the RSpec beta Version v2.0.0 - January 31, 2014 ================================================================================ * Fix TravisCI link, Add RubyGems badge and add code climate badge to ReadMe * Switch to RSpec 3.0 compatible formatter * fix gem name * Added MRI 2.1.0 to README.md. * Added MRI 2.1.0 to .travis.yml. Version v1.3.2 - December 16, 2013 ================================================================================ * Fix an issue whereby loading rspec-rails did not properly require RSpec Version v1.3.1 - December 16, 2013 ================================================================================ * Fix issue where loading RSpec's configuration was causing issues when used with rake (due to the order of requirement) Version v1.3.0 - December 15, 2013 ================================================================================ * Tell Travis which command to run * Update Travis config to test 1.8.7, 1.9.2 and JRuby * Long overdue README Update * Add CHANGELOG - Closes #46 * Use Travis to test against multiple RSpec versions * Update RSpec dependency to work with RSpec 3.0 * Disable colors if the CONTINUOUS_INTEGRATION environment variable is set * If continuous integration is set, the throttle rate should be set to 1 second, otherwise just leave it at the default * Make sure that the default configuration options are set before each spec is run * Add continuous_integration to check if the CONTINUOUS_INTEGRATION environment variable is set * Upgrade ruby-progressbar with additional throttle logic * Remove the version file * Update Rakefile with bundler tasks for releasing gems * Remove spec_helper * Upgrade ruby-progressbar to the latest version * Add Gemfile.lock to the project * Add MIT License - Closes #42 * Update gemspec * Big refactoring to use the capabilities exposed by RSpec's formatters as well as replacing the specs with ones which are more representative * Add .ruby-version file * Use RSpec's helpers to output the failures at the proper time * Remove all references to instafail * Remove rspec-instafail from the project Version v1.2.1 - August 16, 2013 ================================================================================ * Delegate back up to the RSpec superclass if the reporter has yet to be started Version v1.2.0 - August 15, 2013 ================================================================================ * Allow fuubar to send messages to the output stream * Print end color escape sequence only when colors are enabled. * Broken link removed. * Corrupt Travis CI Status Image fixed. * Loosen the version requirement of ruby-progressbar since it follows SemVer * Releasing 1.1.0 * Update ruby-progressbar to 1.0.0 * Releasing 1.1.0.rc1 * Remove `start_dump` as it's no longer needed * Setting the example_count is handled in the super class and has been since v2.0 so we can just rely on calling `super` * Simplification now means we have a duplicate spec we can remove * ProgressBars finish themselves as soon as the progress equals the total so we no longer need to explicitly finish the bar * Now the the ProgressBar is in charge of keeping track of progress and total, we don't need to cross boundaries to spec this * Because we're using the formatters, we no longer have to manually update the counts after each increment * Use the new ruby-progressbar formatters for MOAR AWESOME!!!1! * The progress mark defaults to '=' in ruby-progressbar 1.0 so no need to set it in Fuubar * Update usages to the new ruby-progressbar syntax * Update ruby-progressbar to the 1.0 release candidate * Update legacy gem info in README * Update README ref to fuubar-legacy with a reminder to still require fuubar. * Add ref to fuubar-legacy gem in README * Fix the Travis build status image :) * Add the Travis build status badge * Remove the stillmaintained status badge * Releasing 1.0 * Releasing 1.0.0.rc1 * loosen instafail gem version req * bump instafail version * use let instead of instance variables * 0.0.6 * Bump rspec-instafail to 0.1.8. Closes #12 * Remove the outdated contributor link from the README * Releasing 0.0.5 * Switch back to ruby-progressbar * Releasing 0.0.4 * Temporarily(?) switch to chalofa_ruby-progressbar to fix issues with Spork. Closes #17 * Remove Gemfile.lock and add it to .gitignore * Travis and Josh made me add a Rakefile * Require StringIO in fuubar_spec. Closes #3 * Put Fuubar::COLORS in a method instead of a constant. Closes #15 * Bump the version number to 0.0.3 * Add the StillMaintained button to the README * Increment the progress bar before updating the title * Add the contributors line to the README * Bump the version number to 0.0.2 * Link to Github as the "homepage" in the .gemspec * Add a spec for the bar_mark change * Minor cleaups for spec/fuubar_spec * Use ==== instead of oooo in the progress bar * Use ruby-progressbar instead of progressbar * Add .rspec to eat my own dogfood * Update Gemfile.lock * Move the title 2 spaces to the right * Require rspec-instafail ~> 0.1.4 * Remove "--require fuubar" from the README * Linking to the video instead of embedding and using bc. blocks in the README * Wrap the video in the README in === * Add the LITL license :) * Add README.textile * Update the .gemspec descriptions * remove the Rakefile * Use Instafail's example_failed method * Add instafail, start_dump and state * Add inrement and with_color * Add example_passed, example_pending, example_failed and state * Add Fuubar.start * Add RSpec and create /spec * Initial commit fuubar-releases-v2.5.0/CODE-OF-CONDUCT.md000066400000000000000000000036771355564405000174500ustar00rootroot00000000000000# Contributor Code of Conduct As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality. Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery * Personal attacks * Trolling or insulting/derogatory comments * Public or private harassment * Publishing other's private information, such as physical or electronic addresses, without explicit permission * Other unethical or unprofessional conduct. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team. This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) fuubar-releases-v2.5.0/Gemfile000066400000000000000000000002611355564405000162720ustar00rootroot00000000000000# frozen_string_literal: true source 'https://rubygems.org' group :console do gem 'awesome_print', '~> 1.7' end # Specify your gem's dependencies in fuubar.gemspec gemspec fuubar-releases-v2.5.0/Gemfile.lock000066400000000000000000000013021355564405000172160ustar00rootroot00000000000000PATH remote: . specs: fuubar (2.5.0) rspec-core (~> 3.0) ruby-progressbar (~> 1.4) GEM remote: https://rubygems.org/ specs: awesome_print (1.8.0) diff-lcs (1.3) rspec (3.8.0) rspec-core (~> 3.8.0) rspec-expectations (~> 3.8.0) rspec-mocks (~> 3.8.0) rspec-core (3.8.0) rspec-support (~> 3.8.0) rspec-expectations (3.8.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.8.0) rspec-mocks (3.8.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.8.0) rspec-support (3.8.0) ruby-progressbar (1.10.0) PLATFORMS ruby DEPENDENCIES awesome_print (~> 1.7) fuubar! rspec (~> 3.7) BUNDLED WITH 1.17.2 fuubar-releases-v2.5.0/LICENSE.txt000066400000000000000000000020521355564405000166220ustar00rootroot00000000000000Copyright (c) 2010-2016 The Kompanee, Ltd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. fuubar-releases-v2.5.0/README.md000066400000000000000000000142301355564405000162570ustar00rootroot00000000000000Fuubar ================================================================================ [![Gem Version](https://img.shields.io/gem/v/fuubar.svg)](https://rubygems.org/gems/fuubar) ![Rubygems Rank Overall](https://img.shields.io/gem/rt/fuubar.svg) ![Rubygems Rank Daily](https://img.shields.io/gem/rd/fuubar.svg) ![Rubygems Downloads](https://img.shields.io/gem/dv/fuubar/stable.svg) [![Build Status](https://img.shields.io/travis/thekompanee/fuubar/master.svg)](http://travis-ci.org/thekompanee/fuubar) [![Code Climate](https://codeclimate.com/github/thekompanee/fuubar.svg)](https://codeclimate.com/github/thekompanee/fuubar) fuubar is an instafailing [RSpec][rspec] formatter that uses a progress bar instead of a string of letters and dots as feedback. ![examples][example-gif] Installation -------------------------------------------------------------------------------- ```ruby gem install fuubar # or in your Gemfile gem 'fuubar' ``` Usage -------------------------------------------------------------------------------- In order to use fuubar, you have three options. ### Option 1: Invoke It Manually Via The Command Line ### ``` rspec --format Fuubar --color ``` ### Option 2: Add It To Your Local `.rspec` File ### ``` # .rspec --format Fuubar --color ``` ### Option 3: Add It To Your `spec_helper.rb` ### ```ruby # spec/spec_helper.rb RSpec.configure do |config| config.add_formatter 'Fuubar' end ``` Advanced Usage -------------------------------- ### Customizing The Bar ### fuubar exposes an RSpec configuration variable called `fuubar_progress_bar_options` which, when set will be passed directly to [ruby-progressbar][rpb-github] which does all the heavy lifting. Take a look at the [ruby-progressbar documentation][rpb-docs] for details on all of the options you can pass in. #### Example #### Let's say for example that you would like to change the format of the bar. You would do that like so: ```ruby # spec/spec_helper.rb RSpec.configure do |config| config.fuubar_progress_bar_options = { :format => 'My Fuubar! <%B> %p%% %a' } end ``` would make it so that, when fuubar is output, it would look something like: My Fuubar! <================================ > 53.44% 00:12:31 ### Hiding Pending/Skipped Spec Summary ### By default fuubar follows RSpec's lead and will dump out a summary of all of the pending specs in the suite once the test run is over. This is a good idea because the additional noise is a nudge to fix those tests. We realize however that not all teams have the luxury of implementing all of the pending specs and therefore fuubar gives you the option of supressing that summary. #### Example #### ```ruby # spec/spec_helper.rb RSpec.configure do |config| config.fuubar_output_pending_results = false end ``` ### Enabling Auto-Refresh ### By default fuubar refreshes the bar only between each spec. You can enable an auto-refresh feature that will keep refreshing the bar (and therefore the ETA) every second. You can enable the feature as follows: ```ruby # spec/spec_helper.rb RSpec.configure do |config| config.fuubar_auto_refresh = true end ``` #### Undesirable effects Unfortunately this option doesn't play well with things like debuggers, as having a bar show up every second would be undesireable (which is why the feature is disabled by default). Depending on what you are using, you may be given ways to work around this problem. ##### Pry [Pry][pry] provides hooks that can be used to disable fuubar during a debugging session, you could for example add the following to your spec helper: ```ruby # spec/spec_helper.rb Pry.config.hooks.add_hook(:before_session, :disable_fuubar_auto_refresh) do |_output, _binding, _pry| RSpec.configuration.fuubar_auto_refresh = false end Pry.config.hooks.add_hook(:after_session, :restore_fuubar_auto_refresh) do |_output, _binding, _pry| RSpec.configuration.fuubar_auto_refresh = true end ``` ##### Byebug Unfortunately [byebug][byebug] does not provide hooks, so your best bet is to disable auto-refresh manually before calling `byebug`. ```ruby RSpec.configuration.fuubar_auto_refresh = false byebug ``` Security -------------------------------------------------------------------------------- fuubar is cryptographically signed. To be sure the gem you install hasn’t been tampered with, follow these steps: 1. Add my public key (if you haven’t already) as a trusted certificate ``` gem cert --add <(curl -Ls https://raw.github.com/thekompanee/fuubar/master/certs/thekompanee.pem) ``` 2. Install fuubar telling it to use security checks when possible. ``` gem install fuubar -P MediumSecurity ``` > **Note:** The `MediumSecurity` trust profile will verify signed gems, but > allow the installation of unsigned dependencies. > > This is necessary because fuubar has a dependency on RSpec which isn't signed, > and therefore we cannot use `HighSecurity`, which requires signed gems. Credits -------------------------------------------------------------------------------- fuubar was written by [Jeff Felchner][jefff-profile] and [Jeff Kreeftmeijer][jeffk-profile] ![The Kompanee][kompanee-logo] fuubar is maintained and funded by [The Kompanee, Ltd.][kompanee-site] The names and logos for The Kompanee are trademarks of The Kompanee, Ltd. License -------------------------------------------------------------------------------- fuubar is Copyright © 2010-2019 Jeff Kreeftmeijer and Jeff Felchner. It is free software, and may be redistributed under the terms specified in the [LICENSE][license] file. [byebug]: https://github.com/deivid-rodriguez/byebug [example-gif]: https://kompanee-public-assets.s3.amazonaws.com/readmes/fuubar-examples.gif [jefff-profile]: https://github.com/jfelchner [jeffk-profile]: https://github.com/jeffkreeftmeijer [kompanee-logo]: https://kompanee-public-assets.s3.amazonaws.com/readmes/kompanee-horizontal-black.png [kompanee-site]: http://www.thekompanee.com [license]: https://github.com/thekompanee/fuubar/blob/master/LICENSE.txt [pry]: https://github.com/pry/pry [rpb-docs]: https://github.com/jfelchner/ruby-progressbar/wiki/Options [rpb-github]: https://github.com/jfelchner/ruby-progressbar [rspec]: https://github.com/rspec fuubar-releases-v2.5.0/bin/000077500000000000000000000000001355564405000155505ustar00rootroot00000000000000fuubar-releases-v2.5.0/bin/setup000077500000000000000000000034451355564405000166440ustar00rootroot00000000000000#!/usr/bin/env bash # shellcheck disable=SC2037 ### # Install Bundler Source Credentials # declare private_url="$(command chamber show --as-env --files="config/settings/**/*.yml" | grep 'GEMFURY_URL' | perl -p -e 's/GEMFURY_URL="(.*)"/\1/')" declare private_token="$(command chamber show --as-env --files="config/settings/**/*.yml" | grep 'GEMFURY_TOKEN' | perl -p -e 's/GEMFURY_TOKEN="(.*)"/\1/')" if [ -n "${private_url}" ] && [ -n "${private_token}" ]; then bundle config --local "${private_url}" "${private_token}" else bundle config --delete "${private_url}" fi ### # Install Dependencies # echo 'Installing Ruby Packages...' gem install bundler --conservative bundle check || bundle install gem install rubocop --conservative echo 'Installing NPM Packages...' command npm install -g "jsonlint" 2> /dev/null command npm update -g "jsonlint" 2> /dev/null nodenv rehash 2> /dev/null ### # Install Project bin Executables # echo 'Installing project binaries...' if ! [ -d ".git/shellwreck-verification-dir" ]; then mkdir .git/shellwreck-verification-dir fi ### # Add Project Information to the Git Repository # echo 'Installing project configuration into git repo...' command git config --replace-all --local project.application-name 'fuubar' command git config --replace-all --local deployment.pipeline 'rubygems' command git config --replace-all --local deployment.profile 'thekompanee' command git config --replace-all --local workflow.issue-tracker 'github' ### # Setup Git Hook Templates # gem install overcommit --conservative if [ -d "${HOME}/.shellwreck/plugins/git/symlinks/hooks" ]; then rm --recursive --force .git/hooks ln -s "${HOME}/.shellwreck/plugins/git/symlinks/hooks" .git/hooks fi fuubar-releases-v2.5.0/certs/000077500000000000000000000000001355564405000161205ustar00rootroot00000000000000fuubar-releases-v2.5.0/certs/thekompanee.pem000066400000000000000000000031061355564405000211230ustar00rootroot00000000000000-----BEGIN CERTIFICATE----- MIIEdjCCAt6gAwIBAgIBATANBgkqhkiG9w0BAQsFADAyMTAwLgYDVQQDDCdhY2Nv dW50c19ydWJ5Z2Vtcy9EQz10aGVrb21wYW5lZS9EQz1jb20wHhcNMTgwODAzMjEz NjUzWhcNMTkwODAzMjEzNjUzWjAyMTAwLgYDVQQDDCdhY2NvdW50c19ydWJ5Z2Vt cy9EQz10aGVrb21wYW5lZS9EQz1jb20wggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAw ggGKAoIBgQDR6ma5Z4B2Qz+ykVUKn2CoWwoJ3vStZLDNc6nIOUTUDFS5rg43XwwB nnHCLhHZ9QeNflBpJObMwIUwDqxfZoxhmEILzUfv/yuoBj90zmnf7K2mmsPuT44a aTyZjYGid+yyTbzIpR4CCBHyvGNVm9ss64C2XXPNXrlLO3eAxgB9zNYkxOeJatZp d1h5FZIkAqgw7rx65W+e4HUSNnUvzUmZKoO0u/yMlnc4NcK05RdgHZ5FcXgSAZG/ MRzJ0rIdEk7wT8fBJ6w9oeFca8qW7C9M/ONJ4WiS+HoquCRcR+FiNAS3LQtQbiaR ADVS0CBzc2/6zBxWf/+C6wv8vEkoIDSgJ4T07IV2oEJH2ox1z0PYLcNQ9KIrz9iW +Q2DPjjO2+ymR3QOBpOrDr4keYS25tfUiSkBXemHj94Bm95/Szi8At8ywCtBVWUx AumxK9WPjr7WFDk5o71NX4SZft99Ey5XBeZ1+I2v4+ozio/cqOFz9UTarQryCf0e 2uJLFPBPkzcCAwEAAaOBljCBkzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNV HQ4EFgQUUTthhLkcr6+8JU1/B/dxKYaYnKUwLAYDVR0RBCUwI4EhYWNjb3VudHMr cnVieWdlbXNAdGhla29tcGFuZWUuY29tMCwGA1UdEgQlMCOBIWFjY291bnRzK3J1 YnlnZW1zQHRoZWtvbXBhbmVlLmNvbTANBgkqhkiG9w0BAQsFAAOCAYEAED2U/MD3 PHRHyeh9Ge3JTKJ/bjZLYquJWQr+ei4rsNk8oO2O6CcoiC84oNEnpnENHX9KiZu8 h7ylKO7u6vKJl9p9IV2YR0uOnXbSApYr5olDDlEz7HNGL3xUCJJhJBf09C4AkaAn kfaOv9Nkko0izYPpKsGlyKvbWBIzT3urBMRNbv95DzhBdNI6RF0q13eCePPqXPGe RaikE1dUWcVsW29XzO/RINmuMcKU6k0caC7X4kTD657Nf74oGUXHxYPmfUmYmppg uAF3jK5824uMvxofLysxqXhrUlTuCVndaexDm3bYK+YrTnZJEu6CimpMYa2u6JEE sWLZKmDLUxEUs/5jVGuypZbSBJBDb6VnmCkoEr3Fmh4O/FH4IZ+Gd3QdYCohLoKd 09JNgxpgZHCDuKwoycU+wXdWVSzMtchMQygnEu6th1SY5qHj4ISipBEBtKG0MdgB L3AbMAHTztj5YI+gvmpuV1B4Zv1QZjZWOeNSnLZdrnOQbyyDBzJyXmNV -----END CERTIFICATE----- fuubar-releases-v2.5.0/checksum/000077500000000000000000000000001355564405000166025ustar00rootroot00000000000000fuubar-releases-v2.5.0/checksum/fuubar-2.1.0.beta1.gem.md5000066400000000000000000000000411355564405000226660ustar00rootroot00000000000000c900b9cd71d993f179069ca57ade016a fuubar-releases-v2.5.0/checksum/fuubar-2.1.0.beta1.gem.sha512000066400000000000000000000002011355564405000232020ustar00rootroot00000000000000d8a402fecb070d357896ac4b00f5c00315f80dac856d1f897a9390e592527fccbfd82eaa3565b39cab6764500362c043b10d5243cfa466f97f9d24e6bdaa038d fuubar-releases-v2.5.0/checksum/fuubar-2.1.0.beta2.gem.md5000066400000000000000000000000411355564405000226670ustar00rootroot00000000000000029c4ef5fb39fd2aeecdf407cbeac760 fuubar-releases-v2.5.0/checksum/fuubar-2.1.0.beta2.gem.sha512000066400000000000000000000002011355564405000232030ustar00rootroot0000000000000036f26d21b8b3dd26645d4e78c08543e7e964848ae897f20a5f4c06ed306ba1496698172776f5cf9554fc9586fe955cbd2f93feea1fb1a8a1450e801b7d3b65c2 fuubar-releases-v2.5.0/checksum/fuubar-2.1.0.gem.md5000066400000000000000000000000411355564405000216730ustar00rootroot000000000000004a87848e6cfb2fd1c1caebc3339fd694 fuubar-releases-v2.5.0/checksum/fuubar-2.1.0.gem.sha256000066400000000000000000000001011355564405000222130ustar00rootroot00000000000000dfbfbd0a711b9716381004ebe8ae2e7c21012bb5b65313ce64f65e975855ae68 fuubar-releases-v2.5.0/checksum/fuubar-2.1.0.gem.sha512000066400000000000000000000002011355564405000222070ustar00rootroot00000000000000409d29b6160b43f8760bcc25399171f684e18dba63eb6c3fab0da8db830d86f5afb7bd2176520ace05777b1a75e1d7764173d33bd4d095e4bfad38027c28423a fuubar-releases-v2.5.0/checksum/fuubar-2.1.1.gem.md5000066400000000000000000000000411355564405000216740ustar00rootroot00000000000000075ebe5d53f3ae60954cf0c7444ca955 fuubar-releases-v2.5.0/checksum/fuubar-2.1.1.gem.sha256000066400000000000000000000001011355564405000222140ustar00rootroot00000000000000a98e63488dab6121168d1778545c60634025a7d3437a42e9583babf1f866e14e fuubar-releases-v2.5.0/checksum/fuubar-2.1.1.gem.sha512000066400000000000000000000002011355564405000222100ustar00rootroot000000000000008ef5982b838acb3f61cc4030f4ae42b31d3db49a081a580d04b680c010d24fb0e6f23feec4359ef77a3f332c718d9214a0da8c61425cbeee3e16440b05f74b02 fuubar-releases-v2.5.0/checksum/fuubar-2.2.0.gem.md5000066400000000000000000000000411355564405000216740ustar00rootroot00000000000000b6a84b44c8b547a6ffd2437f0f48587c fuubar-releases-v2.5.0/checksum/fuubar-2.2.0.gem.sha256000066400000000000000000000001011355564405000222140ustar00rootroot000000000000009b0263c4074f39c68b37f1e4e69a7d3cfc7523c41bea43601235daa723179b4a fuubar-releases-v2.5.0/checksum/fuubar-2.2.0.gem.sha512000066400000000000000000000002011355564405000222100ustar00rootroot000000000000005d421fe61b2c28a30165beb10852b31d8eda71af0e8b62dbb4f4385f064a2a5ab2929933df41c7665e1fae6750763a13cfa016a506d93e7adc1bb03c227ad0e7 fuubar-releases-v2.5.0/checksum/fuubar-2.3.0.beta1.gem.md5000066400000000000000000000000411355564405000226700ustar00rootroot00000000000000f6557f0c12b75535aa3dbef57e16305f fuubar-releases-v2.5.0/checksum/fuubar-2.3.0.beta1.gem.sha256000066400000000000000000000001011355564405000232100ustar00rootroot00000000000000c44197f5c4542352972109104efc83a6d59b0f7fe641f8efe972959cb8f90740 fuubar-releases-v2.5.0/checksum/fuubar-2.3.0.beta1.gem.sha512000066400000000000000000000002011355564405000232040ustar00rootroot000000000000007b9ed158ef9c9fd6f380f26ddae5c512d7eaffff47422ae6170ab57769e3adab9f78ae1be48b8a98057dd87262583f834ac8092f9575ee110dfd29b6d4edc800 fuubar-releases-v2.5.0/checksum/fuubar-2.3.0.beta2.gem.md5000066400000000000000000000000411355564405000226710ustar00rootroot00000000000000380e7046ff1f258af9fec227414f8b34 fuubar-releases-v2.5.0/checksum/fuubar-2.3.0.beta2.gem.sha256000066400000000000000000000001011355564405000232110ustar00rootroot00000000000000e246325574690eebb7af269c1ef3b002dfec9ef4ea3d4b283edf52753f9d67a4 fuubar-releases-v2.5.0/checksum/fuubar-2.3.0.beta2.gem.sha512000066400000000000000000000002011355564405000232050ustar00rootroot00000000000000ab381d3cf0584c3f7195808d8c7b3b4e74b3a1bff7b673ea1c515a11ffea6f2830f7072dec9a4bc7604d6336f1956c2597d1896be27a9a5fe11edd691ca3ef09 fuubar-releases-v2.5.0/checksum/fuubar-2.3.0.beta3.gem.md5000066400000000000000000000000411355564405000226720ustar00rootroot000000000000000ac4a65274af7ce822df18c2147e0c97 fuubar-releases-v2.5.0/checksum/fuubar-2.3.0.beta3.gem.sha256000066400000000000000000000001011355564405000232120ustar00rootroot000000000000004b498c753d22b7afd7bf4c1b808bff96f2a430c8b00eb325ecd8bf61b651c243 fuubar-releases-v2.5.0/checksum/fuubar-2.3.0.beta3.gem.sha512000066400000000000000000000002011355564405000232060ustar00rootroot00000000000000d1ea29f04aa0bc3ae9e3e719ed113c27392a9752aeae97e759f9f8ef43b163d65e41874ce9ddb69feefd1aeb32e15ed92a6890b2b5eeb1215e054902d05eaf05 fuubar-releases-v2.5.0/checksum/fuubar-2.3.0.gem.md5000066400000000000000000000000411355564405000216750ustar00rootroot000000000000005b23a81e3746f20932824c3c3a62a796 fuubar-releases-v2.5.0/checksum/fuubar-2.3.0.gem.sha256000066400000000000000000000001011355564405000222150ustar00rootroot00000000000000313a38c98f2a0012b834661266c783c4b0701b186f1af1c5a18adb0c5b6175e5 fuubar-releases-v2.5.0/checksum/fuubar-2.3.0.gem.sha512000066400000000000000000000002011355564405000222110ustar00rootroot00000000000000f512bd99c4418d52138ab7e637cac985f2f9df356b9f00d314132ada20fa231c7c3bf3028204c8c42155fdb2399ee31c910a380ac681954ec83560a3323a169b fuubar-releases-v2.5.0/checksum/fuubar-2.3.1.gem.md5000066400000000000000000000000411355564405000216760ustar00rootroot000000000000008210fb1993e9138f44bb01276d93aba9 fuubar-releases-v2.5.0/checksum/fuubar-2.3.1.gem.sha256000066400000000000000000000001011355564405000222160ustar00rootroot00000000000000740db1d70b6e3d4cdec2763ab53d290382136db5f5ef7c0aba7bb92be7f21601 fuubar-releases-v2.5.0/checksum/fuubar-2.3.1.gem.sha512000066400000000000000000000002011355564405000222120ustar00rootroot00000000000000e83b5474b6805f03e3a81e9b25d97e3a3819d7d3972c7f164dc4dc09bc163eb86457a3cfe5fd53df336f821846e5fd63739fe05c30200537c22aa329215c1900 fuubar-releases-v2.5.0/checksum/fuubar-2.3.2.gem.md5000066400000000000000000000000411355564405000216770ustar00rootroot00000000000000987d5afd89f48e85a06398f82bdd5d6c fuubar-releases-v2.5.0/checksum/fuubar-2.3.2.gem.sha256000066400000000000000000000001011355564405000222170ustar00rootroot00000000000000b95f3de056ae995f0a3a56667b498cf86d859b7ed9e3410daa3427026dc813eb fuubar-releases-v2.5.0/checksum/fuubar-2.3.2.gem.sha512000066400000000000000000000002011355564405000222130ustar00rootroot0000000000000072cb11eb21f6f3a03ca88467c10c0ebd58f2423d71e4322713dc2baef01ee94642353b99ee2914511c27b6d18cf66e277b8e3d2d2eb141bcc581a0f10787a25e fuubar-releases-v2.5.0/checksum/fuubar-2.4.0.gem.md5000066400000000000000000000000411355564405000216760ustar00rootroot00000000000000ce1a285270280c9ab706564a9fb1abee fuubar-releases-v2.5.0/checksum/fuubar-2.4.0.gem.sha256000066400000000000000000000001011355564405000222160ustar00rootroot00000000000000cf317d74788d74095d3d0b9a812b23bc106d38ad56b49f6741b5c0f446479e8f fuubar-releases-v2.5.0/checksum/fuubar-2.4.0.gem.sha512000066400000000000000000000002011355564405000222120ustar00rootroot00000000000000131aff31a76d60814b763d65432e72dc706c5cf31cd6aa9b918dad690b2b6335f3ad642951ce8eee2690021d4931b61bde97902424e3bfcb93a969442f2bd5ea fuubar-releases-v2.5.0/checksum/fuubar-2.4.1.gem.md5000066400000000000000000000000411355564405000216770ustar00rootroot0000000000000058f3d54d27bdbb3a0b906dcd86aea9f1 fuubar-releases-v2.5.0/checksum/fuubar-2.4.1.gem.sha256000066400000000000000000000001011355564405000222170ustar00rootroot00000000000000055d59003116ecf28ea802d84cf86279839c5568a63cc39ccc6837ec13f33699 fuubar-releases-v2.5.0/checksum/fuubar-2.4.1.gem.sha512000066400000000000000000000002011355564405000222130ustar00rootroot00000000000000eadeaf75637296ac10588ce5626ea903d08b9498bf97a1e5478eedff239221841845b9bf84ae190a0151c62ad622cd897ea031f4f744c4774c4b051bfc03b299 fuubar-releases-v2.5.0/fuubar.gemspec000066400000000000000000000030521355564405000176310ustar00rootroot00000000000000# encoding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) Gem::Specification.new do |spec| spec.name = 'fuubar' spec.version = '2.5.0' spec.authors = ['Nicholas Evans', 'Jeff Kreeftmeijer', 'jfelchner'] spec.email = ['jeff@kreeftmeijer.nl', 'accounts+git@thekompanee.com'] spec.summary = %q{the instafailing RSpec progress bar formatter} spec.description = %q{the instafailing RSpec progress bar formatter} spec.homepage = 'https://github.com/thekompanee/fuubar' spec.licenses = ['MIT'] spec.cert_chain = ['certs/thekompanee.pem'] spec.signing_key = File.expand_path('~/.gem/certs/thekompanee-private_key.pem') if $0 =~ /gem\z/ spec.executables = [] spec.files = Dir['{app,config,db,lib,templates}/**/*'] + %w{README.md LICENSE.txt} spec.metadata = { 'bug_tracker_uri' => 'https://github.com/thekompanee/fuubar/issues', 'changelog_uri' => 'https://github.com/thekompanee/fuubar/blob/master/CHANGELOG.md', 'documentation_uri' => 'https://github.com/thekompanee/fuubar/tree/releases/v2.4.0', 'homepage_uri' => 'https://github.com/thekompanee/fuubar', 'source_code_uri' => 'https://github.com/thekompanee/fuubar', 'wiki_uri' => 'https://github.com/thekompanee/fuubar/wiki', } spec.add_dependency 'rspec-core', ["~> 3.0"] spec.add_dependency 'ruby-progressbar', ["~> 1.4"] spec.add_development_dependency 'rspec', ["~> 3.7"] end fuubar-releases-v2.5.0/lib/000077500000000000000000000000001355564405000155465ustar00rootroot00000000000000fuubar-releases-v2.5.0/lib/fuubar.rb000066400000000000000000000111431355564405000173570ustar00rootroot00000000000000# frozen_string_literal: true require 'rspec/core' require 'rspec/core/formatters/base_text_formatter' require 'ruby-progressbar' require 'fuubar/output' RSpec.configuration.add_setting :fuubar_progress_bar_options, :default => {} RSpec.configuration.add_setting :fuubar_auto_refresh, :default => false RSpec.configuration.add_setting :fuubar_output_pending_results, :default => true class Fuubar < RSpec::Core::Formatters::BaseTextFormatter DEFAULT_PROGRESS_BAR_OPTIONS = { :format => ' %c/%C |%w>%i| %e ' }.freeze RSpec::Core::Formatters.register self, :close, :dump_failures, :dump_pending, :example_failed, :example_passed, :example_pending, :message, :start attr_accessor :example_tick_thread, :example_tick_lock, :progress, :passed_count, :pending_count, :failed_count def initialize(*args) super self.example_tick_lock = Mutex.new self.progress = ProgressBar.create( DEFAULT_PROGRESS_BAR_OPTIONS. merge(:throttle_rate => continuous_integration? ? 1.0 : nil). merge(:total => 0, :output => output, :autostart => false) ) end def start(notification) progress_bar_options = DEFAULT_PROGRESS_BAR_OPTIONS. merge(:throttle_rate => continuous_integration? ? 1.0 : nil). merge(configuration.fuubar_progress_bar_options). merge(:total => notification.count, :output => output, :autostart => false) self.progress = ProgressBar.create(progress_bar_options) self.passed_count = 0 self.pending_count = 0 self.failed_count = 0 self.example_tick_thread = Thread.new do loop do sleep(1) if configuration.fuubar_auto_refresh example_tick(notification) end end end # rubocop:disable Layout/BlockAlignment super with_current_color { progress.start } end def close(_notification) example_tick_thread.kill end def example_passed(_notification) self.passed_count += 1 increment end def example_pending(_notification) self.pending_count += 1 increment end def example_failed(notification) self.failed_count += 1 progress.clear output.puts notification.fully_formatted(failed_count) output.puts increment end def example_tick(_notification) example_tick_lock.synchronize do refresh end end def message(notification) if progress.respond_to? :log progress.log(notification.message) else super end end def dump_failures(_notification) # # We output each failure as it happens so we don't need to output them en # masse at the end of the run. # end def dump_pending(notification) return unless configuration.fuubar_output_pending_results super end # rubocop:disable Naming/MemoizedInstanceVariableName def output @fuubar_output ||= Fuubar::Output.new(super, configuration.tty?) end # rubocop:enable Naming/MemoizedInstanceVariableName private def increment with_current_color { progress.increment } end def refresh with_current_color { progress.refresh } end def with_current_color output.print "\e[#{color_code_for(current_color)}m" if color_enabled? yield output.print "\e[0m" if color_enabled? end def color_enabled? configuration.color_enabled? && !continuous_integration? end def current_color if failed_count > 0 configuration.failure_color elsif pending_count > 0 configuration.pending_color else configuration.success_color end end def color_code_for(*args) RSpec::Core::Formatters::ConsoleCodes.console_code_for(*args) end def configuration RSpec.configuration end def continuous_integration? @continuous_integration ||= \ ![nil, '', 'false'].include?(ENV['CONTINUOUS_INTEGRATION']) end end fuubar-releases-v2.5.0/lib/fuubar/000077500000000000000000000000001355564405000170325ustar00rootroot00000000000000fuubar-releases-v2.5.0/lib/fuubar/output.rb000066400000000000000000000005241355564405000207200ustar00rootroot00000000000000# frozen_string_literal: true require 'delegate' class Fuubar < RSpec::Core::Formatters::BaseTextFormatter class Output < ::Delegator def initialize(output, force_tty = false) @raw_output = output @force_tty = force_tty end def __getobj__ @raw_output end def tty? @force_tty || @raw_output.tty? end end end fuubar-releases-v2.5.0/settings/000077500000000000000000000000001355564405000166405ustar00rootroot00000000000000fuubar-releases-v2.5.0/settings/rubygems.yml000066400000000000000000000005661355564405000212270ustar00rootroot00000000000000rubygems: _secure_api_key: YtXKHnK6cuVOHYGmg175zded6dh0h6I3/es9BF0aFXo9XHAzocokXC5F+lSBBvJ2K/ROdR/CylCTkjevGnUT2ajfPJRfRylKKyYujaq0MjngBB4qQBtuhrOdK8ewzao7b6VfWc06gUIfPrgW0QS3rAutIjpd0q4A6H3qGoYKzTktJkEpEoitl/BEinGG9DYdm/2p0MmQ/oAm5l1hE8UI5/zyvA/4KnIdCzTZ7w/OmHJXEXQkiFwXZl1UUq8JDOLm+NbIxC5GHhJocZYOu6OdHXLDaf4UugxarlNVs83Wfvae0Db4VtDKYsdA/WacvITyTU7fPCoBCIfBW3zzrH+YgQ== fuubar-releases-v2.5.0/spec/000077500000000000000000000000001355564405000157325ustar00rootroot00000000000000fuubar-releases-v2.5.0/spec/fuubar/000077500000000000000000000000001355564405000172165ustar00rootroot00000000000000fuubar-releases-v2.5.0/spec/fuubar/output_spec.rb000066400000000000000000000011471355564405000221200ustar00rootroot00000000000000# frozen_string_literal: true require 'fuubar' class TestNonTtyOutputClass def tty? false end end class TestTtyOutputClass def hello 'hello' end def tty? true end end class Fuubar < RSpec::Core::Formatters::BaseTextFormatter describe Output do it 'delegates anything to the passed in object' do output = Output.new(TestTtyOutputClass.new) expect(output.hello).to eql 'hello' expect(output).to be_tty end it 'can override the TTY of the passed in class' do output = Output.new(TestNonTtyOutputClass.new, true) expect(output).to be_tty end end end fuubar-releases-v2.5.0/spec/fuubar_spec.rb000066400000000000000000000171061355564405000205620ustar00rootroot00000000000000# frozen_string_literal: true require 'fuubar' require 'stringio' require 'ostruct' describe Fuubar do let(:output) do io = StringIO.new allow(io).to receive(:tty?). and_return(true) io end let(:formatter) { Fuubar.new(output) } let(:example) { self.class.example } let(:example_count) { 2 } let(:start_notification) { RSpec::Core::Notifications::StartNotification.new(example_count, Time.now) } let(:message_notification) { RSpec::Core::Notifications::MessageNotification.new('My Message') } let(:example_notification) { RSpec::Core::Notifications::ExampleNotification.for(example) } let(:pending_notification) { RSpec::Core::Notifications::ExampleNotification.for(pending_example) } let(:failed_notification) { RSpec::Core::Notifications::ExampleNotification.for(failed_example) } let(:failed_example) do exception = RuntimeError.new('Test Fuubar Error') exception.set_backtrace [ "/my/filename.rb:4:in `some_method'" ] example = self.class.example example.metadata[:file_path] = '/my/example/spec.rb' example.metadata[:execution_result].status = :failed example.metadata[:execution_result].exception = exception example end let(:pending_example) do example = self.class.example example.metadata[:execution_result].pending_fixed = true example end let(:fuubar_results) do output.rewind output.read end before(:each) do RSpec.configuration.fuubar_progress_bar_options = { :length => 40, :throttle_rate => 0.0 } ENV.delete('CONTINUOUS_INTEGRATION') end context 'when it is created' do it 'does not start the bar until the formatter is started' do expect(formatter.progress).not_to be_started formatter.start(start_notification) expect(formatter.progress).to be_started end it 'creates a new ProgressBar' do expect(formatter.progress).to be_instance_of ProgressBar::Base end it 'sets the format of the bar to the default' do expect(formatter.progress.instance_variable_get(:@format)).to eql ' %c/%C |%w>%i| %e ' end it 'sets the total to the number of examples' do expect(formatter.progress.total).to be_zero end it 'sets the bar\'s output' do expect(formatter.progress.send(:output).stream).to be_a Fuubar::Output expect(formatter.progress.send(:output).stream.__getobj__).to eql output end context 'and continuous integration is enabled' do before(:each) do RSpec.configuration.fuubar_progress_bar_options = { :length => 40 } ENV['CONTINUOUS_INTEGRATION'] = 'true' end it 'throttles the progress bar at one second' do throttle = formatter.progress.__send__(:output).__send__(:throttle) throttle_rate = throttle.__send__(:rate) expect(throttle_rate).to eql 1.0 # rubocop:disable RSpec/BeEql end context 'when processing an example' do before(:each) do formatter.start(start_notification) throttle = formatter.progress.__send__(:output).__send__(:throttle) _throttle_rate = throttle.__send__(:rate=, 0.0) output.rewind formatter.example_passed(example) end it 'does not output color codes' do expect(fuubar_results).to start_with " 1/2 |== 50 ==> | ETA: 00:00:00 \r" end end end context 'and continuous integration is not enabled' do before(:each) do RSpec.configuration.fuubar_progress_bar_options = { :length => 40 } ENV['CONTINUOUS_INTEGRATION'] = 'false' end it 'throttles the progress bar at the default rate' do throttle = formatter.progress.__send__(:output).__send__(:throttle) throttle_rate = throttle.__send__(:rate) expect(throttle_rate).to eql 0.01 # rubocop:disable RSpec/BeEql end context 'when processing an example' do before(:each) do formatter.start(start_notification) throttle = formatter.progress.__send__(:output).__send__(:throttle) _throttle_rate = throttle.__send__(:rate=, 0.0) output.rewind formatter.example_passed(example) end it 'does not output color codes' do expect(fuubar_results).to start_with "\e[32m 1/2 |== 50 ==> | ETA: 00:00:00 \r\e[0m" end end end end context 'when custom options are set after the formatter is created' do before(:each) do formatter RSpec.configuration.fuubar_progress_bar_options = { :length => 40, :throttle_rate => 0.0, :format => '%c' } end context 'when the bar is started' do before(:each) { formatter.start(start_notification) } it 'properly creates the bar' do expect(formatter.progress.instance_variable_get(:@format)).to eql '%c' end end end context 'when it is started' do before(:each) { formatter.start(start_notification) } it 'sets the total to the number of examples' do expect(formatter.progress.total).to be 2 end context 'and no custom options are passed in' do it 'sets the format of the bar to the default' do expect(formatter.progress.instance_variable_get(:@format)).to eql ' %c/%C |%w>%i| %e ' end end context 'and an example passes' do before(:each) do output.rewind formatter.example_passed(example) end it 'outputs the proper bar information' do expect(fuubar_results).to start_with "\e[32m 1/2 |== 50 ==> | ETA: 00:00:00 \r\e[0m" end end context 'and an example pends' do before(:each) do output.rewind formatter.example_pending(pending_example) end it 'outputs the proper bar information' do formatter.progress.increment expect(fuubar_results).to start_with "\e[33m 1/2 |== 50 ==> | ETA: 00:00:00 \r\e[0m" end context 'and then an example succeeds' do before(:each) do output.rewind formatter.example_pending(pending_notification) end it 'outputs the pending bar' do expect(fuubar_results).to start_with "\e[33m 2/2 |===== 100 ======>| Time: 00:00:00 \n\e[0m" end end end context 'and an example fails' do it 'outputs the proper bar information' do output.rewind formatter.example_failed(failed_notification) expect(fuubar_results).to end_with "\e[31m 1/2 |== 50 ==> | ETA: 00:00:00 \r\e[0m" end context 'and then an example succeeds' do before(:each) do formatter.example_failed(failed_notification) output.rewind formatter.example_passed(example) end it 'outputs the failed bar' do expect(fuubar_results).to start_with "\e[31m 2/2 |===== 100 ======>| Time: 00:00:00 \n\e[0m" end end context 'and then an example pends' do before(:each) do formatter.example_failed(failed_notification) output.rewind formatter.example_pending(example_notification) end it 'outputs the failed bar' do expect(fuubar_results).to start_with "\e[31m 2/2 |===== 100 ======>| Time: 00:00:00 \n\e[0m" end end end it 'can properly log messages' do formatter.message message_notification expect(fuubar_results).to end_with "My Message\n 0/2 |> | ETA: ??:??:?? \r" end end end