cute_print 1.2.0 → 1.3.0

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: 0d855507092404371d5759b32d04a2ad2a7f62d4
4
- data.tar.gz: 4fbd0367d14891b9f44cc06c5a618aabaa739c30
2
+ SHA256:
3
+ metadata.gz: afe267ce9b44683e2dae746f7ff91468761ae694c54654c5b6e1478eec1913a9
4
+ data.tar.gz: 9c3fe451cbf354c890975d43576b7b4ea2e2489162592602b99c686a242d19df
5
5
  SHA512:
6
- metadata.gz: 54b25a6c26cb97acc2e294aa46121c0a2884ac1e25fcff8e39a37b22adc801d3300ccd4711f03bd514877261b9eb3f69b13d61f0791effe2f9f906c2ee4ecd11
7
- data.tar.gz: eec06862739df60c376cbd6a7a087e3d11f078fd4eecd5a6a1ebee576ff8d5b3268b9ed5bf98a246a73e649ea511bd35216052c69349991cd9f1d29c5a85e42c
6
+ metadata.gz: e316c0edb7b2f36e246a92126a64da7d7c6e8c0bd0055d87278a807a0e479d0c844a4583a586958ec0c935e2bc2a77a4551072035f4790551c73b67a0718c8b4
7
+ data.tar.gz: 69d5d45f49c02afddd967c4112be0971a3e706c5be06d2c4406f44bb3ecc3d0f868b1656dfeaf5905fe191c36365e3ea16faa6c894baba8c74f7aee7e74b4a4f
@@ -1,4 +1,11 @@
1
- # 1.1.5 - 2017-07-25
1
+ # 1.3.0 - 2018-03-13
2
+
3
+ * Rubies prior to 2.2 are no longer supported.
4
+ * Update gems
5
+ * No longer require hirb gem
6
+ * Removed warnings in Rubies 2.4 and 2.5
7
+
8
+ # 1.2.0 - 2017-07-25
2
9
 
3
10
  * Remove jeweler gem as a development dependency
4
11
  * Added CutePrint::Release with version and release date constants
@@ -7,7 +14,7 @@
7
14
  # 1.1.4 - 2016-06-15
8
15
 
9
16
  * Update gems
10
-
17
+
11
18
  # 1.1.3 - 2016-02-22
12
19
 
13
20
  * Update gems
data/LICENSE CHANGED
@@ -18,3 +18,9 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
18
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
19
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
20
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
22
+ -----
23
+
24
+ Portions of cute_print were extracted from the hirb gem. hirb is
25
+ Copyright (c) 2010 by Gabrier Horner, which is also under the MIT
26
+ License.
data/README.md CHANGED
@@ -184,14 +184,20 @@ methods:
184
184
 
185
185
  The "tap" methods are not available when using CutePrint this way.
186
186
 
187
- ## Rubies supported
187
+ ## Ruby versions
188
188
 
189
- This gem is known to work with these Rubies:
189
+ As of version 1.1.6, cute_print works with these versions of Ruby:
190
190
 
191
- * ruby-1.9.3
192
- * ruby-2.0
193
- * ruby-2.1
194
- * ruby-2.2
191
+ * ruby-2.5.0
192
+ * ruby-2.4.3
193
+ * ruby-2.3.6
194
+ * ruby-2.2.9
195
+
196
+ For older versions of Ruby, use cute_print version 1.2.0, which works
197
+ with:
198
+
199
+ * ruby-2.1.10
200
+ * ruby-1.9.3 (tests pass but with warnings)
195
201
 
196
202
  ## Platforms supported
197
203
 
@@ -67,53 +67,20 @@ Gem::Specification.new do |s|
67
67
  "README.md",
68
68
  "Rakefile",
69
69
  "cute_print.gemspec",
70
- "lib/cute_print.rb",
71
- "lib/cute_print/configure.rb",
72
- "lib/cute_print/core.rb",
73
- "lib/cute_print/core_ext.rb",
74
- "lib/cute_print/core_ext/irb.rb",
75
- "lib/cute_print/core_ext/object.rb",
76
- "lib/cute_print/cute_print.rb",
77
- "lib/cute_print/finds_foreign_caller.rb",
78
- "lib/cute_print/format.rb",
79
- "lib/cute_print/format/inspect.rb",
80
- "lib/cute_print/format/pretty_print.rb",
81
- "lib/cute_print/formatter.rb",
82
- "lib/cute_print/inline_labeler.rb",
83
- "lib/cute_print/labeler.rb",
84
- "lib/cute_print/location.rb",
85
- "lib/cute_print/location_label.rb",
86
- "lib/cute_print/location_label/filename.rb",
87
- "lib/cute_print/location_label/path.rb",
88
- "lib/cute_print/mixin.rb",
89
- "lib/cute_print/outline_labeler.rb",
90
- "lib/cute_print/printer.rb",
91
- "lib/cute_print/ruby_generator.rb",
92
- "lib/cute_print/ruby_parser.rb",
93
- "lib/cute_print/ruby_parser/block.rb",
94
- "lib/cute_print/ruby_parser/method_call.rb",
95
- "lib/cute_print/ruby_parser/parsed_code.rb",
96
- "lib/cute_print/ruby_parser/wraps_sexp.rb",
97
- "lib/cute_print/source_label.rb",
98
- "lib/cute_print/stderr_out.rb",
99
- "lib/cute_print/term_width.rb",
100
- "lib/cute_print/term_width/detected.rb",
101
- "lib/cute_print/term_width/static.rb",
102
- "lib/cute_print/values.rb",
103
70
  ]
104
71
  s.files += Dir["lib/**/*.rb"]
105
72
  s.homepage = "http://github.com/wconrad/cute_print"
106
73
  s.licenses = ["MIT"]
74
+ s.required_ruby_version = ">= 1.9.3"
107
75
  s.rubygems_version = "2.5.1"
108
76
  s.summary = "print debug to stderr, with flair"
109
77
  s.specification_version = 4
110
- s.add_development_dependency("cucumber", "~> 2.0")
78
+ s.add_development_dependency("cucumber", "~> 3.0")
111
79
  s.add_development_dependency("rake", "~> 12.0")
112
80
  s.add_development_dependency("redcarpet", "~> 3.2")
113
81
  s.add_development_dependency("rspec", "~> 3.1")
114
82
  s.add_development_dependency("rspec-given", "~> 3.5")
115
83
  s.add_development_dependency("yard", "~> 0.9.9")
116
- s.add_runtime_dependency("hirb", "~> 0.7")
117
84
  s.add_runtime_dependency("ruby2ruby", "~> 2.1")
118
85
  s.add_runtime_dependency("ruby_parser", "~> 3.6")
119
86
  end
@@ -6,8 +6,8 @@ module CutePrint
6
6
  # by the library as well.
7
7
  module Release
8
8
 
9
- VERSION = "1.2.0"
10
- DATE = "2017-07-25"
9
+ VERSION = "1.3.0"
10
+ DATE = "2018-03-13"
11
11
 
12
12
  end
13
13
  end
@@ -1,5 +1,3 @@
1
- require "hirb"
2
-
3
1
  module CutePrint
4
2
  class TermWidth
5
3
 
@@ -24,7 +22,7 @@ module CutePrint
24
22
 
25
23
  def detect_width
26
24
  return width_override_for_tests if width_override_for_tests
27
- width, _height = Hirb::Util.detect_terminal_size
25
+ width, _height = detect_terminal_size
28
26
  # Hirb returns nil if it can't determine the terminal width.
29
27
  # Program run in Emacs have an apparent terminal width of "0".
30
28
  width = FALLBACK_WIDTH if width.nil? || width == 0
@@ -36,6 +34,34 @@ module CutePrint
36
34
  n && Integer(n)
37
35
  end
38
36
 
37
+ # This function extracted from hirb version 0.7.3. hirb is
38
+ # copyright (c) 2010 by Gabriel Horner and licensed under the
39
+ # MIT License. This gem also uses the MIT License, so there is
40
+ # no problem with moving that function into here.
41
+ #
42
+ # The project: https://github.com/cldwalker/hirb
43
+ # The specific file:
44
+ # https://github.com/cldwalker/hirb/blob/master/lib/hirb/util.rb#L59
45
+ #
46
+ # We extracted the function because hirb is no longer maintained
47
+ # and now causes warnings with ruby-2.4.0 or greater.
48
+
49
+ # Returns [width, height] of terminal when detected, nil if not detected.
50
+ # Think of this as a simpler version of Highline's Highline::SystemExtensions.terminal_size()
51
+ def detect_terminal_size
52
+ if (ENV['COLUMNS'] =~ /^\d+$/) && (ENV['LINES'] =~ /^\d+$/)
53
+ [ENV['COLUMNS'].to_i, ENV['LINES'].to_i]
54
+ elsif (RUBY_PLATFORM =~ /java/ || (!STDIN.tty? && ENV['TERM'])) && command_exists?('tput')
55
+ [`tput cols`.to_i, `tput lines`.to_i]
56
+ elsif STDIN.tty? && command_exists?('stty')
57
+ `stty size`.scan(/\d+/).map { |s| s.to_i }.reverse
58
+ else
59
+ nil
60
+ end
61
+ rescue
62
+ nil
63
+ end
64
+
39
65
  end
40
66
 
41
67
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cute_print
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wayne Conrad
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-25 00:00:00.000000000 Z
11
+ date: 2018-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '3.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: '2.0'
26
+ version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -94,20 +94,6 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: 0.9.9
97
- - !ruby/object:Gem::Dependency
98
- name: hirb
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '0.7'
104
- type: :runtime
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '0.7'
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: ruby2ruby
113
99
  requirement: !ruby/object:Gem::Requirement
@@ -198,7 +184,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
198
184
  requirements:
199
185
  - - ">="
200
186
  - !ruby/object:Gem::Version
201
- version: '0'
187
+ version: 1.9.3
202
188
  required_rubygems_version: !ruby/object:Gem::Requirement
203
189
  requirements:
204
190
  - - ">="
@@ -206,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
192
  version: '0'
207
193
  requirements: []
208
194
  rubyforge_project:
209
- rubygems_version: 2.4.8
195
+ rubygems_version: 2.7.3
210
196
  signing_key:
211
197
  specification_version: 4
212
198
  summary: print debug to stderr, with flair