summaryrefslogtreecommitdiff
path: root/lib/pry/commands/gist.rb
diff options
context:
space:
mode:
authorKyrylo Silin <silin@kyrylo.org>2018-10-13 03:20:08 +0800
committerGitHub <noreply@github.com>2018-10-13 03:20:08 +0800
commite7f01818d36e92c883beb251badb045e5cdaefa7 (patch)
tree42db65f6de53c1d74de1a52d50d1a546dc9fdcd6 /lib/pry/commands/gist.rb
parent4f121a6a07a94dd5f7a71e75a406147d9d21568d (diff)
parentf33d82779a6ecbadc6a6deb196d4477829500b1b (diff)
downloadpry-e7f01818d36e92c883beb251badb045e5cdaefa7.tar.gz
Merge pull request #1798 from pry/rubocop-style-hash-syntax
rubocop: fix offences of the Style/HashSyntax cop
Diffstat (limited to 'lib/pry/commands/gist.rb')
-rw-r--r--lib/pry/commands/gist.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pry/commands/gist.rb b/lib/pry/commands/gist.rb
index 83cdf2b8..bd055879 100644
--- a/lib/pry/commands/gist.rb
+++ b/lib/pry/commands/gist.rb
@@ -3,7 +3,7 @@ class Pry
match 'gist'
group 'Misc'
description 'Upload code, docs, history to https://gist.github.com/.'
- command_options :requires_gem => "gist"
+ command_options requires_gem: "gist"
banner <<-'BANNER'
Usage: gist [OPTIONS] [--help]
@@ -22,8 +22,8 @@ class Pry
def options(opt)
CodeCollector.inject_options(opt)
opt.on :login, "Authenticate the gist gem with GitHub"
- opt.on :p, :public, "Create a public gist (default: false)", :default => false
- opt.on :clip, "Copy the selected content to clipboard instead, do NOT gist it", :default => false
+ opt.on :p, :public, "Create a public gist (default: false)", default: false
+ opt.on :clip, "Copy the selected content to clipboard instead, do NOT gist it", default: false
end
def process
@@ -81,7 +81,7 @@ class Pry
end
def gist_content(content, filename)
- response = ::Gist.gist(content, :filename => filename || "pry_gist.rb", :public => !!opts[:p])
+ response = ::Gist.gist(content, filename: filename || "pry_gist.rb", public: !!opts[:p])
if response
url = response['html_url']
message = "Gist created at URL #{url}"