class RSGem::Tasks::IgnoreGemfileLock
Gemfile.lock should be gitignored when developing gems
Constants
- OUTPUT
Public Instance Methods
perform()
click to toggle source
# File lib/rsgem/tasks/ignore_gemfile_lock.rb, line 13 def perform gitignore << "\nGemfile.lock\n" write_to_gitignore end
Private Instance Methods
gitignore()
click to toggle source
# File lib/rsgem/tasks/ignore_gemfile_lock.rb, line 20 def gitignore @gitignore ||= File.read(context.gitignore_path) end
write_to_gitignore()
click to toggle source
# File lib/rsgem/tasks/ignore_gemfile_lock.rb, line 24 def write_to_gitignore File.open(context.gitignore_path, 'w') do |file| file.puts gitignore end end