diff options
author | Gabriel Mazetto <gabriel@gitlab.com> | 2016-05-10 23:58:06 -0300 |
---|---|---|
committer | Gabriel Mazetto <gabriel@gitlab.com> | 2016-05-13 04:46:56 -0300 |
commit | f5a0ac0fc197bae2eb5fe1045ed237cdbbaf6ea4 (patch) | |
tree | 29c89f80adc403185f931966d49c67f830be842b /lib | |
parent | 311fb58c44fe6dd14709c8eb8f9346ec73e03aff (diff) | |
download | gitlab-ce-f5a0ac0fc197bae2eb5fe1045ed237cdbbaf6ea4.tar.gz |
Codestyle: make sure we have space around operators
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/helpers.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/email/reply_parser.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/redis.rb | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 5e638dbe16a..cadf9f98fe3 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -2,7 +2,7 @@ module API module Helpers PRIVATE_TOKEN_HEADER = "HTTP_PRIVATE_TOKEN" PRIVATE_TOKEN_PARAM = :private_token - SUDO_HEADER ="HTTP_SUDO" + SUDO_HEADER = "HTTP_SUDO" SUDO_PARAM = :sudo def parse_boolean(value) diff --git a/lib/gitlab/email/reply_parser.rb b/lib/gitlab/email/reply_parser.rb index 6ed36b51f12..3411eb1d9ce 100644 --- a/lib/gitlab/email/reply_parser.rb +++ b/lib/gitlab/email/reply_parser.rb @@ -65,7 +65,7 @@ module Gitlab (l =~ /On \w+ \d+,? \d+,?.*wrote:/) # Headers on subsequent lines - break if (0..2).all? { |off| lines[idx+off] =~ REPLYING_HEADER_REGEX } + break if (0..2).all? { |off| lines[idx + off] =~ REPLYING_HEADER_REGEX } # Headers on the same line break if REPLYING_HEADER_LABELS.count { |label| l.include?(label) } >= 3 diff --git a/lib/gitlab/redis.rb b/lib/gitlab/redis.rb index f7db7a6391c..40766f35f77 100644 --- a/lib/gitlab/redis.rb +++ b/lib/gitlab/redis.rb @@ -25,7 +25,7 @@ module Gitlab end @pool.with { |redis| yield redis } end - + def self.redis_store_options url = new.url redis_config_hash = ::Redis::Store::Factory.extract_host_options_from_uri(url) @@ -40,10 +40,10 @@ module Gitlab def initialize(rails_env=nil) rails_env ||= Rails.env config_file = File.expand_path('../../../config/resque.yml', __FILE__) - + @url = "redis://localhost:6379" if File.exist?(config_file) - @url =YAML.load_file(config_file)[rails_env] + @url = YAML.load_file(config_file)[rails_env] end end end |