Skip to content

Commit

Permalink
Include _config.yml in a new theme's gemspec (#7865)
Browse files Browse the repository at this point in the history
Merge pull request 7865
  • Loading branch information
bglw committed Feb 6, 2020
1 parent ac49cea commit 6097d3b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
12 changes: 9 additions & 3 deletions features/step_definitions.rb
Expand Up @@ -239,9 +239,14 @@

When(%r!^I decide to build the theme gem$!) do
Dir.chdir(Paths.theme_gem_dir)
File.new("_includes/blank.html", "w")
File.new("_sass/blank.scss", "w")
File.new("assets/blank.scss", "w")
[
"_includes/blank.html",
"_sass/blank.scss",
"assets/blank.scss",
"_config.yml"
].each do |filename|
File.new(filename, "w")
end
end

#
Expand Down Expand Up @@ -385,6 +390,7 @@
Gemfile
LICENSE.txt
README.md
_config.yml
_includes/blank.html
_layouts/default.html
_layouts/page.html
Expand Down
1 change: 1 addition & 0 deletions features/theme_gem.feature
Expand Up @@ -25,6 +25,7 @@ Feature: Building Theme Gems
And the "my-cool-theme-0.1.0/_includes/blank.html" file should exist
And the "my-cool-theme-0.1.0/_sass/blank.scss" file should exist
And the "my-cool-theme-0.1.0/assets/blank.scss" file should exist
And the "my-cool-theme-0.1.0/_config.yml" file should exist
And the my-cool-theme-0.1.0/.git directory should not exist
And the "my-cool-theme-0.1.0/.gitignore" file should not exist
And the "my-cool-theme-0.1.0/Gemfile" file should not exist
Expand Down
2 changes: 1 addition & 1 deletion lib/theme_template/theme.gemspec.erb
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
spec.homepage = "TODO: Put your gem's website or public repo URL here."
spec.license = "MIT"

spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r!^(<%= theme_directories.join("|") %>|LICENSE|README)!i) }
spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r!^(<%= theme_directories.join("|") %>|LICENSE|README|_config\.yml)!i) }

spec.add_runtime_dependency "jekyll", "~> <%= jekyll_version_with_minor %>"

Expand Down

0 comments on commit 6097d3b

Please sign in to comment.