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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 576b46914baa06d588c6889e34a784106d51b7711c2cc79cf54e799a2ed40a21
4
- data.tar.gz: a9a4f6a4a8b1bf9277c1c6185097b06aed01d8dc3e5914644181ead130dc6c27
3
+ metadata.gz: 40e1aeb5fb4fb3bed982c0455a648a35a93ca4d23542ee9c29137fdf2506b140
4
+ data.tar.gz: 0b9c13b733e0caba46a90c26a4bfb9c464d86be76a44f367eadbc67253a4cbd2
5
5
  SHA512:
6
- metadata.gz: acb60f8b86ef25d9e4375c123e15b920137c90d9c1e848bbf987cb72f4dbfe625e11a4ae754168c3913d42ebb52f9743726a4372039b181796fe82e71bb7cc35
7
- data.tar.gz: 04c005dd4253795118a6ebc4bc678c52dbbec9246da56e606e60dad4962c027a6d296df0d11549b4ac02bc2b258396cbff979e419cbe375f753a71cb712bf9d4
6
+ metadata.gz: 3d2ad85752b81e8d1d396433b2cb59d2637b922cb4e201ba532716238060a5d056d57a38c241ba024ab081cfc818f9aa0887aa8c1c410ac08d93ec06d9723247
7
+ data.tar.gz: c6d412493e3a1330ab87748879548aba22650ced8be2ad9c9411f6bde974c1b183f537cc27658f526ad6889f5d8375415c126e7819a87db8d2a8da74f0ec74ff
data/CHANGELOG CHANGED
@@ -1,3 +1,4 @@
1
+ Unreleased Use Pry::Prompt API for Pry 0.13.0+
1
2
  2.0.1 Rails 6 support for Pry
2
3
  2.0.0 Rails 6 support
3
4
  1.2.1 Less hacky railtie
@@ -1,3 +1,3 @@
1
1
  module MarcoPolo
2
- VERSION = "2.0.2"
2
+ VERSION = "2.0.3"
3
3
  end
data/lib/marco-polo.rb CHANGED
@@ -12,18 +12,25 @@ module MarcoPolo
12
12
  end
13
13
 
14
14
  if defined? Pry
15
- Pry.config.prompt = [
16
- proc {
17
- current_app = ENV["MARCO_POLO_APP_NAME"] || Rails.application.class.module_parent_name.underscore.gsub("_", "-")
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
- # shorten some common long environment names
21
- rails_env = "dev" if rails_env == "development"
22
- rails_env = "prod" if rails_env == "production"
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
- "#{current_app}(#{rails_env})> "
25
- },
26
- proc { "> "}
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marco-polo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Doyle