Sha256: df0a19878bbb144f7e0aab071959d4274382ef30489cbec75c15383cc7711107
Contents?: true
Size: 1.48 KB
Versions: 2
Compression:
Stored size: 1.48 KB
Contents
#!/usr/bin/env ruby require 'pathname' source_path = (Pathname.new(__FILE__).dirname + '../lib').expand_path $LOAD_PATH << source_path activate_rails_version = ->(rails_version) do rails_bin_path = Gem.activate_bin_path("railties", "rails", rails_version) rails_path = File.expand_path("../..", rails_bin_path) $LOAD_PATH.unshift(rails_path) end if str = ARGV.first str = str.b[/\A_(.*)_\z/, 1] if str && Gem::Version.correct?(str) rails_version = str ARGV.shift begin activate_rails_version.call(rails_version) rescue Gem::GemNotFoundException abort "Hephaestus error: Unable to find Rails version #{rails_version}" end else require "hephaestus/version" spec = Gem::Specification.find_by_name("rails", Hephaestus::RAILS_VERSION) activate_rails_version.call(spec.version.to_s) end end require "hephaestus" if ARGV.empty? puts "Please provide a path for the new application" puts puts "See --help for more info" exit 0 elsif ["-v", "--version"].include? ARGV[0] puts Hephaestus::VERSION exit 0 end templates_root = File.expand_path(File.join("..", "templates"), File.dirname(__FILE__)) Hephaestus::AppGenerator.source_root templates_root Hephaestus::AppGenerator.source_paths << Rails::Generators::AppGenerator.source_root << templates_root ARGV.push("--minimal") ARGV.push("--no-skip-active-job") ARGV.push("--skip-asset-pipeline") ARGV.push("--skip-active-record") ARGV.push("--skip-active-record") Hephaestus::AppGenerator.start
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hephaestus-0.0.2 | bin/hephaestus |
hephaestus-0.0.1 | bin/hephaestus |