pry-loudmouth 0.1.0 → 0.1.2

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
- SHA1:
3
- metadata.gz: be77a936fa5d963fd9726470726091e42baf290b
4
- data.tar.gz: cae5bf8da75c9d858919f8ec58bfda96a2a74f43
2
+ SHA256:
3
+ metadata.gz: 3cf50b3aeb32955589bf892ecfbd255c0d8282900d85bdb2452a422e6a8aa9ab
4
+ data.tar.gz: 15f228049d01877389f682f72d59dd07741027dabf77ef35901ba830f3b8380c
5
5
  SHA512:
6
- metadata.gz: b167e131e86c5fa132385e40c0c99ce871befd281a3e4896259738440f1bbd8ba847f4d414f6beb4fc3fedadbadb22f2d28e075b0eac20c608eb524d8b164534
7
- data.tar.gz: 6135a5b485e731dcabda5ab5e4b96ec54db0e4c8f78589744e73e38f5ef99f60250faaec073bbe8feba495641a0fbbf791cda7839a1540fb45e436cf11d6aea0
6
+ metadata.gz: e07c79d2eed70392d71028898ecb360cbc45b5135a3beed848c006df7edbad69c9b934aa1fdbc767429e78d79eddae89a168bbff51943d1a63387eb2d2bb9758
7
+ data.tar.gz: e6ef9bef65888871516bc96bc183bff1086c689b45a6fb26569418c0065ea7424672f7e9fc3a6de2846135f18ddba3614da058fccaf93cbf10a12ea9893239c5
data/CHANGELOG ADDED
@@ -0,0 +1,7 @@
1
+ # v 0.1.2 09/22/19
2
+
3
+ Bugfix: Pry is not a module
4
+
5
+ # v 0.1.1 09/22/19
6
+
7
+ Fixed bug. Had wrong binding.pry hook. Not sure how it ever worked.
data/README.md CHANGED
@@ -1,8 +1,12 @@
1
1
  # Pry::Loudmouth
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/pry/loudmouth`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Pry-Loudmouth is a dead simple pry plugin. It's actually just 7 lines from my .pryrc that I thought was worth gemifying. Here's what it does:
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ 1. Terminal bell when a pry session starts
6
+ 2. Changes your process name to "pry" when the session starts
7
+ 3. Resets the process name to "ruby" when it ends.
8
+
9
+ (The process name appears in your terminal or tmux title.)
6
10
 
7
11
  ## Installation
8
12
 
@@ -20,20 +24,25 @@ Or install it yourself as:
20
24
 
21
25
  $ gem install pry-loudmouth
22
26
 
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
27
+ ## Local installation
26
28
 
27
- ## Development
29
+ If you're really opinionated about not adding extra cruft to your Gemfile, try this instead.
28
30
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake false` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
31
+ Install pry-loudmouth
32
+ $ gem install pry-loudmouth
30
33
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
34
+ And add this to your .pryrc:
32
35
 
33
- ## Contributing
36
+ ```ruby
37
+ require 'rubygems'
34
38
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/pry-loudmouth.
39
+ Gem.path.each do |gemset|
40
+ $:.concat(Dir.glob("#{gemset}/gems/pry-*/lib"))
41
+ end if defined?(Bundler)
42
+ $:.uniq!
36
43
 
44
+ require 'pry-loudmouth'
45
+ ```
37
46
 
38
47
  ## License
39
48
 
data/lib/pry/loudmouth.rb CHANGED
@@ -1,16 +1,20 @@
1
- require "pry/loudmouth/version"
1
+ # frozen_string_literal: true
2
2
 
3
- module Pry::Loudmouth
4
- def self.add_before_hook!
5
- Pry.hooks.add_hook :before_session, 'pry-loudmouth:announce_entrance' do |a,b,c|
6
- print "\a"
7
- Process.setproctitle 'pry'
3
+ require 'pry/loudmouth/version'
4
+
5
+ class Pry
6
+ module Loudmouth
7
+ def self.add_before_hook!
8
+ Pry.hooks.add_hook :before_eval, 'pry-loudmouth:eval' do
9
+ Process.setproctitle 'ruby'
10
+ end
8
11
  end
9
- end
10
12
 
11
- def self.add_after_hook!
12
- Pry.hooks.add_hook :after_session, 'pry-loudmouth:pry_has_left_the_building' do
13
- Process.setproctitle 'ruby'
13
+ def self.add_after_hook!
14
+ Pry.hooks.add_hook :after_eval, 'pry-loudmouth:all-done' do
15
+ print "\a"
16
+ Process.setproctitle 'pry'
17
+ end
14
18
  end
15
19
  end
16
20
  end
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Pry
2
4
  module Loudmouth
3
- VERSION = "0.1.0"
5
+ VERSION = '0.1.2'
4
6
  end
5
7
  end
@@ -19,6 +19,6 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_development_dependency "bundler", "~> 1.10"
23
- spec.add_development_dependency "rake", "~> 10.0"
22
+ spec.add_development_dependency "bundler"#, "~> 1.10"
23
+ spec.add_development_dependency "rake"#, "~> 10.0"
24
24
  end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pry-loudmouth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Sagotsky
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-07 00:00:00.000000000 Z
11
+ date: 2019-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.10'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.10'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '0'
41
41
  description: When a pry session starts, change the process title and alert user with
42
42
  a terminal bell. Switch back to ruby process afterwards.
43
43
  email:
@@ -48,6 +48,7 @@ extra_rdoc_files: []
48
48
  files:
49
49
  - ".gitignore"
50
50
  - ".travis.yml"
51
+ - CHANGELOG
51
52
  - Gemfile
52
53
  - LICENSE.txt
53
54
  - README.md
@@ -77,8 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
78
  - !ruby/object:Gem::Version
78
79
  version: '0'
79
80
  requirements: []
80
- rubyforge_project:
81
- rubygems_version: 2.2.3
81
+ rubygems_version: 3.0.3
82
82
  signing_key:
83
83
  specification_version: 4
84
84
  summary: Make pry sessions announce when they start.