Could you point me to either documentation for `resource` or to an example of a `resource` definition used to grab data in some formula’s test? I am wondering, for instance, whether I should put this inside the `test` block or at class-level scope.

Kyle

On Mar 6, 2014, at 7:42 AM, Adam Vandenberg <notifications@github.com> wrote:

> In Library/Formula/opengrm-ngram.rb:
> 
> > +  homepage 'http://www.openfst.org/twiki/bin/view/GRM/NGramLibrary'
> > +  url 'http://openfst.cs.nyu.edu/twiki/pub/GRM/NGramDownload/opengrm-ngram-1.1.0.tar.gz'
> > +  sha1 'a2ceeaf6ac129b66d2682d76a20388cf1d4b8c31'
> > +
> > +  depends_on 'openfst'
> > +
> > +  def install
> > +    ENV.libstdcxx if ENV.compiler == :clang && MacOS.version >= :mavericks
> > +    system './configure', "--prefix=#{prefix}", '--disable-dependency-tracking'
> > +    system 'make install'
> > +  end
> > +
> > +  test do
> > +    # based on the examples at the OpenGRM "NGram quick tour" page...
> > +    # tests using a tokenized variant of The Importance of Being Earnest
> > +    system 'curl', 'http://openfst.cs.nyu.edu/twiki/pub/GRM/NGramQuickTour/earnest.txt', '-o', 'e.txt'
> 
> We prefer to use resource definitions for this.
> 
> —
> Reply to this email directly or view it on GitHub.
>