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

exclude spec/huginn/ subtree from test_files #10

Merged
merged 1 commit into from
Feb 4, 2017

Conversation

stesie
Copy link
Contributor

@stesie stesie commented Feb 3, 2017

gem build obviously shouldn't include the spec/huginn/ subtree :-)

... this excludes it once and for all (so you don't have to manually rm -rf or move it away each time)

Copy link
Collaborator

@dsander dsander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wow ... very good catch!

@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|

spec.files = Dir['LICENSE.txt', 'lib/**/*']
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = Dir['spec/**/*.rb']
spec.test_files = Dir['spec/{[!huginn/]}**/*.rb']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am afraid the bash glob syntax is not compatible to ruby's Dir.glob, this should work:

Dir['spec/**/*.rb'].reject { |f| f[%r{^spec/huginn}]  }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ouch, you're right. Sorry for not testing well enough, I just glanced at the gems size and it shrank (too far as it excluded the proper specs also)

@dsander dsander merged commit fb3fd36 into huginn:master Feb 4, 2017
@dsander
Copy link
Collaborator

dsander commented Feb 4, 2017

Thank you @stesie!

@dsander
Copy link
Collaborator

dsander commented Feb 4, 2017

I just released 0.5.0 which includes your changes 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants