lib/pluginizer/plugin_builder.rb in pluginizer-0.2.0 vs lib/pluginizer/plugin_builder.rb in pluginizer-0.2.1
- old
+ new
@@ -8,10 +8,11 @@
end
def leftovers
template '.ruby-version'
template "lib/%namespaced_name%/configuration.rb"
+ configure_gemfile
after_bundle do
in_root do
configure_database_yml if options.database == 'postgresql'
configure_rspec
@@ -25,9 +26,19 @@
end
end
end
private
+
+ def configure_gemfile
+ insert_into_file 'Gemfile', <<-END.strip_heredoc, after: "source 'https://rubygems.org'"
+ \n
+ git_source(:github) do |repo_name|
+ repo_name = "\#{repo_name}/\#{repo_name}" unless repo_name.include?("/")
+ "https://github.com/\#{repo_name}.git"
+ end
+ END
+ end
def configure_database_yml
insert_into_file 'spec/dummy/config/database.yml', <<-END.strip_heredoc.indent(2), after: "encoding: unicode"
host: 127.0.0.1