pry-rails 0.3.7 → 0.3.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f3842beaf1c495fc474c8f601bc68430d5897855
4
- data.tar.gz: 5f00502e1e79c391c9432a141d18e4b9e76f79db
3
+ metadata.gz: 21af77dd8aded805e37ee7ce77e5385bd205670b
4
+ data.tar.gz: bfd11e6d4dce9e3a632c2efcff9b0cc92f533df5
5
5
  SHA512:
6
- metadata.gz: 542b7249eae25a491004cb5d3a515b99ba1b4616e8fdbac95ded9c77924175118e80e934505428d595dfdfc1c464b2129a6c192e2cf3f542aa7c60799efab0ec
7
- data.tar.gz: 2c3c43bab0d9d0883cbb46dcb1497665edf030af26063356ec8c671de249b074411f43eff050048c3878b71a1186a51d7f168693eb73a361fa3eacaa9d617192
6
+ metadata.gz: 43224d8a22bdb7eaf256130f77612e8c65c841e9d979c7aa0fa69090c5d06bc491e0e0ffd517fc76ded8812f0d9050f0844edc0f3eed024bd7145c292c4b1400
7
+ data.tar.gz: 48fc50022caf324a382e5474d5900b421c4bcc7ed7812808733bcab94f041361a476bc4ff7a2832016f54ea4bf612d4125766e3fee72ccdc5824c43a6f6d66ee
data/Readme.md CHANGED
@@ -78,14 +78,25 @@ irb(main):001:0>
78
78
 
79
79
  ## Custom Rails prompt
80
80
 
81
- If you want to include the current Rails environment and project name in the pry prompt, put the following lines in your project's `.pryrc`:
81
+ If you want to permanently include the current Rails environment and project name
82
+ in the Pry prompt, put the following lines in your project's `.pryrc`:
82
83
 
83
84
  ```ruby
84
- if defined?(PryRails::RAILS_PROMPT)
85
- Pry.config.prompt = PryRails::RAILS_PROMPT
85
+ Pry.config.prompt = Pry::Prompt[:rails][:value]
86
+ ```
87
+
88
+ If `.pryrc` could be loaded without pry-rails being available or installed,
89
+ guard against setting `Pry.config.prompt` to `nil`:
90
+
91
+ ```ruby
92
+ if Pry::Prompt[:rails]
93
+ Pry.config.prompt = Pry::Prompt[:rails][:value]
86
94
  end
87
95
  ```
88
96
 
97
+ Check out `change-prompt --help` for information about temporarily
98
+ changing the prompt for the current Pry session.
99
+
89
100
  # Developing and Testing
90
101
 
91
102
  This repo uses [Roadshow] to generate a [Docker Compose] file for each
@@ -13,7 +13,7 @@ module PryRails
13
13
  end
14
14
 
15
15
  def project_name
16
- File.basename(Rails.root)
16
+ Rails.application.class.parent_name.underscore
17
17
  end
18
18
  end
19
19
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module PryRails
4
- VERSION = "0.3.7"
4
+ VERSION = "0.3.8"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pry-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robin Wenglewski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-06 00:00:00.000000000 Z
11
+ date: 2018-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry