lib/gemsmith/skeletons/travis_skeleton.rb in gemsmith-5.3.0 vs lib/gemsmith/skeletons/travis_skeleton.rb in gemsmith-5.4.0
- old
+ new
@@ -1,9 +1,15 @@
module Gemsmith
module Skeletons
+ # Configures Travis CI support.
class TravisSkeleton < BaseSkeleton
- def create_files
- template "%gem_name%/.travis.yml.tt", template_options
+ def enabled?
+ cli.template_options.key?(:travis) && cli.template_options[:travis]
+ end
+
+ def create
+ return unless enabled?
+ cli.template "%gem_name%/.travis.yml.tt", cli.template_options
end
end
end
end