openmeta.rb 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,12 @@
1
- === 1.0.0 / 2012-10-12
1
+ 1.0.4 / 2013-03-23
2
+ ==================
3
+ * add 'add' tag command
4
+ * add remove tag command
2
5
 
3
- * 1 major enhancement
6
+ 1.0.0 / 2012-10-12
7
+ ==================
4
8
 
5
- * Birthday!
9
+ * Disable JIT optimization to save loading time
10
+ * Implemented "clone" and "recent" command
11
+ * Port OpenMeta as framework
6
12
 
@@ -77,6 +77,22 @@ module Openmeta
77
77
  Openmeta.set_tags(tags, file)
78
78
  end
79
79
 
80
+ desc "add", "add openmeta tags, use ',' to separate multiple tags"
81
+ method_option :tag,
82
+ :aliases => "-t" ,
83
+ :lazy_default => '' ,
84
+ :type => :string ,
85
+ :desc => "add tags, use ',' to separate multiple tags"
86
+ def add(file)
87
+ tags = options[:tag].split(',')
88
+ existing_tags = Openmeta.get_tags(file)
89
+ # union
90
+ tags |= existing_tags
91
+ unless tags.eql? existing_tags
92
+ Openmeta.set_tags(tags, file)
93
+ end
94
+ end
95
+
80
96
  desc "remove", "remove openmeta tags, use ',' to separate multiple tags"
81
97
  method_option :tag,
82
98
  :aliases => "-t" ,
@@ -1,4 +1,4 @@
1
1
  module Openmeta
2
- VERSION = '1.0.3'
2
+ VERSION = '1.0.4'
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openmeta.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: