https://github.com/pry/pry-rails
Rails >= 3 pry initializer
https://github.com/pry/pry-rails
Keywords from Contributors
activerecord activejob mvc crash-reporting reflection pry irb introspection debugger rubygems
Last synced: about 11 hours ago
JSON representation
Repository metadata
Rails >= 3 pry initializer
- Host: GitHub
- URL: https://github.com/pry/pry-rails
- Owner: pry
- License: mit
- Created: 2011-08-27T10:30:50.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2024-06-20T01:31:49.000Z (over 1 year ago)
- Last Synced: 2026-02-28T15:55:22.126Z (4 days ago)
- Language: Ruby
- Homepage:
- Size: 129 KB
- Stars: 1,363
- Watchers: 18
- Forks: 89
- Open Issues: 28
- Releases: 0
-
Metadata Files:
- Readme: Readme.md
Readme.md
This project is not actively maintained and looking for a maintainer!
Description
Avoid repeating yourself, use pry-rails instead of copying the initializer to every rails project.
This is a small gem which causes rails console to open pry. It therefore depends on pry.
Prerequisites
- A Rails >= 3.0 Application
- Ruby >= 1.9
Installation
Add this line to your gemfile:
gem 'pry-rails', :group => :development
bundle install and enjoy pry.
Usage
$ rails console
[1] pry(main)> show-routes
pokemon POST /pokemon(.:format) pokemons#create
new_pokemon GET /pokemon/new(.:format) pokemons#new
edit_pokemon GET /pokemon/edit(.:format) pokemons#edit
GET /pokemon(.:format) pokemons#show
PUT /pokemon(.:format) pokemons#update
DELETE /pokemon(.:format) pokemons#destroy
beer POST /beer(.:format) beers#create
new_beer GET /beer/new(.:format) beers#new
edit_beer GET /beer/edit(.:format) beers#edit
GET /beer(.:format) beers#show
PUT /beer(.:format) beers#update
DELETE /beer(.:format) beers#destroy
[2] pry(main)> show-routes --grep beer
beer POST /beer(.:format) beers#create
new_beer GET /beer/new(.:format) beers#new
edit_beer GET /beer/edit(.:format) beers#edit
GET /beer(.:format) beers#show
PUT /beer(.:format) beers#update
DELETE /beer(.:format) beers#destroy
[3] pry(main)> show-routes --grep new
new_pokemon GET /pokemon/new(.:format) pokemons#new
new_beer GET /beer/new(.:format) beers#new
[4] pry(main)> show-models
Beer
id: integer
name: string
type: string
rating: integer
ibu: integer
abv: integer
created_at: datetime
updated_at: datetime
belongs_to hacker
Hacker
id: integer
social_ability: integer
created_at: datetime
updated_at: datetime
has_many pokemons
has_many beers
Pokemon
id: integer
name: string
caught: binary
species: string
abilities: string
created_at: datetime
updated_at: datetime
belongs_to hacker
has_many beers through hacker
Custom Rails prompt
If you want to permanently include the current Rails environment and project name
in the Pry prompt, put the following lines in your project's .pryrc:
Pry.config.prompt = Pry::Prompt[:rails]
If .pryrc could be loaded without pry-rails being available or installed,
guard against setting Pry.config.prompt to nil:
if Pry::Prompt[:rails]
Pry.config.prompt = Pry::Prompt[:rails]
end
Check out change-prompt --help for information about temporarily
changing the prompt for the current Pry session.
Disabling pry-rails
If pry-rails is included in your application but you would prefer not to use it, you may run the following command to set the appropriate environment variable to disable initialization and fall back to the default IRB console:
DISABLE_PRY_RAILS=1 rails console
Note that you may need to run spring stop first.
Developing and Testing
This repo uses Roadshow to generate a Docker Compose file for each
supported version of Rails (with a compatible version of Ruby for each one).
To run specs across all versions, you can either get the Roadshow tool and
run roadshow run, or use Docker Compose directly:
$ for fn in scenarios/*.docker-compose.yml; do docker-compose -f $fn run --rm scenario; done
You can also manually run the Rails console and server on each version with
roadshow run rake console and roadshow run rake server, or run them on a
specific version with, e.g., roadshow run -s rails40 rake console.
To update the set of scenarios, edit scenarios.yml and run roadshow generate, although the Gemfiles in the scenarios directory need to be
maintained manually.
Alternative
If you want to enable pry everywhere, make sure to check out
pry everywhere.
Owner metadata
- Name: The Pry REPL
- Login: pry
- Email:
- Kind: organization
- Description: Pry is a powerful runtime developer console and IRB alternative for Ruby.
- Website: http://pryrepl.org
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/845682?v=4
- Repositories: 16
- Last ynced at: 2024-03-25T19:47:39.102Z
- Profile URL: https://github.com/pry
GitHub Events
Total
- Pull request event: 2
- Fork event: 2
- Issues event: 1
- Watch event: 17
- Issue comment event: 8
Last Year
- Pull request event: 2
- Fork event: 1
- Issues event: 1
- Watch event: 10
- Issue comment event: 8
Committers metadata
Last synced: 2 days ago
Total Commits: 166
Total Committers: 36
Avg Commits per committer: 4.611
Development Distribution Score (DDS): 0.657
Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0
| Name | Commits | |
|---|---|---|
| Ryan Fitzgerald | r****e@g****m | 57 |
| Robin Wenglewski | r****n@w****e | 23 |
| Trey Lawrence | l****y@g****m | 14 |
| David Peter | d****r@g****m | 11 |
| John Mair | j****r@g****m | 11 |
| ☈king | r****g@s****g | 7 |
| Dave Powers | d****9@g****m | 4 |
| Kyrylo Silin | k****n@g****m | 3 |
| Philipp Hansch | d****v@p****t | 3 |
| crackedmind | d****d@g****m | 2 |
| Scott Watermasysk | s****r@g****m | 2 |
| Norimasa Ando | n****o@g****m | 2 |
| Akira Matsuda | r****e@d****p | 2 |
| rpag | r****g@s****m | 2 |
| robert | r****t@j****z | 2 |
| Charlie Jonas | c****e@c****k | 1 |
| Chris LaRose | c****e@g****m | 1 |
| Doug Yun | d****n@d****m | 1 |
| linyows | l****s@g****m | 1 |
| jonathan-mui | j****i | 1 |
| ar.shestopal | a****l@g****m | 1 |
| Yasuharu Ozaki | y****i@g****m | 1 |
| Teng Siong Ong | s****7@g****m | 1 |
| Takatoshi Matsumoto | t****3@g****m | 1 |
| Sven Pachnit | s****n@b****t | 1 |
| Peter M. Goldstein | p****n@g****m | 1 |
| Myke Cameron | m****n@g****m | 1 |
| Mike MacDonald | c****l@g****m | 1 |
| Meliq Pilosyan | m****n@h****m | 1 |
| Matthias Winkelmann | m****n@g****m | 1 |
| and 6 more... | ||
Committer domains:
- bitaculous.com: 1
- hey.com: 1
- bmonkeys.net: 1
- dockyard.com: 1
- charliejonas.co.uk: 1
- jazzonmymind.xyz: 1
- singletonclass.com: 1
- dio.jp: 1
- phansch.net: 1
- sharpsaw.org: 1
- wenglewski.de: 1
Issue and Pull Request metadata
Last synced: 8 days ago
Total issues: 44
Total pull requests: 68
Average time to close issues: 5 months
Average time to close pull requests: 3 months
Total issue authors: 43
Total pull request authors: 48
Average comments per issue: 3.34
Average comments per pull request: 1.59
Merged pull request: 47
Bot issues: 0
Bot pull requests: 0
Past year issues: 2
Past year pull requests: 6
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 2
Past year pull request authors: 3
Past year average comments per issue: 4.5
Past year average comments per pull request: 0.0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- codemilan (2)
- eiked (1)
- eloyesp (1)
- rycwilson (1)
- grncdr (1)
- rking (1)
- BartlomiejSkwira (1)
- nhocki (1)
- DenDos (1)
- karuppasamy (1)
- vihai (1)
- darrennickerson (1)
- Trevoke (1)
- jjb (1)
- ptrhvns (1)
Top Pull Request Authors
- banister (4)
- 0x1eef (4)
- kwstannard (4)
- rf- (3)
- 2called-chaos (2)
- marcreynolds (2)
- francoisa (2)
- djpowers (2)
- melopilosyan (2)
- ghost (2)
- hbd225 (2)
- amatsuda (2)
- scottwater (2)
- mkempe (1)
- greysteil (1)
Top Issue Labels
Top Pull Request Labels
Dependencies
- pryrails_scenario_rails30 latest
- pryrails_scenario_rails31 latest
- pryrails_scenario_rails32 latest
- pryrails_scenario_rails40 latest
- pryrails_scenario_rails41 latest
- pryrails_scenario_rails42 latest
- pryrails_scenario_rails50 latest
- pryrails_scenario_rails51 latest
- pryrails_scenario_rails52 latest
- pryrails_scenario_rails60 latest
- appraisal >= 0 development
- minitest >= 0 development
- pry >= 0.13.0
Score: 10.821297130379552