LoremKnight 3.0.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/Tiger.gemspec +4 -4
- data/lib/tiger.rb +7 -15
- data/pkg/LoremKnight-3.0.0.gem +0 -0
- data/pkg/LoremKnight-3.1.0.gem +0 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 309c5595c15cc833b17dc139a8731c7ffacb4b8f
|
4
|
+
data.tar.gz: 11360809cf86a077ba95ca0e0856dcf7b967914d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71690fcab0b4bf21d6e00eaf5ee2d615bcc4949da80f37528c1f4cb925a539dce8ab7ea723d2cae0d2b7d5b12fef473c5dfe28ca424157ac8d8651d58477048d
|
7
|
+
data.tar.gz: 7b2ebf3032a591f9cb7c0c1313893d31718b99e378c184e34a83c1f079bfd9c0bda5be772f4c227f547a2e4cb935bb7edda51cb41c978f3aa52fb63e25f56702
|
data/Gemfile.lock
CHANGED
data/Tiger.gemspec
CHANGED
@@ -3,16 +3,16 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = 'LoremKnight'
|
6
|
-
s.version = '3.
|
7
|
-
s.date = '2017-
|
6
|
+
s.version = '3.1.1'
|
7
|
+
s.date = '2017-03-10'
|
8
8
|
s.summary = "The Knight in the Panther's Skin!"
|
9
|
-
s.description = "lorem generating words from georgian epic poem : The Knight in the Panther's Skin,now with Terminal support"
|
9
|
+
s.description = "lorem generating words from georgian epic poem : The Knight in the Panther's Skin,now with Terminal support,offline mode <3"
|
10
10
|
s.authors = ["Guga katsiashvili"]
|
11
11
|
s.email = 'guga.katsiashvili@gmail.com'
|
12
12
|
s.files = `git ls-files -z`.split("\x0")
|
13
13
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
14
14
|
s.homepage =
|
15
|
-
'https://github.com/Pimpify/LoremKnight/wiki'
|
15
|
+
'https://github.com/Pimpify/LoremKnight/wiki/3.0.0'
|
16
16
|
s.license = 'MIT'
|
17
17
|
s.add_dependency 'thor'
|
18
18
|
s.add_dependency 'rainbow'
|
data/lib/tiger.rb
CHANGED
@@ -12,14 +12,8 @@ class Tiger
|
|
12
12
|
@contentType = "RAW"
|
13
13
|
@hasPreSentence = false
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
source.each do |char|
|
19
|
-
contentFromhttp += char
|
20
|
-
end
|
21
|
-
|
22
|
-
@content = contentFromhttp.split(" ")
|
15
|
+
source = File.open("#{$source_location}/words.txt","r+")
|
16
|
+
@content = source.sysread(source.size).split(" ")
|
23
17
|
|
24
18
|
def self.getSentence(sentenceN)
|
25
19
|
lorem(sentenceN,@sentenceStandartSize,'')
|
@@ -46,7 +40,7 @@ class Tiger
|
|
46
40
|
@words += pendingWord.length <= @wordLength ? pendingWord+" " : ""
|
47
41
|
@wordArray = @words.split(" ")
|
48
42
|
end
|
49
|
-
return @words;
|
43
|
+
return @words.force_encoding('UTF-8');
|
50
44
|
end
|
51
45
|
|
52
46
|
def self.setSentenceSize(size)
|
@@ -82,13 +76,13 @@ class Tiger
|
|
82
76
|
end
|
83
77
|
|
84
78
|
def lorem(header,body,startWith = '')
|
85
|
-
|
86
79
|
@preSentence = @hasPreSentence == true ? "რომელმან შექმნა სამყარო" : ""
|
87
80
|
@sentence = @contentType == 'text/html' ? "<p> #{@preSentence} " : " #{@preSentence} "
|
88
81
|
|
89
82
|
header.times do |x|
|
90
83
|
body.times do
|
91
|
-
|
84
|
+
randomWord = @content[rand(@content.size)].force_encoding('UTF-8')
|
85
|
+
@sentence += randomWord+" "
|
92
86
|
end
|
93
87
|
if @contentType == 'text/html'
|
94
88
|
@sentence += x != header - 1 ? " </p> <br> <br> <p> #{@preSentence} " : " </p> <br> "
|
@@ -96,9 +90,7 @@ def lorem(header,body,startWith = '')
|
|
96
90
|
@sentence += x != header-1 ? " \n \n #{@preSentence} " : " \n "
|
97
91
|
end
|
98
92
|
end
|
99
|
-
|
100
|
-
return @sentence
|
101
|
-
|
93
|
+
return @sentence.force_encoding('UTF-8')
|
102
94
|
end
|
103
95
|
|
104
96
|
def generateList
|
@@ -115,6 +107,6 @@ def generateList
|
|
115
107
|
list += x != @listStandartSize-1 ? "<li>" : "</ul><br><br>"
|
116
108
|
end
|
117
109
|
|
118
|
-
return list
|
110
|
+
return list.force_encoding('UTF-8')
|
119
111
|
|
120
112
|
end
|
data/pkg/LoremKnight-3.0.0.gem
CHANGED
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: LoremKnight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guga katsiashvili
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.6'
|
55
55
|
description: 'lorem generating words from georgian epic poem : The Knight in the Panther''s
|
56
|
-
Skin,now with Terminal support'
|
56
|
+
Skin,now with Terminal support,offline mode <3'
|
57
57
|
email: guga.katsiashvili@gmail.com
|
58
58
|
executables:
|
59
59
|
- LoremKnight
|
@@ -73,7 +73,8 @@ files:
|
|
73
73
|
- lib/tiger.rb
|
74
74
|
- lib/words.txt
|
75
75
|
- pkg/LoremKnight-3.0.0.gem
|
76
|
-
|
76
|
+
- pkg/LoremKnight-3.1.0.gem
|
77
|
+
homepage: https://github.com/Pimpify/LoremKnight/wiki/3.0.0
|
77
78
|
licenses:
|
78
79
|
- MIT
|
79
80
|
metadata: {}
|