mkmatter 3.0.38 → 3.0.39

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: 0b9161253762fa37d178f21532ffca2629ce787593699c64b3b8510ba70ac532
4
- data.tar.gz: 5cff346aff68d29ccfc56cff3d625f084f68d85ffc343181cef4d50cf5c65eb5
3
+ metadata.gz: 04a7db220defedf2cda0b815eab8786071256a3859feabdfd2c6570c100099e8
4
+ data.tar.gz: 44ab5da9def6631721eece172f52ab35d34dc7d7c513db880fa5d732f897dc00
5
5
  SHA512:
6
- metadata.gz: 69a679ba18bd92731bc71fd5508ceb32becbc6a502772b15a20fc502a7ff22d223ae5a8cc2e135daabb0e660778a6f8fad6ae34ca1acc3b2354fa637f068f286
7
- data.tar.gz: 669452556c67aa36eede1d4f776405bbacd7e8c8cd3876e876d8cbd02e46ef86d8b89b13ecd0c6b252588eebdec79b3cd87c972bf8436b852446ae8e975f43cf
6
+ metadata.gz: b19c9bc10f1766db877545a4b4dd2348758a144617dd9315cf20c288575f02ecbc57aba22aa0a17c393ad7c5876b64fbd9c072fc1fb5cbadffe5ccb15211d5a9
7
+ data.tar.gz: 03e2aa2b92bf7a0e43c78221652b3bed32b63df0ab8e0da28e0266f654a735c0dcd4568f0511394dd2686fe29c0fa177fc36deed33223309e66dc6213544825e
data/.travis.yml CHANGED
@@ -33,6 +33,11 @@ jobs:
33
33
  script:
34
34
  - echo "Running tests against $(ruby -v) ..."
35
35
  - bundle exec rake -t
36
+ - stage: test Ruby Head
37
+ rvm: ruby-head
38
+ script:
39
+ - echo "Running tests against $(ruby -v) ..."
40
+ - bundle exec rake -t
36
41
  - stage: gem release
37
42
  rvm: 2.3.0
38
43
  script: echo "Deploying to rubygems.org ..."
data/README.md CHANGED
@@ -1,10 +1,17 @@
1
1
  # mkmatter
2
2
 
3
- ###### Builds & Links
3
+ Builds & Links
4
+
5
+ <div>
6
+
4
7
  [![Travis branch](https://img.shields.io/travis/IotaSpencer/mkmatter/dev.svg?style=for-the-badge)](https://travis-ci.org/IotaSpencer/mkmatter)
5
8
  [![Travis branch](https://img.shields.io/travis/IotaSpencer/mkmatter/master.svg?style=for-the-badge)](https://travis-ci.org/IotaSpencer/mkmatter)
9
+ </div>
10
+ <div class="m-0 p-0">
11
+
6
12
  [![Github commits (since latest release)](https://img.shields.io/github/commits-since/IotaSpencer/mkmatter/latest.svg?style=for-the-badge)]()
7
- [![GitHub commits](https://img.shields.io/github/commits-since/IotaSpencer/mkmatter/3.0.27.svg?style=for-the-badge)]()
13
+ [![GitHub commits](https://img.shields.io/github/commits-since/IotaSpencer/mkmatter/3.0.38.svg?style=for-the-badge)]()
14
+ </div>
8
15
 
9
16
  ###### Gem
10
17
  [![Gem](https://img.shields.io/gem/v/mkmatter.svg?style=for-the-badge)](https://rubygems.org/gems/mkmatter)
data/bin/mkmatter CHANGED
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/ruby
2
2
  require 'mkmatter'
3
-
4
-
5
3
  Signal.trap('INT') do
6
4
  $stderr.puts
7
5
  $stderr.puts 'Got INT.. Exiting'
@@ -47,8 +47,7 @@ module Mkmatter
47
47
  alias_method :inspect, :to_h
48
48
  #
49
49
  # Dumps all file applicable metadata to a provided output.
50
- # @param [Boolean] to_file A path or filename
51
- # @param [Boolean] stdout Whether to print to stdout
50
+ # @return [String] yaml front matter
52
51
  def dump
53
52
  custom_fields = nil
54
53
  hl = HighLine.new($stdin, $stderr, 80)
@@ -14,6 +14,8 @@ module Mkmatter
14
14
  module App
15
15
  class CLI < Thor
16
16
  include Thor::Actions
17
+
18
+ # \(see {http://www.rubydoc.info/gems/highline/HighLine#initialize-instance_method HighLine#new}\)
17
19
  HILINE = HighLine.new($stdin, $stderr, 80)
18
20
  map %w[--version -v] => :__print_version
19
21
  desc '--version, -v', 'Print the version'
@@ -54,11 +56,12 @@ module Mkmatter
54
56
  map %w[--info -i] => :__print_info
55
57
  desc '--info, -i', 'Print script/gem info'
56
58
  method_option :'info-format', :type => :string, desc: 'The format of info', enum: %w(table yaml), default: 'table'
59
+ # @return nil
57
60
  def __print_info
58
61
  format = options[:'info-format']
59
62
  rows = {
60
63
  'author(s)': Mkmatter::GemInfo.authors.join(', '),
61
- 'e-mail': Mkmatter::GemInfo.email,
64
+ 'e-mail': Mkmatter::GemInfo.email.join(', '),
62
65
  'mkmatter version': Mkmatter::VERSION,
63
66
  'Ruby version': RbConfig::CONFIG['RUBY_PROGRAM_VERSION'],
64
67
  'Platform': RbConfig::CONFIG['build_os']
@@ -3,6 +3,7 @@ require 'find'
3
3
  require 'yaml'
4
4
  module Mkmatter
5
5
  class Methods
6
+ # @return [Boolean] whether current directory is inside a jekyll site source directory
6
7
  def Methods.check_if_jekyll
7
8
  cwd = Pathname.new('.')
8
9
  cwd.ascend do |path|
@@ -15,6 +16,7 @@ module Mkmatter
15
16
  end
16
17
  end
17
18
 
19
+ # @return [Pathname] path of current jekyll site source roo
18
20
  def Methods.get_jekyll_root
19
21
  if Methods.check_if_jekyll
20
22
  cwd = Pathname.new('.').realdirpath
@@ -28,6 +30,7 @@ module Mkmatter
28
30
  end
29
31
  end
30
32
 
33
+ # @return [NilClass] nil
31
34
  def Methods.launch_editor(file_path)
32
35
  hl = HighLine.new($stdin, $stderr, 80)
33
36
  if file_path
@@ -38,7 +41,9 @@ module Mkmatter
38
41
  end
39
42
  end
40
43
 
41
-
44
+ # @param [String] type type of content
45
+ # @param [String] key root yaml directive to return
46
+ # @return [Hash] front matter
42
47
  def Methods.find_front_matter(type, key)
43
48
  unless type =~ /^(post|page)$/
44
49
  $stderr.puts "#{HighLine.color('Error', :red, :bold)}: Invalid Argument, allowed values: post, page"
@@ -1,6 +1,8 @@
1
1
  require 'mkmatter/version'
2
2
  module Mkmatter
3
+ # Gem Name
3
4
  GEM_NAME = 'mkmatter'
5
+ # Gem Name Alias
4
6
  NAME = GEM_NAME
5
7
 
6
8
  #
@@ -10,13 +12,16 @@ module Mkmatter
10
12
  #
11
13
  # Gem Summary
12
14
  SUMMARY = %q{Script facilitating easy content creation and generation for Jekyll Sites}
15
+ # Return gem information for certain commands and options
13
16
  class GemInfo
17
+ # @return [Array] list of authors
14
18
  def GemInfo.authors
15
19
  ['Ken Spencer']
16
20
  end
17
21
 
22
+ # @return [Array] authors emails
18
23
  def GemInfo.email
19
- 'me@iotaspencer.me'
24
+ ['me@iotaspencer.me']
20
25
  end
21
26
  end
22
27
  end
@@ -1,3 +1,3 @@
1
1
  module Mkmatter
2
- VERSION = '3.0.38'
2
+ VERSION = '3.0.39'
3
3
  end
data/lib/mkmatter.rb CHANGED
@@ -6,7 +6,7 @@ require 'mkmatter/version'
6
6
 
7
7
  require 'json'
8
8
  require 'yaml'
9
-
9
+ # Main Module Declaration
10
10
  module Mkmatter
11
11
 
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mkmatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.38
4
+ version: 3.0.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Spencer