frontmatter 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/frontmatter/page.rb +4 -7
- data/lib/frontmatter/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7ce738ca9e4a18643a9c0b63ef84b214d7cc91ab75d916788bd530ae2dee882
|
4
|
+
data.tar.gz: b3d88aa80401197e4916112bebc29258f9d67fe8c394b8a64b0f36c08bfe09c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66651ceee2f386c2f53fa4f6ca2995d77016fcd47be4c84e463c54f5fc2cd164dd4b59f31b3d104a2e51893df02d3aa3e07a6c4549dbf0e0f3365bf9be6fd07d
|
7
|
+
data.tar.gz: d71632ec4ff53750c092b2c5176d617866adf4b633eea4b1ca841ddeb7440202adfb55e52ea7e2310420f58a1ea9047b3f537254030ba142a634d4edf168815e
|
@@ -18,20 +18,17 @@ module Frontmatter
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def initialize(filename)
|
21
|
-
@slug = File.basename(filename.split('.')[0])
|
21
|
+
@slug = File.basename(filename.split('.')[0] )
|
22
22
|
@frontmatter = YAML.load(File.read(filename)).with_indifferent_access
|
23
23
|
end
|
24
24
|
|
25
25
|
# TODO: Define attribute methods to speed this up
|
26
26
|
def method_missing(m, *args, &block)
|
27
|
-
|
28
|
-
return value
|
29
|
-
end
|
30
|
-
super
|
27
|
+
@frontmatter[m] || super
|
31
28
|
end
|
32
29
|
|
33
|
-
def respond_to_missing(
|
34
|
-
@frontmatter.key(
|
30
|
+
def respond_to_missing?(method_name, include_private = false)
|
31
|
+
@frontmatter.key?(method_name) || super
|
35
32
|
end
|
36
33
|
|
37
34
|
def to_param
|
data/lib/frontmatter/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frontmatter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Caleb Hearth
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -92,7 +92,7 @@ files:
|
|
92
92
|
- lib/frontmatter/template_handler.rb
|
93
93
|
- lib/frontmatter/version.rb
|
94
94
|
- lib/tasks/frontmatter_tasks.rake
|
95
|
-
homepage: https://
|
95
|
+
homepage: https://github.com/calebthompson/frontmatter
|
96
96
|
licenses:
|
97
97
|
- MIT
|
98
98
|
metadata: {}
|
@@ -104,7 +104,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
104
104
|
requirements:
|
105
105
|
- - ">="
|
106
106
|
- !ruby/object:Gem::Version
|
107
|
-
version:
|
107
|
+
version: 2.7.0
|
108
108
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
110
|
- - ">="
|