Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include _config.yml in a new theme's gemspec #7865

Merged
merged 3 commits into from Feb 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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