Skip to content

Commit

Permalink
Fix code style.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Apr 12, 2022
1 parent 8ea60a6 commit fbe3f64
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/tasks/fluor.rake
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ task :fluor => [:'brew:casks_and_formulae'] do
{
id: 'csgo_osx64',
path: '~/Library/Application Support/Steam/steamapps/common/Counter-Strike Global Offensive/csgo_osx64',
}
},
]

write 'AppRules', games.map { |id:, path:|
{
'behaviour' => 2,
'id' => bundle_id,
'id' => id,
'path' => File.expand_path(path),
}
}
Expand Down
9 changes: 7 additions & 2 deletions lib/tasks/git.rake
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ namespace :git do
command 'git', 'config', '--global', 'diff.strings.binary', 'false'
add_line_to_file git_attributes, '*.strings utf16 diff=strings'

command 'git', 'config', '--global', 'diff.sops.textconv', 'sh -c "echo \'-----BEGIN SOPS ENCRYPTED CONTENT-----\' && sops -d \\"${@}\\" && echo \'-----END SOPS ENCRYPTED CONTENT-----\'"'
command 'git', 'config', '--global', 'diff.sops.textconv',
'sh -c "echo \'-----BEGIN SOPS ENCRYPTED CONTENT-----\' && ' \
'sops -d \\"${@}\\" && ' \
'echo \'-----END SOPS ENCRYPTED CONTENT-----\'"'
command 'git', 'config', '--global', 'diff.sops.binary', 'false'
add_line_to_file git_attributes, '*.enc.yml diff=sops'

Expand All @@ -46,6 +49,7 @@ namespace :git do

git_gpg = which 'git-gpg'
raise if git_gpg.nil?

command 'git', 'config', '--global', 'gpg.program', git_gpg

# Always use SSH URLs for pushing to GitHub and for pulling from private repositories.
Expand Down Expand Up @@ -82,7 +86,8 @@ namespace :git do

gpg = which 'gpg'
raise if gpg.nil?
git_gpg = git_bin_path/'git-gpg'

git_gpg = git_bin_path.join('git-gpg')
git_gpg.write <<~SH
#!/usr/bin/env bash
Expand Down
9 changes: 5 additions & 4 deletions lib/tasks/vscode.rake
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ require 'json'
task :vscode do
settings_path = Pathname('~/Library/Application Support/Code/User/settings.json').expand_path

settings = settings_path.exist? ? JSON.parse(settings_path.read) : {}

settings.merge!({
settings = {
'trailing-spaces.trimOnSave' => true,
'trailing-spaces.highlightCurrentLine' => false,
# FIXME: https://github.com/shardulm94/vscode-trailingspaces/issues/55
Expand All @@ -20,7 +18,10 @@ task :vscode do
'editor.cursorWidth' => 1,
'editor.tabSize' => 2,
'editor.fontSize' => 13,
})
}

# Combine wanted with existing settings.
settings = JSON.parse(settings_path.read).merge(settings) if settings_path.exist?

settings_path.write JSON.pretty_generate(settings)

Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/xcode.rake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace :xcode do
pkg = '/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg'

ruby_include_dir = Pathname('/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/include')
header = ruby_include_dir / 'ruby-2.3.0/universal-darwin18/ruby/config.h'
header = ruby_include_dir.join('ruby-2.3.0/universal-darwin18/ruby/config.h')

command sudo, 'installer', '-pkg', pkg, '-target', '/' if File.exist?(pkg) && !header.exist?
end
Expand Down

0 comments on commit fbe3f64

Please sign in to comment.