Sha256: f6706f01131d70a40245c44cb8dd674442887a4187d98d7621a6cdd4d140dfd1

Contents?: true

Size: 1.37 KB

Versions: 6

Compression:

Stored size: 1.37 KB

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), "..", "lib")

require "leap_salesforce/error"
require "thor"

def init_setup?
  File.exist?(".leap_salesforce.yml")
end

unless init_setup?
  puts "Setting up leap_salesforce API first"
  Process.fork { exec("leap_salesforce init") }
  Process.wait

  raise LeapSalesforce::SetupError, "Unable to setup leap_salesforce" unless init_setup?
end

require "leap_salesforce_ui/version"
require "leap_salesforce_ui/generator/appenders"
require "colorize"

module LeapSalesforce
  # Executable for setting up Leap Salesforce UI
  class UiExe < Thor
    include LeapSalesforce::Generators::Appenders

    desc "init", "Create leap salesforce ui configuration"
    def init
      puts "Initialising initial files to get started with leap_salesforce_ui"
      append "Rakefile", "Rakefile.erb"
      append "Gemfile", "Gemfile.erb"
      puts 'Running Rake task "leaps:create_poms"'
      puts `rake leaps:create_poms`
      append File.join("spec", "spec_helper.rb"), "spec_helper.rb.erb"
      append File.join("spec", "ui_spec.rb"), "ui_spec.rb.erb"
      puts "Note test 'ui_spec' is specific to 'Contact' and 'Account' object using fields that
may not exist but purely as a demonstration."
    end
  end
end

puts "Using #{LeapSalesforceUi::VERSION} of LeapSalesforceUi"

LeapSalesforce::UiExe.start(ARGV)

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
leap_salesforce_ui-0.3.0 exe/leap_salesforce_ui
leap_salesforce_ui-0.2.0 exe/leap_salesforce_ui
leap_salesforce_ui-0.1.9 exe/leap_salesforce_ui
leap_salesforce_ui-0.1.8 exe/leap_salesforce_ui
leap_salesforce_ui-0.1.7 exe/leap_salesforce_ui
leap_salesforce_ui-0.1.6 exe/leap_salesforce_ui