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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b817bbc36796c281dfd5a562485af0bb45697f3acc7a0e6249877a7ba54e9dfe
4
- data.tar.gz: 598e0e890161b35709e0b008aa336bbf70f4179fbb870d884e97d5cbb1a820c2
3
+ metadata.gz: e7ce738ca9e4a18643a9c0b63ef84b214d7cc91ab75d916788bd530ae2dee882
4
+ data.tar.gz: b3d88aa80401197e4916112bebc29258f9d67fe8c394b8a64b0f36c08bfe09c3
5
5
  SHA512:
6
- metadata.gz: c84eebe8e7bcc99be51ab952ea65ec6a68f43c75f762cd3fb13e702e6e903d67f15af0d70cf5f248b57acd9d77645fbbc99487528ff824e3bbaaaafd3dab6fd1
7
- data.tar.gz: 04b496c4eb4319bb7d2e21c500312af903ee0d6f87b83347a581251c221ddb9380db5d44ffece3c8788d355d4542521bb3f07500ea5288312c4520052d374b01
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
- if value = @frontmatter[m]
28
- return value
29
- end
30
- super
27
+ @frontmatter[m] || super
31
28
  end
32
29
 
33
- def respond_to_missing(m)
34
- @frontmatter.key(m)
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
@@ -1,3 +1,3 @@
1
1
  module Frontmatter
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
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.1.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-23 00:00:00.000000000 Z
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://calebhearth.com
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: '0'
107
+ version: 2.7.0
108
108
  required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - ">="