markdown_record 0.1.4 → 0.1.6

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: 23187950035ecd3722dbca9a0503d3cdfd3c67e20d18748f7ae0bc6b6d5558ba
4
- data.tar.gz: f2f5c597ce31540b3160b33fe58df4d736553d28c1905a09993fbb754fbde397
3
+ metadata.gz: 2a4c60c407ae3d679694a78384ee19031e6e4c4e81b13fb906735eeed501c401
4
+ data.tar.gz: b2e9e868cf53abbfdfa564545d4714ce566d65f1394b688f4907b9f5dc9999fb
5
5
  SHA512:
6
- metadata.gz: 165e1a938e4f8788a420147682b1b2782176c32efeb792497bbad5b7fbd89281b69d73d52fd48fbb09d9ef647573583ff350d3667b5ed290f56b5b5163a9100b
7
- data.tar.gz: d04f6e42b4ced38d90cfc1e22d6c64d6e2cbad93063987e088de279f390343e895be57009a7bae0cc1a528b1de86e5df2c5daadb3cc93ce73415dd3fa9003cfa
6
+ metadata.gz: 14b05075403c27112cec85baec54a03118830f96c6c50b5537f262e6940311ec87d6bcb34db2ca986b5bbb7ba6876596bdcf55ee3a59e4e817c9261deaa299fc
7
+ data.tar.gz: e8673494fcd89dd4287bdf84616e720a0eafb8b9c1688835fa58d00bf726931be17b2c26286439ada37ca1eb35f0f45ec58add57f5ce5c51d13479fb5d965dbd
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Welcome to MarkdownRecord. This project is still in BETA stage, and as such is subject to rapid change. There are many things that still need improving, so bear that in mind. That said, please feel free to test this project out and provide feedback in the form of GitHub issues! Thank you.
4
4
 
5
- You can find the complete usage guide [here](https://markdown-record-docs.herokuapp.com/mdr/content/home).
5
+ You can find the complete usage guide [here](https://markdown-record-docs.herokuapp.com/).
6
6
 
7
7
  MarkdownRecord is a Rails engine that allows you to write markdown with embedded json like this:
8
8
 
@@ -214,7 +214,7 @@ rendered: /markdown_record/rendered/content/custom_models_and_associations.html
214
214
 
215
215
  Congratulations! You have installed MarkdownRecord. If you are not viewing this from the host application already, go ahead and start your Rails server with `rails s` and navigate to http://localhost:3000/mdr/content/home to continue following this guide.
216
216
 
217
- Alternatively, you can find the complete usage guide [here](https://markdown-record-docs.herokuapp.com/mdr/content/home).
217
+ Alternatively, you can find the complete usage guide [here](https://markdown-record-docs.herokuapp.com/).
218
218
 
219
219
  ## Contributing
220
220
 
@@ -239,7 +239,6 @@ To test a local version of this gem in a local app, simply add the `path` parame
239
239
 
240
240
  - Make the Content DSL extensible
241
241
  - Add support for raw JSON files as source content
242
- - Support semantic versioning in numeric filename prefixes
243
242
 
244
243
  ## License
245
244
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -3,10 +3,12 @@ module MarkdownRecord
3
3
  class DateSorter < MarkdownRecord::FileSorting::Base
4
4
  def initialize(sort_regex = /^(\d\d\d\d?_\d\d?_\d\d?)/, date_pattern = "%Y_%m_%d")
5
5
  super(sort_regex)
6
- @date_pattern = options[:date_pattern] || "%Y_%m_%d"
6
+ @date_pattern = date_pattern || "%Y_%m_%d"
7
7
  end
8
8
 
9
9
  def to_sort_value(value)
10
+ return value unless value.present?
11
+
10
12
  Date.strptime(value, @date_pattern)
11
13
  end
12
14
  end
@@ -6,6 +6,8 @@ module MarkdownRecord
6
6
  end
7
7
 
8
8
  def to_sort_value(value)
9
+ return value unless value.present?
10
+
9
11
  SemVer.new(value)
10
12
  end
11
13
 
@@ -1,3 +1,3 @@
1
1
  module MarkdownRecord
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -141,4 +141,6 @@ rendered: /markdown_record/rendered/content/custom_models_and_associations.html
141
141
  51 files saved.
142
142
  ```
143
143
 
144
- Congratulations! You have installed MarkdownRecord. If you are not viewing this from the host application already, go ahead and start your Rails server and navigate to your <%= link_to("local host demo", "http://localhost:3000/mdr/content/home") %> to continue following this guide.
144
+ Congratulations! You have installed MarkdownRecord. If you are not viewing this from the host application already, go ahead and start your Rails server and navigate to your <%= link_to("local host demo", "http://localhost:3000/mdr/content/home") %> to continue following this guide.
145
+
146
+ Alternatively, you can find the complete usage guide [here](https://markdown-record-docs.herokuapp.com/).
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdown_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryant Morrill