Module: Exefy

Defined in:
lib/exefy.rb,
lib/exefy/version.rb

Defined Under Namespace

Classes: Generator, GeneratorFromBatch

Constant Summary collapse

VERSION =
"1.2.0"

Class Method Summary collapse

Class Method Details

.devkit_needed?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/exefy.rb', line 28

def self.devkit_needed?
  !File.executable?(Exefy.executable)
end

.executableObject



19
20
21
22
23
24
25
26
# File 'lib/exefy.rb', line 19

def self.executable
  return @executable if defined?(@executable)

  gem_root     = File.expand_path("../..", __FILE__)
  ruby_version = RbConfig::CONFIG["ruby_version"]

  @executable = File.join(gem_root, "data", ruby_version, "gemstub.exe")
end

.process_existing_gem(gem, revert) ⇒ Object



9
10
11
12
# File 'lib/exefy.rb', line 9

def self.process_existing_gem(gem, revert)
  generator = GeneratorFromBatch.new(gem)
  revert ? generator.revert_gem : generator.exefy_gem
end

.process_gem_install(target_path) ⇒ Object



14
15
16
17
# File 'lib/exefy.rb', line 14

def self.process_gem_install(target_path)
  generator = Generator.new(target_path)
  generator.exefy_gem
end