lib/gemplate/gem.rb in gemplate-2.0.5 vs lib/gemplate/gem.rb in gemplate-2.0.6
- old
+ new
@@ -1,6 +1,7 @@
# frozen_string_literal: true
+
require 'rugged'
require 'pathname'
require 'fileutils'
require 'curb'
require 'octoauth'
@@ -66,11 +67,11 @@
[/LICENSE_NAME/, @license],
[/FULL_NAME/, @full_name],
[/REPO_NAME/, @name],
[/EMAIL_ADDRESS/, @email],
[/CURRENT_YEAR/, Time.now.strftime('%Y')],
- [/#DEV_DEPS/, dependencies]
+ [/# DEV_DEPS/, dependencies]
]
end
def process_templates
Dir.glob('**/*', File::FNM_DOTMATCH).each do |path|
@@ -80,12 +81,12 @@
File.open(path, 'w') { |fh| fh.write text }
end
end
def adjust_files
- moves = [['REPO_NAME.gemspec', "#{@name}.gemspec"],
- ['lib/REPO_NAME.rb', "lib/#{@name}.rb"],
- ['spec/REPO_NAME_spec.rb', "spec/#{@name}_spec.rb"]]
+ moves = [['repo_name.gemspec', "#{@name}.gemspec"],
+ ['lib/repo_name.rb', "lib/#{@name}.rb"],
+ ['spec/repo_name_spec.rb', "spec/#{@name}_spec.rb"]]
moves.each { |original, new| FileUtils.move original, new }
end
def make_repo
Rugged::Repository.init_at '.'