Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
fixes robocop warnings - no code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ohadlevy committed Apr 14, 2016
1 parent 36e1b18 commit bcc406f
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 15 deletions.
9 changes: 9 additions & 0 deletions .rubocop.yml
@@ -0,0 +1,9 @@
inherit_from:
- .rubocop_todo.yml

AllCops:
RunRailsCops: true # always run the rails cops

# Don't enforce documentation
Style/Documentation:
Enabled: false
13 changes: 13 additions & 0 deletions .rubocop_todo.yml
@@ -0,0 +1,13 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2016-04-14 12:19:19 +0300 using RuboCop version 0.35.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: SupportedStyles, UseHashRocketsWithSymbolValues.
Style/HashSyntax:
EnforcedStyle: hash_rockets
2 changes: 1 addition & 1 deletion Gemfile
@@ -1,3 +1,3 @@
source "http://rubygems.org"
source 'http://rubygems.org'

gemspec
21 changes: 11 additions & 10 deletions foreman_memcache.gemspec
Expand Up @@ -2,19 +2,20 @@ require File.expand_path('../lib/foreman_memcache/version', __FILE__)
require 'date'

Gem::Specification.new do |s|
s.name = "foreman_memcache"
s.name = 'foreman_memcache'
s.version = ForemanMemcache::VERSION
s.authors = ["Ohad Levy"]
s.email = ["ohadlevy@gmail.com"]
s.homepage = "http://theforeman.org"
s.summary = "Adds memcache integeration to foreman"
s.description = "adds memcache support to foreman"
s.licenses = ["GPL-3"]
s.authors = ['Ohad Levy']
s.email = ['ohadlevy@gmail.com']
s.homepage = 'http://theforeman.org'
s.summary = 'Adds memcache integeration to foreman'
s.description = 'adds memcache support to foreman'
s.licenses = ['GPL-3']

s.files = Dir["{app,config,db,lib}/**/*"] + ["LICENSE", "Rakefile", "README.md", "foreman_memcache.yaml.example"]
s.test_files = Dir["test/**/*"]
s.files = Dir['{app,config,db,lib}/**/*'] + \
%w(LICENSE Rakefile README.md foreman_memcache.yaml.example)
s.test_files = Dir['test/**/*']

s.add_dependency "dalli"
s.add_dependency 'dalli'
s.add_dependency 'deface'
s.add_development_dependency 'rubocop'
s.add_development_dependency 'rdoc'
Expand Down
5 changes: 2 additions & 3 deletions lib/foreman_memcache.rb
@@ -1,7 +1,7 @@
module ForemanMemcache
class Engine < ::Rails::Engine
isolate_namespace ForemanMemcache
initializer "setup_memcache", :before => :initialize_cache do |app|
initializer 'setup_memcache', :before => :initialize_cache do |app|
args = [:dalli_store]
if (s = SETTINGS[:memcache])
Array.wrap(s[:hosts]).each { |h| args << h }
Expand All @@ -11,13 +11,12 @@ class Engine < ::Rails::Engine
app.config.cache_store = args
end

initializer "setup_memcache", :after => :load_config_initializers do |app|
initializer 'setup_memcache', :after => :load_config_initializers do |app|
# reuse cache store for sessions
app.config.session_store ActionDispatch::Session::CacheStore
# register plugin in Foreman
Foreman::Plugin.register :foreman_memcache do
end
end

end
end
2 changes: 1 addition & 1 deletion lib/foreman_memcache/version.rb
@@ -1,3 +1,3 @@
module ForemanMemcache
VERSION = "0.0.3"
VERSION = '0.0.3'
end

0 comments on commit bcc406f

Please sign in to comment.