[DRE-commits] [foodcritic] 03/03: Patch no-rufus-lru: We haven't packaged ruby-rufus-lru, yet, so revert back to a persistent cache for now.
Stefano Rivera
stefano at rivera.za.net
Fri Oct 24 08:02:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
stefanor pushed a commit to branch master
in repository foodcritic.
commit dd7dd77fbef4f35a2517c9fd3866769582947536
Author: Stefano Rivera <stefanor at debian.org>
Date: Fri Oct 24 00:58:29 2014 -0700
Patch no-rufus-lru: We haven't packaged ruby-rufus-lru, yet, so revert back to a persistent cache for now.
---
debian/changelog | 3 ++-
debian/control | 2 --
debian/patches/no-rufus-lru | 55 +++++++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
4 files changed, 58 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 8a14302..967fabe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,9 +2,10 @@ foodcritic (4.0.0-1) UNRELEASED; urgency=medium
* New upstream release.
* Refresh patches.
- * Depend (and Build-Depend) on ruby-rufus-lru.
* Bump Standards-Version to 3.9.6, no changes needed.
* Bump copyright years.
+ * Patch no-rufus-lru: We haven't packaged ruby-rufus-lru, yet, so revert
+ back to a persistent cache for now.
-- Stefano Rivera <stefanor at debian.org> Mon, 13 Oct 2014 18:12:30 -0700
diff --git a/debian/control b/debian/control
index 62ed5be..ae7da66 100644
--- a/debian/control
+++ b/debian/control
@@ -15,7 +15,6 @@ Build-Depends:
ruby-minitest (>= 3.3.0),
ruby-nokogiri (>= 1.5.4),
ruby-ronn,
- ruby-rufus-lru,
ruby-treetop (>= 1.4.10),
ruby-yajl (>= 1.1.0)
Standards-Version: 3.9.6
@@ -32,7 +31,6 @@ Depends:
ruby-erubis,
ruby-gherkin (>= 2.11.7),
ruby-nokogiri (>= 1.5.4),
- ruby-rufus-lru,
ruby-treetop (>= 1.4.10),
ruby-yajl (>= 1.1.0),
${misc:Depends},
diff --git a/debian/patches/no-rufus-lru b/debian/patches/no-rufus-lru
new file mode 100644
index 0000000..22588f8
--- /dev/null
+++ b/debian/patches/no-rufus-lru
@@ -0,0 +1,55 @@
+Description: Temporarily back-out the LRU caching
+ Reverts 4f35d2a1aaddbfa6cf7b0dda6d37b34183be5f3f
+ We haven't packaged ruby-rufus-lru, and are unlikely to in time for Jessie's
+ frieeze.
+Author: Stefano Rivera <stefanor at debian.org>
+Last-Update: 2014-10-24
+Forwarded: not-needed
+
+--- a/lib/foodcritic/api.rb
++++ b/lib/foodcritic/api.rb
+@@ -1,5 +1,4 @@
+ require 'nokogiri'
+-require 'rufus-lru'
+
+ module FoodCritic
+ # Helper methods that form part of the Rules DSL.
+@@ -218,12 +217,10 @@
+
+ # Read the AST for the given Ruby source file
+ def read_ast(file)
+- @ast_cache ||= Rufus::Lru::Hash.new(5)
+- if @ast_cache.include?(file)
+- @ast_cache[file]
+- else
+- @ast_cache[file] = uncached_read_ast(file)
++ @ast_cache ||= Hash.new do |h,k|
++ h[k] = uncached_read_ast(k)
+ end
++ @ast_cache[file]
+ end
+
+ # Retrieve a single-valued attribute from the specified resource.
+--- a/metadata.yml
++++ b/metadata.yml
+@@ -94,20 +94,6 @@
+ - - ">="
+ - !ruby/object:Gem::Version
+ version: '0'
+-- !ruby/object:Gem::Dependency
+- name: rufus-lru
+- requirement: !ruby/object:Gem::Requirement
+- requirements:
+- - - "~>"
+- - !ruby/object:Gem::Version
+- version: '1.0'
+- type: :runtime
+- prerelease: false
+- version_requirements: !ruby/object:Gem::Requirement
+- requirements:
+- - - "~>"
+- - !ruby/object:Gem::Version
+- version: '1.0'
+ description: Lint tool for Opscode Chef cookbooks.
+ email:
+ executables:
diff --git a/debian/patches/series b/debian/patches/series
index 5c0351d..dcc567e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ no-coverage
no-rubygems
system-install-layout
FC010-broken
+no-rufus-lru
--
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