mdcat 0.3.0 → 0.4.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: 3230ada7366241572efd5432611638066224ed9c467ca9a8a136942cdc45f91d
4
- data.tar.gz: 98fe44332942419dc31f0d28b4b3ced5e0715d7f23560846e93faa1aafd709ad
3
+ metadata.gz: f71ba396910974ce42ac68e13ff3065d6baa4f202944272d92c81ed43e2fe59b
4
+ data.tar.gz: a8e4fa4441873103f6f0a3425d43cbcc1babb814c7cc9ac2fb872bfc4efe3b65
5
5
  SHA512:
6
- metadata.gz: 5d9ba213e33c46205a72c6e0bec52e39f85a0410eb31772c8715c055322becab43e42e4fd676a0eaf36d945d7cd6f6df10b13cd4be1235f1c6921c4c0606e322
7
- data.tar.gz: c9e3b9513ff985bf90cd9208c4d6d5e3fa38c1946b9556753f26fce479ac60831e584212973dd424399dac1437f357839023e47c8bdc58be3f5b1cb1e9c205ee
6
+ metadata.gz: 3f33aa291a8f6c14f0fd57876e4f3830d5037bfe45d5489944a0d124816f035daac9fbfec98697a05f8a6e46c16ea5c310dfa8ed3fef4b4601979eb4ee03d79b
7
+ data.tar.gz: a11423ac7e84072bd19792ea832847275a21363cca526ba42dbdcf7710d027b2bfb2af33739f3f74ddb8d0b70acd009da6c9a27d9d0745331fbaa18839a40e0c
data/Changelog.md ADDED
@@ -0,0 +1,44 @@
1
+
2
+ # Changelog
3
+
4
+ All notable changes to this project will be documented in this file.
5
+
6
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
7
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
+
9
+ ## [Unreleased]
10
+
11
+ <!--
12
+ RELEASE TEMPLATE
13
+ ======================
14
+
15
+ ## [0.0.0] - 2024-01-01
16
+
17
+ ### Added
18
+
19
+ - Add support to open README or index by default
20
+
21
+ ### Fixed
22
+
23
+ - Fix missing logo
24
+
25
+ ### Changed
26
+
27
+ - Upgrade dependencie tty-markdown
28
+
29
+ ### Removed
30
+
31
+ - Identical links assigned in each translation file
32
+
33
+ -->
34
+
35
+
36
+ ## [0.4.0] - 2024-01-18
37
+
38
+ ### Added
39
+
40
+ - Add support to open README.md or index.md by default
41
+
42
+
43
+ [unreleased]: https://github.com/dvinciguerra/mdcat/compare/v0.4.0...HEAD
44
+ [0.4.0]: https://github.com/dvinciguerra/mdcat/compare/v0.3.0...v0.4.0
data/README.md CHANGED
@@ -1,35 +1,39 @@
1
- # Mdcat
1
+ # mdcat
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
3
+ [![Gem Version](https://badge.fury.io/rb/mdcat.svg)](https://badge.fury.io/rb/mdcat)
4
+ [![Build Status](https://travis-ci.org/dvinciguerra/mdcat.svg?branch=master)](https://travis-ci.org/dvinciguerra/mdcat)
5
+ [![Maintainability](https://api.codeclimate.com/v1/badges/cf154e97f0e6c10614b4/maintainability)](https://codeclimate.com/github/dvinciguerra/mdcat/maintainability)
6
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/cf154e97f0e6c10614b4/test_coverage)](https://codeclimate.com/github/dvinciguerra/mdcat/test_coverage)
4
7
 
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/mdcat`. To experiment with that code, run `bin/console` for an interactive prompt.
8
+ `mdcat` is a command line tool write in Ruby to display markdown files in the terminal.
6
9
 
7
10
  ## Installation
8
11
 
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
12
+ The recommended way to install `mdcat` is via RubyGems:
10
13
 
11
- Install the gem and add to the application's Gemfile by executing:
12
-
13
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
14
-
15
- If bundler is not being used to manage dependencies, install the gem by executing:
16
-
17
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
14
+ $ gem install mdcat
18
15
 
19
16
  ## Usage
20
17
 
21
- TODO: Write usage instructions here
18
+ ### Displaying a file
19
+
20
+ $ mdcat README.md
22
21
 
23
- ## Development
22
+ ### For help
24
23
 
25
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
24
+ $ mdcat help
26
25
 
27
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
28
26
 
29
27
  ## Contributing
30
28
 
31
29
  Bug reports and pull requests are welcome on GitHub at https://github.com/dvinciguerra/mdcat.
32
30
 
31
+
33
32
  ## License
34
33
 
35
34
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
35
+
36
+
37
+ ## Author
38
+
39
+ [Daniel Vinciguerra](https://github.com/dvinciguerra)
data/bin/mdcat CHANGED
@@ -6,6 +6,8 @@ $LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
6
6
  require "mdcat"
7
7
  require "tty-markdown"
8
8
 
9
+ DEFAULT_FILES = %w[README.md index.md].freeze
10
+
9
11
  BANNER = %q(
10
12
  _ _
11
13
  _ __ __| |__ __ _| |_
@@ -37,7 +39,9 @@ if ARGV[0] == "-h" || ARGV[0] == "help"
37
39
  end
38
40
 
39
41
  # validations
40
- file_path = ARGV[0]
42
+ file_path =
43
+ ARGV[0] || DEFAULT_FILES.find { |file| File.exist?(file) }
44
+
41
45
  if file_path.nil?
42
46
  help
43
47
  exit(1)
data/lib/mdcat/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mdcat
4
- VERSION = "0.3.0"
4
+ VERSION = "0.4.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mdcat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Vinciguerra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-04 00:00:00.000000000 Z
11
+ date: 2024-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-markdown
@@ -34,6 +34,7 @@ extra_rdoc_files: []
34
34
  files:
35
35
  - ".rspec"
36
36
  - ".rubocop.yml"
37
+ - Changelog.md
37
38
  - Gemfile
38
39
  - Gemfile.lock
39
40
  - LICENSE.txt