marked-conductor 1.0.37 → 1.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/bin/conductor +47 -23
- data/lib/conductor/version.rb +1 -1
- data/marked-conductor.gemspec +52 -0
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d11929a623cf222dcc0fb6cb681b2292a9d00b1560651f2705935089b42c6b8f
|
4
|
+
data.tar.gz: 2162e63d939709e7a81ed1d686c7fde34024b763a05ea41ccbd17165bd4c60ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f695ce001dbaae4e25e2bb03106923cf6488e90b71a5e427b0511d3cba57d395e47e6e6cd4f19c2d365a9be11edf7f4a518349950a2e90b4b7beabd94a625e51
|
7
|
+
data.tar.gz: 42092c947da449d3dc54d36f9b48e36f3a213767145f0151dce5b98a00b92c0a1ff575a8f3f8904aed43841b444dbac3ef27ed31f5140f9dabbb9e062e145537
|
data/CHANGELOG.md
CHANGED
data/bin/conductor
CHANGED
@@ -1,29 +1,53 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
1
|
+
#!/usr/bin/env ruby -W1
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
-
load(bundle_binstub)
|
20
|
-
else
|
21
|
-
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
-
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
4
|
+
require_relative "../lib/conductor"
|
5
|
+
require "optparse"
|
6
|
+
|
7
|
+
optparse = OptionParser.new do |opts|
|
8
|
+
opts.banner = "Called from Marked 2 as a Custom Pre/Processor"
|
9
|
+
|
10
|
+
opts.on("-v", "--version", "Show version number") do
|
11
|
+
puts "conductor v#{Conductor::VERSION}"
|
12
|
+
Process.exit 0
|
13
|
+
end
|
14
|
+
|
15
|
+
opts.on("-h", "--help", "Display this screen") do
|
16
|
+
puts opts
|
17
|
+
exit
|
23
18
|
end
|
24
19
|
end
|
25
20
|
|
26
|
-
|
27
|
-
|
21
|
+
optparse.parse!
|
22
|
+
|
23
|
+
config = Conductor::Config.new
|
24
|
+
res = config.configure
|
25
|
+
|
26
|
+
Process.exit 0 unless res
|
28
27
|
|
29
|
-
|
28
|
+
Conductor.stdin
|
29
|
+
Conductor.original_input = Conductor.stdin
|
30
|
+
|
31
|
+
tracks = config.tracks
|
32
|
+
res, condition = Conductor.conduct(tracks)
|
33
|
+
|
34
|
+
##
|
35
|
+
## Clean up conditions for output
|
36
|
+
##
|
37
|
+
## @param condition The condition
|
38
|
+
##
|
39
|
+
def clean_condition(condition)
|
40
|
+
condition.join("").sub(/ *(->|,) *$/, "")
|
41
|
+
end
|
42
|
+
|
43
|
+
if res.nil?
|
44
|
+
warn "No conditions satisfied"
|
45
|
+
# puts Conductor::Env
|
46
|
+
puts "NOCUSTOM"
|
47
|
+
elsif res == Conductor.original_input
|
48
|
+
warn "No change in output"
|
49
|
+
puts "NOCUSTOM"
|
50
|
+
else
|
51
|
+
warn "Met condition: #{clean_condition(condition)}"
|
52
|
+
puts res
|
53
|
+
end
|
data/lib/conductor/version.rb
CHANGED
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/conductor/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "marked-conductor"
|
7
|
+
spec.version = Conductor::VERSION
|
8
|
+
spec.authors = ["Brett Terpstra"]
|
9
|
+
spec.email = ["me@brettterpstra.com"]
|
10
|
+
|
11
|
+
spec.summary = "A custom processor manager for Marked 2 (Mac)"
|
12
|
+
spec.description = "Conductor allows easy configuration of multiple scripts" \
|
13
|
+
"which are run as custom pre/processors for Marked based on conditional statements."
|
14
|
+
spec.homepage = "https://github.com/ttscoff/marked-conductor"
|
15
|
+
spec.license = "MIT"
|
16
|
+
spec.required_ruby_version = ">= 2.6.0"
|
17
|
+
|
18
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
19
|
+
spec.metadata["source_code_uri"] = "https://github.com/ttscoff/marked-conductor"
|
20
|
+
spec.metadata["changelog_uri"] = "https://github.com/ttscoff/marked-conductor/CHANGELOG.md"
|
21
|
+
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
25
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
26
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
27
|
+
end
|
28
|
+
end
|
29
|
+
spec.bindir = "bin"
|
30
|
+
spec.executables = spec.files.grep(%r{\Abin/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
spec.add_development_dependency "awesome_print", "~> 1.9.2"
|
34
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
35
|
+
spec.add_development_dependency "gem-release", "~> 2.2"
|
36
|
+
spec.add_development_dependency "parse_gemspec-cli", "~> 1.0"
|
37
|
+
spec.add_development_dependency "pry", "~> 0.14.2"
|
38
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
39
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
40
|
+
spec.add_development_dependency "simplecov", "~> 0.21"
|
41
|
+
spec.add_development_dependency "simplecov-console", "~> 0.9"
|
42
|
+
spec.add_development_dependency "yard", "~> 0.9", ">= 0.9.26"
|
43
|
+
|
44
|
+
spec.add_development_dependency "rubocop", "~> 1.21"
|
45
|
+
|
46
|
+
|
47
|
+
# Uncomment to register a new dependency of your gem
|
48
|
+
spec.add_dependency "chronic", "~> 0.10.2"
|
49
|
+
spec.add_dependency "tty-which", "~> 0.5.0"
|
50
|
+
# For more information and examples about making a new gem, checkout our
|
51
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
52
|
+
end
|
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marked-conductor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.38
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Terpstra
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2024-08-23 00:00:00.000000000 Z
|
@@ -232,6 +232,7 @@ files:
|
|
232
232
|
- lib/conductor/string.rb
|
233
233
|
- lib/conductor/version.rb
|
234
234
|
- lib/conductor/yui_compressor.rb
|
235
|
+
- marked-conductor.gemspec
|
235
236
|
- src/_README.md
|
236
237
|
- test.sh
|
237
238
|
homepage: https://github.com/ttscoff/marked-conductor
|
@@ -241,7 +242,7 @@ metadata:
|
|
241
242
|
homepage_uri: https://github.com/ttscoff/marked-conductor
|
242
243
|
source_code_uri: https://github.com/ttscoff/marked-conductor
|
243
244
|
changelog_uri: https://github.com/ttscoff/marked-conductor/CHANGELOG.md
|
244
|
-
post_install_message:
|
245
|
+
post_install_message:
|
245
246
|
rdoc_options: []
|
246
247
|
require_paths:
|
247
248
|
- lib
|
@@ -256,8 +257,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
256
257
|
- !ruby/object:Gem::Version
|
257
258
|
version: '0'
|
258
259
|
requirements: []
|
259
|
-
rubygems_version: 3.
|
260
|
-
signing_key:
|
260
|
+
rubygems_version: 3.2.16
|
261
|
+
signing_key:
|
261
262
|
specification_version: 4
|
262
263
|
summary: A custom processor manager for Marked 2 (Mac)
|
263
264
|
test_files: []
|