$:.push File.expand_path("../lib", __FILE__) require "<%=config[:gem_name]%>/version" def add_security_key specification, method, files file = files.is_a?(Array) ? files.first : files if File.exists? file specification.send "#{method}=", files else puts "WARNING: Security key not found for #{specification.name} gem specification: #{file}" end end Gem::Specification.new do |s| s.name = "<%= config[:gem_name] %>" s.version = <%= config[:gem_class] %>::VERSION s.platform = <%= config[:gem_platform] %> s.author = "<%= config[:author_name] %>" s.email = "<%= config[:author_email] %>" s.homepage = "<%= config[:gem_url] %>" s.summary = "TODO: Add gem summary here." s.description = "TODO: Add gem description here." s.license = "MIT" <%- if config[:post_install_message] -%> s.post_install_message = "<%= config[:post_install_message] %>" <%- end -%> add_security_key s, "signing_key", File.expand_path("<%= config[:gem_private_key] %>") add_security_key s, "cert_chain", [File.expand_path("<%= config[:gem_public_key] %>")] <%- if config[:pry] -%> case Gem.ruby_engine when "ruby" s.add_development_dependency "pry-byebug" s.add_development_dependency "pry-stack_explorer" when "jruby" s.add_development_dependency "pry-nav" when "rbx" s.add_development_dependency "pry-nav" s.add_development_dependency "pry-stack_explorer" else raise RuntimeError.new("Unsupported Ruby Engine!") end <%- end -%> s.required_ruby_version = "~> <%= config[:ruby_version] %>" <%- if config[:bin] -%> s.add_dependency "thor" s.add_dependency "thor_plus" <%- end -%> <%- if config[:rails] -%> s.add_dependency "rails", "~> <%= config[:rails_version] %>" <%- end -%> <%- if config[:travis] -%> s.add_development_dependency "rake" <%- end -%> <%- if config[:pry] -%> s.add_development_dependency "pry" s.add_development_dependency "pry-remote" s.add_development_dependency "pry-rescue" <%- end -%> <%- if config[:rspec] -%> <%- rspec_gem = config[:rails] ? "rspec-rails" : "rspec" -%> s.add_development_dependency "<%= rspec_gem %>" <%- end -%> <%- if config[:bin] -%> s.add_development_dependency "aruba" <%- end -%> <%- if config[:guard] -%> s.add_development_dependency "rb-fsevent" # Guard file events for OSX. s.add_development_dependency "guard-rspec" <%- end -%> <%- if config[:coveralls] -%> s.add_development_dependency "coveralls" <%- end -%> s.files = Dir["lib/**/*", "vendor/**/*"] s.extra_rdoc_files = Dir["README*", "LICENSE*"] <%- if config[:bin] -%> s.executables << "<%= config[:gem_name] %>" <%- end -%> s.require_paths = ["lib"] end