Created
December 13, 2011 23:23
-
-
Save juanje/1474442 to your computer and use it in GitHub Desktop.
Install required library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/providers/bookmarks.rb b/providers/bookmarks.rb | |
index ac470fa..f75fe11 100644 | |
--- a/providers/bookmarks.rb | |
+++ b/providers/bookmarks.rb | |
@@ -1,4 +1,8 @@ | |
-require ('sqlite3') | |
+begin | |
+ require 'sqlite3' | |
+rescue LoadError => e | |
+ Chef::Log.warn("Dependency 'gem' not loaded: #{e}") | |
+end | |
action :add do | |
if FileTest.exist? new_resource.sqlitedb | |
diff --git a/recipes/bookmarks.rb b/recipes/bookmarks.rb | |
index 5c850f3..880bf86 100644 | |
--- a/recipes/bookmarks.rb | |
+++ b/recipes/bookmarks.rb | |
@@ -23,6 +23,12 @@ | |
# limitations under the License. | |
# | |
+package 'libsqlite3-ruby' do | |
+ action :nothing | |
+end.run_action(:install) | |
+Gem.clear_paths | |
+require 'sqlite3' | |
+ | |
users.each do |userdata| | |
username = userdata["id"] | |
sqlitefile = "/home/#{username}/.mozilla/firefox/firefox-firma/places.sqlite" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment