Module: Exer

Defined in:
lib/exer.rb,
lib/exer/make.rb,
lib/exer/version.rb

Overview

Note:

Do not use same name for installer-name and your-gem-binary-name.

Build executable gem installers for Windows, Linux and Mac. Go language is bundled together within the app, so all you need is Linux and Ruby.

Examples:

Build gem runner that will install gem if not installed


# make gem with binary named same as gem
# upload it to rubygems
# executable will install gem if not installed, and open it
Exer.make do |app|
  app.filename = 'my_gem run' # do not use same name as gem
  app.add :gem_run, 'my_gem'
end

Build executable installers for gem


Exer.make('my_gem install') do |app|
  # if you only make installer, add wait_for_enter
  app.add :gem_install, 'my_gem'
  app.wait_for_enter
end

See Also:

Defined Under Namespace

Classes: Make

Constant Summary collapse

VERSION =
'0.2.1'

Class Method Summary collapse

Class Method Details

.make(options = {}) {|Exer::Make| ... } ⇒ Object

Class method #make is a shortcut to initialize new Maker instance, and add default functions.

Examples:

Build Windows installer for gem ‘my_gem’


Exer.make(exclude: [:windows, :darwin]) do |build|
  build.filename = 'my_gem_name'
  build.add :gem_install, 'my_gem_name'
end

Parameters:

  • options (Hash) (defaults to: {})

    Optional.

Options Hash (options):

  • filename (String)

    Optional. Filename, defined here or inside a block.

  • exclude (Symbol)

    Optional. Platforms to exclude when making binaries.

Yields:

  • (Exer::Make)

    New instance of make class, with added default functions.

See Also:



52
53
54
55
56
57
# File 'lib/exer.rb', line 52

def self.make(options = {})
  maker = Exer::Make.new(options[:filename])
  maker.add_defaults
  yield(maker) if block_given?
  maker.build options[:exclude]
end

.system_golang=(arg) ⇒ Object



64
65
66
# File 'lib/exer.rb', line 64

def system_golang=(arg)
  @system_golang = arg
end

.system_golang?Boolean

Returns:

  • (Boolean)


60
61
62
# File 'lib/exer.rb', line 60

def system_golang?
  @system_golang == true
end