markdown_exec 0.1.0 → 0.1.3

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: 4a4e558c22601546757b3fdd28f0c438ca1419badd2416e8beac4bc35692d6fe
4
- data.tar.gz: fdb68f22046be5c9c00b9044330a2891ac047505644defdb493b2795c0852943
3
+ metadata.gz: bf18f8937c1601bf8e6d19698d74c327c16ebfce07868249ebacddf0d7397dad
4
+ data.tar.gz: 6b8bb53ad8c9f21aa4c267984ff8ab02154c617a6b3f5de230763dbb81436131
5
5
  SHA512:
6
- metadata.gz: b0d32562440fc40f82dd00d189a51f55e0d7f5ca4dcc2f80d3c915622222a3234bafd162abb6931f78ab1d32fc067eba97c0788a6dca0bfaa87ce653001c62e6
7
- data.tar.gz: 44de2ffe388333c536512bef6cd6981424ed68f84a157d0b60397ae598a4cf60dae49b413c91d2683da9d544bd6d5c5790bd7f278c6ed5873e1d3f74f30f6f67
6
+ metadata.gz: 15a0d5aba4cc5b88b4f586bb59313f61c9d461564252f8653c71696f1f6d2e3ea32c72c3ca8a9b70e5ebe74c398ddba97758b460e0770f7cd2b3da7ae15be4ba
7
+ data.tar.gz: adf64d06a15ef0e2259557ac79e5ec4ead8a4dfa36ed15f706f19a9169a1006388fcdd4ee19ec790f3f6b0f350044b29b7cf002fb82a0ce019f9b1062a948603
data/Gemfile.lock CHANGED
@@ -1,14 +1,19 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- markdown_exec (0.0.3)
4
+ markdown_exec (0.1.1)
5
+ open3 (~> 0.1.1)
6
+ optparse (~> 0.1.1)
5
7
  tty-prompt (~> 0.23.1)
8
+ yaml (~> 0.2.0)
6
9
 
7
10
  GEM
8
11
  remote: https://rubygems.org/
9
12
  specs:
10
13
  ast (2.4.2)
11
14
  minitest (5.15.0)
15
+ open3 (0.1.1)
16
+ optparse (0.1.1)
12
17
  parallel (1.21.0)
13
18
  parser (3.1.1.0)
14
19
  ast (~> 2.4.1)
@@ -42,6 +47,7 @@ GEM
42
47
  tty-screen (0.8.1)
43
48
  unicode-display_width (2.1.0)
44
49
  wisper (2.0.1)
50
+ yaml (0.2.0)
45
51
 
46
52
  PLATFORMS
47
53
  arm64-darwin-21
data/README.md CHANGED
@@ -1,38 +1,38 @@
1
1
  # MarkdownExec
2
2
 
3
- 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/markdown_exec`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ This gem allows you to interactively select and run code blocks in markdown files.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ * Code blocks can be named.
6
6
 
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'markdown_exec'
13
- ```
7
+ * Named blocks can be required by other blocks.
14
8
 
15
- And then execute:
9
+ * The selected code block, and all required blocks, are collected in the order they appear in the markdown file.
16
10
 
17
- $ bundle install
11
+ ## Installation
18
12
 
19
- Or install it yourself as:
13
+ Install:
20
14
 
21
15
  $ gem install markdown_exec
22
16
 
23
17
  ## Usage
24
18
 
25
- TODO: Write usage instructions here
19
+ `mde --help`
20
+ Displays help information.
26
21
 
27
- ## Development
22
+ `mde`
23
+ Process `README.md` file in the current directory. Displays all the blocks in the file and allows you to select using [up], [down], and [return]. Press [ctrl]-c to abort selection.
28
24
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
25
+ `mde -f my.md`
26
+ Process `my.md` file in the current directory.
30
27
 
31
- 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
+ `mde -p child`
29
+ Process markdown files in the `child` directory.
32
30
 
33
- ## Contributing
31
+ `mde --list-blocks`
32
+ List all blocks in the selected files.
34
33
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/markdown_exec. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/markdown_exec/blob/master/CODE_OF_CONDUCT.md).
34
+ `mde --list-docs`
35
+ List all markdown documents in the selected folder.
36
36
 
37
37
  ## License
38
38
 
@@ -41,26 +41,3 @@ The gem is available as open source under the terms of the [MIT License](https:/
41
41
  ## Code of Conduct
42
42
 
43
43
  Everyone interacting in the MarkdownExec project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/markdown_exec/blob/master/CODE_OF_CONDUCT.md).
44
-
45
- # 2022-03-06
46
- ```
47
- gem build markdown_exec.gemspec
48
- ```
49
- ```expect
50
- Successfully built RubyGem
51
- Name: markdown_exec
52
- Version: 0.0.1
53
- File: markdown_exec-0.0.1.gem
54
- ```
55
- ```
56
- gem install ./markdown_exec-0.0.1.gem
57
- ```
58
- ```
59
- gem list | grep exec
60
- ```
61
- ```
62
- gem uninstall markdown_exec
63
- ```
64
- pusher api key: rubygems_8c4b38ef685484719858c53c3161a124c15d7a9bec6cb65a
65
-
66
- gem push markdown_exec-0.0.1.gem
@@ -4,5 +4,5 @@ module MarkdownExec
4
4
  APP_NAME = 'MDE'
5
5
  APP_DESC = 'Markdown block executor'
6
6
  GEM_NAME = 'markdown_exec'
7
- VERSION = '0.1.0'
7
+ VERSION = '0.1.3'
8
8
  end
data/lib/markdown_exec.rb CHANGED
@@ -8,7 +8,7 @@ $pdebug = !(ENV['MARKDOWN_EXEC_DEBUG'] || '').empty?
8
8
 
9
9
  require 'open3'
10
10
  require 'optparse'
11
- require 'pathname'
11
+ # require 'pathname'
12
12
  require 'tty-prompt'
13
13
  require 'yaml'
14
14
  require_relative 'markdown_exec/version'
@@ -367,7 +367,7 @@ module MarkdownExec
367
367
  ## configuration file
368
368
  #
369
369
  def read_configuration!(options, configuration_path)
370
- if Pathname.new(configuration_path).exist?
370
+ if File.exist?(configuration_path)
371
371
  # rubocop:disable Security/YAMLLoad
372
372
  options.merge!((YAML.load(File.open(configuration_path)) || {})
373
373
  .transform_keys(&:to_sym))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdown_exec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fareed Stevenson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-11 00:00:00.000000000 Z
11
+ date: 2022-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: open3
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.1.1
41
- - !ruby/object:Gem::Dependency
42
- name: pathname
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 0.1.0
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 0.1.0
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: tty-prompt
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -80,8 +66,8 @@ dependencies:
80
66
  - - "~>"
81
67
  - !ruby/object:Gem::Version
82
68
  version: 0.2.0
83
- description: Execute shell blocks in markdown files. Name blocks and require named
84
- blocks.
69
+ description: Interactively select and execute shell blocks in markdown files. Build
70
+ complex scripts by naming blocks and requiring named blocks.
85
71
  email:
86
72
  - fareed@phomento.com
87
73
  executables:
@@ -107,6 +93,8 @@ licenses:
107
93
  - MIT
108
94
  metadata:
109
95
  homepage_uri: https://rubygems.org/gems/markdown_exec
96
+ source_code_uri: https://github.com/fareedst/markdown_exec
97
+ changelog_uri: https://github.com/fareedst/markdown_exec/blob/main/CHANGELOG.md
110
98
  post_install_message:
111
99
  rdoc_options: []
112
100
  require_paths: