justprep 1.0.0 → 1.0.1
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/Gemfile.lock +2 -2
- data/justfile +7 -2
- data/lib/justprep.rb +25 -8
- data/lib/justprep/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4729fa9db5b45ee64efff9c7f0aaddbeddf6d654cfe031d1a7039a13c8deca0
|
4
|
+
data.tar.gz: a2806b5e251bf062763aec4b5c1806919051a3251e42d7c03f61a557f53b9465
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b27ccd199ac3f53759e0c07e039c3d5d3d4212166c5f4d6cec0fde22fb4f0281746ca7a61b690cb882280e4bdb0e45f7aee446a3696aadc40db20b9617a1117a
|
7
|
+
data.tar.gz: 436b0657a5d2a66d1db74cdfb953f7a83f2b69889653bb0ad0204365a79117f8adcf086aabc7f256123adefcac8861db339362de7d46c4d4e271974e507a799f
|
data/Gemfile.lock
CHANGED
data/justfile
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
set positional-arguments := true
|
6
6
|
|
7
7
|
# List available recipes
|
8
|
-
@
|
8
|
+
@help:
|
9
9
|
echo
|
10
10
|
echo "Available Recipes at"
|
11
11
|
echo `pwd`
|
@@ -16,10 +16,15 @@ set positional-arguments := true
|
|
16
16
|
|
17
17
|
|
18
18
|
# Build the current gem
|
19
|
-
build:
|
19
|
+
@build:
|
20
20
|
rake clean clobber build
|
21
21
|
|
22
22
|
|
23
|
+
# Install the gem locally
|
24
|
+
@install:
|
25
|
+
rake install:local
|
26
|
+
|
27
|
+
|
23
28
|
#################################################
|
24
29
|
## Recipes that deal with the source code version
|
25
30
|
## Version manager is handled by the "bump" gem
|
data/lib/justprep.rb
CHANGED
@@ -30,7 +30,7 @@ module Justprep
|
|
30
30
|
modules = []
|
31
31
|
|
32
32
|
JUSTPREP_KEYWORDS.each do |keyword|
|
33
|
-
modules << text.select{|x| x.start_with?
|
33
|
+
modules << text.select{|x| x.start_with?("#{keyword} ") || x.strip == keyword}
|
34
34
|
end
|
35
35
|
|
36
36
|
return modules.flatten!
|
@@ -129,7 +129,10 @@ module Justprep
|
|
129
129
|
|
130
130
|
mainfile = just_find_it
|
131
131
|
|
132
|
-
|
132
|
+
if mainfile.nil?
|
133
|
+
STDERR.puts "WARNING: JUSTPREP_FILENAME_IN Not Found: #{JUSTPREP_FILENAME_IN}"
|
134
|
+
exit(0)
|
135
|
+
end
|
133
136
|
|
134
137
|
basefile = mainfile.parent + JUSTPREP_FILENAME_OUT
|
135
138
|
|
@@ -145,12 +148,21 @@ module Justprep
|
|
145
148
|
modules.each do |a_line|
|
146
149
|
an_index = text.index a_line
|
147
150
|
begin_filename = a_line.index(' ')
|
148
|
-
|
151
|
+
|
152
|
+
if begin_filename.nil?
|
153
|
+
module_filename = ""
|
154
|
+
else
|
155
|
+
module_filename = a_line[begin_filename, a_line.size - begin_filename].chomp.strip
|
156
|
+
end
|
149
157
|
|
150
158
|
if module_filename.empty?
|
151
|
-
STDERR.puts "#{an_index}: #{a_line}"
|
152
159
|
STDERR.puts "ERROR: No path/to/file was provided"
|
153
|
-
|
160
|
+
line_out = sprintf('% d ', an_index+1)
|
161
|
+
STDERR.puts (" "*line_out.size)+"|"
|
162
|
+
STDERR.puts "#{line_out}| #{a_line}"
|
163
|
+
STDERR.print (" "*line_out.size)+"|"
|
164
|
+
STDERR.puts (" "*(a_line.size+2)) + "^"
|
165
|
+
exit(1)
|
154
166
|
end
|
155
167
|
|
156
168
|
if module_filename.include?('~') || module_filename.include?('$')
|
@@ -166,10 +178,15 @@ module Justprep
|
|
166
178
|
if module_path.exist?
|
167
179
|
text[an_index] = include_content_from(module_path)
|
168
180
|
else
|
169
|
-
STDERR.puts "
|
170
|
-
|
181
|
+
STDERR.puts "ERROR: File Does Not Exist - #{module_path}"
|
182
|
+
line_out = sprintf('% d ', an_index+1)
|
183
|
+
STDERR.puts (" "*line_out.size)+"|"
|
184
|
+
STDERR.puts "#{line_out}| #{a_line}"
|
185
|
+
STDERR.print (" "*line_out.size)+"|"
|
186
|
+
STDERR.puts (" "*(a_line.index(module_filename)+1)) + "^"
|
187
|
+
exit(1)
|
171
188
|
end
|
172
|
-
end
|
189
|
+
end # modules.each do |a_line|
|
173
190
|
|
174
191
|
basefile.write text.flatten!.join "\n"
|
175
192
|
end # def execute
|
data/lib/justprep/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: justprep
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dewayne VanHoozer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bump
|
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '0'
|
74
74
|
requirements: []
|
75
|
-
rubygems_version: 3.2.
|
75
|
+
rubygems_version: 3.2.24
|
76
76
|
signing_key:
|
77
77
|
specification_version: 4
|
78
78
|
summary: A pre-processor for the 'just' command line utility
|