gemspec example on http://docs.rubygems.org/read/chapter/20#files

Azul's Avatar

Azul

14 Aug, 2010 08:09 AM

Hi,

I just ran into problems with a gemspec that is very similar to what can be found here:
http://docs.rubygems.org/read/chapter/20#files

spec.files = Dir['lib/**/*.rb'] + Dir['bin/*']
spec.files << Dir['[A-Z]*'] + Dir['test/**/*']

The code I was working with was:

s.files = %w[LICENSE README.textile Rakefile SYNTAX_REFERENCE greencloth.gemspec]`
s.files << Dir['lib/*.rb'] + Dir['test/*.rb']`

The last line would add an array as the last item of the array which would then be removed. I was able to work around this by using
+= instead of <<. I am not sure this is an issue just for me but it feels like the documentation is suggesting sth. that does not work here.

I am using rubygems 1.3.6

  1. Support Staff 1 Posted by Nick Quaranto on 14 Aug, 2010 04:21 PM

    Nick Quaranto's Avatar

    Yeah, that's a pretty crappy example...a lot of the RG docs need to be revisited. Thanks for pointing this out.

  2. 2 Posted by Josh Nichols on 14 Aug, 2010 06:53 PM

    Josh Nichols's Avatar

    Azul, I've updated the example to use += instead of <<. Thanks!

  3. Josh Nichols closed this discussion on 14 Aug, 2010 06:53 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

28 Oct, 2014 09:51 AM
23 Oct, 2014 05:37 PM
21 Oct, 2014 10:47 AM
18 Oct, 2014 08:39 PM
16 Oct, 2014 12:41 PM