Skip to content

Commit

Permalink
Merge pull request #7 from MikeMcQuaid/rubocop-fixes
Browse files Browse the repository at this point in the history
Fix RuboCop warnings.
  • Loading branch information
MikeMcQuaid committed May 29, 2017
2 parents 9efa1ac + f70f6a0 commit dbaa4e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -12,17 +12,18 @@ before_install:
- HOMEBREW_REPOSITORY="$(brew --repo)"
- sudo chown -R "$USER" "$HOMEBREW_REPOSITORY"
- git -C "$HOMEBREW_REPOSITORY" reset --hard origin/master
- export HOMEBREW_DEVELOPER="1"
- brew update || brew update
- HOMEBREW_TAP_DIR="$(brew --repo "$TRAVIS_REPO_SLUG")"
- mkdir -p "$HOMEBREW_TAP_DIR"
- rm -rf "$HOMEBREW_TAP_DIR"
- ln -s "$PWD" "$HOMEBREW_TAP_DIR"
- export HOMEBREW_DEVELOPER="1"
- ulimit -n 1024
- export PATH="$HOME/.gem/ruby/2.0.0/bin:$PATH"
- gem install --user bundler

script:
- brew style "$TRAVIS_REPO_SLUG"
- brew formula-analytics --help

notifications:
Expand Down
4 changes: 3 additions & 1 deletion cmd/brew-formula-analytics.rb
Expand Up @@ -21,7 +21,7 @@

# Configure RubyGems.
REPO_ROOT = Pathname.new "#{File.dirname(__FILE__)}/.."
VENDOR_RUBY = "#{REPO_ROOT}/vendor/ruby"
VENDOR_RUBY = "#{REPO_ROOT}/vendor/ruby".freeze
BUNDLER_SETUP = Pathname.new "#{VENDOR_RUBY}/bundler/setup.rb"
unless BUNDLER_SETUP.exist?
Homebrew.install_gem_setup_path! "bundler"
Expand All @@ -48,6 +48,8 @@
# Using a service account:
# https://developers.google.com/api-client-library/ruby/auth/service-accounts
credentials = ServiceAccountCredentials.make_creds(
# Need to pass an open file descriptor here
# rubocop:disable Style/AutoResourceCleanup
json_key_io: File.open(CREDENTIALS_PATH),
scope: API_SCOPE,
)
Expand Down

0 comments on commit dbaa4e5

Please sign in to comment.