muflax 0.3.14 → 0.3.16

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
2
  SHA256:
3
- metadata.gz: 10f69ea78cb1c8f710e1d87326ec9a0b3cf8aade38b057de806637aec1bcadb1
4
- data.tar.gz: e95988ab606d83370cfcfccf1bf6af2fe762e939037484990281d795adbd0876
3
+ metadata.gz: b2362750efcc12a5b41659e48539b59c982447f84e6232f00cbc1b6ecdca097e
4
+ data.tar.gz: 45e9c2d5129d56735b12c700db6d9b3d803dfdeac1bb2f57554180d6363c189a
5
5
  SHA512:
6
- metadata.gz: 793f1dac774134791b1f97b1c9a41c2270b8bab97d76e2248e05c3b6040ceb05563d855130501b004dd563dc318b4731f76b42a2d1b0b9fc4c79972e45b0e29c
7
- data.tar.gz: c20adf6a0f70045f4b8f99350acf329fa159ff08f81ba49a3ceaa41b0f3d4b52fb715289f00d0f1e4f14390cf640c719df38cf7f7bf44a5345960d80f25bf0a4
6
+ metadata.gz: 45446bf74fd5e90ab524a4b0a5f2888e7d871e19c38f753b1d506422f26bab7fdcaf6f5fe76921dba3b82b5c3de0468fafdc7c79993a89ef0b062d105a1b0442
7
+ data.tar.gz: 0c4cb51cf2a444eb1bfebd9f92fb687751fef72b59b6c6954b5387b5108db287daf2f1179ed1ec22d2225d52b32427b68a996f78b507578f7249a9dd3d4307cf
checksums.yaml.gz.sig CHANGED
Binary file
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- muflax (0.3.14)
4
+ muflax (0.3.16)
5
5
  awesome_print (~> 1)
6
6
  debug_inspector (~> 0.0)
7
- highline (~> 1.6)
7
+ highline (< 1.7)
8
8
  pry (~> 0.10)
9
9
  range_math (~> 1)
10
10
  trollop (~> 2.1.3)
@@ -15,12 +15,12 @@ GEM
15
15
  awesome_print (1.8.0)
16
16
  coderay (1.1.2)
17
17
  debug_inspector (0.0.3)
18
- highline (1.7.10)
19
- method_source (0.9.0)
20
- pry (0.11.3)
18
+ highline (1.6.21)
19
+ method_source (0.9.2)
20
+ pry (0.12.2)
21
21
  coderay (~> 1.1.0)
22
22
  method_source (~> 0.9.0)
23
- rake (12.3.0)
23
+ rake (12.3.2)
24
24
  range_math (1.0.1)
25
25
  trollop (2.1.3)
26
26
 
@@ -32,4 +32,4 @@ DEPENDENCIES
32
32
  rake (~> 12)
33
33
 
34
34
  BUNDLED WITH
35
- 1.16.4
35
+ 1.17.3
data/lib/muflax/align.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # -*- encoding: utf-8 -*-
3
- # Copyright Steffi Dorn <mail@muflax.com>, 2017
3
+ # Copyright Steffie Dorn <mail@muflax.com>, 2017
4
4
  # License: GNU APGLv3 (or later) <http://www.gnu.org/copyleft/gpl.html>
5
5
 
6
6
  module Enumerable
@@ -37,11 +37,12 @@ class Object
37
37
  end
38
38
 
39
39
  class Array
40
- def align str=" ", alignment: :left
40
+ def align str="\t", alignment: :left, force: false
41
41
  just_function = case alignment
42
- when :left ; :ljust
43
- when :right ; :rjust
44
- when :center ; :center
42
+ when :left ; Proc.new{|e,l,_c| e.ljust(l) }
43
+ when :right ; Proc.new{|e,l,_c| e.rjust(l) }
44
+ when :center ; Proc.new{|e,l,_c| e.center(l) }
45
+ when Proc ; alignment
45
46
  else
46
47
  raise "invalid alignment: #{alignment}"
47
48
  end
@@ -49,8 +50,10 @@ class Array
49
50
  # split all lines
50
51
  lines = []
51
52
  columns = 0
53
+ rx = /[ ]#{str}/ if force
52
54
 
53
55
  self.each do |line|
56
+ line .gsub! rx, str if force
54
57
  line = line.split(str, -1)
55
58
  lines << line
56
59
  columns = [columns, line.size].max
@@ -67,7 +70,7 @@ class Array
67
70
  # how much the element is internally longer than it appears
68
71
  elem_diff = elem.to_s.length - elem.str_length
69
72
 
70
- elem.send(just_function, lengths[column] + elem_diff)
73
+ just_function.call(elem, lengths[column] + elem_diff, column)
71
74
  end
72
75
 
73
76
  # join line back together
data/lib/muflax/blank.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # -*- encoding: utf-8 -*-
3
- # Copyright Steffi Dorn <mail@muflax.com>, 2017
3
+ # Copyright Steffie Dorn <mail@muflax.com>, 2017
4
4
  # License: GNU APGLv3 (or later) <http://www.gnu.org/copyleft/gpl.html>
5
5
 
6
6
  class Object
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # -*- encoding: utf-8 -*-
3
- # Copyright Steffi Dorn <mail@muflax.com>, 2017
3
+ # Copyright Steffie Dorn <mail@muflax.com>, 2017
4
4
  # License: GNU APGLv3 (or later) <http://www.gnu.org/copyleft/gpl.html>
5
5
 
6
6
  class Object
data/lib/muflax/math.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # -*- encoding: utf-8 -*-
3
- # Copyright Steffi Dorn <mail@muflax.com>, 2018
3
+ # Copyright Steffie Dorn <mail@muflax.com>, 2018
4
4
  # License: GNU APGLv3 (or later) <http://www.gnu.org/copyleft/gpl.html>
5
5
 
6
6
  module Math
data/lib/muflax/num.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # -*- encoding: utf-8 -*-
3
- # Copyright Steffi Dorn <mail@muflax.com>, 2017
3
+ # Copyright Steffie Dorn <mail@muflax.com>, 2017
4
4
  # License: GNU APGLv3 (or later) <http://www.gnu.org/copyleft/gpl.html>
5
5
 
6
6
  class Numeric
data/lib/muflax/panes.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # -*- encoding: utf-8 -*-
3
- # Copyright Steffi Dorn <mail@muflax.com>, 2017
3
+ # Copyright Steffie Dorn <mail@muflax.com>, 2017
4
4
  # License: GNU GPLv3 (or later) <http://www.gnu.org/copyleft/gpl.html>
5
5
 
6
6
  module Kernel
data/lib/muflax/table.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # -*- encoding: utf-8 -*-
3
- # Copyright Steffi Dorn <mail@muflax.com>, 2017
3
+ # Copyright Steffie Dorn <mail@muflax.com>, 2017
4
4
  # License: GNU GPLv3 (or later) <http://www.gnu.org/copyleft/gpl.html>
5
5
 
6
6
  class Table
data/lib/muflax/time.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # -*- encoding: utf-8 -*-
3
- # Copyright Steffi Dorn <mail@muflax.com>, 2017
3
+ # Copyright Steffie Dorn <mail@muflax.com>, 2017
4
4
  # License: GNU APGLv3 (or later) <http://www.gnu.org/copyleft/gpl.html>
5
5
 
6
6
  class Numeric
data/muflax.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "muflax"
3
- s.version = "0.3.14"
3
+ s.version = "0.3.16"
4
4
 
5
5
  s.authors = ["muflax"]
6
6
  s.summary = "muflax standard library"
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.add_dependency "awesome_print", "~> 1"
16
16
  s.add_dependency "debug_inspector", "~> 0.0"
17
- s.add_dependency "highline", "~> 1.6"
17
+ s.add_dependency "highline", "< 1.7"
18
18
  s.add_dependency "pry", "~> 0.10"
19
19
  s.add_dependency "range_math", "~> 1"
20
20
  s.add_dependency "trollop", "~> 2.1.3"
data.tar.gz.sig CHANGED
@@ -1 +1,4 @@
1
- SuRi�_W��8���&�ݢ#FÀ��ZX�u1<h
1
+ >zU�����v߰�_ob_wk�\JN���|�^�t����ᦛP�A5f�I�֖_ƴO�#^�G;���˝�K,�Kn~���lFl�̾��B;�0�J�^�N(
2
+ ����ai��|
3
+ ��,�ga̽v%��q=��3Dxr[����� ֌��>a�K�9Z�;�'�A��;��f�����W&se���R9;x|��\���?5=n���8r
4
+ ��X@���a
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muflax
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.14
4
+ version: 0.3.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - muflax
@@ -28,7 +28,7 @@ cert_chain:
28
28
  jj4QBQUG5hER1ZAFf+RXdy4RSimjXedOgvebDGeTafOJyhtLsxsh6UKCViHVGzkw
29
29
  fhGEJ1deAR/i8RPCblyBDtl7Ved3uX8izfU9LItVY+HOAzl69Qp0fe2TYH+y4uCO
30
30
  -----END CERTIFICATE-----
31
- date: 2018-10-28 00:00:00.000000000 Z
31
+ date: 2019-02-07 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: awesome_print
@@ -62,16 +62,16 @@ dependencies:
62
62
  name: highline
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - "~>"
65
+ - - "<"
66
66
  - !ruby/object:Gem::Version
67
- version: '1.6'
67
+ version: '1.7'
68
68
  type: :runtime
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - "~>"
72
+ - - "<"
73
73
  - !ruby/object:Gem::Version
74
- version: '1.6'
74
+ version: '1.7'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: pry
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -181,8 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  - !ruby/object:Gem::Version
182
182
  version: '0'
183
183
  requirements: []
184
- rubyforge_project:
185
- rubygems_version: 2.7.7
184
+ rubygems_version: 3.0.1
186
185
  signing_key:
187
186
  specification_version: 4
188
187
  summary: muflax standard library
metadata.gz.sig CHANGED
Binary file