marco-polo 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +1 -0
- data/lib/marco-polo/version.rb +1 -1
- data/lib/marco-polo.rb +19 -12
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40e1aeb5fb4fb3bed982c0455a648a35a93ca4d23542ee9c29137fdf2506b140
|
4
|
+
data.tar.gz: 0b9c13b733e0caba46a90c26a4bfb9c464d86be76a44f367eadbc67253a4cbd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d2ad85752b81e8d1d396433b2cb59d2637b922cb4e201ba532716238060a5d056d57a38c241ba024ab081cfc818f9aa0887aa8c1c410ac08d93ec06d9723247
|
7
|
+
data.tar.gz: c6d412493e3a1330ab87748879548aba22650ced8be2ad9c9411f6bde974c1b183f537cc27658f526ad6889f5d8375415c126e7819a87db8d2a8da74f0ec74ff
|
data/CHANGELOG
CHANGED
data/lib/marco-polo/version.rb
CHANGED
data/lib/marco-polo.rb
CHANGED
@@ -12,18 +12,25 @@ module MarcoPolo
|
|
12
12
|
end
|
13
13
|
|
14
14
|
if defined? Pry
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
rails_env = Rails.env.downcase
|
15
|
+
wait_proc = proc {
|
16
|
+
current_app = ENV["MARCO_POLO_APP_NAME"] || Rails.application.class.module_parent_name.underscore.gsub("_", "-")
|
17
|
+
rails_env = Rails.env.downcase
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
# shorten some common long environment names
|
20
|
+
rails_env = "dev" if rails_env == "development"
|
21
|
+
rails_env = "prod" if rails_env == "production"
|
23
22
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
]
|
28
|
-
end
|
23
|
+
"#{current_app}(#{rails_env})> "
|
24
|
+
}
|
25
|
+
incomplete_proc = proc { "> "}
|
29
26
|
|
27
|
+
if defined? Pry::Prompt
|
28
|
+
Pry.config.prompt = Pry::Prompt.new(
|
29
|
+
'marco-polo',
|
30
|
+
'A prompt which shows your app name and environment',
|
31
|
+
[wait_proc, incomplete_proc]
|
32
|
+
)
|
33
|
+
else
|
34
|
+
Pry.config.prompt = [wait_proc, incomplete_proc]
|
35
|
+
end
|
36
|
+
end
|