Ask rubygems if the gemspec is supported on the current platform

RUBY_PLATFORM was i368-msys32, gemspec was x86-msys32
yea, that's fine

On Thu, Nov 6, 2014 at 2:06 PM, Dan DeLeo <notifications@github.com> wrote:

> In lib/appbundler/app.rb:
>
> > @@ -127,19 +127,23 @@ def relative_bin_file(bin_file)
> >      end
> >
> >      def executables
> > -      spec_path = ["#{app_root}/#{name}-#{RUBY_PLATFORM}.gemspec",
> > -                   "#{app_root}/#{name}.gemspec"].detect do |f|
> > -        File.exists?(f)
> > -      end
> > -
> > -      if spec_path
> > -        spec = nil
> > -        Dir.chdir(app_root) do
> > -          spec = Gem::Specification::load(spec_path)
> > -        end
> > -        spec.executables.map do |e|
> > -          File.join(app_root, spec.bindir, e)
> > +      specs = Dir[File.join(app_root, "#{name}*.gemspec")]
> > +      if not specs.empty?
>
> At CHEF, we typically just have 2, and the one that has a longer filename
> is the more specific one. We can probably just use that as a heuristic and
> document why it works for us. Sound reasonable?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/opscode/appbundler/pull/8/files#r19979548>.
>