tonka 0.0.2 → 0.0.3

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.
Files changed (2) hide show
  1. data/lib/tonka.rb +30 -21
  2. metadata +1 -1
data/lib/tonka.rb CHANGED
@@ -2,7 +2,12 @@ class Tonka
2
2
 
3
3
  attr_accessor :options, :site_name, :action, :messages
4
4
 
5
+ attr_reader :version
6
+
5
7
  def initialize(options=[])
8
+
9
+ @version = "0.0.2b1";
10
+
6
11
  @options = options || ARGV
7
12
  if !@options[0].nil?
8
13
 
@@ -39,6 +44,10 @@ class Tonka
39
44
 
40
45
  case @action
41
46
 
47
+ when "-v"
48
+
49
+ puts @version
50
+
42
51
  when "build"
43
52
  #handles the 'build' command
44
53
 
@@ -87,7 +96,7 @@ class Tonka::HTML
87
96
  body = options[3] || ""
88
97
  jquery = true if options[2] == "-jquery"
89
98
  index_html = File.new("#{site_name}/index.html","w")
90
- @layout = "<!DOCTYPE html>\n<html>\n<head>\n<title>#{site_name}</title>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"stylesheets/style.css\" />\n<script type=\"text/javascript\" src=\"javascripts/scripts.js\"></script>#{ "\n<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js\"></script>" if jquery == true }\n</head>\n<body>\n#{ body+"\n" }\</body>\n</html>"
99
+ @layout = "<!DOCTYPE html>\n<html>\n<head>\n<title>#{site_name}</title>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"stylesheets/style.css\" />#{ "\n<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js\"></script>" if jquery == true }\n<script type=\"text/javascript\" src=\"javascripts/scripts.js\"></script>\n</head>\n<body>\n#{ body+"\n" }\</body>\n</html>"
91
100
  index_html.puts @layout
92
101
  index_html.close
93
102
  puts "\t\tbuilt ".green+"#{site_name}/index.html"
@@ -121,24 +130,24 @@ class Tonka::JS
121
130
  end
122
131
 
123
132
  class String
124
- # text colorization
125
- def colorize(color_code)
126
- "\e[#{color_code}m#{self}\e[0m"
127
- end
128
-
129
- def red
130
- colorize(31)
131
- end
132
-
133
- def green
134
- colorize(32)
135
- end
136
-
137
- def yellow
138
- colorize(33)
139
- end
140
-
141
- def pink
142
- colorize(35)
143
- end
133
+ # text colorization
134
+ def colorize(color_code)
135
+ "\e[#{color_code}m#{self}\e[0m"
136
+ end
137
+
138
+ def red
139
+ colorize(31)
140
+ end
141
+
142
+ def green
143
+ colorize(32)
144
+ end
145
+
146
+ def yellow
147
+ colorize(33)
148
+ end
149
+
150
+ def pink
151
+ colorize(35)
152
+ end
144
153
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tonka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: