Giter Site home page Giter Site logo

chef-sar's People

Watchers

 avatar  avatar

chef-sar's Issues

sar vs. chef-sar cookbooks

Philip,

When I search for "sar" on https://supermarket.chef.io I get two hits: sar and chef-sar. Both appear to be by you, but with different usernames. They appear to be similar in content, but only the sar one has a button to link to the source on GitHub.

I'm curious why that is. Can you share the background on why there are two cookbooks instead of just one? As a relative newcomer to the Chef community, I can't figure it out :-)

Thanks,

Linc

Address rubocop v0.28.0 offenses found in cookbook v0.0.1

Philip,

At my company they encourage us to run the Ruby linting tool called "rubocop" (which comes with the ChefDK) on our cookbook Ruby files. In my limited experience with it, it's kind of a hassle to use because it's quite sensitive (it'll pick up tons of things that "ruby -c " doesn't care about). But I like it because it helps me write Ruby in what I'm hoping is a more standard and readable way.

As a practice for me as a newcomer to the Chef community, I propose to address these straightforward "rubocop offenses" in a pull request.

Linc Abbey

chef-sar (linc)$ pwd
/Users/linc/chef/chef-repo/cookbooks/chef-sar

chef-sar (linc)$ rubocop -n
warning: parser/current is loading parser/ruby21, which recognizes
warning: 2.1.7-compliant syntax, but you are running 2.1.5.
Inspecting 3 files
C.C

Offenses:

metadata.rb:1:5: C: Put one space between the method name and the first argument.
name             "sar"
    ^^^^^^^^^^^^^
metadata.rb:1:18: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
name             "sar"
                 ^^^^^
metadata.rb:2:11: C: Put one space between the method name and the first argument.
maintainer       "Philip Hutchins"
          ^^^^^^^
metadata.rb:2:18: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
maintainer       "Philip Hutchins"
                 ^^^^^^^^^^^^^^^^^
metadata.rb:3:18: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
maintainer_email "[email protected]"
                 ^^^^^^^^^^^^^^^^^^^^
metadata.rb:4:8: C: Put one space between the method name and the first argument.
license          "Apache 2.0"
       ^^^^^^^^^^
metadata.rb:4:18: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
license          "Apache 2.0"
                 ^^^^^^^^^^^^
metadata.rb:5:12: C: Put one space between the method name and the first argument.
description      "Installs/Configures sar"
           ^^^^^^
metadata.rb:5:18: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
description      "Installs/Configures sar"
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
metadata.rb:7:8: C: Put one space between the method name and the first argument.
version          "0.0.1"
       ^^^^^^^^^^
metadata.rb:7:18: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
version          "0.0.1"
                 ^^^^^^^
metadata.rb:9:1: C: %w-literals should be delimited by ( and )
%w{ ubuntu debian redhat centos scientific amazon fedora }.each do |os|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
metadata.rb:13:1: C: %w-literals should be delimited by ( and )
%w{ yum apt }.each do |ckbk|
^^^^^^^^^^^^^
recipes/default.rb:10:13: C: Redundant curly braces around a hash parameter.
  variables({
            ^
recipes/default.rb:11:5: C: Use the new Ruby 1.9 hash syntax.
    :sar_enabled => node['sar']['enabled'],
    ^^^^^^^^^^^^^^^
recipes/default.rb:11:5: C: Use 2 spaces for indentation in a hash, relative to the first position after the preceding left parenthesis.
    :sar_enabled => node['sar']['enabled'],
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
recipes/default.rb:12:5: C: Use the new Ruby 1.9 hash syntax.
    :sa1_options => node['sar']['sa1_options'],
    ^^^^^^^^^^^^^^^
recipes/default.rb:13:5: C: Use the new Ruby 1.9 hash syntax.
    :sa2_options => node['sar']['sa2_options']
    ^^^^^^^^^^^^^^^
recipes/default.rb:14:3: C: Indent the right brace the same as the first position after the preceding left parenthesis.
  })
  ^
recipes/default.rb:22:13: C: Redundant curly braces around a hash parameter.
  variables({
            ^
recipes/default.rb:23:5: C: Use the new Ruby 1.9 hash syntax.
    :run_every_minutes => node['sar']['cron']['run_every_minutes']
    ^^^^^^^^^^^^^^^^^^^^^
recipes/default.rb:23:5: C: Use 2 spaces for indentation in a hash, relative to the first position after the preceding left parenthesis.
    :run_every_minutes => node['sar']['cron']['run_every_minutes']
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
recipes/default.rb:24:3: C: Indent the right brace the same as the first position after the preceding left parenthesis.
  })
  ^

3 files inspected, 23 offenses detected

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.