pictureframe 0.0.2 → 0.0.6
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 +4 -4
- data/README.md +13 -13
- data/lib/pictureframe.rb +7 -11
- data/lib/pictureframe/version.rb +1 -1
- data/pictureframe-0.0.2.gem +0 -0
- data/pictureframe.gemspec +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e699fb29f004c65cd761365dde899a871226c9a
|
4
|
+
data.tar.gz: a1678ca99b7470646dc009f9e462621a12ba66ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
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 =
|
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,
|
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
|
data/lib/pictureframe/version.rb
CHANGED
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
|
13
|
-
spec.description = %q{
|
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.
|
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-
|
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:
|
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
|
114
|
+
summary: The gem to frame your debug code.
|
115
115
|
test_files: []
|
116
116
|
has_rdoc:
|