diff --git a/Gemfile.lock b/Gemfile.lock index d02deb4..b3be45a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,7 +3,6 @@ PATH specs: app_store_connect (0.5.0) activesupport (~> 5.2.3) - gli (~> 2.17) httparty (~> 0.16) jwt (~> 2.1) @@ -28,7 +27,6 @@ GEM activesupport (>= 4.2.0) ffi (1.11.1) formatador (0.2.5) - gli (2.18.1) guard (2.15.0) formatador (>= 0.2.4) listen (>= 2.7, < 4.0) diff --git a/app_store_connect.gemspec b/app_store_connect.gemspec index 209d546..79fea99 100644 --- a/app_store_connect.gemspec +++ b/app_store_connect.gemspec @@ -18,12 +18,9 @@ Gem::Specification.new do |spec| `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } end - spec.bindir = 'exe' - spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ['lib'] spec.add_runtime_dependency 'activesupport', '~> 5.2.3' - spec.add_runtime_dependency 'gli', '~> 2.17' spec.add_runtime_dependency 'httparty', '~> 0.16' spec.add_runtime_dependency 'jwt', '~> 2.1' diff --git a/exe/app_store_connect b/exe/app_store_connect deleted file mode 100755 index cffc758..0000000 --- a/exe/app_store_connect +++ /dev/null @@ -1,6 +0,0 @@ -#! /usr/bin/env ruby -# frozen_string_literal: true - -require 'app_store_connect' - -AppStoreConnect::CLI.run(ARGV) diff --git a/lib/app_store_connect.rb b/lib/app_store_connect.rb index 4b97c6b..d4c259d 100644 --- a/lib/app_store_connect.rb +++ b/lib/app_store_connect.rb @@ -6,7 +6,6 @@ require 'app_store_connect/authorization' require 'app_store_connect/parser' require 'app_store_connect/client' -require 'app_store_connect/cli' require 'app_store_connect/bundle_id_create_request' require 'app_store_connect/user_invitation_create_request' require 'app_store_connect/version' diff --git a/lib/app_store_connect/cli.rb b/lib/app_store_connect/cli.rb deleted file mode 100644 index d1421e7..0000000 --- a/lib/app_store_connect/cli.rb +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true - -require 'gli' - -require 'app_store_connect/version' - -module AppStoreConnect - class CLI - extend GLI::App - - program_desc 'Here is my program description' - version AppStoreConnect::VERSION - - flag [:i, 'issuer-id'], - default_value: ENV['APP_STORE_CONNECT_ISSUER_ID'] - - flag [:p, 'private-key'], - default_value: ENV['APP_STORE_CONNECT_PRIVATE_KEY'] - - flag [:k, 'key-id'], - default_value: ENV['APP_STORE_CONNECT_KEY_ID'] - - command 'app' do |c| - c.flag %i[a app_id], required: true - - c.action do |_, options| - app_id = options[:app_id] - puts client.app(app_id).to_json - end - end - - command 'apps' do |c| - c.desc 'Gets all of the apps' - c.long_desc 'The long desc' - - c.action do |global_options, _, _| - puts client(global_options).apps.to_json - end - end - - command 'builds' do |c| - c.flag %i[a app_id], required: true - - c.action do |global_options, options| - app_id = options[:app_id] - - puts client(global_options).builds(app_id).to_json - end - end - - command 'build' do |c| - c.flag %i[a app_id], required: true - c.switch %i[b build_id], required: true - - c.action do |global_options, options| - app_id = options[:app_id] - build_id = options[:build_id] - - puts client(global_options).build(app_id, build_id).to_json - end - end - - def self.client(global_options) - AppStoreConnect::Client.new( - private_key: global_options[:private_key], - issuer_id: global_options[:issuer_id], - key_id: global_options[:key_id] - ) - end - private_class_method :client - end -end