usefuldb 0.0.3 → 0.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.
data/CHANGELOG CHANGED
@@ -1,5 +1,9 @@
1
1
  usefuldb gem CHANGELOG
2
2
 
3
+ ## Version 0.0.4
4
+ - Altered the UsefulDB::GUI.list function's output to mimic Array#to_s as it was not operating correctly on the Mac platform I tested the gem on
5
+ - Altered the UsefulDB::UsefulUtils.search function's output to mimic Array#to_s as it was not operating correctly on the Mac platform I tested the gem on
6
+
3
7
  ## Version 0.0.3
4
8
  - Attempt to fix bug with traversing the database array
5
9
 
@@ -21,4 +25,4 @@ usefuldb gem CHANGELOG
21
25
  - On first run, the system will now install the database in the users home directory at ~/.usefuldb/db.yaml
22
26
 
23
27
  ## Version 0.0.0
24
- - Added core functionality
28
+ - Added core functionality
data/bin/usefuldb CHANGED
File without changes
data/lib/usefuldb/gui.rb CHANGED
@@ -13,18 +13,28 @@ module UsefulDB
13
13
 
14
14
  def list
15
15
  UsefulDB.dbLoad
16
-
17
16
  index = 0
18
-
19
17
  UsefulDB::UsefulUtils.list.each do |i|
20
18
  puts red(index)
21
19
  index += 1
22
- puts "- Tags: " + yellow(i["tag"].to_s) + "\n"
23
- puts "- Value: " + red(i["value"]) + blue("\n##\n")
20
+ index_tag = 0
21
+ msg = ''
22
+ msg += "- Tags: "
23
+ i["tag"].each do |j|
24
+ if index_tag == 0
25
+ msg += yellow(j)
26
+ else
27
+ msg += ", " + yellow(j)
28
+ end
29
+ index_tag += 1
30
+ end
31
+ puts msg + "\n"
32
+ puts "- Value: " + red(i["value"]) + blue("\n##\n")
24
33
  end
25
34
  end
26
35
 
27
36
 
37
+
28
38
  def remove(opts)
29
39
  if opts[:v] then puts "in verbose mode\n"; end
30
40
  list()
@@ -91,4 +101,4 @@ module UsefulDB
91
101
  end
92
102
  end
93
103
 
94
- end
104
+ end
@@ -88,7 +88,17 @@ module UsefulDB
88
88
 
89
89
  @data.each do |db|
90
90
  if db["tag"].include?(tag)
91
- msg += "- Tags: " + db["tag"].to_s + "\n"
91
+ index_tag = 0
92
+ msg += "- Tags: "
93
+ db["tag"].each do |i|
94
+ if index_tag == 0
95
+ msg += yellow(i)
96
+ else
97
+ msg += ", " + yellow(i)
98
+ end
99
+ index_tag += 1
100
+ end
101
+ msg += "\n"
92
102
  msg += "- Value: " + db["value"] + blue("\n##\n")
93
103
  end
94
104
  end
data/resources/db.yaml CHANGED
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usefuldb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -52,16 +52,16 @@ executables:
52
52
  extensions: []
53
53
  extra_rdoc_files: []
54
54
  files:
55
- - lib/usefuldb.rb
56
55
  - lib/usefuldb/utilities.rb
57
- - lib/usefuldb/exceptions.rb
58
- - lib/usefuldb/gui.rb
59
56
  - lib/usefuldb/settings.rb
57
+ - lib/usefuldb/gui.rb
58
+ - lib/usefuldb/exceptions.rb
59
+ - lib/usefuldb.rb
60
60
  - bin/usefuldb
61
- - Rakefile
62
- - CHANGELOG
63
- - COPYING
64
61
  - README
62
+ - COPYING
63
+ - CHANGELOG
64
+ - Rakefile
65
65
  - resources/db.yaml
66
66
  - test/main_test.rb
67
67
  homepage: http://rubygems.org/gems/usefuldb