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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

theme.gemspec doesn't build theme gem properly #5323

Closed
6 tasks done
ashmaroli opened this issue Sep 4, 2016 · 4 comments
Closed
6 tasks done

theme.gemspec doesn't build theme gem properly #5323

ashmaroli opened this issue Sep 4, 2016 · 4 comments
Assignees

Comments

@ashmaroli
Copy link
Member

  • I believe this to be a bug, not a question about using Jekyll.
  • I updated to the latest Jekyll (or) if on GitHub Pages to the latest github-pages
  • I read the CONTRIBUTION file at https://jekyllrb.com/docs/contributing/
  • This is not a feature request.

  • I am on (or have tested on) _Windows 7_

  • I was trying to build the theme gem.

My Reproduction Steps

  • Create new theme, titan:
$ jekyll new-theme titan
  • cd into theme dir and add a file each to empty subdirs.
  • edit titan.gemspec to prepare for building gem
  • update git index by running:
$ git add .
  • Build gem.
$ gem build titan.gemspec

  Successfully built RubyGem
  Name: titan
  Version: 0.1.0
  File: titan-0.1.0.gem
  • unpack gem contents to verify build before publishing:
$ gem unpack titan-0.1.0.gem
Unpacked gem: ~/titan-0.1.0
  • cd into the unpacked dir and inspect.

The Output I Wanted

see the necessary files in the unpacked directory.

The Output I Got

an empty directory which means my theme gem was essentially empty.


I reached a solution by simply changing the spec.files line in the gemspec to:

  spec.files  = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }

and additionally adding a file each to empty dirs.


/cc @jekyll/ecosystem

@benbalter
Copy link
Contributor

I reached a solution by simply changing the spec.files line in the gemspec to:

@ashmaroli this is a great bug report, thank you.

Any interested in submitting a pull request to make that change?

/cc @jekyll/ecosystem

@ashmaroli
Copy link
Member Author

@benbalter thanks 😃 I've already opened a PR at #5325.

@benbalter
Copy link
Contributor

See an alternative approach for minima via jekyll/minima#31 (and related issue jekyll/minima#29.

@ashmaroli
Copy link
Member Author

Fixed in #5325

@jekyll jekyll locked and limited conversation to collaborators Jul 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants