Module: Gemstar
- Defined in:
- lib/gemstar/version.rb,
lib/gemstar/cli.rb,
lib/gemstar/cache.rb,
lib/gemstar/utils.rb,
lib/gemstar/config.rb,
lib/gemstar/git_hub.rb,
lib/gemstar/project.rb,
lib/gemstar/web/app.rb,
lib/gemstar/git_repo.rb,
lib/gemstar/cache_cli.rb,
lib/gemstar/lock_file.rb,
lib/gemstar/change_log.rb,
lib/gemstar/cache_warmer.rb,
lib/gemstar/npm_metadata.rb,
lib/gemstar/outputs/html.rb,
lib/gemstar/commands/diff.rb,
lib/gemstar/outputs/basic.rb,
lib/gemstar/commands/cache.rb,
lib/gemstar/importmap_file.rb,
lib/gemstar/request_logger.rb,
lib/gemstar/webrick_logger.rb,
lib/gemstar/commands/server.rb,
lib/gemstar/commands/command.rb,
lib/gemstar/outputs/markdown.rb,
lib/gemstar/package_lock_file.rb,
lib/gemstar/remote_repository.rb,
lib/gemstar/ruby_gems_metadata.rb
Overview
:nodoc:
Defined Under Namespace
Modules: Commands, Config, Outputs, Utils, Web Classes: CLI, Cache, CacheCLI, CacheWarmer, ChangeLog, GitHub, GitRepo, ImportmapFile, LockFile, NpmMetadata, PackageLockFile, Project, RemoteRepository, RequestLogger, RubyGemsMetadata, WEBrickLogger
Constant Summary collapse
- VERSION =
"1.1"
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.debug? ⇒ Boolean
5 6 7 8 |
# File 'lib/gemstar/version.rb', line 5 def self.debug? return @debug if defined?(@debug) @debug = ENV["GEMSTAR_DEBUG"] == "true" end |
Instance Method Details
#edit_gitignore ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/gemstar/cache.rb', line 81 def edit_gitignore gitignore_path = ".gitignore" ignore_entries = %w[gem_update_changelog.html] existing_lines = File.exist?(gitignore_path) ? File.read(gitignore_path).lines.map(&:chomp) : [] new_lines = ignore_entries.reject { |entry| existing_lines.include?(entry) } unless new_lines.empty? File.open(gitignore_path, "a") do |f| f.puts "\n# Cache/output from gem changelog tool" if (existing_lines & ignore_entries).empty? new_lines.each { |entry| f.puts entry } end end end |