everyday_thor_util 2.0.6 → 2.0.7

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: d317f8d8587ceb1e53198ebff1c1df6fc3dbd9e3
4
- data.tar.gz: 597ac2993a58bab3dcd014ecae181db4d7e01c77
3
+ metadata.gz: e19d49fbd6591fd684d5c684ebf9215d7c3507ca
4
+ data.tar.gz: cdacc891ee3e2fb9255d4d96771e94dd0dba07cf
5
5
  SHA512:
6
- metadata.gz: '0290444d9caa4d55c0ef209e67261ab47412ee5eb78000ea71a13c1b9f4ecb455b40d06f22f6ad372e5c8ddcedf7c1a1317e4d647fc1c28bf81db2fce647a78c'
7
- data.tar.gz: 8bca41fa7d560bc598158d1a49448d928136cfee6d7f5f3395a678d738ac65b02089889f642eef883250fe2e2c9aa3bc799f827a7ea735a65b4ff45e1744464d
6
+ metadata.gz: 4a17147bb09fd04dbc83e4237e1c14cb5fbed22446f55c0fe1475ce0bf6f5c3a8b39a55889f9fbe9b09557d413b8970f7e3b7a12d63b0f37b4b3bb82c5724779
7
+ data.tar.gz: 7ce042f07c62cd5016a7ed957ec0f8a788bf80c013cb24b4dd4057229bcaddbd6e9d27330ac9d49301d1d8f68440cfef54239477cab1a4f9adf414b4bee48b84
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- everyday_thor_util (2.0.5)
4
+ everyday_thor_util (2.0.7)
5
5
  everyday-plugins (~> 1.2, >= 1.2.1)
6
6
  thor (~> 0.19)
7
7
 
@@ -11,8 +11,8 @@ GEM
11
11
  everyday-cli-utils (1.8.7.1)
12
12
  everyday-plugins (1.2.1)
13
13
  everyday-cli-utils (~> 1.8, >= 1.8.6)
14
- rake (11.3.0)
15
- thor (0.19.1)
14
+ rake (12.0.0)
15
+ thor (0.19.4)
16
16
 
17
17
  PLATFORMS
18
18
  ruby
@@ -23,4 +23,4 @@ DEPENDENCIES
23
23
  rake
24
24
 
25
25
  BUNDLED WITH
26
- 1.13.1
26
+ 1.15.1
@@ -0,0 +1,27 @@
1
+ require 'io/console'
2
+ class Thor
3
+ module Shell
4
+ class Basic
5
+ def print_wrapped(message, options = {})
6
+ indent = options[:indent] || 0
7
+ width = terminal_width - indent
8
+ paras = message.split("\n\n")
9
+ min_space_length = paras.map{|para| para.gsub(/^(\s*)\S.*$/, '\1').length }.min
10
+
11
+ paras.map! do |unwrapped|
12
+ unwrapped.gsub(/(^|\005)([ ]+)/) { "#{$1}#{"\0" * ($2.length - min_space_length)}" }.strip.tr("\n", " ").squeeze(" ").gsub(/.{1,#{width}}(?:\s|\Z)/) { ($& + 5.chr).gsub(/\n\005/, "\n").gsub(/\005/, "\n").gsub(/\0/, ' ') }
13
+ end
14
+
15
+ paras.each do |para|
16
+ para.split("\n").each do |line|
17
+ stdout.puts line.insert(0, " " * indent)
18
+ end
19
+ stdout.puts unless para == paras.last
20
+ end
21
+ end
22
+ def dynamic_width
23
+ IO.console.winsize[1]
24
+ end
25
+ end
26
+ end
27
+ end
@@ -1,3 +1,3 @@
1
1
  module EverydayThorUtil
2
- VERSION = '2.0.6'
2
+ VERSION = '2.0.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: everyday_thor_util
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Henderson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-10 00:00:00.000000000 Z
11
+ date: 2017-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -93,6 +93,7 @@ files:
93
93
  - lib/everyday_thor_util/common.rb
94
94
  - lib/everyday_thor_util/plugin-helper.rb
95
95
  - lib/everyday_thor_util/thor-fix.rb
96
+ - lib/everyday_thor_util/thor-print-fix.rb
96
97
  - lib/everyday_thor_util/version.rb
97
98
  homepage: https://github.com/henderea/everyday_thor_util
98
99
  licenses:
@@ -114,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
115
  version: '0'
115
116
  requirements: []
116
117
  rubyforge_project:
117
- rubygems_version: 2.5.1
118
+ rubygems_version: 2.6.12
118
119
  signing_key:
119
120
  specification_version: 4
120
121
  summary: 'Two parts: everyday_thor_util/thor-fix has a patch for Thor and everyday_thor_util/plugin-helper