pictureframe 0.0.2 → 0.0.6

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
  SHA1:
3
- metadata.gz: 75278537afc8730dce30913aa878704e2031346c
4
- data.tar.gz: 498e3e5224ede8b84219727027f947dfe23804d8
3
+ metadata.gz: 1e699fb29f004c65cd761365dde899a871226c9a
4
+ data.tar.gz: a1678ca99b7470646dc009f9e462621a12ba66ea
5
5
  SHA512:
6
- metadata.gz: 04260cd3a40434eb73e8f4e7bc204eb36c45e715195c8a7365f795d12f0441ac14636f14c0a434337e421c8c6491d18f0e3603ea314761f3d15bf4de447c063a
7
- data.tar.gz: 316b1347496462a8b1b8aaa2da9d71355b26c8124c00427e0a25e68cd3ecae77eadd30d8ccc6ad6b6aea6fef118c04bf000bff4c90800e6fce567fcc749f7075
6
+ metadata.gz: 0d802f43d45bdafe8c43526b9abef14c1e8cfc84da248cef907a2a877f71e9ea4d94a3e84c9682a1e189c5383ae1e9188229a5edab5de17cae28ba1493422d9f
7
+ data.tar.gz: c931cff17e29a01e531a20bc8196eb93d91179ca6cf4848c57ff6d8b1534e385aee75bf8ba9b10096d758e548a2fc941fefb97f8424203c873ee3f448d1657b6
data/README.md CHANGED
@@ -32,19 +32,19 @@ Pictureframe.frame(@account.first_name, @account.email, @account.uuid)
32
32
  And in your server, you will see this as an output:
33
33
 
34
34
  ```
35
- [2016-02-26 12:13:34] INFO _____________________________
36
- [2016-02-26 12:13:34] INFO | ._________________________. |
37
- [2016-02-26 12:13:34] INFO | | | |
38
- [2016-02-26 12:13:34] INFO | | Cody | |
39
- [2016-02-26 12:13:34] INFO | | ---------------------- | |
40
- [2016-02-26 12:13:34] INFO | | teampalmer.apps@gmail | |
41
- [2016-02-26 12:13:34] INFO | | .com | |
42
- [2016-02-26 12:13:34] INFO | | ---------------------- | |
43
- [2016-02-26 12:13:34] INFO | | 50691d7a-e6e7-4c45- | |
44
- [2016-02-26 12:13:34] INFO | | bd27-68553d639b87 | |
45
- [2016-02-26 12:13:34] INFO | | | |
46
- [2016-02-26 12:13:34] INFO | ._________________________. |
47
- [2016-02-26 12:13:34] INFO _____________________________
35
+ _____________________________
36
+ | ._________________________. |
37
+ | | | |
38
+ | | Cody | |
39
+ | | ---------------------- | |
40
+ | | teampalmer.apps@gmail | |
41
+ | | .com | |
42
+ | | ---------------------- | |
43
+ | | 50691d7a-e6e7-4c45- | |
44
+ | | bd27-68553d639b87 | |
45
+ | | | |
46
+ | ._________________________. |
47
+ _____________________________
48
48
  ```
49
49
 
50
50
  ## Development
data/lib/pictureframe.rb CHANGED
@@ -1,29 +1,25 @@
1
1
  require "pictureframe/version"
2
2
 
3
3
  module Pictureframe
4
- def self.frame(text, width = 25)
5
- # this all should be passed into a buildFrame() function
4
+ def self.frame(text, width = 5)
6
5
  inputLocation = 3
7
6
  output = []
8
- lefts = [".__", "| .", "| |", "| .", "|__"]
9
- rights = ["__.", ". |", "| |", ". |", "__|"]
7
+ lefts = [".___", "| ._", "| | ", "| ._", "|___"]
8
+ rights = ["___.", "_. |", " | |", "_. |", "___|"]
9
+ totalLength = lefts[0].length + rights[0].length + text.length
10
+ width = totalLength if totalLength > width
10
11
  lefts.each_with_index do |row, i|
11
12
  filler = i == 2 ? " " : "_"
12
13
  output[i] = expandLine(lefts[i], rights[i], filler, width)
13
14
  end
14
- output = output.insert(inputLocation, frameWrap(text, width))
15
+ output = output.insert(inputLocation, expandLine("| | ", " | |", " ", width, text))
15
16
  puts output.join("\n")
16
17
  return output
17
18
  end
18
19
 
19
- def self.frameWrap(text, width = 75)
20
- left = "| | "
21
- right = " | |"
22
- expandLine(left, right, " ", width, text)
23
- end
24
-
25
20
  def self.expandLine(left, right, filler, width, text = "")
26
21
  totalLength = left.length + right.length + text.length
22
+ width = totalLength if totalLength > width
27
23
  numFiller = width - totalLength
28
24
  left + text + filler*numFiller + right
29
25
  end
@@ -1,3 +1,3 @@
1
1
  module Pictureframe
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.6"
3
3
  end
Binary file
data/pictureframe.gemspec CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Cody Palmer"]
10
10
  spec.email = ["teampalmer.apps@gmail.com"]
11
11
 
12
- spec.summary = %q{The gem that makes debug statements easy to spot and formatted well.}
13
- spec.description = %q{The gem that makes debug statements easy to spot and framed in an easy-to-spot picture frame!}
12
+ spec.summary = %q{The gem to frame your debug code.}
13
+ spec.description = %q{A gem to put an ascii picture frame around your debug output.}
14
14
  spec.homepage = "http://www.github.com/cdpalmer"
15
15
  spec.license = "MIT"
16
16
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pictureframe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Palmer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-29 00:00:00.000000000 Z
11
+ date: 2016-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,8 +66,7 @@ dependencies:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.2.8
69
- description: The gem that makes debug statements easy to spot and framed in an easy-to-spot
70
- picture frame!
69
+ description: A gem to put an ascii picture frame around your debug output.
71
70
  email:
72
71
  - teampalmer.apps@gmail.com
73
72
  executables: []
@@ -86,6 +85,7 @@ files:
86
85
  - lib/pictureframe.rb
87
86
  - lib/pictureframe/version.rb
88
87
  - pictureframe-0.0.1.gem
88
+ - pictureframe-0.0.2.gem
89
89
  - pictureframe.gemspec
90
90
  homepage: http://www.github.com/cdpalmer
91
91
  licenses:
@@ -111,6 +111,6 @@ rubyforge_project:
111
111
  rubygems_version: 2.4.6
112
112
  signing_key:
113
113
  specification_version: 4
114
- summary: The gem that makes debug statements easy to spot and formatted well.
114
+ summary: The gem to frame your debug code.
115
115
  test_files: []
116
116
  has_rdoc: