marv 0.7.3 → 0.8.0
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/lib/marv/project/guard/pry.rb +48 -2
- data/lib/marv/version.rb +1 -1
- metadata +3 -4
- data/Gemfile.lock +0 -119
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aead1f81bd54be742953a991c4f1f3da7145753835847800c537581be93bcf41
|
4
|
+
data.tar.gz: d411b5671cb3a63fc7759dc14958aee9c6a587a80eff0799b992fe76aa4a547c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e2ac78aa59075debd2b3832ed6117badd7740e09c8abc71e0aa513e39d344cb2961fdea045376375885fdb44e0787d6bbc79cfc9df9330ad686a453e788f6fa
|
7
|
+
data.tar.gz: 5958235bf58734ee024fc001dd2fc0634b6933cf58b2a36ea3984a6b2aaffa1b56f3a28ebeaf47077f58fc6b4a83ee8b764bcc3da626aa4fe612e9e17cc560e3
|
@@ -1,11 +1,42 @@
|
|
1
|
+
require 'guard/jobs/base'
|
2
|
+
|
1
3
|
module Guard
|
2
4
|
module Jobs
|
3
5
|
class PryWrapper < Base
|
4
6
|
|
7
|
+
def _setup(options)
|
8
|
+
Pry.config.should_load_rc = false
|
9
|
+
Pry.config.should_load_local_rc = false
|
10
|
+
history_file_path = options[:history_file] || HISTORY_FILE
|
11
|
+
|
12
|
+
if legacy_pry?
|
13
|
+
Pry.config.history.file = File.expand_path(history_file_path)
|
14
|
+
else
|
15
|
+
Pry.config.history_file = File.expand_path(history_file_path)
|
16
|
+
end
|
17
|
+
|
18
|
+
_add_hooks(options)
|
19
|
+
|
20
|
+
::Guard::Commands::All.import
|
21
|
+
::Guard::Commands::Change.import
|
22
|
+
::Guard::Commands::Notification.import
|
23
|
+
::Guard::Commands::Pause.import
|
24
|
+
::Guard::Commands::Reload.import
|
25
|
+
::Guard::Commands::Show.import
|
26
|
+
::Guard::Commands::Scope.import
|
27
|
+
|
28
|
+
_setup_commands
|
29
|
+
_configure_prompt
|
30
|
+
end
|
31
|
+
|
5
32
|
private
|
6
33
|
|
7
34
|
attr_reader :thread
|
8
35
|
|
36
|
+
def legacy_pry?
|
37
|
+
Gem::Version.new(Pry::VERSION) < Gem::Version.new('0.13')
|
38
|
+
end
|
39
|
+
|
9
40
|
# Colorizes message using Thor Color Util
|
10
41
|
#
|
11
42
|
def _colorize(text, color)
|
@@ -16,7 +47,22 @@ module Guard
|
|
16
47
|
# `pry`.
|
17
48
|
#
|
18
49
|
def _configure_prompt
|
19
|
-
|
50
|
+
prompt_procs = [
|
51
|
+
_prompt(_colorize("\u00BB", :green)),
|
52
|
+
_prompt(_colorize("*", :yellow))
|
53
|
+
]
|
54
|
+
|
55
|
+
if legacy_pry?
|
56
|
+
Pry.config.prompt = prompt_procs
|
57
|
+
else
|
58
|
+
prompt_args = [:marv, 'Marv prompt for guard watcher', prompt_procs]
|
59
|
+
|
60
|
+
Pry::Prompt.add(*prompt_args) do |context, nesting, pry_instance, sep|
|
61
|
+
sep.call(context, nesting, pry_instance)
|
62
|
+
end
|
63
|
+
|
64
|
+
Pry.config.prompt = Pry::Prompt[:marv]
|
65
|
+
end
|
20
66
|
end
|
21
67
|
|
22
68
|
# Returns a proc that will return itself a string ending with the given
|
@@ -30,7 +76,7 @@ module Guard
|
|
30
76
|
hist_text = _colorize("[#{history}]", :yellow)
|
31
77
|
clip_text = _colorize("(#{_clip_name(target_self)})", :cyan)
|
32
78
|
level_text = _colorize("#{level}", :cyan)
|
33
|
-
path_text = _colorize(
|
79
|
+
path_text = _colorize(File.basename(Dir.pwd), :magenta)
|
34
80
|
|
35
81
|
"#{hist_text} #{_scope_for_prompt}#{process} #{path_text} #{clip_text}#{level_text} #{ending_char} "
|
36
82
|
end
|
data/lib/marv/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonian Guveli
|
@@ -223,14 +223,14 @@ dependencies:
|
|
223
223
|
name: pry
|
224
224
|
requirement: !ruby/object:Gem::Requirement
|
225
225
|
requirements:
|
226
|
-
- - "
|
226
|
+
- - ">="
|
227
227
|
- !ruby/object:Gem::Version
|
228
228
|
version: '0.13'
|
229
229
|
type: :runtime
|
230
230
|
prerelease: false
|
231
231
|
version_requirements: !ruby/object:Gem::Requirement
|
232
232
|
requirements:
|
233
|
-
- - "
|
233
|
+
- - ">="
|
234
234
|
- !ruby/object:Gem::Version
|
235
235
|
version: '0.13'
|
236
236
|
- !ruby/object:Gem::Dependency
|
@@ -286,7 +286,6 @@ extra_rdoc_files: []
|
|
286
286
|
files:
|
287
287
|
- CHANGELOG.md
|
288
288
|
- Gemfile
|
289
|
-
- Gemfile.lock
|
290
289
|
- LICENSE.txt
|
291
290
|
- README.md
|
292
291
|
- Rakefile
|
data/Gemfile.lock
DELETED
@@ -1,119 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
marv (0.7.2)
|
5
|
-
autoprefixer-rails (~> 9.3)
|
6
|
-
childprocess (~> 0.5)
|
7
|
-
coffee-script (~> 2.3)
|
8
|
-
guard (~> 2.8, < 2.9)
|
9
|
-
guard-livereload (~> 2.4)
|
10
|
-
less (~> 2.6)
|
11
|
-
mini_racer (~> 0.2)
|
12
|
-
mysql2 (~> 0.3)
|
13
|
-
pry (< 0.13)
|
14
|
-
rubyzip (~> 1.1)
|
15
|
-
sass (~> 3.4)
|
16
|
-
sprockets (~> 3.7)
|
17
|
-
thor (~> 0.19)
|
18
|
-
tilt (~> 1.1, != 1.3)
|
19
|
-
uglifier (~> 4.1)
|
20
|
-
|
21
|
-
GEM
|
22
|
-
remote: https://rubygems.org/
|
23
|
-
specs:
|
24
|
-
autoprefixer-rails (9.7.6)
|
25
|
-
execjs
|
26
|
-
celluloid (0.16.0)
|
27
|
-
timers (~> 4.0.0)
|
28
|
-
childprocess (0.9.0)
|
29
|
-
ffi (~> 1.0, >= 1.0.11)
|
30
|
-
coderay (1.1.2)
|
31
|
-
coffee-script (2.4.1)
|
32
|
-
coffee-script-source
|
33
|
-
execjs
|
34
|
-
coffee-script-source (1.12.2)
|
35
|
-
commonjs (0.2.7)
|
36
|
-
concurrent-ruby (1.1.6)
|
37
|
-
diff-lcs (1.3)
|
38
|
-
em-websocket (0.5.1)
|
39
|
-
eventmachine (>= 0.12.9)
|
40
|
-
http_parser.rb (~> 0.6.0)
|
41
|
-
eventmachine (1.2.7)
|
42
|
-
execjs (2.7.0)
|
43
|
-
ffi (1.12.2)
|
44
|
-
formatador (0.2.5)
|
45
|
-
guard (2.8.2)
|
46
|
-
formatador (>= 0.2.4)
|
47
|
-
listen (~> 2.7)
|
48
|
-
lumberjack (~> 1.0)
|
49
|
-
pry (>= 0.9.12)
|
50
|
-
thor (>= 0.18.1)
|
51
|
-
guard-compat (1.2.1)
|
52
|
-
guard-livereload (2.5.2)
|
53
|
-
em-websocket (~> 0.5)
|
54
|
-
guard (~> 2.8)
|
55
|
-
guard-compat (~> 1.0)
|
56
|
-
multi_json (~> 1.8)
|
57
|
-
hitimes (2.0.0)
|
58
|
-
http_parser.rb (0.6.0)
|
59
|
-
less (2.6.0)
|
60
|
-
commonjs (~> 0.2.7)
|
61
|
-
libv8 (7.3.492.27.1)
|
62
|
-
listen (2.10.1)
|
63
|
-
celluloid (~> 0.16.0)
|
64
|
-
rb-fsevent (>= 0.9.3)
|
65
|
-
rb-inotify (>= 0.9)
|
66
|
-
lumberjack (1.2.4)
|
67
|
-
method_source (0.9.2)
|
68
|
-
mini_racer (0.2.9)
|
69
|
-
libv8 (>= 6.9.411)
|
70
|
-
multi_json (1.14.1)
|
71
|
-
mysql2 (0.5.3)
|
72
|
-
pry (0.12.2)
|
73
|
-
coderay (~> 1.1.0)
|
74
|
-
method_source (~> 0.9.0)
|
75
|
-
rack (2.2.2)
|
76
|
-
rake (13.0.1)
|
77
|
-
rb-fsevent (0.10.3)
|
78
|
-
rb-inotify (0.10.1)
|
79
|
-
ffi (~> 1.0)
|
80
|
-
rspec (3.9.0)
|
81
|
-
rspec-core (~> 3.9.0)
|
82
|
-
rspec-expectations (~> 3.9.0)
|
83
|
-
rspec-mocks (~> 3.9.0)
|
84
|
-
rspec-core (3.9.1)
|
85
|
-
rspec-support (~> 3.9.1)
|
86
|
-
rspec-expectations (3.9.1)
|
87
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
88
|
-
rspec-support (~> 3.9.0)
|
89
|
-
rspec-mocks (3.9.1)
|
90
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
91
|
-
rspec-support (~> 3.9.0)
|
92
|
-
rspec-support (3.9.2)
|
93
|
-
rubyzip (1.3.0)
|
94
|
-
sass (3.7.4)
|
95
|
-
sass-listen (~> 4.0.0)
|
96
|
-
sass-listen (4.0.0)
|
97
|
-
rb-fsevent (~> 0.9, >= 0.9.4)
|
98
|
-
rb-inotify (~> 0.9, >= 0.9.7)
|
99
|
-
sprockets (3.7.2)
|
100
|
-
concurrent-ruby (~> 1.0)
|
101
|
-
rack (> 1, < 3)
|
102
|
-
thor (0.20.3)
|
103
|
-
tilt (1.4.1)
|
104
|
-
timers (4.0.4)
|
105
|
-
hitimes
|
106
|
-
uglifier (4.2.0)
|
107
|
-
execjs (>= 0.3.0, < 3)
|
108
|
-
|
109
|
-
PLATFORMS
|
110
|
-
ruby
|
111
|
-
|
112
|
-
DEPENDENCIES
|
113
|
-
bundler (~> 2.0)
|
114
|
-
marv!
|
115
|
-
rake (~> 13.0)
|
116
|
-
rspec (~> 3.0)
|
117
|
-
|
118
|
-
BUNDLED WITH
|
119
|
-
2.1.2
|