katelovescode / aphorism

Random quote generator
MIT License
4 stars 2 forks source link

Change gemspec's `files` to be more restrictive. #2

Closed phallstrom closed 5 years ago

phallstrom commented 5 years ago

Consider changing the gemspec to use something like this:

spec.files = Dir.glob("{lib,spec}/**/*") + %w[Rakefile .rspec]

This has the benefit that when I use your gem I won't be pulling down lolcat.png, .ruby-gemset, and the prebuilt *.gem packages. I imagine you'd want to extend the above to include exe, the readme, license, etc though.

Currently it pulls down all of this:

.gitignore
.rspec
.ruby-gemset
.ruby-version
.travis.yml
CODE_OF_CONDUCT.md
Gemfile
Gemfile.lock
LICENSE.txt
README.md
Rakefile
aphorism-0.1.0.gem
aphorism.gemspec
bin/console
bin/setup
exe/aphorism
lib/aphorism.rb
lib/aphorism/version.rb
lib/content/aphorisms.txt
lolcatdemo.png
katelovescode commented 5 years ago

Solved in v0.1.2

katelovescode commented 5 years ago
$ gem contents aphorism
/Users/katedonaldson/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/aphorism-0.1.2/CODE_OF_CONDUCT.md
/Users/katedonaldson/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/aphorism-0.1.2/LICENSE.txt
/Users/katedonaldson/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/aphorism-0.1.2/README.md
/Users/katedonaldson/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/aphorism-0.1.2/exe/aphorism
/Users/katedonaldson/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/aphorism-0.1.2/lib/aphorism.rb
/Users/katedonaldson/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/aphorism-0.1.2/lib/aphorism/version.rb
/Users/katedonaldson/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/aphorism-0.1.2/lib/content/aphorisms.txt