zuazo/owncloud-cookbook

View on GitHub

Showing 9 of 9 total issues

File metadata.rb has 394 lines of code (exceeds 250 allowed). Consider refactoring.
Open

name 'owncloud'
maintainer 'Xabier de Zuazo'
maintainer_email 'xabier@zuazo.org'
license 'Apache 2.0'
description <<-EOH
Severity: Minor
Found in metadata.rb - About 5 hrs to fix

    File default.rb has 319 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    dbtype = node['owncloud']['config']['dbtype']
    download_url =
      node['owncloud']['download_url'] % { version: node['owncloud']['version'] }
    
    # Sync apt package index
    Severity: Minor
    Found in recipes/default.rb - About 3 hrs to fix

      Consider simplifying this complex logical expression.
      Open

        if (platform_family?('rhel') && !platform?('amazon') &&
           node['platform_version'].to_i < 7) ||
           (platform?('debian') && node['platform_version'].to_i < 7) ||
           (platform?('ubuntu') && node['platform_version'].to_i < 12)
          '7.0.4'
      Severity: Major
      Found in attributes/default.rb - About 1 hr to fix

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        when 'fedora'
          default['owncloud']['packages']['core'] =
            %w(php-gd php-mbstring php-xml php-intl samba-client)
          default['owncloud']['packages']['sqlite'] = %w(php-pdo)
          default['owncloud']['packages']['mysql'] = %w(php-mysql)
        Severity: Minor
        Found in attributes/packages.rb and 1 other location - About 50 mins to fix
        attributes/packages.rb on lines 23..28

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 43.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        when 'debian'
          default['owncloud']['packages']['core'] =
            %w(php5-gd php5-intl php5-curl php5-json smbclient)
          default['owncloud']['packages']['sqlite'] = %w(php5-sqlite)
          default['owncloud']['packages']['mysql'] = %w(php5-mysql)
        Severity: Minor
        Found in attributes/packages.rb and 1 other location - About 50 mins to fix
        attributes/packages.rb on lines 43..48

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 43.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

            default['owncloud']['packages']['core'] =
              %w(php-gd php-mbstring php-xml php-intl samba-client)
            default['owncloud']['packages']['sqlite'] = %w(php-pdo)
            default['owncloud']['packages']['mysql'] = %w(php-mysql)
            default['owncloud']['packages']['pgsql'] = %w(php-pgsql)
        Severity: Minor
        Found in attributes/packages.rb and 1 other location - About 45 mins to fix
        attributes/packages.rb on lines 31..35

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 41.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

            default['owncloud']['packages']['core'] =
              %w(php53-gd php53-mbstring php53-xml php53-intl samba-client)
            default['owncloud']['packages']['sqlite'] = %w(php53-pdo)
            default['owncloud']['packages']['mysql'] = %w(php53-mysql)
            default['owncloud']['packages']['pgsql'] = %w(php53-pgsql)
        Severity: Minor
        Found in attributes/packages.rb and 1 other location - About 45 mins to fix
        attributes/packages.rb on lines 37..41

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 41.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

          if node['platform'] == 'ubuntu' && node['platform_version'].to_i >= 15
            r = resources(service: 'postfix')
            r.provider(Chef::Provider::Service::Debian)
          end
        Severity: Minor
        Found in recipes/default.rb and 1 other location - About 15 mins to fix
        recipes/_php_fpm.rb on lines 47..50

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 25.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        if node['platform'] == 'ubuntu' && node['platform_version'].to_i >= 15
          r = resources(service: 'php-fpm')
          r.provider(Chef::Provider::Service::Debian)
        end
        Severity: Minor
        Found in recipes/_php_fpm.rb and 1 other location - About 15 mins to fix
        recipes/default.rb on lines 247..250

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 25.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Severity
        Category
        Status
        Source
        Language