akitaonrails-utility_belt 1.0.10
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.
- data/History.txt +5 -0
- data/Manifest.txt +7 -0
- data/README +348 -0
- data/bin/amazon +16 -0
- data/bin/google +7 -0
- data/bin/pastie +7 -0
- data/html/andreas00.css +449 -0
- data/html/authorship.html +86 -0
- data/html/bg.gif +0 -0
- data/html/front.jpg +0 -0
- data/html/index.html +81 -0
- data/html/menubg.gif +0 -0
- data/html/menubg2.gif +0 -0
- data/html/test.jpg +0 -0
- data/html/usage.html +298 -0
- data/lib/utility_belt.rb +22 -0
- data/lib/utility_belt/amazon_upload_shortcut.rb +25 -0
- data/lib/utility_belt/clipboard.rb +68 -0
- data/lib/utility_belt/command_history.rb +129 -0
- data/lib/utility_belt/convertable_to_file.rb +34 -0
- data/lib/utility_belt/equipper.rb +71 -0
- data/lib/utility_belt/google.rb +26 -0
- data/lib/utility_belt/hash_math.rb +13 -0
- data/lib/utility_belt/interactive_editor.rb +81 -0
- data/lib/utility_belt/irb_options.rb +3 -0
- data/lib/utility_belt/irb_verbosity_control.rb +30 -0
- data/lib/utility_belt/is_an.rb +4 -0
- data/lib/utility_belt/language_greps.rb +28 -0
- data/lib/utility_belt/not.rb +15 -0
- data/lib/utility_belt/pastie.rb +29 -0
- data/lib/utility_belt/pipe.rb +24 -0
- data/lib/utility_belt/print_methods.rb +72 -0
- data/lib/utility_belt/rails_finder_shortcut.rb +18 -0
- data/lib/utility_belt/rails_verbosity_control.rb +8 -0
- data/lib/utility_belt/string_to_proc.rb +72 -0
- data/lib/utility_belt/symbol_to_proc.rb +30 -0
- data/lib/utility_belt/webbrowser.rb +37 -0
- data/lib/utility_belt/wirble.rb +83 -0
- data/lib/utility_belt/with.rb +21 -0
- data/spec/convertable_to_file_spec.rb +31 -0
- data/spec/equipper_spec.rb +70 -0
- data/spec/hash_math_spec.rb +17 -0
- data/spec/interactive_editor_spec.rb +146 -0
- data/spec/language_greps_spec.rb +9 -0
- data/spec/pastie_spec.rb +92 -0
- data/spec/pipe_spec.rb +30 -0
- data/spec/spec_helper.rb +8 -0
- data/spec/string_to_proc_spec.rb +41 -0
- data/spec/utility_belt_spec.rb +4 -0
- data/utility_belt.gemspec +22 -0
- metadata +136 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
# IRB verbosity: http://groups.google.com/group/ruby-talk-google/browse_thread/thread/9c1febbe05513dc0
|
2
|
+
module IRB
|
3
|
+
def self.result_format
|
4
|
+
conf[:PROMPT][conf[:PROMPT_MODE]][:RETURN]
|
5
|
+
end
|
6
|
+
def self.result_format=(str)
|
7
|
+
result_format.replace(str)
|
8
|
+
end
|
9
|
+
def self.show_results
|
10
|
+
self.result_format = "=> %s\n"
|
11
|
+
end
|
12
|
+
def self.hide_results
|
13
|
+
self.result_format = ''
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
class Object
|
18
|
+
def verbose
|
19
|
+
IRB.show_results
|
20
|
+
end
|
21
|
+
alias :v :verbose
|
22
|
+
|
23
|
+
def quiet
|
24
|
+
IRB.hide_results
|
25
|
+
end
|
26
|
+
alias :q :quiet
|
27
|
+
|
28
|
+
alias :x :exit
|
29
|
+
end
|
30
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# fix by Bob Hutchison:
|
2
|
+
class String
|
3
|
+
unless public_method_defined? :blank?
|
4
|
+
def blank?
|
5
|
+
self !~ /\S/
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
# TODO: upgrade these to take either regexes or strings
|
11
|
+
|
12
|
+
# http://gilesbowkett.blogspot.com/2006/12/smalltalk-cleverness-translated-into.html
|
13
|
+
# http://gilesbowkett.com/blog_code_samples/122906_seaside_rails/controller.txt
|
14
|
+
class Object
|
15
|
+
def grep_classes(search_term)
|
16
|
+
classes = []
|
17
|
+
ObjectSpace.each_object {|object| classes << object.name if object.is_a? Class and not object.name.blank?}
|
18
|
+
classes.find_all {|klass| klass.downcase.include? search_term.downcase}
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# http://gilesbowkett.blogspot.com/2007/11/irb-what-was-that-method-again.html
|
23
|
+
class Object
|
24
|
+
def grep_methods(search_term)
|
25
|
+
methods.find_all {|method| method.downcase.include? search_term.downcase}
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# http://blog.jayfields.com/2007/08/ruby-adding-not-method-for-readability.html
|
2
|
+
class Object
|
3
|
+
define_method :not do
|
4
|
+
Not.new(self)
|
5
|
+
end
|
6
|
+
class Not
|
7
|
+
private *instance_methods.select { |m| m !~ /(^__|^\W|^binding$)/ }
|
8
|
+
def initialize(subject)
|
9
|
+
@subject = subject
|
10
|
+
end
|
11
|
+
def method_missing(sym, *args, &blk)
|
12
|
+
!@subject.send(sym,*args,&blk)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# automate creating pasties
|
2
|
+
%w{platform net/http utility_belt}.each {|lib| require lib}
|
3
|
+
UtilityBelt.equip(:clipboard)
|
4
|
+
UtilityBelt.equip(:webbrowser)
|
5
|
+
|
6
|
+
module UtilityBelt
|
7
|
+
module Pastie
|
8
|
+
def pastie(stuff_to_paste = nil)
|
9
|
+
stuff_to_paste ||= Clipboard.read if Clipboard.available?
|
10
|
+
# return nil unless stuff_to_paste
|
11
|
+
|
12
|
+
pastie_url = Net::HTTP.post_form(URI.parse("http://pastie.caboo.se/pastes/create"),
|
13
|
+
{"paste_parser" => "ruby",
|
14
|
+
"paste[authorization]" => "burger",
|
15
|
+
"paste[body]" => stuff_to_paste}).body.match(/href="([^\"]+)"/)[1]
|
16
|
+
|
17
|
+
Clipboard.write(pastie_url) if Clipboard.available?
|
18
|
+
|
19
|
+
WebBrowser.open(pastie_url)
|
20
|
+
|
21
|
+
return pastie_url
|
22
|
+
end
|
23
|
+
alias :pst :pastie
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
class Object
|
28
|
+
include UtilityBelt::Pastie
|
29
|
+
end if Object.const_defined? :IRB
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# This extension adds a UNIX-style pipe to strings
|
2
|
+
#
|
3
|
+
# Synopsis:
|
4
|
+
#
|
5
|
+
# >> puts "UtilityBelt is better than alfalfa" | "cowsay"
|
6
|
+
# ____________________________________
|
7
|
+
# < UtilityBelt is better than alfalfa >
|
8
|
+
# ------------------------------------
|
9
|
+
# \ ^__^
|
10
|
+
# \ (oo)\_______
|
11
|
+
# (__)\ )\/\
|
12
|
+
# ||----w |
|
13
|
+
# || ||
|
14
|
+
# => nil
|
15
|
+
#
|
16
|
+
class String
|
17
|
+
def |(cmd)
|
18
|
+
IO.popen(cmd, 'r+') do |pipe|
|
19
|
+
pipe.write(self)
|
20
|
+
pipe.close_write
|
21
|
+
pipe.read
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# Helps to inspect the list of methods in a class without clutter
|
2
|
+
# It will categorize and also filter out the Object's methods to help out
|
3
|
+
# just visualizing the relevant methods
|
4
|
+
#
|
5
|
+
# ex. String.print_methods
|
6
|
+
#
|
7
|
+
# author: Fabio Akita (akitaonrails.com)
|
8
|
+
module UtilityBelt
|
9
|
+
module Editor
|
10
|
+
# shortcut to textmate
|
11
|
+
def mate
|
12
|
+
edit_interactively 'mate'
|
13
|
+
end
|
14
|
+
|
15
|
+
# shortcut to vi
|
16
|
+
def vi
|
17
|
+
edit_interactively 'vi'
|
18
|
+
end
|
19
|
+
end
|
20
|
+
module PrintMethods
|
21
|
+
INSPECTORS = [
|
22
|
+
:public_methods,
|
23
|
+
:public_instance_methods,
|
24
|
+
:protected_methods,
|
25
|
+
:protected_instance_methods,
|
26
|
+
:private_methods,
|
27
|
+
:private_instance_methods
|
28
|
+
]
|
29
|
+
def print_methods(inspector = nil)
|
30
|
+
buffer = []
|
31
|
+
kself = self.class == Class ? self : self.class
|
32
|
+
clist = kself.included_modules
|
33
|
+
clist -= Object.included_modules unless kself == Object
|
34
|
+
clist = clist.map { |m| m.name }.reject { |m| m =~ /UtilityBelt/ || m =~ /Wirble/ }.sort.map { |m| m.constantize }
|
35
|
+
clist.unshift(kself.superclass) if kself.superclass && kself.superclass != Object
|
36
|
+
clist.unshift(kself)
|
37
|
+
|
38
|
+
inspector_methods = INSPECTORS.include?(inspector) ? [inspector] : INSPECTORS
|
39
|
+
clist.each do |klass|
|
40
|
+
inspector_methods.each do |insmethod|
|
41
|
+
mlist = klass.send(insmethod).sort
|
42
|
+
mlist -= Object.send(insmethod) unless klass == Object
|
43
|
+
mlist -= ['append_features'] # dunno where this method comes from
|
44
|
+
unless mlist.empty?
|
45
|
+
return mlist if inspector_methods.size == 1
|
46
|
+
buffer << "=== #{klass.name} === #{mlist.size} #{insmethod.to_s.split('_').join(' ')}"
|
47
|
+
buffer << mlist.join(", ")
|
48
|
+
buffer << ""
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
puts buffer.join("\n")
|
53
|
+
nil
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# extracted from ActiveSupport. will only add if not already available
|
58
|
+
module Inflector
|
59
|
+
def constantize
|
60
|
+
names = self.split('::')
|
61
|
+
names.shift if names.empty? || names.first.empty?
|
62
|
+
|
63
|
+
constant = Object
|
64
|
+
names.each do |name|
|
65
|
+
constant = constant.const_defined?(name) ? constant.const_get(name) : constant.const_missing(name)
|
66
|
+
end
|
67
|
+
constant
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
Object.send(:extend, UtilityBelt::PrintMethods)
|
72
|
+
String.send(:include, UtilityBelt::Inflector) if String.instance_methods.select { |m| m == 'constantize' }.empty?
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# http://www.clarkware.com/cgi/blosxom/2007/09/03#ConsoleFindShortcut
|
2
|
+
# Mike Clark's find() shortcut for Rails console
|
3
|
+
|
4
|
+
# Creates shortcut methods for finding models.
|
5
|
+
UTILITY_BELT_IRB_STARTUP_PROCS[:define_model_find_shortcuts] = lambda do
|
6
|
+
if defined? ActiveRecord::Base || defined? ActiveResource::Base
|
7
|
+
model_files = Dir.glob("app/models/**/*.rb")
|
8
|
+
table_names = model_files.map { |f| File.basename(f).split('.')[0..-2].join }
|
9
|
+
table_names.each do |table_name|
|
10
|
+
Object.instance_eval do
|
11
|
+
define_method(table_name) do |*args|
|
12
|
+
table_name.camelize.constantize.send(:find, *args)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
# note: Mike wrote this for ARec, but it works on ARes too since it doesn't hit the DB
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Rails verbosity: http://weblog.jamisbuck.org/2007/1/8/watching-activerecord-do-it-s-thing
|
2
|
+
# Marcel said they toyed with making this the console default on core
|
3
|
+
class Object
|
4
|
+
def log
|
5
|
+
ActiveRecord::Base.clear_active_connections!
|
6
|
+
ActiveRecord::Base.logger = Logger.new(STDOUT)
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# String#to_proc
|
2
|
+
#
|
3
|
+
# See http://weblog.raganwald.com/2007/10/stringtoproc.html
|
4
|
+
#
|
5
|
+
# Ported from the String Lambdas in Oliver Steele's Functional Javascript
|
6
|
+
# http://osteele.com/sources/javascript/functional/
|
7
|
+
#
|
8
|
+
# This work is licensed under the MIT License:
|
9
|
+
#
|
10
|
+
# (c) 2007 Reginald Braithwaite
|
11
|
+
# Portions Copyright (c) 2006 Oliver Steele
|
12
|
+
#
|
13
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
14
|
+
# a copy of this software and associated documentation files (the
|
15
|
+
# "Software"), to deal in the Software without restriction, including
|
16
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
17
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
18
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
19
|
+
# the following conditions:
|
20
|
+
#
|
21
|
+
# The above copyright notice and this permission notice shall be
|
22
|
+
# included in all copies or substantial portions of the Software.
|
23
|
+
#
|
24
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
25
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
26
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
27
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
28
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
29
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
30
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
31
|
+
|
32
|
+
class String
|
33
|
+
unless public_method_defined? :to_proc
|
34
|
+
def to_proc &block
|
35
|
+
params = []
|
36
|
+
expr = self
|
37
|
+
sections = expr.split(/\s*->\s*/m)
|
38
|
+
if sections.length > 1 then
|
39
|
+
eval_block(sections.reverse!.inject { |e, p| "(Proc.new { |#{p.split(/\s/).join(', ')}| #{e} })" }, block)
|
40
|
+
elsif expr.match(/\b_\b/)
|
41
|
+
eval_block("Proc.new { |_| #{expr} }", block)
|
42
|
+
else
|
43
|
+
leftSection = expr.match(/^\s*(?:[+*\/%&|\^\.=<>\[]|!=)/m)
|
44
|
+
rightSection = expr.match(/[+\-*\/%&|\^\.=<>!]\s*$/m)
|
45
|
+
if leftSection || rightSection then
|
46
|
+
if (leftSection) then
|
47
|
+
params.push('$left')
|
48
|
+
expr = '$left' + expr
|
49
|
+
end
|
50
|
+
if (rightSection) then
|
51
|
+
params.push('$right')
|
52
|
+
expr = expr + '$right'
|
53
|
+
end
|
54
|
+
else
|
55
|
+
self.gsub(
|
56
|
+
/(?:\b[A-Z]|\.[a-zA-Z_$])[a-zA-Z_$\d]*|[a-zA-Z_$][a-zA-Z_$\d]*:|self|arguments|'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"/, ''
|
57
|
+
).scan(
|
58
|
+
/([a-z_$][a-z_$\d]*)/i
|
59
|
+
) do |v|
|
60
|
+
params.push(v) unless params.include?(v)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
eval_block("Proc.new { |#{params.join(', ')}| #{expr} }", block)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
private
|
67
|
+
def eval_block(code, block)
|
68
|
+
eval code, block && block.binding
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (c) 2005 David Heinemeier Hansson
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
# a copy of this software and associated documentation files (the
|
6
|
+
# "Software"), to deal in the Software without restriction, including
|
7
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
# the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be
|
13
|
+
# included in all copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
#++
|
23
|
+
|
24
|
+
class Symbol
|
25
|
+
unless public_method_defined? :to_proc
|
26
|
+
def to_proc
|
27
|
+
Proc.new { |*args| args.shift.__send__(self, *args) }
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'platform'
|
2
|
+
|
3
|
+
module UtilityBelt
|
4
|
+
class WebBrowser
|
5
|
+
def self.open(url)
|
6
|
+
case Platform::IMPL
|
7
|
+
when :macosx
|
8
|
+
Kernel.system("open #{url}")
|
9
|
+
when :mswin
|
10
|
+
Kernel.system("start #{url}")
|
11
|
+
when :linux
|
12
|
+
#figure out the prefered web browser
|
13
|
+
#debian
|
14
|
+
if b = File.readlink("/etc/alternatives/x-www-browser") rescue false
|
15
|
+
launch_linux_browser(b, url)
|
16
|
+
#gentoo maybe
|
17
|
+
elsif b = ENV["BROWSER"]
|
18
|
+
launch_linux_browser(b, url)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
def self.launch_linux_browser(browser, url)
|
25
|
+
if /konqueror/.match browser
|
26
|
+
cmd = "dcop `dcop konq* | head -1` konqueror-mainwindow#1 newTab #{url}"
|
27
|
+
Kernel.system(cmd)
|
28
|
+
elsif /(firefox)|(swiftweasel)/.match b
|
29
|
+
Kernel.system("#{browser} -new-tab #{url}")
|
30
|
+
else
|
31
|
+
Kernel.system("#{browser} #{url}")
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
WebBrowser = UtilityBelt::WebBrowser if Object.const_defined? :IRB
|
@@ -0,0 +1,83 @@
|
|
1
|
+
require 'wirble'
|
2
|
+
Wirble.init
|
3
|
+
Wirble.colorize
|
4
|
+
|
5
|
+
module UtilityBelt
|
6
|
+
module Themes
|
7
|
+
def self.background(bkg)
|
8
|
+
case bkg
|
9
|
+
when :dark
|
10
|
+
Wirble::Colorize.colors = UtilityBelt::Themes::WIRBLE_DEFAULT_THEME
|
11
|
+
when :light
|
12
|
+
Wirble::Colorize.colors = UtilityBelt::Themes::THEME_FOR_WHITE_BKG
|
13
|
+
end
|
14
|
+
end
|
15
|
+
WIRBLE_DEFAULT_THEME = {
|
16
|
+
# delimiter colors
|
17
|
+
:comma => :blue,
|
18
|
+
:refers => :blue,
|
19
|
+
|
20
|
+
# container colors (hash and array)
|
21
|
+
:open_hash => :green,
|
22
|
+
:close_hash => :green,
|
23
|
+
:open_array => :green,
|
24
|
+
:close_array => :green,
|
25
|
+
|
26
|
+
# object colors
|
27
|
+
:open_object => :light_red,
|
28
|
+
:object_class => :white,
|
29
|
+
:object_addr_prefix => :blue,
|
30
|
+
:object_line_prefix => :blue,
|
31
|
+
:close_object => :light_red,
|
32
|
+
|
33
|
+
# symbol colors
|
34
|
+
:symbol => :yellow,
|
35
|
+
:symbol_prefix => :yellow,
|
36
|
+
|
37
|
+
# string colors
|
38
|
+
:open_string => :red,
|
39
|
+
:string => :cyan,
|
40
|
+
:close_string => :red,
|
41
|
+
|
42
|
+
# misc colors
|
43
|
+
:number => :cyan,
|
44
|
+
:keyword => :green,
|
45
|
+
:class => :light_green,
|
46
|
+
:range => :red,
|
47
|
+
}
|
48
|
+
THEME_FOR_WHITE_BKG = {
|
49
|
+
# delimiter colors
|
50
|
+
:comma => :purple,
|
51
|
+
:refers => :blue,
|
52
|
+
|
53
|
+
# container colors (hash and array)
|
54
|
+
:open_hash => :red,
|
55
|
+
:close_hash => :red,
|
56
|
+
:open_array => :red,
|
57
|
+
:close_array => :red,
|
58
|
+
|
59
|
+
# object colors
|
60
|
+
:open_object => :dark_gray,
|
61
|
+
:object_class => :purple,
|
62
|
+
:object_addr_prefix => :blue,
|
63
|
+
:object_line_prefix => :blue,
|
64
|
+
:close_object => :dark_gray,
|
65
|
+
|
66
|
+
# symbol colors
|
67
|
+
:symbol => :black,
|
68
|
+
:symbol_prefix => :light_gray,
|
69
|
+
|
70
|
+
# string colors
|
71
|
+
:open_string => :blue,
|
72
|
+
:string => :dark_gray,
|
73
|
+
:close_string => :blue,
|
74
|
+
|
75
|
+
# misc colors
|
76
|
+
:number => :black,
|
77
|
+
:keyword => :brown,
|
78
|
+
:class => :red,
|
79
|
+
:range => :blue,
|
80
|
+
}
|
81
|
+
COLORS = WIRBLE_DEFAULT_THEME
|
82
|
+
end
|
83
|
+
end
|