[DRE-commits] [foodcritic] 10/12: Install treetop grammar file.

Stefano Rivera stefano at rivera.za.net
Sun Jan 3 18:13:07 UTC 2016


This is an automated email from the git hooks/post-receive script.

stefanor pushed a commit to branch master
in repository foodcritic.

commit 7a652ef7d21ba96ce284c41309c3c4d1566d6dbb
Author: Stefano Rivera <stefanor at debian.org>
Date:   Sun Jan 3 20:02:32 2016 +0200

    Install treetop grammar file.
---
 debian/changelog                     |  1 +
 debian/install                       |  1 +
 debian/patches/system-install-layout | 14 ++++++++++++++
 3 files changed, 16 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index ba5a038..238cf07 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,7 @@ foodcritic (5.0.0-1) UNRELEASED; urgency=medium
   * Use an absolute require in the spec file, so the autopkgtest can run
     against the system install.
   * Avoid depending on the lib directory in tests, for autopkgtests.
+  * Install treetop grammar file.
 
  -- Stefano Rivera <stefanor at debian.org>  Sun, 03 Jan 2016 18:01:56 +0200
 
diff --git a/debian/install b/debian/install
index 9751ad4..9b155d9 100644
--- a/debian/install
+++ b/debian/install
@@ -1 +1,2 @@
 chef_dsl_metadata/*.json /usr/share/foodcritic/chef_dsl_metadata
+misc /usr/share/foodcritic
diff --git a/debian/patches/system-install-layout b/debian/patches/system-install-layout
index 235b880..b96a610 100644
--- a/debian/patches/system-install-layout
+++ b/debian/patches/system-install-layout
@@ -32,6 +32,20 @@ Last-Updated: 2013-06-05
      end
  
      def resource_check?(key, resource_type, field)
+@@ -85,7 +90,12 @@
+       # lucene.treetop used to be provided by chef gem
+       # We're keeping a local copy from chef 10.x
+       def chef_search_grammars
+-        [File.expand_path('../../..', __FILE__) + "/misc/lucene.treetop"]
++        local_grammar = File.expand_path('../../../misc/lucene.treetop', __FILE__)
++        if File.exists? local_grammar
++          [local_grammar]
++        else
++          ['/usr/share/foodcritic/misc/lucene.treetop']
++        end
+       end
+ 
+       # Create the search parser from the first loadable grammar.
 --- a/spec/spec_helper.rb
 +++ b/spec/spec_helper.rb
 @@ -11,4 +11,4 @@

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/foodcritic.git



More information about the Pkg-ruby-extras-commits mailing list