LoremKnight 2.7.3 → 3.0.0

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: 6b6b7fc310653a8f8fa9d8bbd29728109723787d
4
- data.tar.gz: 33df82adc5e3672d0268b344efde85c604218d69
3
+ metadata.gz: 8b8cb43a6ee59f489019548aafba7209dd048bc7
4
+ data.tar.gz: 8062f5ea33c60b0e6280960fe257ef8a67b35e88
5
5
  SHA512:
6
- metadata.gz: 9391a06c32c7867b4a8c97b0df3429b568673b2db8adf8502942ec1163aeb71bfb652d04a17d6f769f18e0086302e6824c6241f1676e85a43db986ac22568303
7
- data.tar.gz: 694d4236bcfc9eb2b5ce22b0adf5302cd392cc73013a11b17f3409d9e98be1495c316ee285cc1c3e9ce0c853e1fd50fc14d9cfbbe40477f7c902eb9484e422e7
6
+ metadata.gz: 901b6b4085697e0e5f936c3db040497a6b6c190abd551d3c97e24926911165fc68be66f799f5ccfa02f33ffac01974f38d564b3d79d3d34c2370b246f829a55e
7
+ data.tar.gz: 44e98ae57cd7ba05b858376983fe6c3d1f86d3b4db5930de93baad66ce2267a8e28cd72b7c20acce89355909cd70950cc983056951fe4fcf0ad519fb2bee0be5
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ language : ruby
2
+ rvm :
3
+ - 2.0.0
4
+ - 2.1.0
5
+ script : gem build Tiger.gemspec && gem install *.gem && Tiger
data/0.6.9 ADDED
@@ -0,0 +1,4 @@
1
+ Successfully installed LoremKnight-1.6.9
2
+ Parsing documentation for LoremKnight-1.6.9
3
+ Done installing documentation for LoremKnight after 0 seconds
4
+ 1 gem installed
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
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
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
3
+
4
+ require 'cli'
5
+ Terminal::Knight.start(ARGV)
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 ? " /n /n #{@preSentence} " : " /n "
96
+ @sentence += x != header-1 ? " \n \n #{@preSentence} " : " \n "
97
97
  end
98
98
  end
99
99