lit-cli 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lit_cli.rb +4 -0
- data/lib/lit_pry.rb +13 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 865eec42e3e343a9432bc24ee852290159545a83c0d80c835555d3a7de965355
|
4
|
+
data.tar.gz: ca99ccd747ac4091e93d1e703183ea63f122ed46b6883bd24588ad0c6ccdf809
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64c4afe108dfadbdf6690963a1fb891ecf9dcf4bfd28402087cbeeafc37796e00d9564ce9d436139a1832af211330a61f428d15d5bb07add496347584245191e
|
7
|
+
data.tar.gz: dee1223cefa077ce2b38cf060169ad1bb882b9fec8aac7a42e76834a77fc2a8b6c53d30a62b6695750388742bca48633b59d4656fac1c3dbe563e1e1e2e46d41
|
data/lib/lit_cli.rb
CHANGED
data/lib/lit_pry.rb
CHANGED
@@ -60,25 +60,31 @@ if ENV['LIT_FLAGS'] && ENV['LIT_FLAGS'].include?('step')
|
|
60
60
|
unless @@lit_processed_paths.include? file_path
|
61
61
|
@@lit_processed_paths.add file_path
|
62
62
|
|
63
|
+
binding = "{ binding.pry if LitCLI.is_prying?; @@is_prying = false }"
|
63
64
|
new_lines = ''
|
65
|
+
line_count = 0
|
66
|
+
new_lines_count = 0
|
67
|
+
|
64
68
|
File.foreach(file_path) do |line|
|
69
|
+
line_count = line_count + 1
|
65
70
|
|
66
71
|
# Pass current directory into the next file's requires.
|
67
72
|
if line.strip.start_with? 'require_relative '
|
68
73
|
line = line.strip + ", '#{absolute_path.join('/')}'\n"
|
69
74
|
new_lines << line
|
70
75
|
else
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
76
|
+
# Add pry binding beneath each lit message.
|
77
|
+
if line.strip.start_with? 'lit '
|
78
|
+
lit_args = line.strip.delete_prefix('lit ').delete_suffix("\n")
|
79
|
+
new_lines << "lit(#{lit_args}) #{binding} \n"
|
80
|
+
else
|
81
|
+
new_lines << line
|
82
|
+
end
|
78
83
|
end
|
79
84
|
end
|
80
85
|
|
81
86
|
eval(new_lines, get_binding(__dir__ = absolute_path), file_path)
|
87
|
+
|
82
88
|
return true
|
83
89
|
# Path has already been required.
|
84
90
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lit-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maedi Prichard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pastel
|