LoremKnight 2.7.3 → 3.0.0
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/.travis.yml +5 -0
- data/0.6.9 +4 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +22 -0
- data/LoremKnight-2.7.3.gem +0 -0
- data/README.md +30 -0
- data/Rakefile +1 -0
- data/Tiger.gemspec +21 -0
- data/bin/LoremKnight +5 -0
- data/lib/cli.rb +45 -0
- data/lib/tiger.rb +1 -1
- data/lib/words.txt +1 -0
- data/pkg/LoremKnight-3.0.0.gem +0 -0
- metadata +61 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b8cb43a6ee59f489019548aafba7209dd048bc7
|
4
|
+
data.tar.gz: 8062f5ea33c60b0e6280960fe257ef8a67b35e88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 901b6b4085697e0e5f936c3db040497a6b6c190abd551d3c97e24926911165fc68be66f799f5ccfa02f33ffac01974f38d564b3d79d3d34c2370b246f829a55e
|
7
|
+
data.tar.gz: 44e98ae57cd7ba05b858376983fe6c3d1f86d3b4db5930de93baad66ce2267a8e28cd72b7c20acce89355909cd70950cc983056951fe4fcf0ad519fb2bee0be5
|
data/.travis.yml
ADDED
data/0.6.9
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
LoremKnight (3.0.0)
|
5
|
+
rainbow
|
6
|
+
thor
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
rainbow (2.2.1)
|
12
|
+
thor (0.19.4)
|
13
|
+
|
14
|
+
PLATFORMS
|
15
|
+
ruby
|
16
|
+
|
17
|
+
DEPENDENCIES
|
18
|
+
LoremKnight!
|
19
|
+
bundler (~> 1.6)
|
20
|
+
|
21
|
+
BUNDLED WITH
|
22
|
+
1.13.6
|
Binary file
|
data/README.md
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<meta charset="utf-8">
|
4
|
+
<meta name="viewport" content="width=device-width">
|
5
|
+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
6
|
+
|
7
|
+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
|
8
|
+
|
9
|
+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
10
|
+
</head>
|
11
|
+
<body>
|
12
|
+
<a href="https://badge.fury.io/rb/LoremKnight"><img src="https://badge.fury.io/rb/LoremKnight.svg" alt="Gem Version" height="18"></a>
|
13
|
+
<h1 style = " font:normal 1em Georgia,"Times New Roman",Times,serif;"> Lorem Knight </h1>
|
14
|
+
<br>
|
15
|
+
<h4 style = " font-family: Copperplate,"Copperplate Gothic Light",fantasy;
|
16
|
+
"> <em> Ruby gem , generating lorem from georgia poem "The Knight in the Panther's Skin" </em> </h4>
|
17
|
+
<br>
|
18
|
+
<img src = "http://www.picz.ge/img/s3/1610/11/c/cec3d5d8af8c.jpg" />
|
19
|
+
<hr>
|
20
|
+
<h3> Gettings started </h3>
|
21
|
+
<ul>
|
22
|
+
<li> require 'tiger' </li>
|
23
|
+
<li> or gem 'LoremKnight', '~> 0.0.0' </li>
|
24
|
+
<li> Tiger.generate(sentence,words,filename) </li>
|
25
|
+
</ul>
|
26
|
+
<footer>
|
27
|
+
<h4> <a href = "https://rubygems.org/gems/LoremKnight">you can checkout gem on RubyGems.org </a> </h4>
|
28
|
+
</footer>
|
29
|
+
</body>
|
30
|
+
</html>
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/Tiger.gemspec
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = 'LoremKnight'
|
6
|
+
s.version = '3.0.0'
|
7
|
+
s.date = '2017-02-22'
|
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"
|
10
|
+
s.authors = ["Guga katsiashvili"]
|
11
|
+
s.email = 'guga.katsiashvili@gmail.com'
|
12
|
+
s.files = `git ls-files -z`.split("\x0")
|
13
|
+
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
14
|
+
s.homepage =
|
15
|
+
'https://github.com/Pimpify/LoremKnight/wiki'
|
16
|
+
s.license = 'MIT'
|
17
|
+
s.add_dependency 'thor'
|
18
|
+
s.add_dependency 'rainbow'
|
19
|
+
s.add_development_dependency "bundler", "~> 1.6"
|
20
|
+
s.require_paths = ["lib"]
|
21
|
+
end
|
data/bin/LoremKnight
ADDED
data/lib/cli.rb
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'thor'
|
2
|
+
require 'tiger.rb'
|
3
|
+
require 'rainbow'
|
4
|
+
require 'rainbow/ext/string'
|
5
|
+
|
6
|
+
module Terminal
|
7
|
+
class Knight < Thor
|
8
|
+
desc "s NUMBER","generates LoremKnight sentences"
|
9
|
+
option :pre,:type => :boolean
|
10
|
+
option :html,:type => :boolean
|
11
|
+
|
12
|
+
def s(number)
|
13
|
+
Tiger.setContentType(options[:html] ? 'html' : 'raw')
|
14
|
+
Tiger.hasPreSentence(options[:pre])
|
15
|
+
print "#{Tiger.getSentence(number.to_i)}".color("#DCE35F")
|
16
|
+
end
|
17
|
+
|
18
|
+
desc "p NUMBER","generates LoremKnight paragraphs"
|
19
|
+
option :pre,:type => :boolean
|
20
|
+
option :html,:type => :boolean
|
21
|
+
|
22
|
+
def p(number)
|
23
|
+
Tiger.setContentType(options[:html] ? 'html' : 'raw')
|
24
|
+
Tiger.hasPreSentence(options[:pre])
|
25
|
+
puts "#{Tiger.getParagraph(number.to_i)}".color("#DCE35F")
|
26
|
+
end
|
27
|
+
|
28
|
+
desc "w NUMBER","generates LoremKnight words"
|
29
|
+
option :pre,:type => :boolean
|
30
|
+
option :html,:type => :boolean
|
31
|
+
|
32
|
+
def w(number)
|
33
|
+
Tiger.hasPreSentence(options[:pre])
|
34
|
+
puts "#{Tiger.getWords(number.to_i)}".color("#DCE35F")
|
35
|
+
end
|
36
|
+
|
37
|
+
desc "l NUMBER","generates LoremKnight lists <html>"
|
38
|
+
option :pre,:type => :boolean
|
39
|
+
|
40
|
+
def l(number)
|
41
|
+
Tiger.hasPreSentence(options[:pre])
|
42
|
+
puts "#{Tiger.getList(number.to_i)}".color("#DCE35F")
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/lib/tiger.rb
CHANGED
@@ -93,7 +93,7 @@ def lorem(header,body,startWith = '')
|
|
93
93
|
if @contentType == 'text/html'
|
94
94
|
@sentence += x != header - 1 ? " </p> <br> <br> <p> #{@preSentence} " : " </p> <br> "
|
95
95
|
elsif @contentType == 'RAW'
|
96
|
-
@sentence += x != header-1 ? "
|
96
|
+
@sentence += x != header-1 ? " \n \n #{@preSentence} " : " \n "
|
97
97
|
end
|
98
98
|
end
|
99
99
|
|