rhighlightjs 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +7 -0
- data/LICENSE +20 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +51 -0
- data/Rakefile +58 -0
- data/VERSION +1 -0
- data/assets/images/brown_papersq.png +0 -0
- data/assets/images/paperbg.gif +0 -0
- data/assets/images/school_book.png +0 -0
- data/assets/javascripts/highlight.js +570 -0
- data/assets/javascripts/highlight.pack.js +1 -0
- data/assets/javascripts/languages/1c.js +95 -0
- data/assets/javascripts/languages/apache.js +442 -0
- data/assets/javascripts/languages/avrasm.js +89 -0
- data/assets/javascripts/languages/axapta.js +52 -0
- data/assets/javascripts/languages/bash.js +81 -0
- data/assets/javascripts/languages/cpp.js +42 -0
- data/assets/javascripts/languages/cs.js +47 -0
- data/assets/javascripts/languages/css.js +81 -0
- data/assets/javascripts/languages/delphi.js +82 -0
- data/assets/javascripts/languages/diff.js +65 -0
- data/assets/javascripts/languages/django.js +61 -0
- data/assets/javascripts/languages/dos.js +33 -0
- data/assets/javascripts/languages/dynamic.js +460 -0
- data/assets/javascripts/languages/html-xml.js +140 -0
- data/assets/javascripts/languages/ini.js +40 -0
- data/assets/javascripts/languages/java.js +58 -0
- data/assets/javascripts/languages/javascript.js +50 -0
- data/assets/javascripts/languages/lisp.js +89 -0
- data/assets/javascripts/languages/mel.js +51 -0
- data/assets/javascripts/languages/parser3.js +54 -0
- data/assets/javascripts/languages/perl.js +152 -0
- data/assets/javascripts/languages/php.js +54 -0
- data/assets/javascripts/languages/profile.js +51 -0
- data/assets/javascripts/languages/python.js +75 -0
- data/assets/javascripts/languages/renderman.js +239 -0
- data/assets/javascripts/languages/ruby.js +176 -0
- data/assets/javascripts/languages/smalltalk.js +52 -0
- data/assets/javascripts/languages/sql.js +52 -0
- data/assets/javascripts/languages/static.js +223 -0
- data/assets/javascripts/languages/vbscript.js +27 -0
- data/assets/javascripts/languages/www.js +257 -0
- data/assets/javascripts/styleswitch.js +57 -0
- data/assets/stylesheets/ascetic.css +42 -0
- data/assets/stylesheets/brown_paper.css +104 -0
- data/assets/stylesheets/brown_papersq.png +0 -0
- data/assets/stylesheets/dark.css +101 -0
- data/assets/stylesheets/default.css +103 -0
- data/assets/stylesheets/far.css +113 -0
- data/assets/stylesheets/github.css +90 -0
- data/assets/stylesheets/idea.css +74 -0
- data/assets/stylesheets/ir_black.css +67 -0
- data/assets/stylesheets/magula.css +105 -0
- data/assets/stylesheets/notebook.css +106 -0
- data/assets/stylesheets/school_book.css +106 -0
- data/assets/stylesheets/school_book.png +0 -0
- data/assets/stylesheets/sunburst.css +112 -0
- data/assets/stylesheets/vs.css +68 -0
- data/assets/stylesheets/zenburn.css +113 -0
- data/assets/stylesheets/zenburn.css.txt +108 -0
- data/bin/rhighlightjs +6 -0
- data/init.rb +2 -0
- data/install.rb +3 -0
- data/lib/rhighlightjs.rb +28 -0
- data/rhighlightjs.gemspec +170 -0
- data/tasks/rhighlightjs_tasks.rake +18 -0
- data/test/rhighlightjs_test.rb +7 -0
- data/test/test_helper.rb +10 -0
- data/uninstall.rb +1 -0
- metadata +135 -0
data/.document
ADDED
data/.gitignore
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 romanvbabenko
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2008 [name of plugin creator]
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
= Rhighlightjs
|
2
|
+
|
3
|
+
It is the helper for {higlight.js}[http://softwaremaniacs.org/soft/highlight] by Ivan Salagaev (currently v5.4)
|
4
|
+
|
5
|
+
== Installation
|
6
|
+
|
7
|
+
gem install romanvbabenko-rhighlightjs
|
8
|
+
|
9
|
+
config/environment.rb
|
10
|
+
|
11
|
+
config.gem 'romanvbabenko-rhighlightjs', :lib => 'rhighlightjs',
|
12
|
+
:source => 'http://gems.github.com'
|
13
|
+
|
14
|
+
./script/plugin install git://github.com/romanvbabenko/rhighlightjs.git
|
15
|
+
|
16
|
+
OR
|
17
|
+
|
18
|
+
git clone git://github.com/romanvbabenko/rhighlightjs.git ./vendor/plugins/
|
19
|
+
|
20
|
+
rake rhighlightjs:install
|
21
|
+
|
22
|
+
== New project with gem "rhighlightjs"
|
23
|
+
|
24
|
+
rails blog
|
25
|
+
cd blog
|
26
|
+
rhighlightjs
|
27
|
+
|
28
|
+
This command copy assets files to application public directory.
|
29
|
+
|
30
|
+
== Example
|
31
|
+
|
32
|
+
|
33
|
+
In view:
|
34
|
+
|
35
|
+
<%= highlighter 'github', :languages => [:ruby] %>
|
36
|
+
|
37
|
+
<pre><code>
|
38
|
+
class Person
|
39
|
+
attr_accessors :last_name, :first_name
|
40
|
+
def say
|
41
|
+
puts "Hello world"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
</code></pre>
|
45
|
+
|
46
|
+
== Copyright
|
47
|
+
|
48
|
+
Blog: http://romanvbabenko.com
|
49
|
+
|
50
|
+
Copyright (c) 2008 Roman V. Babenko, released under the MIT license
|
51
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "rhighlightjs"
|
8
|
+
gem.summary = %Q{It is the helper for higlight.js}
|
9
|
+
gem.description = %Q{Javascript syntax highlighter by Ivan Salagaev}
|
10
|
+
gem.email = "romanvbabenko@gmail.com"
|
11
|
+
gem.homepage = "http://github.com/romanvbabenko/rhighlightjs"
|
12
|
+
gem.authors = ["romanvbabenko"]
|
13
|
+
gem.add_development_dependency "thoughtbot-shoulda"
|
14
|
+
gem.files.include Dir['assets/**/*']
|
15
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
16
|
+
end
|
17
|
+
rescue LoadError
|
18
|
+
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
19
|
+
end
|
20
|
+
|
21
|
+
require 'rake/testtask'
|
22
|
+
Rake::TestTask.new(:test) do |test|
|
23
|
+
test.libs << 'lib' << 'test'
|
24
|
+
test.pattern = 'test/**/*_test.rb'
|
25
|
+
test.verbose = true
|
26
|
+
end
|
27
|
+
|
28
|
+
begin
|
29
|
+
require 'rcov/rcovtask'
|
30
|
+
Rcov::RcovTask.new do |test|
|
31
|
+
test.libs << 'test'
|
32
|
+
test.pattern = 'test/**/*_test.rb'
|
33
|
+
test.verbose = true
|
34
|
+
end
|
35
|
+
rescue LoadError
|
36
|
+
task :rcov do
|
37
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
task :test => :check_dependencies
|
42
|
+
|
43
|
+
task :default => :test
|
44
|
+
|
45
|
+
require 'rake/rdoctask'
|
46
|
+
Rake::RDocTask.new do |rdoc|
|
47
|
+
if File.exist?('VERSION')
|
48
|
+
version = File.read('VERSION')
|
49
|
+
else
|
50
|
+
version = ""
|
51
|
+
end
|
52
|
+
|
53
|
+
rdoc.rdoc_dir = 'rdoc'
|
54
|
+
rdoc.title = "rhighlightjs #{version}"
|
55
|
+
rdoc.rdoc_files.include('README*')
|
56
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
57
|
+
end
|
58
|
+
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.2.0
|
Binary file
|
Binary file
|
Binary file
|