Sha256: 3cc621e82304f60dd434e66c1eeeea92c7b980a8baf2db072488363427797c34
Contents?: true
Size: 759 Bytes
Versions: 2
Compression:
Stored size: 759 Bytes
Contents
require 'highline/import' require 'socialcast-git-extensions/git' require 'socialcast-git-extensions/github' module Socialcast module Gitx def protect_reserved_branches!(branch, mode) abort("Cannot #{mode} reserved branch") if Socialcast::Git::RESERVED_BRANCHES.include?(branch) end def run_cmd(cmd) HighLine.say "\n> <%= color('#{cmd.gsub("'", '')}', :red) %>" raise "#{cmd} failed" unless system cmd end def share(message, options = {}) return if ARGV.delete("--quiet") || ARGV.delete("-q") cmd = "socialcast share '#{message}'" cmd += " --url #{options[:url]}" if options[:url] cmd += " --message_type #{options[:message_type]}" if options[:message_type] run_cmd cmd end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
socialcast-git-extensions-2.2.8 | lib/socialcast-git-extensions.rb |
socialcast-git-extensions-2.2.7 | lib/socialcast-git-extensions.rb |