# encoding: utf-8 module GithubCLI class Commands::Blobs < Command namespace :blob desc 'get ', 'Get a Blob' def get(user, repo, sha) global_options = options.dup params = options[:params].dup Util.hash_without!(global_options, params.keys + ['params']) Blob.get user, repo, sha, params, global_options end option :content, :type => :string option :encoding, :type => :string, :banner => "utf-8|base64", :desc => "String containing encoding utf-8 or base64" desc 'create ', 'Create a new Blob' long_desc <<-DESC Inputs content - String of content \n encoding - String containing encoding utf-8 or base64 DESC def create(user, repo) global_options = options.dup params = options[:params].dup params['content'] = options[:content] if options[:content] params['encoding'] = options[:encoding] if options[:encoding] Util.hash_without!(global_options, params.keys + ['params']) Blob.create user, repo, params, global_options end end # Blobs end # GithubCLI