brightly 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/LICENSE +20 -0
- data/README.rdoc +89 -0
- data/Rakefile +73 -0
- data/VERSION +1 -0
- data/bin/brightly +7 -0
- data/brightly.gemspec +106 -0
- data/lib/brightly/consumer.rb +26 -0
- data/lib/brightly/provider/base.rb +61 -0
- data/lib/brightly/provider/config.rb +0 -0
- data/lib/brightly/provider/exec.rb +25 -0
- data/lib/brightly/provider/public/stylesheets/active4d.css +114 -0
- data/lib/brightly/provider/public/stylesheets/all_hallows_eve.css +72 -0
- data/lib/brightly/provider/public/stylesheets/amy.css +147 -0
- data/lib/brightly/provider/public/stylesheets/blackboard.css +88 -0
- data/lib/brightly/provider/public/stylesheets/brilliance_black.css +605 -0
- data/lib/brightly/provider/public/stylesheets/brilliance_dull.css +599 -0
- data/lib/brightly/provider/public/stylesheets/cobalt.css +149 -0
- data/lib/brightly/provider/public/stylesheets/dawn.css +121 -0
- data/lib/brightly/provider/public/stylesheets/eiffel.css +121 -0
- data/lib/brightly/provider/public/stylesheets/espresso_libre.css +109 -0
- data/lib/brightly/provider/public/stylesheets/idle.css +62 -0
- data/lib/brightly/provider/public/stylesheets/iplastic.css +80 -0
- data/lib/brightly/provider/public/stylesheets/lazy.css +73 -0
- data/lib/brightly/provider/public/stylesheets/mac_classic.css +123 -0
- data/lib/brightly/provider/public/stylesheets/magicwb_amiga.css +104 -0
- data/lib/brightly/provider/public/stylesheets/pastels_on_dark.css +188 -0
- data/lib/brightly/provider/public/stylesheets/slush_poppies.css +85 -0
- data/lib/brightly/provider/public/stylesheets/spacecadet.css +51 -0
- data/lib/brightly/provider/public/stylesheets/sunburst.css +180 -0
- data/lib/brightly/provider/public/stylesheets/twilight.css +137 -0
- data/lib/brightly/provider/public/stylesheets/zenburnesque.css +91 -0
- data/lib/brightly.rb +10 -0
- data/spec/brightly_spec.rb +28 -0
- data/spec/data/code.html +6 -0
- data/spec/data/code.markdown +7 -0
- data/spec/data/double_nest.html +16 -0
- data/spec/data/double_nest.markdown +15 -0
- data/spec/data/javascript.html +9 -0
- data/spec/data/javascript.markdown +6 -0
- data/spec/data/nested.html +8 -0
- data/spec/data/nested.markdown +9 -0
- data/spec/data/simple.html +3 -0
- data/spec/data/simple.markdown +3 -0
- data/spec/rcov.opts +2 -0
- data/spec/spec.opts +4 -0
- data/spec/spec_helper.rb +14 -0
- metadata +153 -0
data/.document
ADDED
data/.gitignore
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 Adam Elliot
|
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,89 @@
|
|
1
|
+
= Brightly
|
2
|
+
|
3
|
+
Easily add code a syntax highlighting system to Markdown to make your site's markdown a little more useful.
|
4
|
+
|
5
|
+
== Point?
|
6
|
+
|
7
|
+
There is a wonderful gem that lets you syntax highlight based on TextMate sytle's (Ultraviolet). There's only one problem. The dependencies required to use it don't exist on Heroku. Aww no Heroku love? No. Just wrap you Markdown requests into a simple REST call to this little service and your set.
|
8
|
+
|
9
|
+
== Server Setup
|
10
|
+
|
11
|
+
You'll need Onigurma to use ultraviolet which is used do do the highlighting in Brightly (hence the whole reason for the service).
|
12
|
+
|
13
|
+
Website: http://www.geocities.jp/kosako3/oniguruma/
|
14
|
+
|
15
|
+
OS X Installation (from source):
|
16
|
+
|
17
|
+
curl -O http://www.geocities.jp/kosako3/oniguruma/archive/onig-5.9.1.tar.gz
|
18
|
+
tar xvf onig-5.9.1.tar.gz
|
19
|
+
cd onig-5.9.1
|
20
|
+
./configure
|
21
|
+
make
|
22
|
+
sudo make install
|
23
|
+
|
24
|
+
OS X Installation (from ports):
|
25
|
+
|
26
|
+
sudo port install oniguruma
|
27
|
+
|
28
|
+
Ubuntu Installation:
|
29
|
+
|
30
|
+
sudo aptitude install libonig-dev
|
31
|
+
sudo gem install oniguruma
|
32
|
+
|
33
|
+
Brightly:
|
34
|
+
|
35
|
+
sudo gem install brightly --source=http://gemcutter.org
|
36
|
+
|
37
|
+
|
38
|
+
For development you can easily run brightly via the command line:
|
39
|
+
|
40
|
+
brightly
|
41
|
+
|
42
|
+
Will start a Sinatra server going.
|
43
|
+
|
44
|
+
To get things running with a webserver (passenger + apache, etc) using rack set your config up like:
|
45
|
+
|
46
|
+
config.ru:
|
47
|
+
begin
|
48
|
+
require 'brightly'
|
49
|
+
rescue
|
50
|
+
require 'rubygems'
|
51
|
+
require 'brightly'
|
52
|
+
end
|
53
|
+
run Brightly::Provider::Base
|
54
|
+
|
55
|
+
== Client Usage
|
56
|
+
|
57
|
+
config/environment.rb:
|
58
|
+
|
59
|
+
gem.config :lib => false, :version => '>=0.1.0', :source => "http://gemcutter.org"
|
60
|
+
|
61
|
+
config/initializers/brightly.rb:
|
62
|
+
|
63
|
+
Brightly::Consumer.provider_url = "http://your-host.com"
|
64
|
+
Brightly::Consumer.theme = "blackboard"
|
65
|
+
|
66
|
+
In your controller or model:
|
67
|
+
|
68
|
+
brighten("# Some Markdown")
|
69
|
+
|
70
|
+
Remember that you likely don't want to do this every hit to a page, markdown processing is done with RDiscount so it's fast, but code highlighting and markdown processing and the service call all adds up. Store the result, get better performance.
|
71
|
+
|
72
|
+
Cheers!
|
73
|
+
|
74
|
+
== And in you Markdown
|
75
|
+
|
76
|
+
Here's some ruby:
|
77
|
+
<code language="ruby">
|
78
|
+
def candy
|
79
|
+
puts "is sweet!"
|
80
|
+
end
|
81
|
+
</code>
|
82
|
+
|
83
|
+
== Things of Interest
|
84
|
+
|
85
|
+
Making this I stumbled upon an interesting Rack Middleware which also does syntax highlighting. If you don't need to make the call to a service, it might be of use you you. Check it out: http://coderack.org/users/wbzyl/entries/19-rackcodehighlighter
|
86
|
+
|
87
|
+
== Copyright
|
88
|
+
|
89
|
+
Copyright (c) 2009 Adam Elliot. See LICENSE for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "brightly"
|
8
|
+
gem.summary = %Q{Simple standalone web app that adds syntax highlighting to Markdown}
|
9
|
+
gem.description = %Q{Adds syntax highlighting and some other code stuff to Markdown}
|
10
|
+
gem.email = "adam@warptube.com"
|
11
|
+
gem.homepage = "http://github.com/adamelliot/brightly"
|
12
|
+
gem.authors = ["Adam Elliot"]
|
13
|
+
|
14
|
+
# gem.rubyforge_project = "brightly"
|
15
|
+
gem.add_dependency "sinatra", ">= 0.9.4"
|
16
|
+
gem.add_dependency "ultraviolet", ">= 0.10.2"
|
17
|
+
gem.add_dependency "rdiscount", ">= 1.3.5"
|
18
|
+
|
19
|
+
gem.add_development_dependency "rspec", ">= 1.2.9"
|
20
|
+
gem.add_development_dependency "rack-test", ">= 0.5.0"
|
21
|
+
|
22
|
+
gem.executables = ['brightly']
|
23
|
+
end
|
24
|
+
Jeweler::GemcutterTasks.new
|
25
|
+
Jeweler::RubyforgeTasks.new do |rubyforge|
|
26
|
+
rubyforge.doc_task = "yardoc"
|
27
|
+
end
|
28
|
+
rescue LoadError
|
29
|
+
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
30
|
+
end
|
31
|
+
|
32
|
+
require 'spec/rake/spectask'
|
33
|
+
Spec::Rake::SpecTask.new(:spec) do |spec|
|
34
|
+
spec.spec_opts = %W{--options \"#{File.dirname(__FILE__)}/spec/spec.opts\"}
|
35
|
+
spec.libs << 'lib' << 'spec'
|
36
|
+
spec.spec_files = FileList['spec/**/*_spec.rb']
|
37
|
+
end
|
38
|
+
|
39
|
+
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
40
|
+
spec.spec_opts = %W{--options \"#{File.dirname(__FILE__)}/spec/spec.opts\"}
|
41
|
+
spec.libs << 'lib' << 'spec'
|
42
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
43
|
+
spec.rcov = true
|
44
|
+
spec.rcov_opts = lambda do
|
45
|
+
IO.readlines("#{File.dirname(__FILE__)}/spec/rcov.opts").map {|l| l.chomp.split " "}.flatten
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
task :spec => :check_dependencies
|
50
|
+
|
51
|
+
begin
|
52
|
+
require 'reek/rake_task'
|
53
|
+
Reek::RakeTask.new do |t|
|
54
|
+
t.fail_on_error = true
|
55
|
+
t.verbose = false
|
56
|
+
t.source_files = 'lib/**/*.rb'
|
57
|
+
end
|
58
|
+
rescue LoadError
|
59
|
+
task :reek do
|
60
|
+
abort "Reek is not available. In order to run reek, you must: sudo gem install reek"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
task :default => :spec
|
65
|
+
|
66
|
+
begin
|
67
|
+
require 'yard'
|
68
|
+
YARD::Rake::YardocTask.new
|
69
|
+
rescue LoadError
|
70
|
+
task :yardoc do
|
71
|
+
abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
|
72
|
+
end
|
73
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.1
|
data/bin/brightly
ADDED
data/brightly.gemspec
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{brightly}
|
8
|
+
s.version = "0.1.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Adam Elliot"]
|
12
|
+
s.date = %q{2009-11-19}
|
13
|
+
s.default_executable = %q{brightly}
|
14
|
+
s.description = %q{Adds syntax highlighting and some other code stuff to Markdown}
|
15
|
+
s.email = %q{adam@warptube.com}
|
16
|
+
s.executables = ["brightly"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE",
|
19
|
+
"README.rdoc"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".document",
|
23
|
+
".gitignore",
|
24
|
+
"LICENSE",
|
25
|
+
"README.rdoc",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"bin/brightly",
|
29
|
+
"brightly.gemspec",
|
30
|
+
"lib/brightly.rb",
|
31
|
+
"lib/brightly/consumer.rb",
|
32
|
+
"lib/brightly/provider/base.rb",
|
33
|
+
"lib/brightly/provider/config.rb",
|
34
|
+
"lib/brightly/provider/exec.rb",
|
35
|
+
"lib/brightly/provider/public/stylesheets/active4d.css",
|
36
|
+
"lib/brightly/provider/public/stylesheets/all_hallows_eve.css",
|
37
|
+
"lib/brightly/provider/public/stylesheets/amy.css",
|
38
|
+
"lib/brightly/provider/public/stylesheets/blackboard.css",
|
39
|
+
"lib/brightly/provider/public/stylesheets/brilliance_black.css",
|
40
|
+
"lib/brightly/provider/public/stylesheets/brilliance_dull.css",
|
41
|
+
"lib/brightly/provider/public/stylesheets/cobalt.css",
|
42
|
+
"lib/brightly/provider/public/stylesheets/dawn.css",
|
43
|
+
"lib/brightly/provider/public/stylesheets/eiffel.css",
|
44
|
+
"lib/brightly/provider/public/stylesheets/espresso_libre.css",
|
45
|
+
"lib/brightly/provider/public/stylesheets/idle.css",
|
46
|
+
"lib/brightly/provider/public/stylesheets/iplastic.css",
|
47
|
+
"lib/brightly/provider/public/stylesheets/lazy.css",
|
48
|
+
"lib/brightly/provider/public/stylesheets/mac_classic.css",
|
49
|
+
"lib/brightly/provider/public/stylesheets/magicwb_amiga.css",
|
50
|
+
"lib/brightly/provider/public/stylesheets/pastels_on_dark.css",
|
51
|
+
"lib/brightly/provider/public/stylesheets/slush_poppies.css",
|
52
|
+
"lib/brightly/provider/public/stylesheets/spacecadet.css",
|
53
|
+
"lib/brightly/provider/public/stylesheets/sunburst.css",
|
54
|
+
"lib/brightly/provider/public/stylesheets/twilight.css",
|
55
|
+
"lib/brightly/provider/public/stylesheets/zenburnesque.css",
|
56
|
+
"spec/brightly_spec.rb",
|
57
|
+
"spec/data/code.html",
|
58
|
+
"spec/data/code.markdown",
|
59
|
+
"spec/data/double_nest.html",
|
60
|
+
"spec/data/double_nest.markdown",
|
61
|
+
"spec/data/javascript.html",
|
62
|
+
"spec/data/javascript.markdown",
|
63
|
+
"spec/data/nested.html",
|
64
|
+
"spec/data/nested.markdown",
|
65
|
+
"spec/data/simple.html",
|
66
|
+
"spec/data/simple.markdown",
|
67
|
+
"spec/rcov.opts",
|
68
|
+
"spec/spec.opts",
|
69
|
+
"spec/spec_helper.rb"
|
70
|
+
]
|
71
|
+
s.homepage = %q{http://github.com/adamelliot/brightly}
|
72
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
73
|
+
s.require_paths = ["lib"]
|
74
|
+
s.rubygems_version = %q{1.3.5}
|
75
|
+
s.summary = %q{Simple standalone web app that adds syntax highlighting to Markdown}
|
76
|
+
s.test_files = [
|
77
|
+
"spec/brightly_spec.rb",
|
78
|
+
"spec/spec_helper.rb"
|
79
|
+
]
|
80
|
+
|
81
|
+
if s.respond_to? :specification_version then
|
82
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
83
|
+
s.specification_version = 3
|
84
|
+
|
85
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
86
|
+
s.add_runtime_dependency(%q<sinatra>, [">= 0.9.4"])
|
87
|
+
s.add_runtime_dependency(%q<ultraviolet>, [">= 0.10.2"])
|
88
|
+
s.add_runtime_dependency(%q<rdiscount>, [">= 1.3.5"])
|
89
|
+
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
90
|
+
s.add_development_dependency(%q<rack-test>, [">= 0.5.0"])
|
91
|
+
else
|
92
|
+
s.add_dependency(%q<sinatra>, [">= 0.9.4"])
|
93
|
+
s.add_dependency(%q<ultraviolet>, [">= 0.10.2"])
|
94
|
+
s.add_dependency(%q<rdiscount>, [">= 1.3.5"])
|
95
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
96
|
+
s.add_dependency(%q<rack-test>, [">= 0.5.0"])
|
97
|
+
end
|
98
|
+
else
|
99
|
+
s.add_dependency(%q<sinatra>, [">= 0.9.4"])
|
100
|
+
s.add_dependency(%q<ultraviolet>, [">= 0.10.2"])
|
101
|
+
s.add_dependency(%q<rdiscount>, [">= 1.3.5"])
|
102
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
103
|
+
s.add_dependency(%q<rack-test>, [">= 0.5.0"])
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
|
3
|
+
module Brightly
|
4
|
+
module Consumer
|
5
|
+
class << self
|
6
|
+
attr_accessor :theme, :provider_url
|
7
|
+
end
|
8
|
+
|
9
|
+
module AssetHelper
|
10
|
+
# Return the javascript tag that include the token if the user's authenticated
|
11
|
+
def brightly_stylesheet_link_tag
|
12
|
+
"<link rel=\"stylesheet\" href=\"#{Brightly::Consumer.provider_url}/stylesheets/#{Brightly::Consumer.theme}.css\" type=\"text/css\" media=\"screen\" charset=\"utf-8\">"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
module ProviderHelper
|
17
|
+
def brighten(markdown, theme = Brightly::Consumer.theme)
|
18
|
+
Net::HTTP.post_form(URI.parse("#{Brightly::Consumer.provider_url}/brighten"), {:markdown => markdown, :theme => theme}).body
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
::ActionView::Base.send(:include, Brightly::Consumer::AssetHelper) if defined? ::ActionView::Base
|
25
|
+
::ActiveRecord::Base.send(:include, Brightly::Consumer::ProviderHelper) if defined? ::ActiveRecord::Base
|
26
|
+
::ActionController::Base.send(:include, Brightly::Consumer::ProviderHelper) if defined? ::ActionController::Base
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'sinatra/base'
|
2
|
+
require 'rdiscount'
|
3
|
+
require 'uv'
|
4
|
+
|
5
|
+
module Brightly
|
6
|
+
module Provider
|
7
|
+
class Base < Sinatra::Base
|
8
|
+
enable :logging, :static
|
9
|
+
set :root, File.dirname(__FILE__)
|
10
|
+
|
11
|
+
configure :development do
|
12
|
+
enable :dump_errors
|
13
|
+
end
|
14
|
+
|
15
|
+
# Process the input text and generate the Textilized page
|
16
|
+
post '/brighten' do
|
17
|
+
process_markdown(params[:markdown], params[:theme])
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
def process_markdown(markdown, theme)
|
22
|
+
output = ""
|
23
|
+
embeds = ""
|
24
|
+
|
25
|
+
while !(open = markdown.index(/<code [^>]*language=/m, 0)).nil?
|
26
|
+
output << RDiscount.new(markdown[0, open]).to_html
|
27
|
+
|
28
|
+
close = n = open
|
29
|
+
begin
|
30
|
+
close = markdown.index(/<\/\s*code\s*>/m, close + 1)
|
31
|
+
n = markdown.index(/<code [^>]*language=/m, n + 1)
|
32
|
+
end while !n.nil? && n < close
|
33
|
+
|
34
|
+
inner_open = open + markdown[/<code[^>]*>/m].length
|
35
|
+
inner_close = close
|
36
|
+
close = markdown.index(">", close) + 1
|
37
|
+
|
38
|
+
language = markdown[/<code [^>]*language\s*=\s*(['"])([^\1]*?)\1[^>]*>/m, 2]
|
39
|
+
embed = markdown[/<code [^>]*embed\s*=\s*(['"])([^\1]*?)\1[^>]*>/m, 2]
|
40
|
+
|
41
|
+
code = markdown[inner_open, inner_close - inner_open]
|
42
|
+
|
43
|
+
output << Uv.parse(code, "xhtml", language, false, theme)
|
44
|
+
embeds << embed_code(code, language) unless embed.nil?
|
45
|
+
markdown = markdown[close, markdown.length]
|
46
|
+
end
|
47
|
+
|
48
|
+
output << RDiscount.new(markdown).to_html
|
49
|
+
|
50
|
+
embeds + output
|
51
|
+
end
|
52
|
+
|
53
|
+
def embed_code(code, type)
|
54
|
+
case type
|
55
|
+
when "javascript" then "<script type=\"text/javascript\">#{code}</script>\n"
|
56
|
+
when "css" then "<style>#{code}</style>\n"
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
File without changes
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'optparse'
|
3
|
+
|
4
|
+
module Brightly
|
5
|
+
module Provider
|
6
|
+
class Exec
|
7
|
+
def initialize(argv)
|
8
|
+
options = {}
|
9
|
+
|
10
|
+
OptionParser.new do |opts|
|
11
|
+
opts.banner { "Usage: brightly [options]" }
|
12
|
+
# Sinatra params
|
13
|
+
opts.on('-x') { options[:lock] = true }
|
14
|
+
opts.on('-s server') { |val| options[:server] = val }
|
15
|
+
opts.on('-e env') { |val| options[:environment] = val.to_sym }
|
16
|
+
opts.on('-p port') { |val| options[:port] = val.to_i }
|
17
|
+
|
18
|
+
opts.on_tail('-h', '--help', "Show this message") { puts opts ; exit }
|
19
|
+
end
|
20
|
+
|
21
|
+
Brightly::Provider::Base.run! options
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
pre.active4d .DiffHeader {
|
2
|
+
background-color: #656565;
|
3
|
+
color: #FFFFFF;
|
4
|
+
}
|
5
|
+
pre.active4d .Operator {
|
6
|
+
}
|
7
|
+
pre.active4d .InheritedClass {
|
8
|
+
}
|
9
|
+
pre.active4d .TypeName {
|
10
|
+
color: #21439C;
|
11
|
+
}
|
12
|
+
pre.active4d .Number {
|
13
|
+
color: #A8017E;
|
14
|
+
}
|
15
|
+
pre.active4d .EmbeddedSource {
|
16
|
+
background-color: #ECF1FF;
|
17
|
+
}
|
18
|
+
pre.active4d {
|
19
|
+
background-color: #FFFFFF;
|
20
|
+
color: #000000;
|
21
|
+
}
|
22
|
+
pre.active4d .DiffInsertedLine {
|
23
|
+
background-color: #98FF9A;
|
24
|
+
color: #000000;
|
25
|
+
}
|
26
|
+
pre.active4d .LibraryVariable {
|
27
|
+
color: #A535AE;
|
28
|
+
}
|
29
|
+
pre.active4d .Storage {
|
30
|
+
color: #FF5600;
|
31
|
+
}
|
32
|
+
pre.active4d .InterpolatedEntity {
|
33
|
+
font-weight: bold;
|
34
|
+
color: #66CCFF;
|
35
|
+
}
|
36
|
+
pre.active4d .line-numbers {
|
37
|
+
background-color: #BAD6FD;
|
38
|
+
color: #000000;
|
39
|
+
}
|
40
|
+
pre.active4d .LocalVariable {
|
41
|
+
font-weight: bold;
|
42
|
+
color: #6392FF;
|
43
|
+
}
|
44
|
+
pre.active4d .DiffLineRange {
|
45
|
+
background-color: #1B63FF;
|
46
|
+
color: #FFFFFF;
|
47
|
+
}
|
48
|
+
pre.active4d .BlockComment {
|
49
|
+
color: #D33435;
|
50
|
+
}
|
51
|
+
pre.active4d .TagName {
|
52
|
+
color: #016CFF;
|
53
|
+
}
|
54
|
+
pre.active4d .FunctionArgument {
|
55
|
+
}
|
56
|
+
pre.active4d .BuiltInConstant {
|
57
|
+
color: #A535AE;
|
58
|
+
}
|
59
|
+
pre.active4d .LineComment {
|
60
|
+
color: #D33535;
|
61
|
+
}
|
62
|
+
pre.active4d .DiffDeletedLine {
|
63
|
+
background-color: #FF7880;
|
64
|
+
color: #000000;
|
65
|
+
}
|
66
|
+
pre.active4d .NamedConstant {
|
67
|
+
color: #B7734C;
|
68
|
+
}
|
69
|
+
pre.active4d .CommandMethod {
|
70
|
+
font-weight: bold;
|
71
|
+
color: #45AE34;
|
72
|
+
}
|
73
|
+
pre.active4d .TableField {
|
74
|
+
color: #0BB600;
|
75
|
+
}
|
76
|
+
pre.active4d .PlainXmlText {
|
77
|
+
color: #000000;
|
78
|
+
}
|
79
|
+
pre.active4d .Invalid {
|
80
|
+
background-color: #990000;
|
81
|
+
color: #FFFFFF;
|
82
|
+
}
|
83
|
+
pre.active4d .LibraryClassType {
|
84
|
+
color: #A535AE;
|
85
|
+
}
|
86
|
+
pre.active4d .TagAttribute {
|
87
|
+
color: #963DFF;
|
88
|
+
}
|
89
|
+
pre.active4d .Keyword {
|
90
|
+
font-weight: bold;
|
91
|
+
color: #006699;
|
92
|
+
}
|
93
|
+
pre.active4d .UserDefinedConstant {
|
94
|
+
}
|
95
|
+
pre.active4d .String {
|
96
|
+
color: #666666;
|
97
|
+
}
|
98
|
+
pre.active4d .DiffUnchangedLine {
|
99
|
+
color: #5E5E5E;
|
100
|
+
}
|
101
|
+
pre.active4d .TagContainer {
|
102
|
+
color: #7A7A7A;
|
103
|
+
}
|
104
|
+
pre.active4d .FunctionName {
|
105
|
+
color: #21439C;
|
106
|
+
}
|
107
|
+
pre.active4d .Variable {
|
108
|
+
font-weight: bold;
|
109
|
+
color: #0053FF;
|
110
|
+
}
|
111
|
+
pre.active4d .DateTimeLiteral {
|
112
|
+
font-weight: bold;
|
113
|
+
color: #66CCFF;
|
114
|
+
}
|
@@ -0,0 +1,72 @@
|
|
1
|
+
pre.all_hallows_eve .ClassInheritance {
|
2
|
+
font-style: italic;
|
3
|
+
}
|
4
|
+
pre.all_hallows_eve .Constant {
|
5
|
+
color: #3387CC;
|
6
|
+
}
|
7
|
+
pre.all_hallows_eve .TypeName {
|
8
|
+
text-decoration: underline;
|
9
|
+
}
|
10
|
+
pre.all_hallows_eve .TextBase {
|
11
|
+
background-color: #434242;
|
12
|
+
color: #FFFFFF;
|
13
|
+
}
|
14
|
+
pre.all_hallows_eve {
|
15
|
+
background-color: #000000;
|
16
|
+
color: #FFFFFF;
|
17
|
+
}
|
18
|
+
pre.all_hallows_eve .StringEscapesExecuted {
|
19
|
+
color: #555555;
|
20
|
+
}
|
21
|
+
pre.all_hallows_eve .line-numbers {
|
22
|
+
background-color: #73597E;
|
23
|
+
color: #FFFFFF;
|
24
|
+
}
|
25
|
+
pre.all_hallows_eve .StringExecuted {
|
26
|
+
background-color: #CCCC33;
|
27
|
+
color: #000000;
|
28
|
+
}
|
29
|
+
pre.all_hallows_eve .BlockComment {
|
30
|
+
background-color: #9B9B9B;
|
31
|
+
color: #FFFFFF;
|
32
|
+
}
|
33
|
+
pre.all_hallows_eve .TagName {
|
34
|
+
text-decoration: underline;
|
35
|
+
}
|
36
|
+
pre.all_hallows_eve .PreProcessorLine {
|
37
|
+
color: #D0D0FF;
|
38
|
+
}
|
39
|
+
pre.all_hallows_eve .SupportFunction {
|
40
|
+
color: #C83730;
|
41
|
+
}
|
42
|
+
pre.all_hallows_eve .FunctionArgument {
|
43
|
+
font-style: italic;
|
44
|
+
}
|
45
|
+
pre.all_hallows_eve .PreProcessorDirective {
|
46
|
+
}
|
47
|
+
pre.all_hallows_eve .StringEscapes {
|
48
|
+
color: #AAAAAA;
|
49
|
+
}
|
50
|
+
pre.all_hallows_eve .SourceBase {
|
51
|
+
background-color: #000000;
|
52
|
+
color: #FFFFFF;
|
53
|
+
}
|
54
|
+
pre.all_hallows_eve .TagAttribute {
|
55
|
+
}
|
56
|
+
pre.all_hallows_eve .StringLiteral {
|
57
|
+
color: #CCCC33;
|
58
|
+
}
|
59
|
+
pre.all_hallows_eve .String {
|
60
|
+
color: #66CC33;
|
61
|
+
}
|
62
|
+
pre.all_hallows_eve .Keyword {
|
63
|
+
color: #CC7833;
|
64
|
+
}
|
65
|
+
pre.all_hallows_eve .RegularExpression {
|
66
|
+
color: #CCCC33;
|
67
|
+
}
|
68
|
+
pre.all_hallows_eve .FunctionName {
|
69
|
+
}
|
70
|
+
pre.all_hallows_eve .Comment {
|
71
|
+
color: #9933CC;
|
72
|
+
}
|