Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Commit

Permalink
fix bug with new data structure
Browse files Browse the repository at this point in the history
  • Loading branch information
LeFnord committed Aug 19, 2015
1 parent 8761906 commit 465bdf4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/rb_tags.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def tag_bundled_gems
gem_list.tag

dir_list.each do |dir|
gem_tags = Tags.new(dir, read: true)
gem_tags = Tags.new(dir, read: false)
unless !!gem_tags.tags
gem_tags.tag
gem_tags.save
Expand Down
3 changes: 2 additions & 1 deletion lib/rb_tags/concerns/yaml_tasks.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
module YamlTasks
# # WRITE
def write_to_yaml(dir: nil, this: {})
FileUtils.rm(store(dir)) if File.exist?(store(dir))
db = YAML::Store.new(store(dir), thread_safe: true)
db.transaction { db["tags"] = this }
db.transaction { db["tags"] = this } unless this.nil?
end

# # READ
Expand Down

0 comments on commit 465bdf4

Please sign in to comment.