Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RuboCop warnings. #7

Merged
merged 1 commit into from May 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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