debugging 1.1.0 → 1.1.1

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: 7bd2a1941fbb803028c072531f8d3963f0d019fd
4
- data.tar.gz: 2b1de46d5030b634e773a44582a89790d4dbe87d
3
+ metadata.gz: c434903ad664ee28b78a12fe0de47a2fc88a6c81
4
+ data.tar.gz: cc665d297748b9f3bb29c0cad492f1c3c5274e5c
5
5
  SHA512:
6
- metadata.gz: 9e8987a8faefde09b1e0723f4fbe0d684accc284174f3936054564b1b5462c37f2df6fbb04051b6ce8dc34203853f5972026a24b7e05b867d68dcc79f7b8f954
7
- data.tar.gz: 7b8032e6afc0c7af066df97765a60546f49d396316994bd1fc32227ed90bf5ab739fad5c0240c1440b730e9c61e1679f2678626ac3662845734d5e34294d33f6
6
+ metadata.gz: 17978a5499880fd75a351227d5fa65b3f360acadbdf5001753ce2195e9a456271f3bebb0441b36b54dea5b045281c8374670495cbcef029d562ce760de521a83
7
+ data.tar.gz: d8ac3503cf5bbde30e6092d200a4dfdb78643775ab0aef316ea40424cb11a503d05e8cb9712843041810a07b33aceafd82d12a82caafddb358b7547afb2c012e
@@ -3,21 +3,22 @@ language: ruby
3
3
 
4
4
  rvm:
5
5
  - ruby-head
6
+ - 2.4.0
7
+ - 2.3.3
6
8
  - 2.2
7
9
  - 2.1
8
10
  - 2.0
9
- - rbx-2
10
11
  - jruby-head
11
- - jruby-9000
12
-
13
- env:
14
- - JRUBY_OPTS="--2.1"
12
+ - jruby-9.1.7.0
15
13
 
16
14
  cache:
17
15
  - bundler
18
16
 
19
17
  matrix:
20
18
  allow_failures:
21
- - rvm: rbx-2
19
+ - rvm: jruby-head
20
+ - rvm: ruby-head
21
+ - rvm: 2.0
22
+ # fast_finish: true
22
23
 
23
24
  bundler_args: --without full_support
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at conduct@janlelis.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
@@ -1,5 +1,10 @@
1
1
  ## ChangeLog
2
2
 
3
+ ### 1.1.1 / 2017-03-18
4
+
5
+ * Make howtocall private
6
+ * Relax paint dependency (allow paint versions 2.x)
7
+
3
8
  ### 1.1.0 / 2015-03-26
4
9
 
5
10
  * Added:
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010-2015 Jan Lelis
1
+ Copyright (c) 2010-2017 Jan Lelis
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Ruby Print Debugging [![version](https://badge.fury.io/rb/debugging.svg)](https://badge.fury.io/rb/debugging) [<img src="https://travis-ci.org/janlelis/debugging.png" />](https://travis-ci.org/janlelis/debugging)
1
+ # Ruby Print Debugging [![version](https://badge.fury.io/rb/debugging.svg)](https://badge.fury.io/rb/debugging) [<img src="https://travis-ci.org/janlelis/debugging.svg" />](https://travis-ci.org/janlelis/debugging)
2
2
 
3
3
  Helps you to introspect and debug your code.
4
4
 
@@ -169,5 +169,5 @@ Starts your favorite IRB session from the current binding.
169
169
 
170
170
  ## J-_-L
171
171
 
172
- Copyright (c) 2010-2015 Jan Lelis. MIT License. Originated from the
173
- [zucker](http://rubyzucker.info) gem.
172
+ Copyright (c) 2010-2017 Jan Lelis. MIT License. Originated from the
173
+ [zucker](https://github.com/janlelis/sugar_refinery) gem.
data/Rakefile CHANGED
@@ -1,33 +1,37 @@
1
- # encoding: utf-8
1
+ # # #
2
+ # Get gemspec info
3
+
4
+ gemspec_file = Dir['*.gemspec'].first
5
+ gemspec = eval File.read(gemspec_file), binding, gemspec_file
6
+ info = "#{gemspec.name} | #{gemspec.version} | " \
7
+ "#{gemspec.runtime_dependencies.size} dependencies | " \
8
+ "#{gemspec.files.size} files"
9
+
10
+
11
+ # # #
12
+ # Gem build and install task
13
+
14
+ desc info
15
+ task :gem do
16
+ puts info + "\n\n"
17
+ print " "; sh "gem build #{gemspec_file}"
18
+ FileUtils.mkdir_p 'pkg'
19
+ FileUtils.mv "#{gemspec.name}-#{gemspec.version}.gem", 'pkg'
20
+ puts; sh %{gem install --no-document pkg/#{gemspec.name}-#{gemspec.version}.gem}
21
+ end
2
22
 
3
- require 'rubygems'
4
23
 
5
- begin
6
- require 'bundler'
7
- rescue LoadError => e
8
- warn e.message
9
- warn "Run `gem install bundler` to install Bundler."
10
- exit -1
11
- end
24
+ # # #
25
+ # Start an IRB session with the gem loaded
12
26
 
13
- begin
14
- Bundler.setup(:development)
15
- rescue Bundler::BundlerError => e
16
- warn e.message
17
- warn "Run `bundle install` to install missing gems."
18
- exit e.status_code
27
+ desc "#{gemspec.name} | IRB"
28
+ task :irb do
29
+ sh "irb -I ./lib -r #{gemspec.name.gsub '-','/'}"
19
30
  end
20
31
 
21
- require 'rake'
22
32
 
23
- require 'rubygems/tasks'
24
- Gem::Tasks.new
25
-
26
- require 'rdoc/task'
27
- RDoc::Task.new do |rdoc|
28
- rdoc.title = "ruby_version"
29
- end
30
- task :doc => :rdoc
33
+ # # #
34
+ # Spec
31
35
 
32
36
  require 'rspec/core/rake_task'
33
37
  RSpec::Core::RakeTask.new
@@ -19,12 +19,11 @@ Gem::Specification.new do |gem|
19
19
 
20
20
  gem.required_ruby_version = '~> 2.0'
21
21
 
22
- gem.add_dependency 'paint', '>= 0.9', '< 2.0'
22
+ gem.add_dependency 'paint', '>= 0.9', '< 3.0'
23
23
  gem.add_dependency 'binding.repl', '~> 3.0'
24
24
 
25
25
  gem.add_development_dependency 'bundler', '~> 1.0'
26
26
  gem.add_development_dependency 'rake', '~> 10.1'
27
27
  gem.add_development_dependency 'rdoc', '~> 3.0'
28
28
  gem.add_development_dependency 'rspec', '~> 2.4'
29
- gem.add_development_dependency 'rubygems-tasks', '~> 0.2'
30
29
  end
@@ -1,6 +1,8 @@
1
1
  require 'debugging'
2
2
 
3
3
  module Debugging
4
+ private
5
+
4
6
  def howtocall(object = self, method_or_proc)
5
7
  if method_or_proc.is_a? Proc
6
8
  params = method_or_proc.parameters
@@ -1,3 +1,3 @@
1
1
  module Debugging
2
- VERSION = "1.1.0".freeze
2
+ VERSION = "1.1.1".freeze
3
3
  end
@@ -1,10 +1,6 @@
1
1
  require 'spec_helper'
2
2
  require 'debugging/howtocall'
3
3
 
4
- require 'fileutils'
5
- require 'open3'
6
-
7
-
8
4
  describe "howtocall" do
9
5
  it "displays method parameters" do
10
6
  def function(a, b)
@@ -76,18 +72,3 @@ describe "howtocall" do
76
72
  end
77
73
 
78
74
  end
79
-
80
- __END__
81
- ```ruby
82
- howtocall FileUtils, :cd #=> cd(dir, options, &block)
83
- howtocall Open3, :popen3 #=> popen3(*cmd, **opts, &block)
84
-
85
- ```
86
-
87
- An example with lambdas and keyword arguments:
88
-
89
- ```ruby
90
- a = ->(filter: /\A.*\z/, string:){ string[filter] }
91
- howtocall a #=> call(string:, filter:)
92
-
93
-
metadata CHANGED
@@ -1,133 +1,120 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: debugging
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Lelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-26 00:00:00.000000000 Z
11
+ date: 2017-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paint
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.9'
20
- - - <
20
+ - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '2.0'
22
+ version: '3.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - '>='
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0.9'
30
- - - <
30
+ - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '2.0'
32
+ version: '3.0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: binding.repl
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ~>
37
+ - - "~>"
38
38
  - !ruby/object:Gem::Version
39
39
  version: '3.0'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ~>
44
+ - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '3.0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ~>
51
+ - - "~>"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '1.0'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ~>
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '1.0'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rake
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - ~>
65
+ - - "~>"
66
66
  - !ruby/object:Gem::Version
67
67
  version: '10.1'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - ~>
72
+ - - "~>"
73
73
  - !ruby/object:Gem::Version
74
74
  version: '10.1'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rdoc
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - ~>
79
+ - - "~>"
80
80
  - !ruby/object:Gem::Version
81
81
  version: '3.0'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - ~>
86
+ - - "~>"
87
87
  - !ruby/object:Gem::Version
88
88
  version: '3.0'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: rspec
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - ~>
93
+ - - "~>"
94
94
  - !ruby/object:Gem::Version
95
95
  version: '2.4'
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - ~>
100
+ - - "~>"
101
101
  - !ruby/object:Gem::Version
102
102
  version: '2.4'
103
- - !ruby/object:Gem::Dependency
104
- name: rubygems-tasks
105
- requirement: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - ~>
108
- - !ruby/object:Gem::Version
109
- version: '0.2'
110
- type: :development
111
- prerelease: false
112
- version_requirements: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - ~>
115
- - !ruby/object:Gem::Version
116
- version: '0.2'
117
103
  description: Provides useful print debugging helpers.
118
104
  email: mail@janlelis.de
119
105
  executables: []
120
106
  extensions: []
121
107
  extra_rdoc_files: []
122
108
  files:
123
- - .editorconfig
124
- - .gitignore
125
- - .rspec
126
- - .travis.yml
109
+ - ".editorconfig"
110
+ - ".gitignore"
111
+ - ".rspec"
112
+ - ".travis.yml"
113
+ - CODE_OF_CONDUCT.md
127
114
  - ChangeLog.md
128
115
  - Gemfile
129
116
  - Gemfile.lock
130
- - LICENSE.txt
117
+ - MIT-LICENSE.txt
131
118
  - README.md
132
119
  - Rakefile
133
120
  - debugging.gemspec
@@ -156,17 +143,17 @@ require_paths:
156
143
  - lib
157
144
  required_ruby_version: !ruby/object:Gem::Requirement
158
145
  requirements:
159
- - - ~>
146
+ - - "~>"
160
147
  - !ruby/object:Gem::Version
161
148
  version: '2.0'
162
149
  required_rubygems_version: !ruby/object:Gem::Requirement
163
150
  requirements:
164
- - - '>='
151
+ - - ">="
165
152
  - !ruby/object:Gem::Version
166
153
  version: '0'
167
154
  requirements: []
168
155
  rubyforge_project:
169
- rubygems_version: 2.4.3
156
+ rubygems_version: 2.6.8
170
157
  signing_key:
171
158
  specification_version: 4
172
159
  summary: Print debugging helpers.