pry-byebug-power_assert 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 341653a3fa1a5c3e73b27fa8552ec3c124c84467
4
+ data.tar.gz: 325315895d330bb3a56a04d7d8e24f1753bd88c7
5
+ SHA512:
6
+ metadata.gz: 48e6bed66d3c0ed220ae5371d8370278a8de00bafb7e8e9e31d5b707c3788f55ea7e1e519ac415daa9bc3e3dae67dfbecdb9cae2437e06786c21b309629f50ae
7
+ data.tar.gz: 7fe0c778091c4fcb4dea0dcd4873deb0ca77a2e2bf1a9660c3a898d5ffbecb0aee68682d8b91b6f462d9c040dd1355aacf60d70ebae28b642ecf7624d90cbce9
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /Gemfile.local
3
+ /Gemfile.lock
4
+ /GPATH
5
+ /GRTAGS
6
+ /GTAGS
7
+ /coverage/
8
+ /doc/
9
+ /pkg/
10
+ /tmp/
11
+ /vendor/
data/.travis.yml ADDED
@@ -0,0 +1,11 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.3
5
+ - 2.4.0
6
+ - ruby-head
7
+ matrix:
8
+ allow_failures:
9
+ - rvm: ruby-head
10
+ before_install:
11
+ - gem update bundler
data/BSDL ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (C) 2017 Kazuki Tsujimoto, All rights reserved.
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions
5
+ are met:
6
+ 1. Redistributions of source code must retain the above copyright
7
+ notice, this list of conditions and the following disclaimer.
8
+ 2. Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+
12
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22
+ SUCH DAMAGE.
data/COPYING ADDED
@@ -0,0 +1,57 @@
1
+ Copyright (C) 2017 Kazuki Tsujimoto, All rights reserved.
2
+
3
+ You can redistribute it and/or modify it under either the terms of the
4
+ 2-clause BSDL (see the file BSDL), or the conditions below:
5
+
6
+ 1. You may make and give away verbatim copies of the source form of the
7
+ software without restriction, provided that you duplicate all of the
8
+ original copyright notices and associated disclaimers.
9
+
10
+ 2. You may modify your copy of the software in any way, provided that
11
+ you do at least ONE of the following:
12
+
13
+ a) place your modifications in the Public Domain or otherwise
14
+ make them Freely Available, such as by posting said
15
+ modifications to Usenet or an equivalent medium, or by allowing
16
+ the author to include your modifications in the software.
17
+
18
+ b) use the modified software only within your corporation or
19
+ organization.
20
+
21
+ c) give non-standard binaries non-standard names, with
22
+ instructions on where to get the original software distribution.
23
+
24
+ d) make other distribution arrangements with the author.
25
+
26
+ 3. You may distribute the software in object code or binary form,
27
+ provided that you do at least ONE of the following:
28
+
29
+ a) distribute the binaries and library files of the software,
30
+ together with instructions (in the manual page or equivalent)
31
+ on where to get the original distribution.
32
+
33
+ b) accompany the distribution with the machine-readable source of
34
+ the software.
35
+
36
+ c) give non-standard binaries non-standard names, with
37
+ instructions on where to get the original software distribution.
38
+
39
+ d) make other distribution arrangements with the author.
40
+
41
+ 4. You may modify and include the part of the software into any other
42
+ software (possibly commercial). But some files in the distribution
43
+ are not written by the author, so that they are not under these terms.
44
+
45
+ For the list of those files and their copying conditions, see the
46
+ file LEGAL.
47
+
48
+ 5. The scripts and library files supplied as input to or produced as
49
+ output from the software do not automatically fall under the
50
+ copyright of the software, but belong to whomever generated them,
51
+ and may be sold commercially, and may be aggregated with this
52
+ software.
53
+
54
+ 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
55
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
56
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
57
+ PURPOSE.
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ # https://github.com/redmine/redmine/blob/3.0.4/Gemfile#L101
6
+ local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
7
+ if File.exist?(local_gemfile)
8
+ eval_gemfile local_gemfile
9
+ end
data/LEGAL ADDED
@@ -0,0 +1,4 @@
1
+ LEGAL NOTICE INFORMATION
2
+ ------------------------
3
+
4
+ All the files in this distribution are written by the author.
data/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # Pry::Byebug::PowerAssert
2
+
3
+ [![Build Status](https://secure.travis-ci.org/k-tsj/power_assert.png?branch=master)](http://travis-ci.org/k-tsj/pry-byebug-power_assert)
4
+
5
+ ## About
6
+ pry-byebug-power_assert shows Power Assert style inspection message when you run 'next' command of pry-byebug.
7
+
8
+ ![Screenshot](https://raw.githubusercontent.com/wiki/k-tsj/pry-byebug-power_assert/images/screenshot.png)
9
+
10
+ ## Installation
11
+
12
+ Add this line to your application's Gemfile:
13
+
14
+ ```ruby
15
+ gem 'pry-byebug-power_assert'
16
+ ```
17
+
18
+ And then execute:
19
+
20
+ $ bundle
21
+
22
+ Or install it yourself as:
23
+
24
+ $ gem install pry-byebug-power_assert
25
+
26
+ ## Usage
27
+
28
+ Just type `next` in pry-byebug session.
29
+
30
+ ## Contributing
31
+
32
+ Bug reports and pull requests are welcome on GitHub at https://github.com/k-tsj/pry-byebug-power_assert.
33
+
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.ruby_opts = ["-w", "-r./test/test_helper"]
6
+ t.libs << "lib"
7
+ t.test_files = FileList['test/**/*_test.rb']
8
+ end
9
+
10
+ task :default => :test
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "pry/byebug/power_assert"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,45 @@
1
+ require 'pry/byebug/power_assert/version'
2
+ require 'pry-byebug'
3
+ require 'power_assert'
4
+
5
+ begin
6
+ verbose, $VERBOSE = $VERBOSE, nil
7
+ require 'power_assert/colorize'
8
+ ensure
9
+ $VERBOSE = verbose
10
+ end
11
+
12
+ module PowerAssert
13
+ IGNORED_LIB_DIRS[Pry::Byebug::PowerAssert] = __dir__
14
+ end
15
+
16
+ module Byebug
17
+ class PryProcessor
18
+ prepend Module.new {
19
+ def initialize(*)
20
+ super
21
+ @prev_power_assert_context = nil
22
+ end
23
+
24
+ def perform_next(*)
25
+ @prev_power_assert_context = PowerAssert.trace(frame)
26
+ super
27
+ end
28
+
29
+ def resume_pry
30
+ if @prev_power_assert_context
31
+ begin
32
+ sep = Pry::Helpers::Text.green('-' * (Pry::Terminal.width! - 1))
33
+ output.puts sep
34
+ output.puts @prev_power_assert_context.message
35
+ output.puts sep
36
+ ensure
37
+ @prev_power_assert_context.disable
38
+ @prev_power_assert_context = nil
39
+ end
40
+ end
41
+ super
42
+ end
43
+ }
44
+ end
45
+ end
@@ -0,0 +1,7 @@
1
+ class Pry
2
+ module Byebug
3
+ module PowerAssert
4
+ VERSION = "0.1.0"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,6 @@
1
+ # pry/byebug/power_assert.rb
2
+ #
3
+ # Copyright (C) 2017 Kazuki Tsujimoto, All rights reserved.
4
+
5
+ require "pry/byebug/power_assert/version"
6
+ require "pry/byebug/power_assert/core_ext"
@@ -0,0 +1 @@
1
+ require "pry/byebug/power_assert"
@@ -0,0 +1,31 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'pry/byebug/power_assert/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "pry-byebug-power_assert"
8
+ spec.version = Pry::Byebug::PowerAssert::VERSION
9
+ spec.authors = ["Kazuki Tsujimoto"]
10
+ spec.email = ["kazuki@callcc.net"]
11
+
12
+ spec.summary = %q{Extend pry-byebug with power_assert}
13
+ spec.description = %q{pry-byebug-power_assert shows Power Assert style inspection message when you run 'next' command of pry-byebug.}
14
+ spec.homepage = "https://github.com/k-tsj/pry-byebug-power_assert"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
+ f.match(%r{^(test|spec|features)/})
18
+ end
19
+ spec.bindir = "exe"
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ["lib"]
22
+
23
+ spec.add_development_dependency "bundler"
24
+ spec.add_development_dependency "rake"
25
+ spec.add_development_dependency "test-unit"
26
+ spec.add_development_dependency "pry-byebug"
27
+ spec.add_development_dependency "power_assert", ">= 1.0.0"
28
+ spec.extra_rdoc_files = ['README.md']
29
+ spec.rdoc_options = ['--main', 'README.md']
30
+ spec.licenses = ['2-clause BSDL', "Ruby's"]
31
+ end
metadata ADDED
@@ -0,0 +1,134 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pry-byebug-power_assert
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Kazuki Tsujimoto
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2017-01-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: test-unit
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry-byebug
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: power_assert
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 1.0.0
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 1.0.0
83
+ description: pry-byebug-power_assert shows Power Assert style inspection message when
84
+ you run 'next' command of pry-byebug.
85
+ email:
86
+ - kazuki@callcc.net
87
+ executables: []
88
+ extensions: []
89
+ extra_rdoc_files:
90
+ - README.md
91
+ files:
92
+ - ".gitignore"
93
+ - ".travis.yml"
94
+ - BSDL
95
+ - COPYING
96
+ - Gemfile
97
+ - LEGAL
98
+ - README.md
99
+ - Rakefile
100
+ - bin/console
101
+ - bin/setup
102
+ - lib/pry-byebug-power_assert.rb
103
+ - lib/pry/byebug/power_assert.rb
104
+ - lib/pry/byebug/power_assert/core_ext.rb
105
+ - lib/pry/byebug/power_assert/version.rb
106
+ - pry-byebug-power_assert.gemspec
107
+ homepage: https://github.com/k-tsj/pry-byebug-power_assert
108
+ licenses:
109
+ - 2-clause BSDL
110
+ - Ruby's
111
+ metadata: {}
112
+ post_install_message:
113
+ rdoc_options:
114
+ - "--main"
115
+ - README.md
116
+ require_paths:
117
+ - lib
118
+ required_ruby_version: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
123
+ required_rubygems_version: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - ">="
126
+ - !ruby/object:Gem::Version
127
+ version: '0'
128
+ requirements: []
129
+ rubyforge_project:
130
+ rubygems_version: 2.6.8
131
+ signing_key:
132
+ specification_version: 4
133
+ summary: Extend pry-byebug with power_assert
134
+ test_files: []