Sha256: 09530f3ab79927a7697fb6bf636d3ad23fb45e8025400c0fab426d04092e89de
Contents?: true
Size: 1.27 KB
Versions: 149
Compression:
Stored size: 1.27 KB
Contents
module Origen module CodeGenerators class GemSetup < Origen::CodeGenerators::Base desc <<-END This generator creates a gemspec file in the top-level directory to allow it to be packed up and distributed as a gem. END def create_gemspec_file @summary = ask 'Describe your plugin in a few words:' template 'templates/code_generators/gemspec.rb', File.join(Origen.root, "#{Origen.app.name}.gemspec") end def create_master_require_file file = "#{Origen.root}/lib/#{Origen.app.name}.rb" if File.exist?(file) prepend_to_file file, <<-END require "origen" require_relative "../config/application.rb" require_relative "../config/environment.rb" END else create_file file do <<-END require "origen" require_relative "../config/application.rb" require_relative "../config/environment.rb" END end end end def verify_semver unless Origen.app.version.semantic? puts <<-END Warning, you application is not currently using semantic (1.2.3) versioning, this must be used if you want to publish your plugin as a gem. To upgrade your application to semantic versioning run the following command: origen add semver END end end end end end
Version data entries
149 entries across 149 versions & 1 rubygems