marco-polo 2.0.1 → 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: '079746538ccd3fb5061a4f8926317713e6a6ef419813dabf933cfbc3eeb8a172'
4
- data.tar.gz: 375a052e04ea2c9f4d36809ce77e61dfb1cd53c821bb804b9019b6aeb636d454
3
+ metadata.gz: 40e1aeb5fb4fb3bed982c0455a648a35a93ca4d23542ee9c29137fdf2506b140
4
+ data.tar.gz: 0b9c13b733e0caba46a90c26a4bfb9c464d86be76a44f367eadbc67253a4cbd2
5
5
  SHA512:
6
- metadata.gz: 3bbf679e1e867d1242858a8ab17a359f32b48c25c77e3e3d6e7e57c9970173a678a76f241b9d575cdbba5a3875a98ea865a965e01801388951eac6a7350bb4f1
7
- data.tar.gz: 2e41103c3d6b984209c8c5e32343de739dc8885807dbd2a5aaa0d0abf9c5850df3f195e9d364e06eaba914a82e45c551eda249752334eb87c8c2d356977bd8d0
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.1"
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
data/marco-polo.gemspec CHANGED
@@ -4,7 +4,7 @@ Gem::Specification.new do |gem|
4
4
  gem.name = "marco-polo"
5
5
 
6
6
  gem.authors = ["Chris Doyle"]
7
- gem.email = ["archslide@gmail.com"]
7
+ gem.email = ["chris@arches.io"]
8
8
 
9
9
  gem.description = "MarcoPolo shows your app name and environment in your console prompt so you don't accidentally break production"
10
10
  gem.summary = "MarcoPolo shows your app name and environment in your console prompt"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marco-polo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Doyle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-10 00:00:00.000000000 Z
11
+ date: 2024-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -27,7 +27,7 @@ dependencies:
27
27
  description: MarcoPolo shows your app name and environment in your console prompt
28
28
  so you don't accidentally break production
29
29
  email:
30
- - archslide@gmail.com
30
+ - chris@arches.io
31
31
  executables: []
32
32
  extensions: []
33
33
  extra_rdoc_files: []
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  - !ruby/object:Gem::Version
58
58
  version: '0'
59
59
  requirements: []
60
- rubygems_version: 3.0.3
60
+ rubygems_version: 3.0.3.1
61
61
  signing_key:
62
62
  specification_version: 4
63
63
  summary: MarcoPolo shows your app name and environment in your console prompt