markdown_datafier 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/lib/markdown_datafier.rb +1 -1
- data/lib/markdown_datafier/version.rb +1 -1
- data/spec/fixtures/config/{config.yml → markdown_datafier.yml} +0 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17c1b340350863507e6a37b71a4dd2977d1326dd
|
4
|
+
data.tar.gz: e07fb668ce3e2c98b685a3daa9e9ef1e17a29b74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19a1e8b30d5f7b735dc6e2cfe0e2e9337e88fd5774bb452bd6983f95576456df89cb6a7d663ad9aeae9edb32360d6064623dd603fc0939d32e80cfa5a5e9ab5c
|
7
|
+
data.tar.gz: 8e20e55d7b2b955154dc4a8fcf74d261f35da161e015c790368b9c3505b41401e3d35bb0b65dcf7478312caa023093cdee89ebc6b5c4fbcd9d163a78ef3e43c2
|
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
MarkdownDatafier is a ruby gem which reads a structure of Markdown files, parses their metadata and outputs to a simple hash. It is framework agnostic, configurable to any content and configuration location and easy to plug into your own API endpoints or controller actions.
|
4
4
|
|
5
|
+
MarkdownDatafier was inspired by the NestaCMS framework. But instead of a self-contained CMS, I simply wanted to get data out of a Markdown file structure to be used however I like (direct into Mustache templates via server-side Sinarta or Rails; or via an API endpoint to a javascript framework, iOS/Android app, and so on).
|
6
|
+
|
5
7
|
This is currently in an early alpha stage. Though it is likely to remain simple, there will undoubtedly be some feature additions and improvement to things like exception handling. This gem was developed using Ruby 2.0.0p247.
|
6
8
|
|
7
9
|
## Installation
|
@@ -22,13 +24,14 @@ Or install it yourself as:
|
|
22
24
|
|
23
25
|
Create an object for your server and include MarkdownDatafier:
|
24
26
|
|
27
|
+
require 'markdown_datafier'
|
25
28
|
class MyServerObject
|
26
29
|
include MarkdownDatafier
|
27
30
|
end
|
28
31
|
|
29
32
|
Then create an instance of the server using the full path to your config directory:
|
30
33
|
|
31
|
-
server = MyServerObject.new(config_directory: "/path/to/config/")
|
34
|
+
server = MyServerObject.new(config_directory: "/absolute/path/to/config/")
|
32
35
|
|
33
36
|
Inside your configuration directory, configure your config.yml file like so:
|
34
37
|
|
@@ -54,6 +57,7 @@ Or specify a sub level (for instance by using the "shortname" of previously retr
|
|
54
57
|
|
55
58
|
collection = server.indexes_for_sections("/section-two")
|
56
59
|
|
60
|
+
Take a look at the file structure in spec/fixtures/content to see how the directory structure and meta data works.
|
57
61
|
|
58
62
|
## Contributing
|
59
63
|
|
data/lib/markdown_datafier.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: markdown_datafier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- J. Ryan Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redcarpet
|
@@ -82,7 +82,7 @@ files:
|
|
82
82
|
- lib/markdown_datafier.rb
|
83
83
|
- lib/markdown_datafier/version.rb
|
84
84
|
- markdown_datafier.gemspec
|
85
|
-
- spec/fixtures/config/
|
85
|
+
- spec/fixtures/config/markdown_datafier.yml
|
86
86
|
- spec/fixtures/content/index.mdown
|
87
87
|
- spec/fixtures/content/section-one/index.mdown
|
88
88
|
- spec/fixtures/content/section-one/sub-one-test-one.mdown
|
@@ -121,7 +121,7 @@ specification_version: 4
|
|
121
121
|
summary: Reads a structure of Markdown files parses their metadata and outputs to
|
122
122
|
a ruby hash or array of hashes. Easy to plug into your own API endpoints.
|
123
123
|
test_files:
|
124
|
-
- spec/fixtures/config/
|
124
|
+
- spec/fixtures/config/markdown_datafier.yml
|
125
125
|
- spec/fixtures/content/index.mdown
|
126
126
|
- spec/fixtures/content/section-one/index.mdown
|
127
127
|
- spec/fixtures/content/section-one/sub-one-test-one.mdown
|