catalogdb 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gemtest +0 -0
- data/lib/catalogdb/version.rb +2 -2
- data/lib/catalogdb.rb +4 -0
- data/test/test_reader.rb +30 -0
- data/test/test_version.rb +18 -0
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1af3e70effd829aaeb9ac3d6d1a4fcb77d1a93e
|
4
|
+
data.tar.gz: 05ae5750aec2241b51e2debb034d8e567056f726
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d028c63e7fe7bcfb470c4e741269e0b768e6ada86a2937ad7985d3c08760eca397e2fea57ac8ea14b588829846d7b0c132e91f3b96c5eb17e8c98b2712d4a852
|
7
|
+
data.tar.gz: 0658b9132867a8d3423200e7005396e8a0ad5a24236315eac917b4a79ed270458ce2df62a9fa841e58fbed710a362e4f18d793348aed6a0b974cbfffc2929911
|
data/.gemtest
ADDED
File without changes
|
data/lib/catalogdb/version.rb
CHANGED
data/lib/catalogdb.rb
CHANGED
@@ -5,6 +5,9 @@ require 'pp'
|
|
5
5
|
require 'date'
|
6
6
|
require 'strscan' ## StringScanner lib
|
7
7
|
require 'erb'
|
8
|
+
require 'uri'
|
9
|
+
require 'json'
|
10
|
+
|
8
11
|
|
9
12
|
# 3rd party libs (gems)
|
10
13
|
require 'props'
|
@@ -19,6 +22,7 @@ require 'logutils/activerecord'
|
|
19
22
|
|
20
23
|
require 'catalogdb/version' ## let version always go first
|
21
24
|
|
25
|
+
require 'catalogdb/reader'
|
22
26
|
|
23
27
|
|
24
28
|
|
data/test/test_reader.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
###
|
4
|
+
# to run use
|
5
|
+
# ruby -I ./lib -I ./test test/test_reader.rb
|
6
|
+
|
7
|
+
|
8
|
+
require 'helper'
|
9
|
+
|
10
|
+
|
11
|
+
class TestReader < MiniTest::Test
|
12
|
+
|
13
|
+
def test_ruby
|
14
|
+
|
15
|
+
r = CatalogDb::CardReader.from_file( "#{CatalogDb.root}/test/data/RUBY.md" )
|
16
|
+
cards = r.read
|
17
|
+
|
18
|
+
pp cards
|
19
|
+
|
20
|
+
c = cards[0]
|
21
|
+
|
22
|
+
assert_equal [["Rack HQ", "http://rack.github.io"],
|
23
|
+
[":octocat:", "https://github.com/rack"],
|
24
|
+
[":gem:", "https://rubygems.org/gems/rack"],
|
25
|
+
[":book:", "http://rubydoc.info/gems/rack"]], c.links
|
26
|
+
|
27
|
+
assert_equal 'Webframeworks › Rack', c.categories
|
28
|
+
end
|
29
|
+
|
30
|
+
end # class TestReader
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
###
|
4
|
+
# to run use
|
5
|
+
# ruby -I ./lib -I ./test test/test_version.rb
|
6
|
+
|
7
|
+
|
8
|
+
require 'helper'
|
9
|
+
|
10
|
+
class TestVersion < MiniTest::Test
|
11
|
+
|
12
|
+
def test_version
|
13
|
+
assert_equal CatalogDb::VERSION, CatalogDb.version
|
14
|
+
assert true # if we get here - test success
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
end # class TestVersion
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: catalogdb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: props
|
@@ -131,12 +131,15 @@ extra_rdoc_files:
|
|
131
131
|
- Manifest.txt
|
132
132
|
- README.md
|
133
133
|
files:
|
134
|
+
- ".gemtest"
|
134
135
|
- HISTORY.md
|
135
136
|
- Manifest.txt
|
136
137
|
- README.md
|
137
138
|
- Rakefile
|
138
139
|
- lib/catalogdb.rb
|
139
140
|
- lib/catalogdb/version.rb
|
141
|
+
- test/test_reader.rb
|
142
|
+
- test/test_version.rb
|
140
143
|
homepage: https://github.com/textkit/catalog.db
|
141
144
|
licenses:
|
142
145
|
- Public Domain
|
@@ -163,4 +166,6 @@ rubygems_version: 2.4.2
|
|
163
166
|
signing_key:
|
164
167
|
specification_version: 4
|
165
168
|
summary: catalogdb - catalog.db schema 'n' models for easy (re)use
|
166
|
-
test_files:
|
169
|
+
test_files:
|
170
|
+
- test/test_version.rb
|
171
|
+
- test/test_reader.rb
|