instead of for inline-partial-edit-mode? May allow for folding.
-- Remove indentation from partials during create-partial-from-selection
-- Add indentation to partials when entering inline-partial-edit-mode
-- Add indentation to erb fragment that replaces the partials after create-partial-from-selection
-- Intelligent Go To File needs to look for rxml and rjs files
- - pop up window asking for filename on create (if view doesn't exist, for example)
-- Fix inline-partial mode for rjs files ( " + new_name
-end
-
-# Sanitize the transit dir
-bad_dirs = []
-Find.find(DIR_TO_CLEAN) do |f|
- f = File.expand_path(f).sub(DIR_TO_CLEAN, '')
- next if f =~ /\/?\.(git|svn)/
- orig_name = File.basename(f)
- next if orig_name === ( clean_name = sanitize(File.basename(f)) )
- if File.directory? f
- bad_dirs.push(f)
- next
- end
- dirname = File.dirname(f) + "/"
- verbose_rename(dirname + orig_name, dirname + clean_name) unless (orig_name === clean_name)
-end
-
-puts "Renaming #{bad_dirs.size} dirs..."
-bad_dirs.each do |d|
- orig_name = File.basename(d)
- clean_name = sanitize(File.basename(d))
- dirname = File.dirname(d) + "/"
- verbose_rename(dirname + orig_name, dirname + clean_name)
-end
diff --git a/bundles/ruby-on-rails.tmbundle/script/destroy b/bundles/ruby-on-rails.tmbundle/script/destroy
deleted file mode 100755
index 2216b5e10..000000000
--- a/bundles/ruby-on-rails.tmbundle/script/destroy
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env ruby
-APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
-
-begin
- require 'rubigen'
-rescue LoadError
- require 'rubygems'
- require 'rubigen'
-end
-require 'rubigen/scripts/destroy'
-
-ARGV.shift if ['--help', '-h'].include?(ARGV[0])
-RubiGen::Base.use_component_sources! [:newjs, :newjs_theme, :test_unit]
-RubiGen::Scripts::Destroy.new.run(ARGV)
diff --git a/bundles/ruby-on-rails.tmbundle/script/generate b/bundles/ruby-on-rails.tmbundle/script/generate
deleted file mode 100755
index bf33992a8..000000000
--- a/bundles/ruby-on-rails.tmbundle/script/generate
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env ruby
-APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
-
-begin
- require 'rubigen'
-rescue LoadError
- require 'rubygems'
- require 'rubigen'
-end
-require 'rubigen/scripts/generate'
-
-ARGV.shift if ['--help', '-h'].include?(ARGV[0])
-RubiGen::Base.use_component_sources! [:newjs, :newjs_theme, :test_unit]
-RubiGen::Scripts::Generate.new.run(ARGV)
diff --git a/bundles/ruby-on-rails.tmbundle/script/txt2html b/bundles/ruby-on-rails.tmbundle/script/txt2html
deleted file mode 100755
index 2d2b9282f..000000000
--- a/bundles/ruby-on-rails.tmbundle/script/txt2html
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'erb'
-require 'rubygems'
-begin
- require 'newgem'
-rescue LoadError
- puts "\n\nGenerating the website requires the newgem RubyGem"
- puts "Install: gem install newgem\n\n"
- exit(1)
-end
-require 'redcloth'
-require 'syntax/convertors/html'
-require 'erb'
-ENV['rakefile_just_config'] = "true"
-load File.dirname(__FILE__) + '/../Rakefile'
-
-version = APP_VERSION
-download = 'http://railsbundle.com/dist/JavaScript Unit Testing.tar.gz'
-
-class Fixnum
- def ordinal
- # teens
- return 'th' if (10..19).include?(self % 100)
- # others
- case self % 10
- when 1: return 'st'
- when 2: return 'nd'
- when 3: return 'rd'
- else return 'th'
- end
- end
-end
-
-class Time
- def pretty
- return "#{mday}#{mday.ordinal} #{strftime('%B')} #{year}"
- end
-end
-
-def convert_syntax(syntax, source)
- return Syntax::Convertors::HTML.for_syntax(syntax).convert(source).gsub(%r!^
|
$!,'')
-end
-
-if ARGV.length >= 1
- src, template = ARGV
- template ||= File.join(File.dirname(__FILE__), '/../website/template.html.erb')
-
-else
- puts("Usage: #{File.split($0).last} source.txt [template.html.erb] > output.html")
- exit!
-end
-
-template = ERB.new(File.open(template).read)
-
-title = nil
-body = nil
-File.open(src) do |fsrc|
- title_text = fsrc.readline
- body_text = fsrc.read
- syntax_items = []
- body_text.gsub!(%r!<(pre|code)[^>]*?syntax=['"]([^'"]+)[^>]*>(.*?)\1>!m){
- ident = syntax_items.length
- element, syntax, source = $1, $2, $3
- syntax_items << "<#{element} class='syntax'>#{convert_syntax(syntax, source)}#{element}>"
- "syntax-temp-#{ident}"
- }
-
- # a few extra supported markup commands specifically for documenting tm bundles
- [
- ['COMMAND', '⌘'],
- ['TAB', '⇥'],
- ['SHIFT', '⇧'],
- ['OPTION', '⌥'],
- ['CONTROL', '⌃'],
- ['BACKSPACE', '⌫'],
- ['DELETE', '⌦'],
- ['RETURN', '↩'],
- ['ENTER', '⌅'],
- ['ESCAPE', '⎋'],
- ['DOWN', '↓'],
- ['UP', '↑'],
- ['LEFT', '←'],
- ['RIGHT', '→']
- ].map do |regexp, replacement|
- body_text.gsub!(Regexp.new(regexp), replacement)
- end
-
- title = RedCloth.new(title_text).to_html.gsub(%r!<.*?>!,'').strip
- body = RedCloth.new(body_text).to_html
- body.gsub!(%r!(?:
)?syntax-temp-(\d+)(?:
)?!){ syntax_items[$1.to_i] }
-end
-stat = File.stat(src)
-created = stat.ctime
-modified = stat.mtime
-
-$stdout << template.result(binding)
diff --git a/bundles/ruby-on-rails.tmbundle/tasks/dist.rake b/bundles/ruby-on-rails.tmbundle/tasks/dist.rake
deleted file mode 100644
index 1dd5ce1ca..000000000
--- a/bundles/ruby-on-rails.tmbundle/tasks/dist.rake
+++ /dev/null
@@ -1,9 +0,0 @@
-desc "Build bundle archive for distribution"
-task :dist do
- bundle = 'Ruby\ on\ Rails.tmbundle'
- bundle_src = APP_ROOT
- bundle_dist = "website/dist"
- FileUtils.mkdir_p bundle_dist
- bundle_file = "#{bundle_dist}/#{bundle}.tar.gz"
- sh %{tar zcvf #{bundle_file} --exclude .git --exclude #{bundle_file} .}
-end
\ No newline at end of file
diff --git a/bundles/ruby-on-rails.tmbundle/tasks/website.rake b/bundles/ruby-on-rails.tmbundle/tasks/website.rake
deleted file mode 100644
index 4312e9da0..000000000
--- a/bundles/ruby-on-rails.tmbundle/tasks/website.rake
+++ /dev/null
@@ -1,35 +0,0 @@
-require 'yaml'
-
-def website_config
- unless @website_config
- begin
- @website_config = YAML.load(File.read(File.expand_path(File.dirname(__FILE__) + "/../config/website.yml")))
- rescue
- puts <<-EOS
-To upload your website to a host, you need to configure
-config/website.yml. See config/website.yml.sample for
-an example.
-EOS
- exit
- end
- end
- @website_config
-end
-
-desc 'Generate website files'
-task :website_generate => :dist do
- (Dir['website/**/*.txt'] - Dir['website/version*.txt']).each do |txt|
- sh %{ #{RUBY_APP} script/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} }
- end
-end
-
-desc 'Upload website files to rubyforge'
-task :website_upload do
- host = website_config["host"] # "#{rubyforge_username}@rubyforge.org"
- remote_dir = website_config["remote_dir"] # "/var/www/gforge-projects/#{PATH}/"
- local_dir = 'website'
- sh %{rsync -aCv #{local_dir}/ #{host}:#{remote_dir}}
-end
-
-desc 'Generate and upload website files'
-task :website => [:website_generate, :website_upload]
diff --git a/bundles/ruby-on-rails.tmbundle/website/demo.html b/bundles/ruby-on-rails.tmbundle/website/demo.html
deleted file mode 100644
index ddd7df1be..000000000
--- a/bundles/ruby-on-rails.tmbundle/website/demo.html
+++ /dev/null
@@ -1,1016 +0,0 @@
-
-
-
-
-
-
- Step-by-step demonstration
-
-
-
-
-
-
-
-
-
Step-by-step demonstration
-
-
Get Version
-
2.0.0
-

-
-
In this demo we’ll create a blog; because that’s what blogs are for: being
-demonstrations of web frameworks.
-
-
-
The demonstration uses new features of Rails 2.0 and the snippets in this bundle.
-
-
-
A New App
-
-
-
rails blog
-cd blog
-mate .
-
-
Add some models
-
-
-
ruby script/generate model Post subject:string body:text
-
-
This creates a 001_create_posts migration with a create_table:
-
-
-
create_table :posts do |t|
- t.string :subject
- t.text :body
-
- t.timestamps
-end
-
-
-
Sexy Migration support
-
-
-
If you put the cursor on the line after t.text :body, type t. and press ⇥. Select “Create boolean column” (by pressing 0), and type “published” into the template field. If nothing happened when you pressed ⇥, check that when you opened the migrations file you’ve selected the bundle “Ruby on Rails”.
-
-
-
Note that another t. was created on the next line! Press ⇥ and the cursor will be placed after it. You can now press ⇥ again to create another column, or delete this line.
-
-
-
Here, delete the extraneous t. line (⌃ ⇧ K). And save the file (⌘ S).
-
-
-
Run the migrations, either from the prompt:
-
-
-
rake db:migrate
-
-
-
or directly from the editor with ⌃ | (Ctrl-Pipeline), and choosing option “Migrate to Current”.
-
-
-
Post fixtures
-
-
-
Update the test/fixtures/posts.yml file as:
-
-
-
published:
- subject: Some article
- body: A test article
- published: true
-
-nonpublished:
- body: Still writing this one
-
-
-
Note, in Rails 2.0 fixtures no longer have explicit ids. Later on we’ll look at snippets for using Foxy Fixtures with auto-completion for associations.
-
-
-
Public blog controller
-
-
-
Create a controller for our blog, either via the command prompt:
-
-
-
ruby script/generate controller blog
-
-
-
or directly from the editor with ⌃ |, and choosing option “Call Generate Script”, choose “Controller”, give it the name “blog”, and empty the list of actions.
-
-
-
Now open blog_controller_test.rb. To find this file quickly press ⌘ T, enter bct, and select the file.
-
-
-
Note how much cleaner functional tests are now via ActionController::TestCase.
-
-
-
Let’s do some TDD. First, delete the test_truth dummy method.
-
-
-
To create a test to show a list of blog articles:
-
-
-
deftg
-
-
-
and ⇥ gives:
-
-
-
def test_should_get_action
- @model = models(:fixture_name)
- get :action, :id => @model.to_param
- assert_response :success
-
-end
-
-
-
Type index to replace action. Press ⇥, and then ⌫ to remove the first line, then press ⇥ three times and then ⌫ to remove the :id => @model.to_param part. The press ⇥ again to go to the end of the method. Now we have:
-
-
-
def test_should_get_index
- get :index
- assert_response :success
-
-end
-
-
-
Now type asg, press ⇥, and type posts, and press ⇥ again. This creates an instance variable lookup within an assertion:
-
-
-
assert(posts = assigns(:posts), "Cannot find @posts")
-
-
-
Now, let’s assert the HTML format.
-
-
-
Type ass and press ⇥. Type div#posts, press ⇥ and ⌫, then ⇥ twice to place the cursor within the assert_select block:
-
-
-
assert_select 'div#posts' do
-
-end
-
-
-
Now we’ll check that the @posts objects are represented in the div#posts element.
-
-
-
With the cursor inside the assert_select:
-
-
-
Type ass, press ⇥, type div.post, press ⇥ twice, and type count (to replace the text). Now press ⇥ again, and type posts.size. Press ⇥ a final time (it will highlight the do...end block), and press ⌫.
-
-
-
Our test method is now finished:
-
-
-
def test_should_get_index
- get :index
- assert_response :success
- assert(posts = assigns(:posts), "Cannot find @posts")
- assert_select 'div#posts' do
- assert_select 'div.post', :count => posts.size
- end
-end
-
-
-
NOTE: there is also a deftp snippet for functional tests to create a POST test stub.
-To memorize: deftg stands for define test get and deftp stands for define test post
-
-
-
Controller actions
-
-
-
To navigate to blog_controller.rb there are three options:
-
-
-
- - press ⇧ ⌥ ⌘ ↓, and select “Controller” from the drop-down list
- - press ⌥ ⌘ ↓ and you’ll go directly to the controller (toggles between the two files)
- - press ⌘ T, type
bc, choose the file, press ↩.
-
-
-
-
Add the index action method:
-
-
-
def index
- @posts = Post.find_all_by_published(true)
-end
-
-
-
Action views
-
-
-
To create/navigate to the view, press ⇧ ⌥ ⌘ ↓ and select “View” (like above). Or press ⌥ ⌘ ↓ to toggle between a controller method and it’s view.
-
-
-
As there are no app/views/blog/index* files, it will prompt you to create a blank view file. By default it guesses index.html.erb (because the method was named index), but of course you can change that in the dialog box.
-
-
-
If instead you got the message “blog_controller.rb does not have a view”, note that you first need to save the controller file before hitting ⇧ ⌥ ⌘ ↓ or ⌥ ⌘ ↓. Also note that the cursor must be within the scope of a method for ⇧ ⌥ ⌘ ↓ or ⌥ ⌘ ↓ to work.
-
-
-
Press enter to accept index.html.erb. You are taken to the new file.
-
-
-
Let’s create HTML to match the earlier tests.
-
-
-
Type div and press ⇥ twice, then type posts and press ⇥:
-
-
-
<div id="posts">
-
-</div>
-
-
-
Inside the div element, type for and press ⇥. This expands into a large ERb-enabled for-loop. Type @posts, press ⇥, type post and press ⇥. The cursor is now inside the for-loop.
-
-
-
Inside the for-loop, type: div and press ⇥. Press ⌫, and type class='post' and press ⇥ to enter the div element.
-
-
-
Create a <%= %> element (⌃ >). If you press ⌃ > again, it toggles to <% %>, and then again and it becomes <%- -%>, and again and it becomes <%# %> (a Ruby comment). Pressing ⌃ > again starts at <%= %> again.
-
-
-
Enter post.body within the ERb template field.
-
-
-
Actually, we’ll need to show the subject too, so above the <%= post.body %> line (press ↑ followed by ⌘ ↩)
-type ‘h3’, and press ⌃ < (LessThan), then ⌃ > (GreatherThan), and post.subject.
-
-
-
The resulting line is: <h3><%= post.subject %></h3>
-
-
-
Move the cursor down between <% else %> and <% end %>.
-
-
-
Create a simple element <p></p> (⌃ ⇧ W or ⌃ <). You can change the element type here. Just press ⇥ to go inside the element. Type There are no posts available to read. All y'all come back soon, yer hear. because its funny.
-
-
-
Our index.html.erb template is now:
-
-
-
<div id="posts">
- <% if !@posts.blank? %>
- <% for post in @posts %>
- <div class="post">
- <h3><%= post.subject %></h3>
- <%= post.body %>
- </div>
- <% end %>
- <% else %>
- <p>There are no posts available to read. All y'all come back soon, yer hear.</p>
- <% end %>
-
-</div>
-
-
-
If we run our functional tests they now pass: run either from the command prompt with rake test:functionals or directly from the editor by pressing ⌃ \ and press 2 for “Test Functionals”
-
-
-
As yet, we have no way for users to leave comments.
-
-
-
Foxy Fixtures
-
-
-
Create a comment model:
-
-
-
ruby script/generate model Comment body:text name:string post:references
-
-
-
Note: here post:references is effectively the same as post_id:integer. Within the generated migration it creates t.reference :post. There is also a t. and tcr snippet for references, as for other standard datatypes, which helps setup polymorphic associations.
-
-
-
The generated create_table in 002_create_comments.rb is:
-
-
-
create_table :comments do |t|
- t.text :body
- t.string :name
- t.references :post
-
- t.timestamps
-end
-
-
-
Run rake db:migrate, or directly from the editor with ⌃ | and choose option “Migrate to Current”.
-
-
-
Now create some comment fixtures so we can look at Foxy Fixtures. Open text/fixtures/comments.yml (⌘ T, type cy, press ↩).
-
-
-
By default, the generated comments.yml starts like:
-
-
-
one:
- body: MyText
- name: MyString
- post:
-
-two:
- body: MyText
- name: MyString
- post:
-
-
The post fields replace the rails1.2 post_id fields. Now, we can specify the post.yml labels for a post. From above we have published and unpublished. It can be hard to remember what fixtures we have, so there is a key-combo helper.
-
-
-
Put the cursor after post: and press ⌥ ⎋. A drop-down box appears with the names of the posts.yml fixtures. Select published and press ↩. Repeat for the 2nd fixture. This gives us:
-
-
-
one:
- body: MyText
- name: MyString
- post: published
-
-two:
- body: MyText
- name: MyString
- post: published
-
-
Associations
-
-
-
To enable the Foxy Fixtures, we need to add associations to the model classes.
-
-
-
You can now quickly go from a fixtures file (we’re in comments.yml) to the model file (⇧ ⌥ ⌘ ↓).
-
-
-
Within comment.rb model, create a new line within the class, and type bt and press ⇥. Type post. This creates a snippet:
-
-
-
belongs_to :post, :class_name => "Post", :foreign_key => "post_id"
-
-
-
The class name and foreign key are now generated from the association name. You can change them by tabbing across. But, we only need the default, so we can delete these options.
-
-
-
Press ⇥ and ⌫ to remove the :class_name and :foreign_key options. The Comment class is now:
-
-
-
class Comment < ActiveRecord::Base
- belongs_to :post
-end
-
-
-
Now go to the Post class. Press ⌘ T and type post and select the model file, and press ↩.
-
-
-
Create a new line within the Post class (⌘ ↩). Type hm and press ⇥ to generate a has_many association. Type comment, and the resulting snippet is:
-
-
-
has_many :comments, :class_name => "comment", :foreign_key => "class_name_id"
-
-
-
We don’t need the options. So press ⇥ once and then ⌫.
-
-
-
class Post < ActiveRecord::Base
- has_many :comments
-end
-
-
-
Note: there is also a has_many :through snippet. Type hmt and ⇥ to activate it.
-
-
-
Finally, we can run our tests since adding the Comment model + fixtures (⌃ \).
-
-
-
rake test
-
-
Routes
-
-
-
Open the routes file (⌘ T, type routes and press ↩).
-
-
-
Change the routes file to:
-
-
-
ActionController::Routing::Routes.draw do |map|
- map.resources :posts
- map.connect ':controller/:action/:id'
- map.connect ':controller/:action/:id.:format'
-end
-
-
-
Creating Posts
-
-
-
From the Post model class (post.rb) you can now quickly navigate to a controller
-of the same name. It supports either singular or plural controller names, but
-will default to the plural name, which is the REST/resources preferred name.
-
-
-
To create a PostsController, use the ‘Go To’ hot key (as above) ⇧ ⌥ ⌘ ↓ and select ‘Controller’. As there is no post_controller.rb nor posts_controller.rb it will create a posts_controller.rb controller file; which is what we want here.
-
-
-
Note; at this stage you could use the Rails 2.0 scaffold generator to create the posts_controller.rb (and tests and routes).
-
-
-
In the blank file, we need to create a controller class.
-
-
-Type
cla and ⇥, and select “Create controller class”. Type
Posts and ⇥,
-
post and ⇥, and finally,
Post and ⇥. This leaves the cursor in the middle
-of the generated class:
-
-
class PostsController < ApplicationController
- before_filter :find_post
-
-
-
- private
- def find_post
- @post = Post.find(params[:id]) if params[:id]
- end
-end
-
-
-
TDD for Posts controller
-
-
-
Currently there is not a functional test for our posts_controller.rb. To create it, use the ‘Go To’ hot key (⇧ ⌥ ⌘ ↓) and select ‘Functional Test’. This will create a blank file.
-
-
-
Type cla and ⇥, and select “Create functional test class”.
-Type Posts and ⇥. (The functional test class name
-should match the controller class, with Test suffixed to it).
-
-
-
The functional test class snippet gives you a deft stub. If you
-press ⇥ now, it creates a generic test method snippet:
-
-
-
def test_case_name
-
-end
-
-
-
Instead, we will use the deftg (GET request) and deftp (POST request) snippets.
-
-
-
Create a test for the index, new and edit actions. For index and new, we can delete the @model = models(:fixture_name),
-etc parts.
-
-
-
To test for the create action, type deftp and ⇥. Type create and ⇥, type post and ⇥, type ⌫ and ⇥, and again ⌫ and ⇥. Now enter in a hash of the values to pass in for the test, say :subject => 'Test', :body => 'Some body', :published => '1'. The result should look like:
-
-
-
def test_should_post_create
- post :create, :post => { :subject => 'Test', :body => 'Some body', :published => '1' }
- assert_response :redirect
-
-end
-
-
-
On the line after the assert_response expression, we’ll test
-for where we want to be redirected to.
-
-
-
If you type art you create an old-style assert_redirected_to :action => "index"
-snippet.
-
-
-
In addition there are now various assert_redirected_to snippets that
-use resourceful routes:
-
-
-
- - artp –
assert_redirected_to model_path(@model)
- - artpp –
assert_redirected_to models_path
- - artnp –
assert_redirected_to parent_child_path(@parent, @child)
- - artnpp –
assert_redirected_to parent_child_path(@parent)
-
-
-
-
As we’ll see later, this naming scheme is used for other snippets that
-use resourceful routes, like link_to and redirect_to.
-
-
-
Type artpp and ⇥, and type post, to assert that the create
-action must redirect to the index page.
-
-
-
The final test_should_post_create method is:
-
-
-
def test_should_post_create
- post :create, :post => { :subject => 'Test', :body => 'Some body', :published => '1' }
- assert_response :redirect
- assert_redirected_to posts_path
-end
-
-
-
Running our tests (rake test:functionals or ⌃ \) shows all these new tests failing.
-
-
-
Views
-
-
-
Go back to the posts_controller.rb file (⌥ ⌘ ↓).
-
-
-
Now add three actions – index, new and edit. New methods can be created
-with the def snippet:
-
-
-
class PostsController < ApplicationController
- before_filter :find_post
-
- def index
- @posts = Post.find(:all)
- end
-
- def new
- @post = Post.new
- end
-
- def edit
- end
-
- private
- def find_post
- @post = Post.find(params[:id]) if params[:id]
- end
-end
-
-
-
Note: the index method could be created by typing def, ⇥, index, ⇥, @posts = Post.fina, ⇥, ⌫.
-
-
-
Now we need templates for the index, new and edit actions.
-
-
-
Place the cursor inside the index method,
-and use the ‘Go To’ hot key (⇧ ⌥ ⌘ ↓)
-and select ‘View’. A dialog box will pop up asking for the name of the new
-template (as there are no app/views/posts/index* files). By default, the
-suffix is now .html.erb rather than the old .rhtml. Press ↩,
-to accept index.html.erb as your template name.
-
-
-
Let’s just create a simple table showing the Posts.
-
-
-
Type table and ⌃ < to generate <table></table>, and
-press ↩ to put the tags on separate lines.
-
-
-
Do the same to create a <tbody></tbody> element.
-
-
-
Inside the <tbody></tbody> we want to iterate over the @posts,
-one per <tr></tr> row.
-
-
-
Press ⌃ >, three times, to create a <%- -%> tag. Inside it
-type @posts.each do |post|.
-
-
-
On the next line (⌘ ↩), type end and ⇥, to create <% end -%>.
-We now have a Ruby block within this ERb template.
-
-
-
Inside the block, create a <tr></tr> element, and within it
-create a <td></td> element. We’ll skip over anything fancy
-here, and just put the post’s subject here.
-
-
-
Type post.subject and select it. Now press ⌃ > to wrap
-the selected text inside <%= post.subject %>.
-
-
-
The resulting index.html.erb is:
-
-
-
<table>
- <tbody>
- <%- @posts.each do |post| -%>
- <tr>
- <td><%= post.subject %></td>
- </tr>
- <% end -%>
- </tbody>
-</table>
-
-
-
Forms
-
-
-
Place the cursor inside the new method,
-and use the ‘Go To’ hot key (⇧ ⌥ ⌘ ↓)
-and select ‘View’. Press ↩ to accept new.html.erb.
-
-
-
Inside the blank new.html.erb file, type ffe and press ⇥, and type post
-and press ⇥ twice:
-
-
-
<%= error_messages_for :post %>
-<% form_for @post do |f| -%>
-
-<% end -%>
-
-
-
form_for is the Rails 2.0 preferred helper for managing forms, and
-there are now snippets for common form_for helpers. There are
ff and
ffe
-snippets; the former does not have the error messages section.
-
-
To create a label and text field for the subject attribute:
-
-
-
Create a <p></p> block (Press ⌃ <, then ⇥, then ↩).
-Type f. and ⇥, and select “Label”. Type subject, press ⇥ and press ⌫.
-Create a <br /> (⌃ ↩).
-Type f. and ⇥, and select “Text Field”. Type subject.
-
-
-
This gives us:
-
-
-
<%= error_messages_for :post %>
-<% form_for @post do |f| -%>
- <p>
- <%= f.label :subject %><br />
- <%= f.text_field :subject %>
- </p>
-<% end -%>
-
-
-
Now repeat for body and published fields.
-
-
-
Note, for published, you might change the label to Published yet? by tabbing
-into the default string file.
-
-
-
Finally, add a “Submit” button using the f. snippet tab completion.
-
-
-
Start script/server from the prompt and you can now view this form at http://localhost:3000/posts/new
-
-
-
The final form is:
-
-
-
<%= error_messages_for :post %>
-<% form_for @post do |f| -%>
- <p>
- <%= f.label :subject %><br />
- <%= f.text_field :subject %>
- </p>
- <p>
- <%= f.label :body %><br />
- <%= f.text_area :body %>
- </p>
- <p>
- <%= f.label :published, "Published yet?" %><br />
- <%= f.check_box :published %>
- </p>
- <p>
- <%= f.submit "Submit" %>
- </p>
-<% end -%>
-
-
-
Note: if you got <br> when hitting ⌃ ↩ instead of <br /> then you might want to go to the preferences of TextMate (⌘ ,), choose tab “Advanced”, choose “Shell Variables”, click the + sign to add a new shell variable, and give it the name TM_XHTML and a value of /
-
-
-
Partials
-
-
-
The form we just created is exactly the same as the form required for the edit.html.erb template.
-
-
-
Instead of copy+pasting it into the edit.html.erb file, we’ll create a partial
-template.
-
-
-
Select the entire form (⌘ A), and press ⌃ ⇧ H and a dialog box appears.
-Type in form and press ↩.
-
-
-
You’ll notice a new file _form.html.erb has appeared which contains the code you had selected,
-while the code in the file new.html.erb has been replaced by:
-
-
-
<%= render :partial => 'form' %>
-
-
-
Now copy and paste this into the edit.html.erb file. To create this file,
-return to the controller (from the new.html.erb file, press ⌥ ⌘ ↓), go to the edit action,
-and use ⌥ ⌘ ↓ again to create the edit.html.erb template file.
-
-
-
Link helpers
-
-
-At the bottom of the
new.html.erb we want a link back to the list of all posts
-(within the posts controller, not the public blog controller). This
-will be the
index action, and will be accessible via the resources route
-
posts_path.
-
-
There are several link_to snippets that support the resources routes:
-
-
-
- - lip –
<%= link_to "link text...", model_path(@model) %>
- - lipp –
<%= link_to "link text...", models_path %>
- - linp –
<%= link_to "link text...", parent_child_path(@parent, @child) %>
- - linpp –
<%= link_to "link text...", parent_child_path(@parent) %>
- - lim –
<%= link_to model.name, model_path(model) %>
-
-
-
-
The tab stop points are in useful places.
-
-
-So, to create our link to the posts page, type
lipp and ⇥, type
-
Show all posts, press ⇥ twice and type
post.
-
-
Controllers: respond_to and redirect_to
-
-
-
Now we’ll add a create action to the posts_controller.rb. Let’s go there (⌥ ⌘ ↓).
-
-
-Below the
edit method type
def and ⇥, and type
-
create and ⇥. Now fill out the
create action like:
-
-
def create
- @post = Post.new(params[:post])
- if @post.save
-
- else
-
- end
-end
-
-
-
Place the cursor in the true section of the if statement.
-Type repp and ⇥ to create a redirect_to expression. Press ⇥
-again and replace the selected text with post.
-
-
-
Like the various link_to snippets, there are matching redirect_to
-snippets.
-
-
-
- - rep –
redirect_to(model_path(@model))
- - repp –
redirect_to(models_path)
- - renp –
redirect_to(parent_child_path(@parent, @child))
- - renpp –
redirect_to(parent_child_path(@parent))
-
-
-
-
There are tab stops in useful places.
-
-
-In the
false section of the
if expression, we’ll demonstrate the
-
respond_to block. There are two ways to generate a
respond_to block.
-
-
Type rest and ⇥, and you get a standard empty block you can work with:
-
-
-
respond_to do |wants|
- wants.html { }
-end
-
-
-
Press ⇥ twice to get inside the wants.html block, type ra, press ⇥, then type new. The final block is:
-
-
-
respond_to do |wants|
- wants.html { render :action => "new" }
-end
-
-
-
Alternately, there is the “upgrade” hot key (⇧ ⌘ H), where you can convert some
-existing selected code, into a respond_to block.
-
-
-Select the whole line containing the
redirect_to expression from the
-
true section of the
if statement (⇧ ⌘ L).
-
-
Press ⇧ ⌘ H and the line is replaced with:
-
-
-
respond_to do |wants|
- wants.html do
- redirect_to(posts_path)
- end
- wants.js { }
-end
-
-
-
The js is the first tab stop. The point of this hot key is to instantly
-refactor your existing html respond code, and support a second response
-format.
-
-
-
For now remove the line with wants.js (⌃ ⇧ K).
-
-
-
The completed create action is:
-
-
-
def create
- @post = Post.new(params[:post])
- if @post.save
- respond_to do |wants|
- wants.html do
- redirect_to(posts_path)
- end
- end
- else
- respond_to do |wants|
- wants.html { render :action => "new" }
- end
- end
-end
-
-
-
Yes you’d probably only have one respond_to block, but this is a
-demo so I am taking the scenic route.
-
-
-
Our application so far
-
-
-
In the browser, we can create posts via http://localhost:3000/posts/new
-and then view them as a blog visitor at http://localhost:3000/blog.
-
-
-
Some more migrations
-
-
-
We’re looking for the following additions:
-
-
-
- - rename the column
name of table comments to author
- - add a new column
author_url to table comments
- - add an index to the column
post_id of the comments table
-
-
-
-
Let’s try to do this all in one migrations file. Start Quick Migration (⌃ ⇧ M). Let’s name it ModifyComments. A new migrations file 003_modify_comments.rb is created and opened, and the cursor is placed behind the mtab trigger. For now delete mtab and instead enter mcol and press ⇥. Choose Rename / Rename Column (3). Type comments ⇥ name ⇥ author ⇥ ↩.
-
-
-
Again type mcol and ⇥. This time choose Add / Remove Column (1). Type comments ⇥ author_url, then ⇥ twice, and press ↩.
-
-
-
Now type mind and ⇥. Choose Add / Remove Index (1). Type comments ⇥ post_id.
-
-
-
The end result looks like this:
-
-
-
class ModifyComments < ActiveRecord::Migration
- def self.up
- rename_column :comments, :name, :author
- add_column :comments, :author_url, :string
- add_index :comments, :post_id
- end
-
- def self.down
- remove_index :comments, :post_id
- remove_column :comments, :author_url
- rename_column :comments, :author, :name
- end
-end
-
-
-
Notice how the down method calls are in reversed order of the up method calls.
-
-
-
Save the file (⌘ S) and migrate to current (⌃ |).
-
-
-
Be sure to modify the comments fixture file. Go there (⌘ T, press cy, choose comments.yml). Rename name to author and add a row for author_url for each comment. Check your tests again (⌃ \, choose option 1). All tests should pass.
-
-
-
Futhermore we’d like to know when a post was published. To do this we’ll want the following modifications:
-
-
-
- - keep track of the datetime when a post was published.
- - remove the column published from the posts table because it can be determined if a post is published by looking at whether or not a value is present for the published date.
-
-
-
-
Start Quick Migration (⌃ ⇧ M). Let’s name it AddPublishedAtForPosts. A new migrations file 004_add_published_at_for_posts.rb is created and opened, and the cursor is placed behind the mtab trigger. Again delete mtab and instead enter mcol and press ⇥. Choose Add / Remove Column (1). Type posts ⇥ published_at ⇥ datetime ⇥ and ↩.
-
-
-
Again type mcol and ⇥. Choose Remove / Add Column (5). Type posts ⇥ published and press ⇥ twice.
-
-
-
The end result looks like this:
-
-
-
class AddPublishedAtForPosts < ActiveRecord::Migration
- def self.up
- add_column :posts, :published_at, :datetime
- remove_column :posts, :published
- end
-
- def self.down
- add_column :posts, :published, :boolean
- remove_column :posts, :published_at
- end
-end
-
-
-
Notice how the Remove / Add Column command automagically determined in the down method the column type of column published to be a boolean. It determines this by looking at the current state of your db/schema.rb file.
-
-
-
Save the file (⌘ S) and migrate to current (⌃ |).
-
-
-
Now we need to modify the posts fixtures file. Go there (⌘ T, type pyml, choose posts.yml). Replace the line published: true by published_at: 2008-1-1.
-
-
-
Modify the posts functional test, first go there (⇧ ⌥ ⌘ ↓, choose “Go to Functional Test”). Replace :published => '1' by :published_at => Date.new(2008, 1, 1).
-
-
-
Modify the post model, first go there (⇧ ⌥ ⌘ ↓, choose “Go to Model”). Have the code look like:
-
-
-
class Post < ActiveRecord::Base
- has_many :comments
-
- def published
- !self.published_at.nil?
- end
-
- def published=(publish)
- if publish
- self.published_at = DateTime.now if self.published_at.nil?
- else
- self.published_at = nil
- end
- end
-end
-
-
-
Modify the blog_controller.rb file. Replace Post.find_all_by_published(true) by Post.find(:all, :conditions => "published_at IS NOT NULL").
-
-
-
Finally, check your tests again (⌃ \). All tests should pass.
-
-
-
TODO
-
-
-
- - Model snippets (validates_…)
- - link_to(model) (ltm)
- - RJS demo
-
-
- Dr Nic Williams, 28th February 2008
- Theme extended from Paul Battley
-
-
-
-
-
-
-
-
-
diff --git a/bundles/ruby-on-rails.tmbundle/website/demo.txt b/bundles/ruby-on-rails.tmbundle/website/demo.txt
deleted file mode 100644
index 37d3c383a..000000000
--- a/bundles/ruby-on-rails.tmbundle/website/demo.txt
+++ /dev/null
@@ -1,738 +0,0 @@
-h1. Step-by-step demonstration
-
-In this demo we'll create a blog; because that's what blogs are for: being
-demonstrations of web frameworks.
-
-The demonstration uses new features of Rails 2.0 and the snippets in this bundle.
-
-h2. A New App
-
-
rails blog
-cd blog
-mate .
-
-h2. Add some models
-
-
ruby script/generate model Post subject:string body:text
-
-This creates a 001_create_posts migration with a create_table:
-
-
create_table :posts do |t|
- t.string :subject
- t.text :body
-
- t.timestamps
-end
-
-h2. Sexy Migration support
-
-If you put the cursor on the line after
t.text :body, type
t. and press TAB. Select "Create boolean column" (by pressing 0), and type "published" into the template field. If nothing happened when you pressed TAB, check that when you opened the migrations file you've selected the bundle "Ruby on Rails".
-
-Note that another
t. was created on the next line! Press TAB and the cursor will be placed after it. You can now press TAB again to create another column, or delete this line.
-
-Here, delete the extraneous
t. line (CONTROL SHIFT K). And save the file (COMMAND S).
-
-Run the migrations, either from the prompt:
-
- rake db:migrate
-
-or directly from the editor with CONTROL | (Ctrl-Pipeline), and choosing option "Migrate to Current".
-
-
-h2. Post fixtures
-
-Update the
test/fixtures/posts.yml file as:
-
-
published:
- subject: Some article
- body: A test article
- published: true
-
-nonpublished:
- body: Still writing this one
-
-Note, in Rails 2.0 fixtures no longer have explicit ids. Later on we'll look at snippets for using Foxy Fixtures with auto-completion for associations.
-
-h2. Public blog controller
-
-Create a controller for our blog, either via the command prompt:
-
- ruby script/generate controller blog
-
-or directly from the editor with CONTROL |, and choosing option "Call Generate Script", choose "Controller", give it the name "blog", and empty the list of actions.
-
-Now open
blog_controller_test.rb. To find this file quickly press COMMAND T, type
bct, and select the file.
-
-Note how much cleaner functional tests are now via
ActionController::TestCase.
-
-Let's do some TDD. First, delete the
test_truth dummy method.
-
-To create a test to show a list of blog articles:
-
- deftg
-
-and TAB gives:
-
-
def test_should_get_action
- @model = models(:fixture_name)
- get :action, :id => @model.to_param
- assert_response :success
-
-end
-
-Type
index to replace
action. Press TAB, and then BACKSPACE to remove the first line, then press TAB three times and then BACKSPACE to remove the
:id => @model.to_param part. The press TAB again to go to the end of the method. Now we have:
-
-
def test_should_get_index
- get :index
- assert_response :success
-
-end
-
-Now type
asg, press TAB, and type
posts, and press TAB again. This creates an instance variable lookup within an assertion:
-
-
assert(posts = assigns(:posts), "Cannot find @posts")
-
-Now, let's assert the HTML format.
-
-Type
ass and press TAB. Type
div#posts, press TAB and BACKSPACE, then TAB twice to place the cursor within the
assert_select block:
-
-
assert_select 'div#posts' do
-
-end
-
-Now we'll check that the
@posts objects are represented in the
div#posts element.
-
-With the cursor inside the
assert_select:
-
-Type
ass, press TAB, type
div.post, press TAB twice, and type
count (to replace the
text). Now press TAB again, and type
posts.size. Press TAB a final time (it will highlight the
do...end block), and press BACKSPACE.
-
-Our test method is now finished:
-
-
def test_should_get_index
- get :index
- assert_response :success
- assert(posts = assigns(:posts), "Cannot find @posts")
- assert_select 'div#posts' do
- assert_select 'div.post', :count => posts.size
- end
-end
-
-NOTE: there is also a
deftp snippet for functional tests to create a POST test stub.
-To memorize:
deftg stands for
define test get and
deftp stands for
define test post
-
-h2. Controller actions
-
-To navigate to
blog_controller.rb there are three options:
-
-* press SHIFT OPTION COMMAND DOWN, and select "Controller" from the drop-down list
-* press OPTION COMMAND DOWN and you'll go directly to the controller (toggles between the two files)
-* press COMMAND T, type
bc, choose the file, press RETURN.
-
-Add the
index action method:
-
-
def index
- @posts = Post.find_all_by_published(true)
-end
-
-h2. Action views
-
-To create/navigate to the view, press SHIFT OPTION COMMAND DOWN and select "View" (like above). Or press OPTION COMMAND DOWN to toggle between a controller method and it's view.
-
-As there are no
app/views/blog/index* files, it will prompt you to create a blank view file. By default it guesses
index.html.erb (because the method was named
index), but of course you can change that in the dialog box.
-
-If instead you got the message "blog_controller.rb does not have a view", note that you first need to save the controller file before hitting SHIFT OPTION COMMAND DOWN or OPTION COMMAND DOWN. Also note that the cursor must be within the scope of a method for SHIFT OPTION COMMAND DOWN or OPTION COMMAND DOWN to work.
-
-Press enter to accept
index.html.erb. You are taken to the new file.
-
-Let's create HTML to match the earlier tests.
-
-Type
div and press TAB twice, then type
posts and press TAB:
-
-
-
-
-
-Inside the
div element, type
for and press TAB. This expands into a large ERb-enabled for-loop. Type
@posts, press TAB, type
post and press TAB. The cursor is now inside the for-loop.
-
-Inside the for-loop, type:
div and press TAB. Press BACKSPACE, and type
class='post' and press TAB to enter the
div element.
-
-Create a
<%= %> element (CONTROL >). If you press CONTROL > again, it toggles to
<% %>, and then again and it becomes
<%- -%>, and again and it becomes
<%# %> (a Ruby comment). Pressing CONTROL > again starts at
<%= %> again.
-
-Enter
post.body within the ERb template field.
-
-Actually, we'll need to show the subject too, so above the
<%= post.body %> line (press UP followed by COMMAND RETURN)
-type 'h3', and press CONTROL < (LessThan), then CONTROL > (GreatherThan), and
post.subject.
-
-The resulting line is:
<%= post.subject %>
-
-Move the cursor down between
<% else %> and
<% end %>.
-
-Create a simple element
(CONTROL SHIFT W or CONTROL <). You can change the element type here. Just press TAB to go inside the element. Type
There are no posts available to read. All y'all come back soon, yer hear. because its funny.
-
-Our
index.html.erb template is now:
-
-
- <% if !@posts.blank? %>
- <% for post in @posts %>
-
-
<%= post.subject %>
- <%= post.body %>
-
- <% end %>
- <% else %>
-
There are no posts available to read. All y'all come back soon, yer hear.
- <% end %>
-
-
-
-If we run our functional tests they now pass: run either from the command prompt with
rake test:functionals or directly from the editor by pressing CONTROL \ and press 2 for "Test Functionals"
-
-As yet, we have no way for users to leave comments.
-
-h2. Foxy Fixtures
-
-Create a comment model:
-
- ruby script/generate model Comment body:text name:string post:references
-
-Note: here
post:references is effectively the same as
post_id:integer. Within the generated migration it creates
t.reference :post. There is also a
t. and
tcr snippet for references, as for other standard datatypes, which helps setup polymorphic associations.
-
-The generated
create_table in
002_create_comments.rb is:
-
-
create_table :comments do |t|
- t.text :body
- t.string :name
- t.references :post
-
- t.timestamps
-end
-
-Run
rake db:migrate, or directly from the editor with CONTROL | and choose option "Migrate to Current".
-
-Now create some comment fixtures so we can look at Foxy Fixtures. Open
text/fixtures/comments.yml (COMMAND T, type
cy, press RETURN).
-
-By default, the generated
comments.yml starts like:
-
-
one:
- body: MyText
- name: MyString
- post:
-
-two:
- body: MyText
- name: MyString
- post:
-
-The
post fields replace the rails1.2
post_id fields. Now, we can specify the
post.yml labels for a post. From above we have
published and
unpublished. It can be hard to remember what fixtures we have, so there is a key-combo helper.
-
-Put the cursor after
post: and press OPTION ESCAPE. A drop-down box appears with the names of the
posts.yml fixtures. Select
published and press RETURN. Repeat for the 2nd fixture. This gives us:
-
-
one:
- body: MyText
- name: MyString
- post: published
-
-two:
- body: MyText
- name: MyString
- post: published
-
-h2. Associations
-
-To enable the Foxy Fixtures, we need to add associations to the model classes.
-
-You can now quickly go from a fixtures file (we're in comments.yml) to the model file (SHIFT OPTION COMMAND DOWN).
-
-Within
comment.rb model, create a new line within the class, and type
bt and press TAB. Type
post. This creates a snippet:
-
-
belongs_to :post, :class_name => "Post", :foreign_key => "post_id"
-
-The class name and foreign key are now generated from the association name. You can change them by tabbing across. But, we only need the default, so we can delete these options.
-
-Press TAB and BACKSPACE to remove the
:class_name and
:foreign_key options. The
Comment class is now:
-
-
class Comment < ActiveRecord::Base
- belongs_to :post
-end
-
-Now go to the
Post class. Press COMMAND T and type
post and select the model file, and press RETURN.
-
-Create a new line within the
Post class (COMMAND RETURN). Type
hm and press TAB to generate a
has_many association. Type
comment, and the resulting snippet is:
-
-
has_many :comments, :class_name => "comment", :foreign_key => "class_name_id"
-
-We don't need the options. So press TAB once and then BACKSPACE.
-
-
class Post < ActiveRecord::Base
- has_many :comments
-end
-
-Note: there is also a
has_many :through snippet. Type
hmt and TAB to activate it.
-
-Finally, we can run our tests since adding the
Comment model + fixtures (CONTROL \).
-
-
rake test
-
-h2. Routes
-
-Open the routes file (COMMAND T, type
routes and press RETURN).
-
-Change the routes file to:
-
-
ActionController::Routing::Routes.draw do |map|
- map.resources :posts
- map.connect ':controller/:action/:id'
- map.connect ':controller/:action/:id.:format'
-end
-
-h2. Creating Posts
-
-From the
Post model class (
post.rb) you can now quickly navigate to a controller
-of the same name. It supports either singular or plural controller names, but
-will default to the plural name, which is the REST/resources preferred name.
-
-To create a
PostsController, use the 'Go To' hot key (as above) SHIFT OPTION COMMAND DOWN and select 'Controller'. As there is no
post_controller.rb nor
posts_controller.rb it will create a
posts_controller.rb controller file; which is what we want here.
-
-Note; at this stage you could use the Rails 2.0
scaffold generator to create the
posts_controller.rb (and tests and routes).
-
-In the blank file, we need to create a controller class.
-
-Type
cla and TAB, and select "Create controller class". Type
Posts and TAB,
-
post and TAB, and finally,
Post and TAB. This leaves the cursor in the middle
-of the generated class:
-
-
class PostsController < ApplicationController
- before_filter :find_post
-
-
-
- private
- def find_post
- @post = Post.find(params[:id]) if params[:id]
- end
-end
-
-h2. TDD for Posts controller
-
-Currently there is not a functional test for our
posts_controller.rb. To create it, use the 'Go To' hot key (SHIFT OPTION COMMAND DOWN) and select 'Functional Test'. This will create a blank file.
-
-Type
cla and TAB, and select "Create functional test class".
-Type
Posts and TAB. (The functional test class name
-should match the controller class, with
Test suffixed to it).
-
-The functional test class snippet gives you a
deft stub. If you
-press TAB now, it creates a generic test method snippet:
-
-
def test_case_name
-
-end
-
-Instead, we will use the
deftg (GET request) and
deftp (POST request) snippets.
-
-Create a test for the
index,
new and
edit actions. For
index and
new, we can delete the
@model = models(:fixture_name),
-etc parts.
-
-To test for the
create action, type
deftp and TAB. Type
create and TAB, type
post and TAB, type BACKSPACE and TAB, and again BACKSPACE and TAB. Now enter in a hash of the values to pass in for the test, say
:subject => 'Test', :body => 'Some body', :published => '1'. The result should look like:
-
-
def test_should_post_create
- post :create, :post => { :subject => 'Test', :body => 'Some body', :published => '1' }
- assert_response :redirect
-
-end
-
-On the line after the
assert_response expression, we'll test
-for where we want to be redirected to.
-
-If you type
art you create an old-style
assert_redirected_to :action => "index"
-snippet.
-
-In addition there are now various
assert_redirected_to snippets that
-use resourceful routes:
-
-* artp -
assert_redirected_to model_path(@model)
-* artpp -
assert_redirected_to models_path
-* artnp -
assert_redirected_to parent_child_path(@parent, @child)
-* artnpp -
assert_redirected_to parent_child_path(@parent)
-
-As we'll see later, this naming scheme is used for other snippets that
-use resourceful routes, like
link_to and
redirect_to.
-
-Type
artpp and TAB, and type
post, to assert that the
create
-action must redirect to the index page.
-
-The final
test_should_post_create method is:
-
-
def test_should_post_create
- post :create, :post => { :subject => 'Test', :body => 'Some body', :published => '1' }
- assert_response :redirect
- assert_redirected_to posts_path
-end
-
-Running our tests (
rake test:functionals or CONTROL \) shows all these new tests failing.
-
-h2. Views
-
-Go back to the
posts_controller.rb file (OPTION COMMAND DOWN).
-
-Now add three actions -
index,
new and
edit. New methods can be created
-with the
def snippet:
-
-
class PostsController < ApplicationController
- before_filter :find_post
-
- def index
- @posts = Post.find(:all)
- end
-
- def new
- @post = Post.new
- end
-
- def edit
- end
-
- private
- def find_post
- @post = Post.find(params[:id]) if params[:id]
- end
-end
-
-Note: the
index method could be created by typing
def, TAB,
index, TAB,
@posts = Post.fina, TAB, BACKSPACE.
-
-Now we need templates for the
index,
new and
edit actions.
-
-Place the cursor inside the
index method,
-and use the 'Go To' hot key (SHIFT OPTION COMMAND DOWN)
-and select 'View'. A dialog box will pop up asking for the name of the new
-template (as there are no
app/views/posts/index* files). By default, the
-suffix is now
.html.erb rather than the old
.rhtml. Press RETURN,
-to accept
index.html.erb as your template name.
-
-Let's just create a simple table showing the Posts.
-
-Type
table and CONTROL < to generate
, and
-press RETURN to put the tags on separate lines.
-
-Do the same to create a
element.
-
-Inside the
we want to iterate over the
@posts,
-one per
|
row.
-
-Press CONTROL >, three times, to create a
<%- -%> tag. Inside it
-type
@posts.each do |post|.
-
-On the next line (COMMAND RETURN), type
end and TAB, to create
<% end -%>.
-We now have a Ruby block within this ERb template.
-
-Inside the block, create a
|
element, and within it
-create a
| element. We'll skip over anything fancy
-here, and just put the post's subject here.
-
-Type
post.subject and select it. Now press CONTROL > to wrap
-the selected text inside
<%= post.subject %>.
-
-The resulting
index.html.erb is:
-
-
-
- <%- @posts.each do |post| -%>
-
- | <%= post.subject %> |
-
- <% end -%>
-
-
-
-h2. Forms
-
-Place the cursor inside the
new method,
-and use the 'Go To' hot key (SHIFT OPTION COMMAND DOWN)
-and select 'View'. Press RETURN to accept
new.html.erb.
-
-Inside the blank
new.html.erb file, type
ffe and press TAB, and type
post
-and press TAB twice:
-
-
<%= error_messages_for :post %>
-<% form_for @post do |f| -%>
-
-<% end -%>
-
-
form_for is the Rails 2.0 preferred helper for managing forms, and
-there are now snippets for common form_for helpers. There are
ff and
ffe
-snippets; the former does not have the error messages section.
-
-To create a label and text field for the
subject attribute:
-
-Create a
block (Press CONTROL <, then TAB, then RETURN).
-Type
f. and TAB, and select "Label". Type
subject, press TAB and press BACKSPACE.
-Create a
(CONTROL RETURN).
-Type
f. and TAB, and select "Text Field". Type
subject.
-
-This gives us:
-
-
<%= error_messages_for :post %>
-<% form_for @post do |f| -%>
-
- <%= f.label :subject %>
- <%= f.text_field :subject %>
-
-<% end -%>
-
-Now repeat for
body and
published fields.
-
-Note, for
published, you might change the label to
Published yet? by tabbing
-into the default string file.
-
-Finally, add a "Submit" button using the
f. snippet tab completion.
-
-Start
script/server from the prompt and you can now view this form at [http://localhost:3000/posts/new](http://localhost:3000/posts/new)
-
-The final form is:
-
-
<%= error_messages_for :post %>
-<% form_for @post do |f| -%>
-
- <%= f.label :subject %>
- <%= f.text_field :subject %>
-
-
- <%= f.label :body %>
- <%= f.text_area :body %>
-
-
- <%= f.label :published, "Published yet?" %>
- <%= f.check_box :published %>
-
-
- <%= f.submit "Submit" %>
-
-<% end -%>
-
-Note: if you got
when hitting CONTROL RETURN instead of
then you might want to go to the preferences of TextMate (COMMAND ,), choose tab "Advanced", choose "Shell Variables", click the + sign to add a new shell variable, and give it the name
TM_XHTML and a value of
/
-
-h2. Partials
-
-The form we just created is exactly the same as the form required for the
edit.html.erb template.
-
-Instead of copy+pasting it into the
edit.html.erb file, we'll create a partial
-template.
-
-Select the entire form (COMMAND A), and press CONTROL SHIFT H and a dialog box appears.
-Type in
form and press RETURN.
-
-You'll notice a new file
_form.html.erb has appeared which contains the code you had selected,
-while the code in the file
new.html.erb has been replaced by:
-
- <%= render :partial => 'form' %>
-
-Now copy and paste this into the
edit.html.erb file. To create this file,
-return to the controller (from the
new.html.erb file, press OPTION COMMAND DOWN), go to the
edit action,
-and use OPTION COMMAND DOWN again to create the
edit.html.erb template file.
-
-h2. Link helpers
-
-At the bottom of the
new.html.erb we want a link back to the list of all posts
-(within the posts controller, not the public blog controller). This
-will be the
index action, and will be accessible via the resources route
-
posts_path.
-
-There are several
link_to snippets that support the resources routes:
-
-* lip -
<%= link_to "link text...", model_path(@model) %>
-* lipp -
<%= link_to "link text...", models_path %>
-* linp -
<%= link_to "link text...", parent_child_path(@parent, @child) %>
-* linpp -
<%= link_to "link text...", parent_child_path(@parent) %>
-* lim -
<%= link_to model.name, model_path(model) %>
-
-The tab stop points are in useful places.
-
-So, to create our link to the posts page, type
lipp and TAB, type
-
Show all posts, press TAB twice and type
post.
-
-h2. Controllers:
respond_to and
redirect_to
-
-Now we'll add a
create action to the
posts_controller.rb. Let's go there (OPTION COMMAND DOWN).
-
-Below the
edit method type
def and TAB, and type
-
create and TAB. Now fill out the
create action like:
-
-
def create
- @post = Post.new(params[:post])
- if @post.save
-
- else
-
- end
-end
-
-Place the cursor in the
true section of the
if statement.
-Type
repp and TAB to create a
redirect_to expression. Press TAB
-again and replace the selected text with
post.
-
-Like the various
link_to snippets, there are matching
redirect_to
-snippets.
-
-* rep -
redirect_to(model_path(@model))
-* repp -
redirect_to(models_path)
-* renp -
redirect_to(parent_child_path(@parent, @child))
-* renpp -
redirect_to(parent_child_path(@parent))
-
-There are tab stops in useful places.
-
-In the
false section of the
if expression, we'll demonstrate the
-
respond_to block. There are two ways to generate a
respond_to block.
-
-Type
rest and TAB, and you get a standard empty block you can work with:
-
-
respond_to do |wants|
- wants.html { }
-end
-
-Press TAB twice to get inside the
wants.html block, type
ra, press TAB, then type
new. The final block is:
-
-
respond_to do |wants|
- wants.html { render :action => "new" }
-end
-
-Alternately, there is the "upgrade" hot key (SHIFT COMMAND H), where you can convert some
-existing selected code, into a
respond_to block.
-
-Select the whole line containing the
redirect_to expression from the
-
true section of the
if statement (SHIFT COMMAND L).
-
-Press SHIFT COMMAND H and the line is replaced with:
-
-
respond_to do |wants|
- wants.html do
- redirect_to(posts_path)
- end
- wants.js { }
-end
-
-The
js is the first tab stop. The point of this hot key is to instantly
-refactor your existing html respond code, and support a second response
-format.
-
-For now remove the line with
wants.js (CONTROL SHIFT K).
-
-The completed
create action is:
-
-
def create
- @post = Post.new(params[:post])
- if @post.save
- respond_to do |wants|
- wants.html do
- redirect_to(posts_path)
- end
- end
- else
- respond_to do |wants|
- wants.html { render :action => "new" }
- end
- end
-end
-
-Yes you'd probably only have one
respond_to block, but this is a
-demo so I am taking the scenic route.
-
-h2. Our application so far
-
-In the browser, we can create posts via [http://localhost:3000/posts/new](http://localhost:3000/posts/new)
-and then view them as a blog visitor at [http://localhost:3000/blog](http://localhost:3000/blog).
-
-h2. Some more migrations
-
-We're looking for the following additions:
-
-* rename the column
name of table
comments to
author
-* add a new column
author_url to table
comments
-* add an index to the column
post_id of the
comments table
-
-Let's try to do this all in one migrations file. Start Quick Migration (CONTROL SHIFT M). Let's name it
ModifyComments. A new migrations file
003_modify_comments.rb is created and opened, and the cursor is placed behind the
mtab trigger. For now delete
mtab and instead enter
mcol and press TAB. Choose
Rename / Rename Column (3). Type
comments TAB
name TAB
author TAB RETURN.
-
-Again type
mcol and TAB. This time choose
Add / Remove Column (1). Type
comments TAB
author_url, then TAB twice, and press RETURN.
-
-Now type
mind and TAB. Choose
Add / Remove Index (1). Type
comments TAB
post_id.
-
-The end result looks like this:
-
-
class ModifyComments < ActiveRecord::Migration
- def self.up
- rename_column :comments, :name, :author
- add_column :comments, :author_url, :string
- add_index :comments, :post_id
- end
-
- def self.down
- remove_index :comments, :post_id
- remove_column :comments, :author_url
- rename_column :comments, :author, :name
- end
-end
-
-Notice how the
down method calls are in reversed order of the
up method calls.
-
-Save the file (COMMAND S) and migrate to current (CONTROL |).
-
-Be sure to modify the comments fixture file. Go there (COMMAND T, press
cy, choose
comments.yml). Rename
name to
author and add a row for
author_url for each comment. Check your tests again (CONTROL \, choose option 1). All tests should pass.
-
-Futhermore we'd like to know when a post was published. To do this we'll want the following modifications:
-
-* keep track of the datetime when a post was published.
-* remove the column published from the posts table because it can be determined if a post is published by looking at whether or not a value is present for the published date.
-
-Start Quick Migration (CONTROL SHIFT M). Let's name it
AddPublishedAtForPosts. A new migrations file
004_add_published_at_for_posts.rb is created and opened, and the cursor is placed behind the
mtab trigger. Again delete
mtab and instead enter
mcol and press TAB. Choose
Add / Remove Column (1). Type
posts TAB
published_at TAB
datetime TAB and RETURN.
-
-Again type
mcol and TAB. Choose
Remove / Add Column (5). Type
posts TAB
published and press TAB twice.
-
-The end result looks like this:
-
-
class AddPublishedAtForPosts < ActiveRecord::Migration
- def self.up
- add_column :posts, :published_at, :datetime
- remove_column :posts, :published
- end
-
- def self.down
- add_column :posts, :published, :boolean
- remove_column :posts, :published_at
- end
-end
-
-Notice how the
Remove / Add Column command automagically determined in the
down method the column type of column
published to be a
boolean. It determines this by looking at the current state of your
db/schema.rb file.
-
-Save the file (COMMAND S) and migrate to current (CONTROL |).
-
-Now we need to modify the posts fixtures file. Go there (COMMAND T, type
pyml, choose
posts.yml). Replace the line
published: true by
published_at: 2008-1-1.
-
-Modify the posts functional test, first go there (SHIFT OPTION COMMAND DOWN, choose "Go to Functional Test"). Replace
:published => '1' by
:published_at => Date.new(2008, 1, 1).
-
-Modify the post model, first go there (SHIFT OPTION COMMAND DOWN, choose "Go to Model"). Have the code look like:
-
-
class Post < ActiveRecord::Base
- has_many :comments
-
- def published
- !self.published_at.nil?
- end
-
- def published=(publish)
- if publish
- self.published_at = DateTime.now if self.published_at.nil?
- else
- self.published_at = nil
- end
- end
-end
-
-Modify the
blog_controller.rb file. Replace
Post.find_all_by_published(true) by
Post.find(:all, :conditions => "published_at IS NOT NULL").
-
-Finally, check your tests again (CONTROL \). All tests should pass.
-
-
-h1. TODO
-
-* Model snippets (validates_...)
-* link_to(model) (ltm)
-* RJS demo
-
diff --git a/bundles/ruby-on-rails.tmbundle/website/images/logo_bundle.png b/bundles/ruby-on-rails.tmbundle/website/images/logo_bundle.png
deleted file mode 100644
index 63babefad..000000000
Binary files a/bundles/ruby-on-rails.tmbundle/website/images/logo_bundle.png and /dev/null differ
diff --git a/bundles/ruby-on-rails.tmbundle/website/index.html b/bundles/ruby-on-rails.tmbundle/website/index.html
deleted file mode 100644
index 31c3982c1..000000000
--- a/bundles/ruby-on-rails.tmbundle/website/index.html
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-
-
-
- Ruby on Rails.tmbundle
-
-
-
-
-
-
-
-
-
Ruby on Rails.tmbundle
-
-
Get Version
-
2.0.0
-

-
-
What
-
-
-
Using Ruby on Rails? Using TextMate? Here is Rails TextMate bundle, now ready for Rails 2.0.
-
-
-
Download
-
-
-

-
-
-
Ruby on Rails.tmbundle
-
-
-
Forum
-
-
-
http://groups.google.com/group/rubyonrails-textmate
-
-
-
How to submit patches
-
-
-
Read the 8 steps for fixing other people’s code and for section 8b: Submit patch to Google Groups, use the Google Group above.
-
-
-
The source project is a Git repository. See Dr Nic’s master branch for clone/checkout details.
-
-
-
License
-
-
-
This code is free to use under the terms of the MIT license.
-
-
-
Contact
-
-
-
Comments are welcome. Send an email to Dr Nic Williams via the forum
-
- Dr Nic Williams, 27th February 2008
- Theme extended from Paul Battley
-
-
-
-
-
-
-
-
-
diff --git a/bundles/ruby-on-rails.tmbundle/website/index.txt b/bundles/ruby-on-rails.tmbundle/website/index.txt
deleted file mode 100644
index 3398c24e8..000000000
--- a/bundles/ruby-on-rails.tmbundle/website/index.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-h1. Ruby on Rails.tmbundle
-
-h2. What
-
-Using "Ruby on Rails":http://rubyonrails.org? Using "TextMate":http://macromates.com? Here is Rails TextMate bundle, now ready for Rails 2.0.
-
-h2. Download
-
-

-
-
Ruby on Rails.tmbundle
-
-
-h2. Forum
-
-"http://groups.google.com/group/rubyonrails-textmate":http://groups.google.com/group/rubyonrails-textmate
-
-h2. How to submit patches
-
-Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/ and for section "8b: Submit patch to Google Groups":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups, use the Google Group above.
-
-The source project is a "Git":http://git.or.cz/ repository. See Dr Nic's "master branch":http://github.com/drnic/ruby-on-rails-tmbundle/tree/master for clone/checkout details.
-
-h2. License
-
-This code is free to use under the terms of the MIT license.
-
-h2. Contact
-
-Comments are welcome. Send an email to "Dr Nic Williams":mailto:drnicwilliams@gmail.com via the "forum":http://groups.google.com/group/rubyonrails-textmate
-
diff --git a/bundles/ruby-on-rails.tmbundle/website/javascripts/rounded_corners_lite.inc.js b/bundles/ruby-on-rails.tmbundle/website/javascripts/rounded_corners_lite.inc.js
deleted file mode 100644
index afc3ea327..000000000
--- a/bundles/ruby-on-rails.tmbundle/website/javascripts/rounded_corners_lite.inc.js
+++ /dev/null
@@ -1,285 +0,0 @@
-
- /****************************************************************
- * *
- * curvyCorners *
- * ------------ *
- * *
- * This script generates rounded corners for your divs. *
- * *
- * Version 1.2.9 *
- * Copyright (c) 2006 Cameron Cooke *
- * By: Cameron Cooke and Tim Hutchison. *
- * *
- * *
- * Website: http://www.curvycorners.net *
- * Email: info@totalinfinity.com *
- * Forum: http://www.curvycorners.net/forum/ *
- * *
- * *
- * This library is free software; you can redistribute *
- * it and/or modify it under the terms of the GNU *
- * Lesser General Public License as published by the *
- * Free Software Foundation; either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * This library is distributed in the hope that it will *
- * be useful, but WITHOUT ANY WARRANTY; without even the *
- * implied warranty of MERCHANTABILITY or FITNESS FOR A *
- * PARTICULAR PURPOSE. See the GNU Lesser General Public *
- * License for more details. *
- * *
- * You should have received a copy of the GNU Lesser *
- * General Public License along with this library; *
- * Inc., 59 Temple Place, Suite 330, Boston, *
- * MA 02111-1307 USA *
- * *
- ****************************************************************/
-
-var isIE = navigator.userAgent.toLowerCase().indexOf("msie") > -1; var isMoz = document.implementation && document.implementation.createDocument; var isSafari = ((navigator.userAgent.toLowerCase().indexOf('safari')!=-1)&&(navigator.userAgent.toLowerCase().indexOf('mac')!=-1))?true:false; function curvyCorners()
-{ if(typeof(arguments[0]) != "object") throw newCurvyError("First parameter of curvyCorners() must be an object."); if(typeof(arguments[1]) != "object" && typeof(arguments[1]) != "string") throw newCurvyError("Second parameter of curvyCorners() must be an object or a class name."); if(typeof(arguments[1]) == "string")
-{ var startIndex = 0; var boxCol = getElementsByClass(arguments[1]);}
-else
-{ var startIndex = 1; var boxCol = arguments;}
-var curvyCornersCol = new Array(); if(arguments[0].validTags)
-var validElements = arguments[0].validTags; else
-var validElements = ["div"]; for(var i = startIndex, j = boxCol.length; i < j; i++)
-{ var currentTag = boxCol[i].tagName.toLowerCase(); if(inArray(validElements, currentTag) !== false)
-{ curvyCornersCol[curvyCornersCol.length] = new curvyObject(arguments[0], boxCol[i]);}
-}
-this.objects = curvyCornersCol; this.applyCornersToAll = function()
-{ for(var x = 0, k = this.objects.length; x < k; x++)
-{ this.objects[x].applyCorners();}
-}
-}
-function curvyObject()
-{ this.box = arguments[1]; this.settings = arguments[0]; this.topContainer = null; this.bottomContainer = null; this.masterCorners = new Array(); this.contentDIV = null; var boxHeight = get_style(this.box, "height", "height"); var boxWidth = get_style(this.box, "width", "width"); var borderWidth = get_style(this.box, "borderTopWidth", "border-top-width"); var borderColour = get_style(this.box, "borderTopColor", "border-top-color"); var boxColour = get_style(this.box, "backgroundColor", "background-color"); var backgroundImage = get_style(this.box, "backgroundImage", "background-image"); var boxPosition = get_style(this.box, "position", "position"); var boxPadding = get_style(this.box, "paddingTop", "padding-top"); this.boxHeight = parseInt(((boxHeight != "" && boxHeight != "auto" && boxHeight.indexOf("%") == -1)? boxHeight.substring(0, boxHeight.indexOf("px")) : this.box.scrollHeight)); this.boxWidth = parseInt(((boxWidth != "" && boxWidth != "auto" && boxWidth.indexOf("%") == -1)? boxWidth.substring(0, boxWidth.indexOf("px")) : this.box.scrollWidth)); this.borderWidth = parseInt(((borderWidth != "" && borderWidth.indexOf("px") !== -1)? borderWidth.slice(0, borderWidth.indexOf("px")) : 0)); this.boxColour = format_colour(boxColour); this.boxPadding = parseInt(((boxPadding != "" && boxPadding.indexOf("px") !== -1)? boxPadding.slice(0, boxPadding.indexOf("px")) : 0)); this.borderColour = format_colour(borderColour); this.borderString = this.borderWidth + "px" + " solid " + this.borderColour; this.backgroundImage = ((backgroundImage != "none")? backgroundImage : ""); this.boxContent = this.box.innerHTML; if(boxPosition != "absolute") this.box.style.position = "relative"; this.box.style.padding = "0px"; if(isIE && boxWidth == "auto" && boxHeight == "auto") this.box.style.width = "100%"; if(this.settings.autoPad == true && this.boxPadding > 0)
-this.box.innerHTML = ""; this.applyCorners = function()
-{ for(var t = 0; t < 2; t++)
-{ switch(t)
-{ case 0:
-if(this.settings.tl || this.settings.tr)
-{ var newMainContainer = document.createElement("DIV"); newMainContainer.style.width = "100%"; newMainContainer.style.fontSize = "1px"; newMainContainer.style.overflow = "hidden"; newMainContainer.style.position = "absolute"; newMainContainer.style.paddingLeft = this.borderWidth + "px"; newMainContainer.style.paddingRight = this.borderWidth + "px"; var topMaxRadius = Math.max(this.settings.tl ? this.settings.tl.radius : 0, this.settings.tr ? this.settings.tr.radius : 0); newMainContainer.style.height = topMaxRadius + "px"; newMainContainer.style.top = 0 - topMaxRadius + "px"; newMainContainer.style.left = 0 - this.borderWidth + "px"; this.topContainer = this.box.appendChild(newMainContainer);}
-break; case 1:
-if(this.settings.bl || this.settings.br)
-{ var newMainContainer = document.createElement("DIV"); newMainContainer.style.width = "100%"; newMainContainer.style.fontSize = "1px"; newMainContainer.style.overflow = "hidden"; newMainContainer.style.position = "absolute"; newMainContainer.style.paddingLeft = this.borderWidth + "px"; newMainContainer.style.paddingRight = this.borderWidth + "px"; var botMaxRadius = Math.max(this.settings.bl ? this.settings.bl.radius : 0, this.settings.br ? this.settings.br.radius : 0); newMainContainer.style.height = botMaxRadius + "px"; newMainContainer.style.bottom = 0 - botMaxRadius + "px"; newMainContainer.style.left = 0 - this.borderWidth + "px"; this.bottomContainer = this.box.appendChild(newMainContainer);}
-break;}
-}
-if(this.topContainer) this.box.style.borderTopWidth = "0px"; if(this.bottomContainer) this.box.style.borderBottomWidth = "0px"; var corners = ["tr", "tl", "br", "bl"]; for(var i in corners)
-{ if(i > -1 < 4)
-{ var cc = corners[i]; if(!this.settings[cc])
-{ if(((cc == "tr" || cc == "tl") && this.topContainer != null) || ((cc == "br" || cc == "bl") && this.bottomContainer != null))
-{ var newCorner = document.createElement("DIV"); newCorner.style.position = "relative"; newCorner.style.fontSize = "1px"; newCorner.style.overflow = "hidden"; if(this.backgroundImage == "")
-newCorner.style.backgroundColor = this.boxColour; else
-newCorner.style.backgroundImage = this.backgroundImage; switch(cc)
-{ case "tl":
-newCorner.style.height = topMaxRadius - this.borderWidth + "px"; newCorner.style.marginRight = this.settings.tr.radius - (this.borderWidth*2) + "px"; newCorner.style.borderLeft = this.borderString; newCorner.style.borderTop = this.borderString; newCorner.style.left = -this.borderWidth + "px"; break; case "tr":
-newCorner.style.height = topMaxRadius - this.borderWidth + "px"; newCorner.style.marginLeft = this.settings.tl.radius - (this.borderWidth*2) + "px"; newCorner.style.borderRight = this.borderString; newCorner.style.borderTop = this.borderString; newCorner.style.backgroundPosition = "-" + (topMaxRadius + this.borderWidth) + "px 0px"; newCorner.style.left = this.borderWidth + "px"; break; case "bl":
-newCorner.style.height = botMaxRadius - this.borderWidth + "px"; newCorner.style.marginRight = this.settings.br.radius - (this.borderWidth*2) + "px"; newCorner.style.borderLeft = this.borderString; newCorner.style.borderBottom = this.borderString; newCorner.style.left = -this.borderWidth + "px"; newCorner.style.backgroundPosition = "-" + (this.borderWidth) + "px -" + (this.boxHeight + (botMaxRadius + this.borderWidth)) + "px"; break; case "br":
-newCorner.style.height = botMaxRadius - this.borderWidth + "px"; newCorner.style.marginLeft = this.settings.bl.radius - (this.borderWidth*2) + "px"; newCorner.style.borderRight = this.borderString; newCorner.style.borderBottom = this.borderString; newCorner.style.left = this.borderWidth + "px"
-newCorner.style.backgroundPosition = "-" + (botMaxRadius + this.borderWidth) + "px -" + (this.boxHeight + (botMaxRadius + this.borderWidth)) + "px"; break;}
-}
-}
-else
-{ if(this.masterCorners[this.settings[cc].radius])
-{ var newCorner = this.masterCorners[this.settings[cc].radius].cloneNode(true);}
-else
-{ var newCorner = document.createElement("DIV"); newCorner.style.height = this.settings[cc].radius + "px"; newCorner.style.width = this.settings[cc].radius + "px"; newCorner.style.position = "absolute"; newCorner.style.fontSize = "1px"; newCorner.style.overflow = "hidden"; var borderRadius = parseInt(this.settings[cc].radius - this.borderWidth); for(var intx = 0, j = this.settings[cc].radius; intx < j; intx++)
-{ if((intx +1) >= borderRadius)
-var y1 = -1; else
-var y1 = (Math.floor(Math.sqrt(Math.pow(borderRadius, 2) - Math.pow((intx+1), 2))) - 1); if(borderRadius != j)
-{ if((intx) >= borderRadius)
-var y2 = -1; else
-var y2 = Math.ceil(Math.sqrt(Math.pow(borderRadius,2) - Math.pow(intx, 2))); if((intx+1) >= j)
-var y3 = -1; else
-var y3 = (Math.floor(Math.sqrt(Math.pow(j ,2) - Math.pow((intx+1), 2))) - 1);}
-if((intx) >= j)
-var y4 = -1; else
-var y4 = Math.ceil(Math.sqrt(Math.pow(j ,2) - Math.pow(intx, 2))); if(y1 > -1) this.drawPixel(intx, 0, this.boxColour, 100, (y1+1), newCorner, -1, this.settings[cc].radius); if(borderRadius != j)
-{ for(var inty = (y1 + 1); inty < y2; inty++)
-{ if(this.settings.antiAlias)
-{ if(this.backgroundImage != "")
-{ var borderFract = (pixelFraction(intx, inty, borderRadius) * 100); if(borderFract < 30)
-{ this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, 0, this.settings[cc].radius);}
-else
-{ this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, -1, this.settings[cc].radius);}
-}
-else
-{ var pixelcolour = BlendColour(this.boxColour, this.borderColour, pixelFraction(intx, inty, borderRadius)); this.drawPixel(intx, inty, pixelcolour, 100, 1, newCorner, 0, this.settings[cc].radius, cc);}
-}
-}
-if(this.settings.antiAlias)
-{ if(y3 >= y2)
-{ if (y2 == -1) y2 = 0; this.drawPixel(intx, y2, this.borderColour, 100, (y3 - y2 + 1), newCorner, 0, 0);}
-}
-else
-{ if(y3 >= y1)
-{ this.drawPixel(intx, (y1 + 1), this.borderColour, 100, (y3 - y1), newCorner, 0, 0);}
-}
-var outsideColour = this.borderColour;}
-else
-{ var outsideColour = this.boxColour; var y3 = y1;}
-if(this.settings.antiAlias)
-{ for(var inty = (y3 + 1); inty < y4; inty++)
-{ this.drawPixel(intx, inty, outsideColour, (pixelFraction(intx, inty , j) * 100), 1, newCorner, ((this.borderWidth > 0)? 0 : -1), this.settings[cc].radius);}
-}
-}
-this.masterCorners[this.settings[cc].radius] = newCorner.cloneNode(true);}
-if(cc != "br")
-{ for(var t = 0, k = newCorner.childNodes.length; t < k; t++)
-{ var pixelBar = newCorner.childNodes[t]; var pixelBarTop = parseInt(pixelBar.style.top.substring(0, pixelBar.style.top.indexOf("px"))); var pixelBarLeft = parseInt(pixelBar.style.left.substring(0, pixelBar.style.left.indexOf("px"))); var pixelBarHeight = parseInt(pixelBar.style.height.substring(0, pixelBar.style.height.indexOf("px"))); if(cc == "tl" || cc == "bl"){ pixelBar.style.left = this.settings[cc].radius -pixelBarLeft -1 + "px";}
-if(cc == "tr" || cc == "tl"){ pixelBar.style.top = this.settings[cc].radius -pixelBarHeight -pixelBarTop + "px";}
-switch(cc)
-{ case "tr":
-pixelBar.style.backgroundPosition = "-" + Math.abs((this.boxWidth - this.settings[cc].radius + this.borderWidth) + pixelBarLeft) + "px -" + Math.abs(this.settings[cc].radius -pixelBarHeight -pixelBarTop - this.borderWidth) + "px"; break; case "tl":
-pixelBar.style.backgroundPosition = "-" + Math.abs((this.settings[cc].radius -pixelBarLeft -1) - this.borderWidth) + "px -" + Math.abs(this.settings[cc].radius -pixelBarHeight -pixelBarTop - this.borderWidth) + "px"; break; case "bl":
-pixelBar.style.backgroundPosition = "-" + Math.abs((this.settings[cc].radius -pixelBarLeft -1) - this.borderWidth) + "px -" + Math.abs((this.boxHeight + this.settings[cc].radius + pixelBarTop) -this.borderWidth) + "px"; break;}
-}
-}
-}
-if(newCorner)
-{ switch(cc)
-{ case "tl":
-if(newCorner.style.position == "absolute") newCorner.style.top = "0px"; if(newCorner.style.position == "absolute") newCorner.style.left = "0px"; if(this.topContainer) this.topContainer.appendChild(newCorner); break; case "tr":
-if(newCorner.style.position == "absolute") newCorner.style.top = "0px"; if(newCorner.style.position == "absolute") newCorner.style.right = "0px"; if(this.topContainer) this.topContainer.appendChild(newCorner); break; case "bl":
-if(newCorner.style.position == "absolute") newCorner.style.bottom = "0px"; if(newCorner.style.position == "absolute") newCorner.style.left = "0px"; if(this.bottomContainer) this.bottomContainer.appendChild(newCorner); break; case "br":
-if(newCorner.style.position == "absolute") newCorner.style.bottom = "0px"; if(newCorner.style.position == "absolute") newCorner.style.right = "0px"; if(this.bottomContainer) this.bottomContainer.appendChild(newCorner); break;}
-}
-}
-}
-var radiusDiff = new Array(); radiusDiff["t"] = Math.abs(this.settings.tl.radius - this.settings.tr.radius)
-radiusDiff["b"] = Math.abs(this.settings.bl.radius - this.settings.br.radius); for(z in radiusDiff)
-{ if(z == "t" || z == "b")
-{ if(radiusDiff[z])
-{ var smallerCornerType = ((this.settings[z + "l"].radius < this.settings[z + "r"].radius)? z +"l" : z +"r"); var newFiller = document.createElement("DIV"); newFiller.style.height = radiusDiff[z] + "px"; newFiller.style.width = this.settings[smallerCornerType].radius+ "px"
-newFiller.style.position = "absolute"; newFiller.style.fontSize = "1px"; newFiller.style.overflow = "hidden"; newFiller.style.backgroundColor = this.boxColour; switch(smallerCornerType)
-{ case "tl":
-newFiller.style.bottom = "0px"; newFiller.style.left = "0px"; newFiller.style.borderLeft = this.borderString; this.topContainer.appendChild(newFiller); break; case "tr":
-newFiller.style.bottom = "0px"; newFiller.style.right = "0px"; newFiller.style.borderRight = this.borderString; this.topContainer.appendChild(newFiller); break; case "bl":
-newFiller.style.top = "0px"; newFiller.style.left = "0px"; newFiller.style.borderLeft = this.borderString; this.bottomContainer.appendChild(newFiller); break; case "br":
-newFiller.style.top = "0px"; newFiller.style.right = "0px"; newFiller.style.borderRight = this.borderString; this.bottomContainer.appendChild(newFiller); break;}
-}
-var newFillerBar = document.createElement("DIV"); newFillerBar.style.position = "relative"; newFillerBar.style.fontSize = "1px"; newFillerBar.style.overflow = "hidden"; newFillerBar.style.backgroundColor = this.boxColour; newFillerBar.style.backgroundImage = this.backgroundImage; switch(z)
-{ case "t":
-if(this.topContainer)
-{ if(this.settings.tl.radius && this.settings.tr.radius)
-{ newFillerBar.style.height = topMaxRadius - this.borderWidth + "px"; newFillerBar.style.marginLeft = this.settings.tl.radius - this.borderWidth + "px"; newFillerBar.style.marginRight = this.settings.tr.radius - this.borderWidth + "px"; newFillerBar.style.borderTop = this.borderString; if(this.backgroundImage != "")
-newFillerBar.style.backgroundPosition = "-" + (topMaxRadius + this.borderWidth) + "px 0px"; this.topContainer.appendChild(newFillerBar);}
-this.box.style.backgroundPosition = "0px -" + (topMaxRadius - this.borderWidth) + "px";}
-break; case "b":
-if(this.bottomContainer)
-{ if(this.settings.bl.radius && this.settings.br.radius)
-{ newFillerBar.style.height = botMaxRadius - this.borderWidth + "px"; newFillerBar.style.marginLeft = this.settings.bl.radius - this.borderWidth + "px"; newFillerBar.style.marginRight = this.settings.br.radius - this.borderWidth + "px"; newFillerBar.style.borderBottom = this.borderString; if(this.backgroundImage != "")
-newFillerBar.style.backgroundPosition = "-" + (botMaxRadius + this.borderWidth) + "px -" + (this.boxHeight + (topMaxRadius + this.borderWidth)) + "px"; this.bottomContainer.appendChild(newFillerBar);}
-}
-break;}
-}
-}
-if(this.settings.autoPad == true && this.boxPadding > 0)
-{ var contentContainer = document.createElement("DIV"); contentContainer.style.position = "relative"; contentContainer.innerHTML = this.boxContent; contentContainer.className = "autoPadDiv"; var topPadding = Math.abs(topMaxRadius - this.boxPadding); var botPadding = Math.abs(botMaxRadius - this.boxPadding); if(topMaxRadius < this.boxPadding)
-contentContainer.style.paddingTop = topPadding + "px"; if(botMaxRadius < this.boxPadding)
-contentContainer.style.paddingBottom = botMaxRadius + "px"; contentContainer.style.paddingLeft = this.boxPadding + "px"; contentContainer.style.paddingRight = this.boxPadding + "px"; this.contentDIV = this.box.appendChild(contentContainer);}
-}
-this.drawPixel = function(intx, inty, colour, transAmount, height, newCorner, image, cornerRadius)
-{ var pixel = document.createElement("DIV"); pixel.style.height = height + "px"; pixel.style.width = "1px"; pixel.style.position = "absolute"; pixel.style.fontSize = "1px"; pixel.style.overflow = "hidden"; var topMaxRadius = Math.max(this.settings["tr"].radius, this.settings["tl"].radius); if(image == -1 && this.backgroundImage != "")
-{ pixel.style.backgroundImage = this.backgroundImage; pixel.style.backgroundPosition = "-" + (this.boxWidth - (cornerRadius - intx) + this.borderWidth) + "px -" + ((this.boxHeight + topMaxRadius + inty) -this.borderWidth) + "px";}
-else
-{ pixel.style.backgroundColor = colour;}
-if (transAmount != 100)
-setOpacity(pixel, transAmount); pixel.style.top = inty + "px"; pixel.style.left = intx + "px"; newCorner.appendChild(pixel);}
-}
-function insertAfter(parent, node, referenceNode)
-{ parent.insertBefore(node, referenceNode.nextSibling);}
-function BlendColour(Col1, Col2, Col1Fraction)
-{ var red1 = parseInt(Col1.substr(1,2),16); var green1 = parseInt(Col1.substr(3,2),16); var blue1 = parseInt(Col1.substr(5,2),16); var red2 = parseInt(Col2.substr(1,2),16); var green2 = parseInt(Col2.substr(3,2),16); var blue2 = parseInt(Col2.substr(5,2),16); if(Col1Fraction > 1 || Col1Fraction < 0) Col1Fraction = 1; var endRed = Math.round((red1 * Col1Fraction) + (red2 * (1 - Col1Fraction))); if(endRed > 255) endRed = 255; if(endRed < 0) endRed = 0; var endGreen = Math.round((green1 * Col1Fraction) + (green2 * (1 - Col1Fraction))); if(endGreen > 255) endGreen = 255; if(endGreen < 0) endGreen = 0; var endBlue = Math.round((blue1 * Col1Fraction) + (blue2 * (1 - Col1Fraction))); if(endBlue > 255) endBlue = 255; if(endBlue < 0) endBlue = 0; return "#" + IntToHex(endRed)+ IntToHex(endGreen)+ IntToHex(endBlue);}
-function IntToHex(strNum)
-{ base = strNum / 16; rem = strNum % 16; base = base - (rem / 16); baseS = MakeHex(base); remS = MakeHex(rem); return baseS + '' + remS;}
-function MakeHex(x)
-{ if((x >= 0) && (x <= 9))
-{ return x;}
-else
-{ switch(x)
-{ case 10: return "A"; case 11: return "B"; case 12: return "C"; case 13: return "D"; case 14: return "E"; case 15: return "F";}
-}
-}
-function pixelFraction(x, y, r)
-{ var pixelfraction = 0; var xvalues = new Array(1); var yvalues = new Array(1); var point = 0; var whatsides = ""; var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(x,2))); if ((intersect >= y) && (intersect < (y+1)))
-{ whatsides = "Left"; xvalues[point] = 0; yvalues[point] = intersect - y; point = point + 1;}
-var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(y+1,2))); if ((intersect >= x) && (intersect < (x+1)))
-{ whatsides = whatsides + "Top"; xvalues[point] = intersect - x; yvalues[point] = 1; point = point + 1;}
-var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(x+1,2))); if ((intersect >= y) && (intersect < (y+1)))
-{ whatsides = whatsides + "Right"; xvalues[point] = 1; yvalues[point] = intersect - y; point = point + 1;}
-var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(y,2))); if ((intersect >= x) && (intersect < (x+1)))
-{ whatsides = whatsides + "Bottom"; xvalues[point] = intersect - x; yvalues[point] = 0;}
-switch (whatsides)
-{ case "LeftRight":
-pixelfraction = Math.min(yvalues[0],yvalues[1]) + ((Math.max(yvalues[0],yvalues[1]) - Math.min(yvalues[0],yvalues[1]))/2); break; case "TopRight":
-pixelfraction = 1-(((1-xvalues[0])*(1-yvalues[1]))/2); break; case "TopBottom":
-pixelfraction = Math.min(xvalues[0],xvalues[1]) + ((Math.max(xvalues[0],xvalues[1]) - Math.min(xvalues[0],xvalues[1]))/2); break; case "LeftBottom":
-pixelfraction = (yvalues[0]*xvalues[1])/2; break; default:
-pixelfraction = 1;}
-return pixelfraction;}
-function rgb2Hex(rgbColour)
-{ try{ var rgbArray = rgb2Array(rgbColour); var red = parseInt(rgbArray[0]); var green = parseInt(rgbArray[1]); var blue = parseInt(rgbArray[2]); var hexColour = "#" + IntToHex(red) + IntToHex(green) + IntToHex(blue);}
-catch(e){ alert("There was an error converting the RGB value to Hexadecimal in function rgb2Hex");}
-return hexColour;}
-function rgb2Array(rgbColour)
-{ var rgbValues = rgbColour.substring(4, rgbColour.indexOf(")")); var rgbArray = rgbValues.split(", "); return rgbArray;}
-function setOpacity(obj, opacity)
-{ opacity = (opacity == 100)?99.999:opacity; if(isSafari && obj.tagName != "IFRAME")
-{ var rgbArray = rgb2Array(obj.style.backgroundColor); var red = parseInt(rgbArray[0]); var green = parseInt(rgbArray[1]); var blue = parseInt(rgbArray[2]); obj.style.backgroundColor = "rgba(" + red + ", " + green + ", " + blue + ", " + opacity/100 + ")";}
-else if(typeof(obj.style.opacity) != "undefined")
-{ obj.style.opacity = opacity/100;}
-else if(typeof(obj.style.MozOpacity) != "undefined")
-{ obj.style.MozOpacity = opacity/100;}
-else if(typeof(obj.style.filter) != "undefined")
-{ obj.style.filter = "alpha(opacity:" + opacity + ")";}
-else if(typeof(obj.style.KHTMLOpacity) != "undefined")
-{ obj.style.KHTMLOpacity = opacity/100;}
-}
-function inArray(array, value)
-{ for(var i = 0; i < array.length; i++){ if (array[i] === value) return i;}
-return false;}
-function inArrayKey(array, value)
-{ for(key in array){ if(key === value) return true;}
-return false;}
-function addEvent(elm, evType, fn, useCapture) { if (elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true;}
-else if (elm.attachEvent) { var r = elm.attachEvent('on' + evType, fn); return r;}
-else { elm['on' + evType] = fn;}
-}
-function removeEvent(obj, evType, fn, useCapture){ if (obj.removeEventListener){ obj.removeEventListener(evType, fn, useCapture); return true;} else if (obj.detachEvent){ var r = obj.detachEvent("on"+evType, fn); return r;} else { alert("Handler could not be removed");}
-}
-function format_colour(colour)
-{ var returnColour = "#ffffff"; if(colour != "" && colour != "transparent")
-{ if(colour.substr(0, 3) == "rgb")
-{ returnColour = rgb2Hex(colour);}
-else if(colour.length == 4)
-{ returnColour = "#" + colour.substring(1, 2) + colour.substring(1, 2) + colour.substring(2, 3) + colour.substring(2, 3) + colour.substring(3, 4) + colour.substring(3, 4);}
-else
-{ returnColour = colour;}
-}
-return returnColour;}
-function get_style(obj, property, propertyNS)
-{ try
-{ if(obj.currentStyle)
-{ var returnVal = eval("obj.currentStyle." + property);}
-else
-{ if(isSafari && obj.style.display == "none")
-{ obj.style.display = ""; var wasHidden = true;}
-var returnVal = document.defaultView.getComputedStyle(obj, '').getPropertyValue(propertyNS); if(isSafari && wasHidden)
-{ obj.style.display = "none";}
-}
-}
-catch(e)
-{ }
-return returnVal;}
-function getElementsByClass(searchClass, node, tag)
-{ var classElements = new Array(); if(node == null)
-node = document; if(tag == null)
-tag = '*'; var els = node.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp("(^|\s)"+searchClass+"(\s|$)"); for (i = 0, j = 0; i < elsLen; i++)
-{ if(pattern.test(els[i].className))
-{ classElements[j] = els[i]; j++;}
-}
-return classElements;}
-function newCurvyError(errorMessage)
-{ return new Error("curvyCorners Error:\n" + errorMessage)
-}
diff --git a/bundles/ruby-on-rails.tmbundle/website/peepcode.html b/bundles/ruby-on-rails.tmbundle/website/peepcode.html
deleted file mode 100644
index 96a35ec65..000000000
--- a/bundles/ruby-on-rails.tmbundle/website/peepcode.html
+++ /dev/null
@@ -1,520 +0,0 @@
-
-
-
-
-
-
- Peepcode Script
-
-
-
-
-
-
-
-
-
Peepcode Script
-
-
Get Version
-
2.0.0
-

-
-
Introduction
-
-
-
Many many people’s first introduction to Ruby on Rails was the 15 minute video from DHH showing how you create a blog application with Rails. Nearly everyone finished that video asking one question: what was that editor? It is awesome.
-
-
-
Let’s take a stroll down memory lane. We pick up the action at the X minute mark:
-
-
-
[transition into a portion of the video that shows off TMs features, plus DHH saying “Whooops!”]
-
-
-
What is interesting, is that as fast as David is able to write his blog application, even with his detour demonstrating the now deleted scaffold command, he never uses any special TextMate extensions for Rails. He uses some HTML snippets and commands and some Ruby snippets and commands. The original Ruby on Rails extensions were in their infancy.
-
-
-
[Open Bundle Editor] A collection of TextMate extensions is called a “bundle”.
-
-
-
When working with Rails with TextMate you’ll use several bundles>
-
-
-
- - HTML
- - Ruby
- - Ruby on Rails
- - JavaScript
-
-
-
-
You might also use the ProtoType, jQuery or other JavaScript bundle if you use those libraries.
-
-
-Ruby on Rails 2.0 was recently released and includes many improvements to
-
- - the syntax that you type [
redirect_to :action => 'show', :id => @person became redirect_to @person]
- - changes to some file extensions [rhtml -> html.erb] and
- - changes to some file name conventions [user_controller.rb -> users_controller.rb, more commonly].
-
-
-
-
The Ruby on Rails bundle has also been given a major upgrade to match all the changes for developing Rails 2.0 applications.
-
-
-
The snippets and commands we’re going to look at are actually described across all three bundles. Often it is the Rails bundle that reuses the HTML and Ruby bundles. For example, in an HTML file you have a variety of ways to create new elements. [examples] Within an html.erb file you can reuse all the same snippets and commands.
-
-
-
Know thy Editor
-
-
-
Overview key icons (see PeepCode TM video)
-
-
-
Preferences > Advanced > Folder References > Folder Patterns: add ‘vendor/rails’ and it will ignore that folder in any project – both from the Dock and from Search.
-
-
-
Access your bundles via Ctrl+Alt+Cmd+B.
-
-
-
Quick menu: Ctrl+Esc
-
-
-
Change language for a file, e.g. Ruby <—> Ruby on Rails. Either click the “L” section of the status bar and select the Language; or learn the Language shortcut. These always start with Shift+Alt+Cmd with a letter. Typically the letter is the first letter of the Language. So to choose either Ruby or Ruby on Rails, use Shift+Alt+Cmd+R and choose the language from the drop-down.
-
-
-
Models and Migrations
-
-
-
- - Create new app
- - Go to app/controllers/application.rb (need a Ruby on Rails file)
- - | + 1 – Call Generate Script – create new model “Post” TODO – not working @ moment
- OR CLI:script/generate model Post title:string
- - Go to migration file: Cmd+T + 001
- - t. – list of available sexy migration columns; when selecting one, another t. is automatically created for you. (create body:text + published:boolean)
- - Shft++K – remove a line
- - CLI:script/generate model Comment
- - Cmd+T + 002 – comment migration + add t.references :post, body:text, name:string
- - Ctrl+| + 3 – run migrations
- * See error?
- * In terminal, go to ”/Applications/TextMate.app/Contents/SharedSupport/Support/lib” and rename/remove Builder.rb
- * Run migrations again
-
-
-
-
- - Go to post.rb
- * hm + comments; notice you can tab across to change fields if required
- * Also, hmt -> for has_many :through*
- - Go to comments.rb
- * bt + post; notice the autocompletions are correct here, but still optional for rails so can be deleted
- * vp + name, body
- * [Ctrl-Esc -> Models] All the validations are available as snippets based on the first letter of each word.
- - Place the cursor on ‘Comment’ class name, Sft+Ctrl+Cmd+S -> shows schema for this class. Alternately, place it on ‘post’ to get the schema for Post class.
-
-
-
-
Testing
-
-
-
I’ll talk more about navigating between files in a Rails application later, but for the moment, know that there is a special relationship between a model file and a unit test file. You can toggle between them with Alt+Cmd+DownArrow.
-
-
-
The Rails generator for models created this unit test file and a fixtures file.
-
-
-
First, let’s set up some fixtures for posts and comments. Go to posts.yml and create a “published” and a “unpublished” fixture. Now go to comments.yml – using Ctrl+Cmd+R to show posts.yml in the dock.
-
-
-
TODO – how to move focus from editor to dock?
-
-
-
Within comments, create one comment:
-
-
-
valid:
- name: Dr Nic
- body: Cool post
- post:
-
-
With Rails 2.0, your fixture ids are no longer required, and you can use Foxy Fixtures to select an associated fixture. Here we’d type ‘published’ to reference that posts.yml fixture. But, since the column name is ‘post’ we can get a drop-down list using Alt+Esc. We’ll use this same fixture autocompletion feature again within the test files.
-
-
-
Back to the comments unit test, and that dummy test needs removing.
-
-
-
Create a new test method with deft + should_require_title.
-
-
-
Type posts(:) and Alt+Esc to access the fixtures autocompletion. You can now select a posts.yml fixture. Note, the current implementation replaces the whole line, so if you need multiple or want a different instance variable you’ll need to make some manual changes.
-
-
-
Finished:
-
-
-
def test_should_require_title
- @post = posts(:published)
- @comment = @post.comments.create
- @comment.valid?
- assert(@comment.errors[:name], "Should be errors for name field")
-end
-
-
-
To run your unit tests, Ctrl-\ + ‘Test Units’ or ‘Test Recent’.
-
-
-
In order to write some functional tests for our blog, let’s generate a controller as it generates the functional test at the same time. [Ctrl-|] We won’t specify any actions for the moment, and we’ll clean away the open windows for the controller and the helper.
-
-
-
For now, let’s write some functional tests. [remove the test_truth method]
-
-
-
Diagram
-
-
-
- - deftg -> test GET action
- - deftp -> test POST action
-
-
-
-
Since many functional tests start with the same setup, there are two functional test snippets to write tests faster. The last letter maps the the http method to be used for the test: g for GET and p for POST.
-
-
-
To create a test for the index action, use deftg + 'index'. Then delete the two optional @model sections.
-
-
-
Next, to load an instance variable into the test, type asg + 'posts'
-
-
-
Now, let’s assert the HTML format.
-
-
-
Type ass and press ⇥. Type div#posts, press ⇥ and ⌦, then ⇥ twice to place the cursor within the assert_select block:
-
-
-
assert_select 'div#posts' do
-
-end
-
-
-
Now we’ll check that the @posts objects are represented in the div#posts element.
-
-
-
With the cursor inside the assert_select:
-
-
-
Type ass, press ⇥, type div.post, press ⇥, press ⇥ again, and type count (to replace the text). Now press ⇥ again, and type @posts.size. Press ⇥ a final time (it will highlight the do...end block), and press ⌦.
-
-
-
Our test method is now finished:
-
-
-
def test_should_get_index
- get :index
- assert_response :success
- assert(posts = assigns(:posts), "Cannot find @posts")
- assert_select 'div#posts' do
- assert_select 'div.post', :count => posts.size
- end
-end
-
-
-
Now we create a test for the ‘show’ action. Type deftg and ‘show’, and then ‘post’. Then tab into ‘fixture_name’ and delete it. Now we’ll autocomplete on fixtures again. Alt+Esc and select ‘published’.
-
-
-
Now copy the ‘div.post’ assert_select line for this test, but change the :count to 1.
-
-
-
To run our functional tests, use Ctrl+\.
-
-
-
Controllers and Routing
-
-
-
Similarly to navigating between model and unit test files, you can toggle between functional tests and controllers via Alt+Cmd+DownArrow.
-
-
-
In the controller, type index and use Shift+Enter to convert it to a method. Press BackSpace to delete the arguments.
-
-
-
To load all Posts:
-
-
-
@posts = Post.fina
-
-
-
Pressing ⇥ creates find(:all, :conditions => [...]). Tab and change ‘field’ to ‘published’.
-
-
-
Diagram: fina – find(:all); finf – find(:first); fini – find(id); ^-| – params[:id]
-
-
-
Now create a ‘show’ action, with @post = Post.fini + tab. Use ^-| to insert params[:id].
-
-
-
We’ll come back and look at views for our index action later. Instead, let’s create a controller for creating + updating posts for the admin of the site.
-
-
-
We could use the scaffold generator to create a posts controller, with functional tests and default views. Instead, we’ll build this controller from the ground up.
-
-
-
Diagram: Navigation between file types
-
-
-
Shift+Alt+Cmd+DownArrow:
-
-
-
TODO – finish this
-
-
-
- - post.rb -> post_test.rb, posts_controller.rb, etc
- - post_test.rb -> post.rb, posts_controller.rb, etc
-
-
-
-
Diagram: views/users/show.rhtml -> user_controller.rb; views/users/show.html.erb -> users_controller.rb
-
-
-
One thing to note for developers of Rails apps using older versions of Rails. If you are in a template file with the extension .rhtml, then it will navigate to the singular controller name ‘post’, rather than the plural default for controllers. This is for backwards compatibility with older naming conventions.
-
-
-
So we can create a new posts_controller.rb by returning to the post.rb or post_test.rb files, and navigating to the matching controller. It doesn’t exist so a blank file is created.
-
-
-
We have a simple way to create new controller classes; the cla snippet has a ‘Create controller class’ option. Select that, and type ‘Posts’ and then ‘post’ to create our posts_controller.rb class.
-
-
-
For simpler actions, use the standard techniques for new methods, def + ‘new’ to create the ‘new’ method.
-
-
-
For some of the common, more complex controller actions there are also snippets. For the create action, type ‘defcreate’ and fill out the template with ‘post’.
-
-
-
What I want the ‘create’ action to do is redirect back to the main blog controller for a page. Originally, I could use ‘recai’ for redirect_to :controller => "blog", :action => "show", :id => @post but its uncool to use anonymous paths.
-
-
-
So instead let’s just enter a named route that sounds nice, replace @post with blog_post_path(@post).
-
-
-
[Change to the ‘routes.rb’ file.] So finally let’s setup our routes. I’m going to delete all the default comments and default routes, and reconstruct it with named routes.
-
-
-
Diagram: Routes: map – named routes; maprs – map.resources; mapr – map.resource; mapwo – map.with_options
-
-
-
Within a routes file, you have the three ‘map’ snippets. As you’ll see in moment, the resources snippets include a block for nested resources.
-
-
-
So we’ll use ‘map’ to create named routes. Leave the name as ‘connect’ for anonymous routes. It is handy to know a Ruby snippet here: tabbing on colon (:) creates a hash key/value pair.
-
-
-
map.public_page 'blog/show/:id', :controller => "blog", :action => "show"
-
-
We could place this route within a with_options block, using ‘mapwo’. Then add map.root within it.
-
-
-
For our posts controller, we’ll use the resources snippets. We use ‘maprs’ and change ‘resource’ to ‘posts’ and then we can tab into the block. Say we wanted comments to be a nested resource of posts, then we’d use ‘maprs’ again, and change ‘map’ to ‘post’ and remove the block. [then delete the comment resource + post’s block].
-
-
-
There is also a shortcut for the respond_to block – ‘rest’, which gives a default html response. To add additional response formats, tab on ‘wants’. [remove these examples from new method]
-
-
-
Now let’s have a final look at functional tests for our create actions, which will require a POST request. [try to change to functional test] We don’t have a posts_controller_test.rb, so it creates a blank file for us.
-
-
-
To create a functional test class, use ‘cla’ again and select ‘Create functional test class’, and type ‘Posts’ for the class name prefix. Save the file, close the window and reopen within the project, otherwise some commands might not work if the file is initially not saved.
-
-
-
Remember that test methods are created with ‘deft’, and the GET + POST methods are created with deftg and deftp. Let’s test our create action with ‘deftp’.
-
-
-
Enter ‘post’, but remove the two optional sections as we’re creating a new object, not updating an existing object. Within the :post => { }, type : and tab to create the hash key values.
-
-
-
Fetch the resulting object with asg + ‘post’.
-
-
-
Add a redirection assertion with artp.
-
-
-
def test_should_post_create
- post :create, :post => { :title => "hi there", :body => "oh yeah" }
- assert_response :redirect
- assert(post = assigns(:post), "Cannot find @post")
-
- assert_redirected_to blog_post_path(post)
-end
-
-
-
If you just want to run the tests in the current file, or in fact run any Ruby file, use Cmd+R. As we can see, this test passes.
-
-
-
Views
-
-
-
[back to posts_controller.rb]
-
-
-
In the posts controller, we have a new action but we haven’t created a template yet. As before, we can use the Navigation cmd to change from the controller to a view. In this case, the view is based on the current method. So we place the cursor in the new method, and it will ask us to create a new.html.erb file. Here is your opportunity to rename the template with alternate format or template extensions, say .xml.builder. But we’ll use .html.erb for now.
-
-
-
Diagram: form_for – ff, form_for with error output – ffe
-
-
-
We’ll use ‘ffe’ and enter ‘post’. In Rails 2.0, the form_for helper is very powerful and knows from the object it is passed whether it is creating or updating an object.
-
-
-
Diagram: f. – list of available helpers; or use first initial of helpers’ names (fftf – text_field)
-
-
-
Inside the form_for block we have two ways to access the common helpers.
-
-
-
By using ‘f.’ it reminds us what helpers are available and tells us what their tab completions are.
-
-
-
So, let’s use the tab completion versions. ffl for label, fftf for text field.
-
-
-
<%= error_messages_for :post %>
-
-<% form_for @post do |f| -%>
- <%= f.label :title, "Title" %>
- <%= f.text_field :title %>
- <%= f.label :body, "Body" %>
- <%= f.text_area :body, :rows => 10 %>
- <%= f.submit "Post", :disable_with => 'Posting...' %>
-<% end -%>
-
-
Now let’s put each label or form field in a separate paragraph. Select those lines and use ‘Wrap Each Selected Line in Open/Close’ – Shift+Ctrl+Cmd+W, and type ‘p’.
-
-
-
Diagram: Partials – Shift-Ctrl-H
-
-
-
Since the form_for helper works with saved and unsaved model objects its easily reusable within new and edit templates. So let’s extract it as a partial. [do it] And now the render can be pasted into an edit.html.erb file as required.
-
-
-
[go to browser http://localhost:3000/posts/new]
-Now we can fire up the server and have a look at our form and use it. [submit form]
-
-
-
As requested, the browser is redirected to the public post page; which we haven’t implemented yet. So let’s do that.
-
-
-
We head back to the blog_controller, and create the show.html.erb via navigating away from the show action.
-
-
-
Create a div and set its class to post, then layout the title and body:
-
-
-
-
<%= @post.title %>
- <%= @post.body %>
-
-
-
If we run our tests, the ‘show’ action test is now passing.
-
-
-
[Shft+Ctrl+H] So we can reuse it in the index.html.erb file, let’s move it to a partial called ‘post’ and remove the ’@’ signs to reference a local variable instead of an instance variable.
-
-
-
The returned ‘render’ expression isn’t quite right as we need to pass the @post object into the partial. Let’s remove it and use the ‘render partial’ snippets.
-
-
-
Diagram: render :partial – rp; render :partial, :object – rpo; render :partial, :collection – rpc; render :partial, :locals – rpl
-
-
-
Create <%= %> and inside use ‘rpo’ and set the :object => @post.
-
-
-
Now we create index.html.erb and use <%= %> with ‘rpc’ and ‘post’. The tests require that its wrapped in a div with id=”posts”. So select all, and Shift+Ctrl+W + div id=”posts”.
-
-
-
Diagram: Link helpers; lip – link_to “label”, model_path(@model), etc.
-
-
-
- - lip –
<%= link_to "link text...", model_path(@model) %>
- - lipp –
<%= link_to "link text...", models_path %>
- - linp –
<%= link_to "link text...", parent_child_path(@parent, @child) %>
- - linpp –
<%= link_to "link text...", parent_child_path(@parent) %>
- - lim –
<%= link_to model.name, model %>
-
-
-
-
Alternate templates
-
-
-
Diagram: html.erb, js.erb, js.rjs, xml.builder, xml.erb, html.builder
-
-
-
In addition to html.erb templates, Rails supports any combination of output format and template engine. As appropriate you can combine html or javascript or xml with erb or rjs or builder, or any other 3rd party templating system such as haml.
-
-
-
The Rails TextMate bundle provides varying support for different combinations.
-
-
-
Diagram: wants.js -> .js.rjs; wants.xml -> .xml.builder; wants.different -> .different.erb
-
-
-
Navigation (e.g. tasty tidbit)
-
-
-
Go to posts_controller, add wants.js to create action. Navigate and create posts/create.js.rjs.
-
-
-
Diagram: RJS snippets – hide, insert_html (ins), replace (rep), replace_html (reph), show, toggle (tog), visual_effect (vis)
-
-
-
All these snippets include the page prefix and are nice ways to start each RJS expression.
-
-
-
[remove all lines; rename with .erb] Another way to generate JavaScript within Rails is with the .js.erb extension. Instead of RJS expressions, you write pure JavaScript, but you can embed ruby using erb.
-
-
-
A new syntax supported in the bundle is JavaScript (Rails), which maps to .js.erb files. That is, JavaScript files that permit embedded Ruby. This means, within the <%= %> tags you have access to your Ruby snippets and syntax highlighting.
-
-
-
Extending
-
- Dr Nic Williams, 27th February 2008
- Theme extended from Paul Battley
-
-
-
-
-
-
-
-
-
diff --git a/bundles/ruby-on-rails.tmbundle/website/peepcode.txt b/bundles/ruby-on-rails.tmbundle/website/peepcode.txt
deleted file mode 100644
index 7f04499b2..000000000
--- a/bundles/ruby-on-rails.tmbundle/website/peepcode.txt
+++ /dev/null
@@ -1,327 +0,0 @@
-h1. Peepcode Script
-
-h2. Introduction
-
-Many many people's first introduction to Ruby on Rails was the 15 minute video from DHH showing how you create a blog application with Rails. Nearly everyone finished that video asking one question: what was that editor? It is awesome.
-
-Let's take a stroll down memory lane. We pick up the action at the X minute mark:
-
-[transition into a portion of the video that shows off TMs features, plus DHH saying "Whooops!"]
-
-What is interesting, is that as fast as David is able to write his blog application, even with his detour demonstrating the now deleted scaffold command, he never uses any special TextMate extensions for Rails. He uses some HTML snippets and commands and some Ruby snippets and commands. The original Ruby on Rails extensions were in their infancy.
-
-[Open Bundle Editor] A collection of TextMate extensions is called a "bundle".
-
-When working with Rails with TextMate you'll use several "bundles":
-
-* HTML
-* Ruby
-* Ruby on Rails
-* JavaScript
-
-You might also use the ProtoType, jQuery or other JavaScript bundle if you use those libraries.
-
-Ruby on Rails 2.0 was recently released and includes many improvements to
-* the syntax that you type [
redirect_to :action => 'show', :id => @person became
redirect_to @person]
-* changes to some file extensions [rhtml -> html.erb] and
-* changes to some file name conventions [user_controller.rb -> users_controller.rb, more commonly].
-
-The Ruby on Rails bundle has also been given a major upgrade to match all the changes for developing Rails 2.0 applications.
-
-The snippets and commands we're going to look at are actually described across all three bundles. Often it is the Rails bundle that reuses the HTML and Ruby bundles. For example, in an HTML file you have a variety of ways to create new elements. [examples] Within an html.erb file you can reuse all the same snippets and commands.
-
-
-h2. Know thy Editor
-
-Overview key icons (see PeepCode TM video)
-
-Preferences > Advanced > Folder References > Folder Patterns: add 'vendor/rails' and it will ignore that folder in any project - both from the Dock and from Search.
-
-Access your bundles via Ctrl+Alt+Cmd+B.
-
-Quick menu: Ctrl+Esc
-
-Change language for a file, e.g. Ruby <--> Ruby on Rails. Either click the "L" section of the status bar and select the Language; or learn the Language shortcut. These always start with Shift+Alt+Cmd with a letter. Typically the letter is the first letter of the Language. So to choose either Ruby or Ruby on Rails, use Shift+Alt+Cmd+R and choose the language from the drop-down.
-
-
-h2. Models and Migrations
-
-* Create new app
-* Go to app/controllers/application.rb (need a Ruby on Rails file)
-* ^| + 1 - Call Generate Script - create new model "Post" TODO - not working @ moment
- OR CLI:script/generate model Post title:string
-* Go to migration file: Cmd+T + 001
-* t. - list of available sexy migration columns; when selecting one, another t. is automatically created for you. (create body:text + published:boolean)
-* Shft+^+K - remove a line
-* CLI:script/generate model Comment
-* Cmd+T + 002 - comment migration + add t.references :post, body:text, name:string
-* Ctrl+| + 3 - run migrations
- * See error?
- * In terminal, go to "/Applications/TextMate.app/Contents/SharedSupport/Support/lib" and rename/remove Builder.rb
- * Run migrations again
-
-* Go to post.rb
- * hm + comments; notice you can tab across to change fields if required
- * Also, hmt -> for has_many :through*
-* Go to comments.rb
- * bt + post; notice the autocompletions are correct here, but still optional for rails so can be deleted
- * vp + name, body
- * [Ctrl-Esc -> Models] All the validations are available as snippets based on the first letter of each word.
-* Place the cursor on 'Comment' class name, Sft+Ctrl+Cmd+S -> shows schema for this class. Alternately, place it on 'post' to get the schema for Post class.
-
-h2. Testing
-
-I'll talk more about navigating between files in a Rails application later, but for the moment, know that there is a special relationship between a model file and a unit test file. You can toggle between them with Alt+Cmd+DownArrow.
-
-The Rails generator for models created this unit test file and a fixtures file.
-
-First, let's set up some fixtures for posts and comments. Go to posts.yml and create a "published" and a "unpublished" fixture. Now go to comments.yml - using Ctrl+Cmd+R to show posts.yml in the dock.
-
-TODO - how to move focus from editor to dock?
-
-Within comments, create one comment:
-
-
valid:
- name: Dr Nic
- body: Cool post
- post:
-
-With Rails 2.0, your fixture ids are no longer required, and you can use Foxy Fixtures to select an associated fixture. Here we'd type 'published' to reference that posts.yml fixture. But, since the column name is 'post' we can get a drop-down list using Alt+Esc. We'll use this same fixture autocompletion feature again within the test files.
-
-Back to the comments unit test, and that dummy test needs removing.
-
-Create a new test method with
deft +
should_require_title.
-
-Type
posts(:) and Alt+Esc to access the fixtures autocompletion. You can now select a posts.yml fixture. Note, the current implementation replaces the whole line, so if you need multiple or want a different instance variable you'll need to make some manual changes.
-
-Finished:
-
-
def test_should_require_title
- @post = posts(:published)
- @comment = @post.comments.create
- @comment.valid?
- assert(@comment.errors[:name], "Should be errors for name field")
-end
-
-To run your unit tests, Ctrl-\ + 'Test Units' or 'Test Recent'.
-
-In order to write some functional tests for our blog, let's generate a controller as it generates the functional test at the same time. [Ctrl-|] We won't specify any actions for the moment, and we'll clean away the open windows for the controller and the helper.
-
-For now, let's write some functional tests. [remove the test_truth method]
-
-h3. Diagram
-
-* deftg -> test GET action
-* deftp -> test POST action
-
-Since many functional tests start with the same setup, there are two functional test snippets to write tests faster. The last letter maps the the http method to be used for the test: g for GET and p for POST.
-
-To create a test for the index action, use
deftg + 'index'. Then delete the two optional @model sections.
-
-Next, to load an instance variable into the test, type
asg + 'posts'
-
-Now, let's assert the HTML format.
-
-Type
ass and press TAB. Type
div#posts, press TAB and DELETE, then TAB twice to place the cursor within the
assert_select block:
-
-
assert_select 'div#posts' do
-
-end
-
-Now we'll check that the
@posts objects are represented in the
div#posts element.
-
-With the cursor inside the
assert_select:
-
-Type
ass, press TAB, type
div.post, press TAB, press TAB again, and type
count (to replace the
text). Now press TAB again, and type
@posts.size. Press TAB a final time (it will highlight the
do...end block), and press DELETE.
-
-Our test method is now finished:
-
-
def test_should_get_index
- get :index
- assert_response :success
- assert(posts = assigns(:posts), "Cannot find @posts")
- assert_select 'div#posts' do
- assert_select 'div.post', :count => posts.size
- end
-end
-
-Now we create a test for the 'show' action. Type deftg and 'show', and then 'post'. Then tab into 'fixture_name' and delete it. Now we'll autocomplete on fixtures again. Alt+Esc and select 'published'.
-
-Now copy the 'div.post' assert_select line for this test, but change the :count to 1.
-
-To run our functional tests, use Ctrl+\.
-
-h2. Controllers and Routing
-
-Similarly to navigating between model and unit test files, you can toggle between functional tests and controllers via Alt+Cmd+DownArrow.
-
-In the controller, type
index and use Shift+Enter to convert it to a method. Press BackSpace to delete the arguments.
-
-To load all Posts:
-
-
@posts = Post.fina
-
-Pressing TAB creates
find(:all, :conditions => [...]). Tab and change 'field' to 'published'.
-
-h3. Diagram: fina - find(:all); finf - find(:first); fini - find(id); ^-| - params[:id]
-
-Now create a 'show' action, with @post = Post.fini + tab. Use ^-| to insert params[:id].
-
-We'll come back and look at views for our index action later. Instead, let's create a controller for creating + updating posts for the admin of the site.
-
-We could use the scaffold generator to create a posts controller, with functional tests and default views. Instead, we'll build this controller from the ground up.
-
-h3. Diagram: Navigation between file types
-
-Shift+Alt+Cmd+DownArrow:
-
-TODO - finish this
-
-* post.rb -> post_test.rb, posts_controller.rb, etc
-* post_test.rb -> post.rb, posts_controller.rb, etc
-
-h3. Diagram: views/users/show.rhtml -> user_controller.rb; views/users/show.html.erb -> users_controller.rb
-
-One thing to note for developers of Rails apps using older versions of Rails. If you are in a template file with the extension .rhtml, then it will navigate to the singular controller name 'post', rather than the plural default for controllers. This is for backwards compatibility with older naming conventions.
-
-So we can create a new
posts_controller.rb by returning to the post.rb or post_test.rb files, and navigating to the matching controller. It doesn't exist so a blank file is created.
-
-We have a simple way to create new controller classes; the
cla snippet has a 'Create controller class' option. Select that, and type 'Posts' and then 'post' to create our posts_controller.rb class.
-
-For simpler actions, use the standard techniques for new methods, def + 'new' to create the 'new' method.
-
-For some of the common, more complex controller actions there are also snippets. For the create action, type 'defcreate' and fill out the template with 'post'.
-
-What I want the 'create' action to do is redirect back to the main blog controller for a page. Originally, I could use 'recai' for
redirect_to :controller => "blog", :action => "show", :id => @post but its uncool to use anonymous paths.
-
-So instead let's just enter a named route that sounds nice, replace
@post with
blog_post_path(@post).
-
-[Change to the 'routes.rb' file.] So finally let's setup our routes. I'm going to delete all the default comments and default routes, and reconstruct it with named routes.
-
-h3. Diagram: Routes: map - named routes; maprs - map.resources; mapr - map.resource; mapwo - map.with_options
-
-Within a routes file, you have the three 'map' snippets. As you'll see in moment, the resources snippets include a block for nested resources.
-
-So we'll use 'map' to create named routes. Leave the name as 'connect' for anonymous routes. It is handy to know a Ruby snippet here: tabbing on colon (:) creates a hash key/value pair.
-
-
map.public_page 'blog/show/:id', :controller => "blog", :action => "show"
-
-We could place this route within a with_options block, using 'mapwo'. Then add
map.root within it.
-
-For our posts controller, we'll use the resources snippets. We use 'maprs' and change 'resource' to 'posts' and then we can tab into the block. Say we wanted comments to be a nested resource of posts, then we'd use 'maprs' again, and change 'map' to 'post' and remove the block. [then delete the comment resource + post's block].
-
-There is also a shortcut for the respond_to block - 'rest', which gives a default html response. To add additional response formats, tab on 'wants'. [remove these examples from new method]
-
-Now let's have a final look at functional tests for our create actions, which will require a POST request. [try to change to functional test] We don't have a posts_controller_test.rb, so it creates a blank file for us.
-
-To create a functional test class, use 'cla' again and select 'Create functional test class', and type 'Posts' for the class name prefix. Save the file, close the window and reopen within the project, otherwise some commands might not work if the file is initially not saved.
-
-Remember that test methods are created with 'deft', and the GET + POST methods are created with deftg and deftp. Let's test our create action with 'deftp'.
-
-Enter 'post', but remove the two optional sections as we're creating a new object, not updating an existing object. Within the
:post => { }, type : and tab to create the hash key values.
-
-Fetch the resulting object with
asg + 'post'.
-
-Add a redirection assertion with
artp.
-
-
def test_should_post_create
- post :create, :post => { :title => "hi there", :body => "oh yeah" }
- assert_response :redirect
- assert(post = assigns(:post), "Cannot find @post")
-
- assert_redirected_to blog_post_path(post)
-end
-
-If you just want to run the tests in the current file, or in fact run any Ruby file, use Cmd+R. As we can see, this test passes.
-
-h2. Views
-
-[back to posts_controller.rb]
-
-In the posts controller, we have a new action but we haven't created a template yet. As before, we can use the Navigation cmd to change from the controller to a view. In this case, the view is based on the current method. So we place the cursor in the new method, and it will ask us to create a new.html.erb file. Here is your opportunity to rename the template with alternate format or template extensions, say .xml.builder. But we'll use .html.erb for now.
-
-h3. Diagram: form_for - ff, form_for with error output - ffe
-
-We'll use 'ffe' and enter 'post'. In Rails 2.0, the form_for helper is very powerful and knows from the object it is passed whether it is creating or updating an object.
-
-h3. Diagram: f. - list of available helpers; or use first initial of helpers' names (fftf - text_field)
-
-Inside the form_for block we have two ways to access the common helpers.
-
-By using 'f.' it reminds us what helpers are available and tells us what their tab completions are.
-
-So, let's use the tab completion versions. ffl for label, fftf for text field.
-
-
<%= error_messages_for :post %>
-
-<% form_for @post do |f| -%>
- <%= f.label :title, "Title" %>
- <%= f.text_field :title %>
- <%= f.label :body, "Body" %>
- <%= f.text_area :body, :rows => 10 %>
- <%= f.submit "Post", :disable_with => 'Posting...' %>
-<% end -%>
-
-Now let's put each label or form field in a separate paragraph. Select those lines and use 'Wrap Each Selected Line in Open/Close' - Shift+Ctrl+Cmd+W, and type 'p'.
-
-h3. Diagram: Partials - Shift-Ctrl-H
-
-Since the form_for helper works with saved and unsaved model objects its easily reusable within new and edit templates. So let's extract it as a partial. [do it] And now the render can be pasted into an edit.html.erb file as required.
-
-[go to browser http://localhost:3000/posts/new]
-Now we can fire up the server and have a look at our form and use it. [submit form]
-
-As requested, the browser is redirected to the public post page; which we haven't implemented yet. So let's do that.
-
-We head back to the blog_controller, and create the show.html.erb via navigating away from the show action.
-
-Create a div and set its class to post, then layout the title and body:
-
-
-
<%= @post.title %>
- <%= @post.body %>
-
-
-If we run our tests, the 'show' action test is now passing.
-
-[Shft+Ctrl+H] So we can reuse it in the index.html.erb file, let's move it to a partial called 'post' and remove the '@' signs to reference a local variable instead of an instance variable.
-
-The returned 'render' expression isn't quite right as we need to pass the @post object into the partial. Let's remove it and use the 'render partial' snippets.
-
-h3. Diagram: render :partial - rp; render :partial, :object - rpo; render :partial, :collection - rpc; render :partial, :locals - rpl
-
-Create <%= %> and inside use 'rpo' and set the :object => @post.
-
-Now we create index.html.erb and use <%= %> with 'rpc' and 'post'. The tests require that its wrapped in a div with id="posts". So select all, and Shift+Ctrl+W + div id="posts".
-
-h3. Diagram: Link helpers; lip - link_to "label", model_path(@model), etc.
-
-* lip -
<%= link_to "link text...", model_path(@model) %>
-* lipp -
<%= link_to "link text...", models_path %>
-* linp -
<%= link_to "link text...", parent_child_path(@parent, @child) %>
-* linpp -
<%= link_to "link text...", parent_child_path(@parent) %>
-* lim -
<%= link_to model.name, model %>
-
-h2. Alternate templates
-
-h3. Diagram: html.erb, js.erb, js.rjs, xml.builder, xml.erb, html.builder
-
-In addition to html.erb templates, Rails supports any combination of output format and template engine. As appropriate you can combine html or javascript or xml with erb or rjs or builder, or any other 3rd party templating system such as haml.
-
-The Rails TextMate bundle provides varying support for different combinations.
-
-h3. Diagram: wants.js -> .js.rjs; wants.xml -> .xml.builder; wants.different -> .different.erb
-
-Navigation (e.g. tasty tidbit)
-
-Go to posts_controller, add wants.js to create action. Navigate and create posts/create.js.rjs.
-
-h3. Diagram: RJS snippets - hide, insert_html (ins), replace (rep), replace_html (reph), show, toggle (tog), visual_effect (vis)
-
-All these snippets include the page prefix and are nice ways to start each RJS expression.
-
-[remove all lines; rename with .erb] Another way to generate JavaScript within Rails is with the .js.erb extension. Instead of RJS expressions, you write pure JavaScript, but you can embed ruby using erb.
-
-A new syntax supported in the bundle is JavaScript (Rails), which maps to .js.erb files. That is, JavaScript files that permit embedded Ruby. This means, within the <%= %> tags you have access to your Ruby snippets and syntax highlighting.
-
-h2. Extending
\ No newline at end of file
diff --git a/bundles/ruby-on-rails.tmbundle/website/stylesheets/screen.css b/bundles/ruby-on-rails.tmbundle/website/stylesheets/screen.css
deleted file mode 100644
index 70f1cde3f..000000000
--- a/bundles/ruby-on-rails.tmbundle/website/stylesheets/screen.css
+++ /dev/null
@@ -1,177 +0,0 @@
-body {
- background-color: #fff;
- font-family: "Georgia", sans-serif;
- font-size: 16px;
- line-height: 1.6em;
- padding: 1.6em 0 0 0;
- color: #333;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #444;
-}
-
-h1 {
- font-family: sans-serif;
- font-weight: normal;
- font-size: 4em;
- line-height: 0.8em;
- letter-spacing: -0.1ex;
- margin: 5px;
-}
-
-li {
- padding: 0;
- margin: 0;
- list-style-type: square;
-}
-
-a {
- color: #5E5AFF;
- font-weight: normal;
- text-decoration: underline;
-}
-
-blockquote {
- font-size: 90%;
- font-style: italic;
- border-left: 1px solid #111;
- padding-left: 1em;
-}
-
-.caps {
- font-size: 80%;
-}
-
-#main {
- width: 45em;
- padding: 0;
- margin: 0 auto;
-}
-
-.coda {
- text-align: right;
- color: #77f;
- font-size: smaller;
-}
-
-table {
- font-size: 90%;
- line-height: 1.4em;
- color: #ff8;
- background-color: #111;
- padding: 2px 10px 2px 10px;
- border-style: dashed;
-}
-
-th {
- color: #fff;
-}
-
-td {
- padding: 2px 10px 2px 10px;
-}
-
-.success {
- color: #0CC52B;
-}
-
-.failed {
- color: #E90A1B;
-}
-
-.unknown {
- color: #995000;
-}
-
-pre, code {
- font-family: monospace;
- font-size: 90%;
- line-height: 1.4em;
- color: #ff8;
- background-color: #111;
- padding: 2px 10px 2px 10px;
-}
-
-.comment {
- color: #aaa;
- font-style: italic;
-}
-
-.keyword {
- color: #eff;
- font-weight: bold;
-}
-
-.punct {
- color: #eee;
- font-weight: bold;
-}
-
-.symbol {
- color: #0bb;
-}
-
-.string {
- color: #6b4;
-}
-
-.ident {
- color: #ff8;
-}
-
-.constant {
- color: #66f;
-}
-
-.regex {
- color: #ec6;
-}
-
-.number {
- color: #F99;
-}
-
-.expr {
- color: #227;
-}
-
-#version {
- float: right;
- text-align: right;
- font-family: sans-serif;
- font-weight: normal;
- background-color: #9A5535;
- color: #141331;
- padding: 15px 20px 10px 20px;
- margin: 0 auto;
- margin-top: 15px;
- border: 3px solid #7E393E;
-}
-
-#version .numbers {
- display: block;
- font-size: 4em;
- line-height: 0.8em;
- letter-spacing: -0.1ex;
- margin-bottom: 5px;
-}
-
-#version p {
- text-decoration: none;
- color: #F1F4FF;
- background-color: #9A5535;
- margin: 0;
- padding: 0;
-}
-
-#version a {
- text-decoration: none;
- color: #F1F4FF;
- background-color: #9A5535;
-}
-
-.clickable {
- cursor: pointer;
- cursor: hand;
-}
\ No newline at end of file
diff --git a/bundles/ruby-on-rails.tmbundle/website/template.html.erb b/bundles/ruby-on-rails.tmbundle/website/template.html.erb
deleted file mode 100644
index 5efa86a24..000000000
--- a/bundles/ruby-on-rails.tmbundle/website/template.html.erb
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
-
-
- <%= title %>
-
-
-
-
-
-
-
-
-
<%= title %>
-
- <%= body %>
-
- Dr Nic Williams, <%= modified.pretty %>
- Theme extended from Paul Battley
-
-
-
-
-
-
-
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Check ERB Syntax.plist b/bundles/ruby.tmbundle/Commands/Check ERB Syntax.plist
deleted file mode 100644
index 56a3ec340..000000000
--- a/bundles/ruby.tmbundle/Commands/Check ERB Syntax.plist
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby
-require ENV['TM_SUPPORT_PATH'] + '/lib/textmate'
-puts "using ruby-" + RUBY_VERSION.to_s + ' / erb'
-result = `"${TM_ERB:=erb}" -T - -x | "${TM_RUBY:=ruby}" -c 2>&1`
-puts result
-TextMate.go_to :line => $1 if result =~ /-:(\d+):/
- input
- document
- keyEquivalent
- ^V
- name
- Validate Syntax (ERB)
- output
- showAsTooltip
- scope
- text.html.ruby, text.html source.ruby
- uuid
- 76FCF165-54CB-4213-BC55-BD60B9C6A3EC
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Check Ruby Syntax.plist b/bundles/ruby.tmbundle/Commands/Check Ruby Syntax.plist
deleted file mode 100644
index b95036fc2..000000000
--- a/bundles/ruby.tmbundle/Commands/Check Ruby Syntax.plist
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby
-require ENV['TM_SUPPORT_PATH'] + '/lib/textmate'
-puts `"${TM_RUBY:=ruby}" -e'puts "Using ruby-" + RUBY_VERSION.to_s'`
-result = `"${TM_RUBY:=ruby}" -wc 2>&1`
-puts result
-TextMate.go_to :line => $1 if result =~ /-:(\d+):/
-
- input
- document
- keyEquivalent
- ^V
- name
- Validate Syntax
- output
- showAsTooltip
- scope
- source.ruby
- uuid
- EE5F19BA-6C02-11D9-92BA-0011242E4184
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Completion: Ruby (rcodetools).tmCommand b/bundles/ruby.tmbundle/Commands/Completion: Ruby (rcodetools).tmCommand
deleted file mode 100644
index 5cbf35c9c..000000000
--- a/bundles/ruby.tmbundle/Commands/Completion: Ruby (rcodetools).tmCommand
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby
-
-require "#{ENV["TM_SUPPORT_PATH"]}/lib/exit_codes"
-require "#{ENV["TM_SUPPORT_PATH"]}/lib/ui"
-
-require "pathname"
-
-TM_RUBY = ENV["TM_RUBY"] || "ruby"
-RCODETOOLS = "#{ENV['TM_BUNDLE_SUPPORT']}/vendor/rcodetools"
-
-RAILS_DIR = nil
-dir = File.dirname(ENV["TM_FILEPATH"]) rescue ENV["TM_PROJECT_DIRECTORY"]
-if dir
- dir = Pathname.new(dir)
- loop do
- if (dir + "config/environment.rb").exist?
- Object.send(:remove_const, :RAILS_DIR)
- RAILS_DIR = dir.to_s
- break
- end
-
- break if dir.to_s == "/"
-
- dir += ".."
- end
-end
-
-command = <<END_COMMAND.tr("\n", " ").strip
-"#{TM_RUBY}"
--I "#{RCODETOOLS}/lib"
---
-"#{RCODETOOLS}/bin/rct-complete"
-#{"-r \"#{RAILS_DIR}/config/environment.rb\"" if RAILS_DIR}
---line=#{ENV['TM_LINE_NUMBER']}
---column=#{ENV['TM_LINE_INDEX']}
-2> /dev/null
-END_COMMAND
-completions = `#{command}`.split("\n").map { |l| l.strip }.select { |l| l =~ /\S/ }
-
-if not $?.success?
- TextMate.exit_show_tool_tip "Parse error."
-elsif completions.size == 1
- selected = completions.first
-elsif completions.size > 1
- selected = completions[TextMate::UI.menu(completions)] rescue exit
-else
- TextMate.exit_show_tool_tip "No matches were found."
-end
-
-print selected.sub(/\A#{Regexp.escape(ENV['TM_CURRENT_WORD'].to_s)}/, "")
-
- input
- document
- keyEquivalent
- ~
- name
- Completion: Ruby (rcodetools)
- output
- afterSelectedText
- scope
- source.ruby
- uuid
- 47D203ED-EB9B-4653-A07B-A897800CEB76
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Convert Ruby hash to 1_9 syntax.tmCommand b/bundles/ruby.tmbundle/Commands/Convert Ruby hash to 1_9 syntax.tmCommand
deleted file mode 100644
index 8f15d2b9d..000000000
--- a/bundles/ruby.tmbundle/Commands/Convert Ruby hash to 1_9 syntax.tmCommand
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby
-
-print case str = STDIN.read
- when /=>/; str.gsub(/:(\w+)[\s]+=>[\s]+/, '\1: ')
- when /(\w+):/; str.gsub(/(\w+):(\s*(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|\w+\([^)]*\)|[^,]+))/, ":\\1 =>\\2")
- else; str
-end
-
- fallbackInput
- line
- input
- selection
- keyEquivalent
- ^=
- name
- Toggle Ruby Hash 1.8/1.9 Syntax
- output
- replaceSelectedText
- uuid
- F4EEB2B6-07D8-402F-8FC3-79B7308D2576
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Enclose in * (RDoc comments).tmCommand b/bundles/ruby.tmbundle/Commands/Enclose in * (RDoc comments).tmCommand
deleted file mode 100644
index 6918b3a31..000000000
--- a/bundles/ruby.tmbundle/Commands/Enclose in * (RDoc comments).tmCommand
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby
-s = STDIN.read
-case s
-when /^\w+$/
- print "*#{s}*$0"
-when ""
- print "*$1*$0"
-else
- print "<b>#{s}</b>"
-end
- fallbackInput
- word
- input
- selection
- keyEquivalent
- @b
- name
- Bold
- output
- insertAsSnippet
- scope
- source.ruby comment
- uuid
- 931DD73E-615E-476E-9B0D-8341023AE730
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Enclose in + (RDoc comments).tmCommand b/bundles/ruby.tmbundle/Commands/Enclose in + (RDoc comments).tmCommand
deleted file mode 100644
index 3a7820e5a..000000000
--- a/bundles/ruby.tmbundle/Commands/Enclose in + (RDoc comments).tmCommand
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby
-s = STDIN.read
-case s
-when /^\w+$/
- print "+#{s}+$0"
-when ""
- print "+$1+$0"
-else
- print "<tt>#{s}</tt>"
-end
- fallbackInput
- word
- input
- selection
- keyEquivalent
- @k
- name
- Typewriter
- output
- insertAsSnippet
- scope
- source.ruby comment
- uuid
- 2DDB6FE0-6111-4C40-A149-8E67E76F8272
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Enclose in _ (RDoc comments).tmCommand b/bundles/ruby.tmbundle/Commands/Enclose in _ (RDoc comments).tmCommand
deleted file mode 100644
index 5516b637d..000000000
--- a/bundles/ruby.tmbundle/Commands/Enclose in _ (RDoc comments).tmCommand
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby
-s = STDIN.read
-case s
-when /^\w+$/
- print "_#{s}_$0"
-when ""
- print "_$1_$0"
-else
- print "<em>#{s}</em>"
-end
- fallbackInput
- word
- input
- selection
- keyEquivalent
- @i
- name
- Italic
- output
- insertAsSnippet
- scope
- source.ruby comment
- uuid
- DAA69A0C-FC1E-4509-9931-DFFB38B4D6AE
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Execute Line with Ruby.plist b/bundles/ruby.tmbundle/Commands/Execute Line with Ruby.plist
deleted file mode 100644
index 87934745f..000000000
--- a/bundles/ruby.tmbundle/Commands/Execute Line with Ruby.plist
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby
-
-# be smart, dont print something if we already have..
-$write_count = 0
-def STDOUT.write(what)
- $write_count += 1
- super(what)
-end
-
-# execure the code
-begin
- # insert a space if input was a selection, if it was a line insert \n
- print(ENV['TM_SELECTED_TEXT'] ? " " : "\n")
- r = eval(STDIN.read)
-rescue Object
- r = $!.class.to_s
-end
-
-# try to_s, if it doesnt work use inspect
-# Array and Hash are shown via inspect because they look better with formating
-# do this just if the script did not print anything itself
-if $write_count == 1
- print( (r.class != Hash and r.class != Array and not r.nil? and r.respond_to? :to_s) ? r.to_s : r.inspect )
- print( "\n" ) unless ENV.has_key?('TM_SELECTED_TEXT')
-end
-
- fallbackInput
- line
- input
- selection
- keyEquivalent
- ^E
- name
- Execute Line / Selection as Ruby
- output
- afterSelectedText
- uuid
- EE5F1FB2-6C02-11D9-92BA-0011242E4184
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Execute and Insert Results.tmCommand b/bundles/ruby.tmbundle/Commands/Execute and Insert Results.tmCommand
deleted file mode 100644
index cab8b0d7c..000000000
--- a/bundles/ruby.tmbundle/Commands/Execute and Insert Results.tmCommand
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- export RUBYLIB="$TM_BUNDLE_SUPPORT/vendor/rcodetools/lib${RUBYLIB:+:$RUBYLIB}"
-export TM_RUBY=$(which "${TM_RUBY:-ruby}")
-
-
-"${TM_RUBY}" -r "${TM_SUPPORT_PATH}/lib/ruby1.9/add_1.8_features.rb" -- "$TM_BUNDLE_SUPPORT/vendor/rcodetools/bin/xmpfilter"
-
- fallbackInput
- document
- input
- selection
- keyEquivalent
- ^@E
- name
- Execute and Update ‘# =>’ Markers
- output
- replaceSelectedText
- scope
- source.ruby
- uuid
- FBFC214F-B019-4967-95D2-028F374A3221
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Insert Missing Requires.plist b/bundles/ruby.tmbundle/Commands/Insert Missing Requires.plist
deleted file mode 100644
index 0da76b106..000000000
--- a/bundles/ruby.tmbundle/Commands/Insert Missing Requires.plist
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby
-$: << "#{ENV['TM_SUPPORT_PATH']}/lib"
-
-require "escape"
-require "open3"
-
-# make exceptions in the writing Thread kill the process so we don't hang
-Thread.abort_on_exception = true
-
-CURSOR = [0xFFFC].pack("U").freeze
-line, col = ENV["TM_LINE_NUMBER"].to_i - 1, ENV["TM_LINE_INDEX"].to_i
-
-stdin, stdout, stderr = Open3.popen3("/usr/bin/env", "ruby", "#{ENV['TM_BUNDLE_SUPPORT']}/bin/insert_requires.rb")
-Thread.new do
- code = STDIN.read.to_a
- unless ENV.has_key?('TM_SELECTED_TEXT')
- if code[line].nil? # if cursor was on the last line and it was blank
- code << CURSOR
- else
- code[line][col...col] = CURSOR
- end
- end
- stdin.write code.join
- stdin.close
-end
-
-print stdout.read.split(CURSOR).join('${0}')
-
- fallbackInput
- document
- input
- selection
- keyEquivalent
- ^#
- name
- Insert Missing Requires
- output
- insertAsSnippet
- scope
- source.ruby
- uuid
- 9FB64639-F776-499B-BA6F-BB45F86F80FD
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Lookup in Documentation.plist b/bundles/ruby.tmbundle/Commands/Lookup in Documentation.plist
deleted file mode 100644
index fef94aaf5..000000000
--- a/bundles/ruby.tmbundle/Commands/Lookup in Documentation.plist
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- "${TM_BUNDLE_SUPPORT}/bin/linked_ri.rb"
- fallbackInput
- word
- input
- selection
- keyEquivalent
- ^h
- name
- Documentation for Word / Selection
- output
- showAsTooltip
- scope
- source.ruby, source.ruby.rails
- uuid
- 63F3B3B7-CBE2-426B-B551-657733F3868B
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Make Destructive Call.plist b/bundles/ruby.tmbundle/Commands/Make Destructive Call.plist
deleted file mode 100644
index 39eb6d1b6..000000000
--- a/bundles/ruby.tmbundle/Commands/Make Destructive Call.plist
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- res=$(ruby "$TM_BUNDLE_SUPPORT/bin/make_destructive.rb")
-
-if [ "$res" = "" ]
- then exit_show_tool_tip "Retry this command without a selection."
- else echo -n "$res"
-fi
- fallbackInput
- line
- input
- selection
- keyEquivalent
- ^!
- name
- Add ! to Method in Line / Selection
- output
- insertAsSnippet
- scope
- source.ruby
- uuid
- 7F79BC8D-8A4F-4570-973B-05DFEC25747F
-
-
diff --git a/bundles/ruby.tmbundle/Commands/New Method.plist b/bundles/ruby.tmbundle/Commands/New Method.plist
deleted file mode 100644
index 3cfd6dd1c..000000000
--- a/bundles/ruby.tmbundle/Commands/New Method.plist
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby -wKU
-
-require "#{ENV['TM_SUPPORT_PATH']}/lib/exit_codes"
-require "#{ENV['TM_SUPPORT_PATH']}/lib/escape"
-
-method_name = ENV["TM_SELECTED_TEXT"] || ENV["TM_CURRENT_WORD"] or
- TextMate.exit_show_tool_tip(
- "Please type the new function's name or use the def⇥ snippet."
- )
-
-print <<END_SNIPPET
-def #{e_sn method_name}\${1/.+/(/}\${1:args}\${1/.+/)/}
- \$0
-end
-END_SNIPPET
-
- fallbackInput
- word
- input
- selection
- keyEquivalent
- $
- name
- New Method
- output
- insertAsSnippet
- scope
- source.ruby
- uuid
- 0275EF39-9357-408F-AF20-79E415CA9504
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Omit from RDoc.tmCommand b/bundles/ruby.tmbundle/Commands/Omit from RDoc.tmCommand
deleted file mode 100644
index b9cc7aeb9..000000000
--- a/bundles/ruby.tmbundle/Commands/Omit from RDoc.tmCommand
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby
-s = STDIN.read
-puts "\#--"
-if s== ""
- puts "\# $0","\#++"
-else
- puts s, "\#++", "$0"
-end
- fallbackInput
- line
- input
- selection
- keyEquivalent
- ^@O
- name
- Omit
- output
- insertAsSnippet
- scope
- source.ruby
- uuid
- BF4CA9F1-51CD-48D4-8357-852234F59046
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Open Require.tmCommand b/bundles/ruby.tmbundle/Commands/Open Require.tmCommand
deleted file mode 100644
index aa4a63358..000000000
--- a/bundles/ruby.tmbundle/Commands/Open Require.tmCommand
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby
-
-require "#{ENV['TM_SUPPORT_PATH']}/lib/ui.rb"
-require "#{ENV['TM_SUPPORT_PATH']}/lib/textmate.rb"
-
-REQUIRE_RE = /^\s*(?:require|load)\s*(['"])([^'"#]+?)(?:\.rb)?\1[ \t]*$/
-
-gems_installed = begin
- require 'rubygems'
- true
- rescue LoadError
- false
- end
-
-requires = if ENV['TM_CURRENT_LINE'].to_s =~ REQUIRE_RE
- ["#{$2}.rb"]
- else
- $stdin.read.scan(REQUIRE_RE).map { |_, path| "#{path}.rb" }
- end
-abort 'No includes found.' if requires.empty?
-
-file = if requires.size > 1
- choice = TextMate::UI.menu(requires) or exit
- requires[choice]
- else
- requires.pop
- end
-dir = $LOAD_PATH.find { |dir| File.exist? File.join(dir, file) }
-if not dir and gems_installed and gem_spec = Gem::GemPathSearcher.new.find(file)
- dir = File.join(gem_spec.full_gem_path, gem_spec.require_path)
-end
-
-if file and dir
- dir.sub!(%r{\A\.(?=/|\z)}, ENV['TM_DIRECTORY']) if ENV['TM_DIRECTORY']
- file_path = File.join(dir, file)
-# puts file_path
- TextMate.go_to :file => file_path
- exit
-else
- puts "File not found: #{file}"
-end
-
- fallbackInput
- document
- input
- selection
- keyEquivalent
- @D
- name
- Open Require
- output
- showAsTooltip
- scope
- source.ruby
- uuid
- 8646378E-91F5-4771-AC7C-43FC49A93576
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Run Rake Task.tmCommand b/bundles/ruby.tmbundle/Commands/Run Rake Task.tmCommand
deleted file mode 100644
index 2d40b66f8..000000000
--- a/bundles/ruby.tmbundle/Commands/Run Rake Task.tmCommand
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- export RUBYLIB="$TM_BUNDLE_SUPPORT/RakeMate${RUBYLIB:+:$RUBYLIB}"
-export TM_RUBY=$(which "${TM_RUBY:-ruby}")
-export TM_RAKE=$(which "${TM_RAKE:-rake}")
-
-"${TM_RUBY}" -- "$TM_BUNDLE_SUPPORT/RakeMate/rake_mate.rb"
-
- input
- none
- keyEquivalent
- ^R
- name
- Run Rake Task
- output
- showAsHTML
- scope
- source.ruby
- uuid
- 569C9822-8C41-4907-94C7-1A8A0031B66D
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Run focused unit test.plist b/bundles/ruby.tmbundle/Commands/Run focused unit test.plist
deleted file mode 100644
index fe3e4ca14..000000000
--- a/bundles/ruby.tmbundle/Commands/Run focused unit test.plist
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- captureFormatString
- $0
- capturePattern
- (/[^:]+):(\d+)
- command
- #!/bin/sh
-
-export RUBYLIB="$TM_BUNDLE_SUPPORT/RubyMate${RUBYLIB:+:$RUBYLIB}"
-
-/usr/bin/env ruby -KU -- "$TM_BUNDLE_SUPPORT/RubyMate/run_script.rb" --name=
-
- fileCaptureRegister
- 1
- input
- document
- keyEquivalent
- @R
- lineCaptureRegister
- 2
- name
- Run Focused Unit Test
- output
- showAsHTML
- scope
- source.ruby
- uuid
- 5289EE40-86B8-11D9-A8D4-000A95E13C98
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Run.tmCommand b/bundles/ruby.tmbundle/Commands/Run.tmCommand
deleted file mode 100644
index b2baaac21..000000000
--- a/bundles/ruby.tmbundle/Commands/Run.tmCommand
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
- autoScrollOutput
-
- beforeRunningCommand
- nop
- command
- #!/bin/sh
-
-export RUBYLIB="$TM_BUNDLE_SUPPORT/RubyMate${RUBYLIB:+:$RUBYLIB}"
-
-/usr/bin/env ruby -KU -- "$TM_BUNDLE_SUPPORT/RubyMate/run_script.rb"
-
- input
- document
- keyEquivalent
- @r
- name
- Run
- output
- showAsHTML
- scope
- source.ruby
- uuid
- 35222962-C50D-4D58-A6AE-71E7AD980BE4
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Show RDoc for this file.plist b/bundles/ruby.tmbundle/Commands/Show RDoc for this file.plist
deleted file mode 100644
index f9e0868d8..000000000
--- a/bundles/ruby.tmbundle/Commands/Show RDoc for this file.plist
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
- beforeRunningCommand
- saveActiveFile
- command
- if (( ${#TM_PROJECT_DIRECTORY} != 0 )); then
- cd "$TM_PROJECT_DIRECTORY"
- output="`basename "$TM_PROJECT_DIRECTORY"`"
- input="."
-else
- cd "$TM_DIRECTORY"
- output="$TM_FILENAME"
- input="$TM_FILENAME"
-fi
-
-output_dir="/tmp/rdoc_${output}"
-
-rm -rf "${output_dir}"
-
-rdoc -S -N -q -f html --op "${output_dir}" "$input" &>/dev/null
-
-echo "<html><head><meta http-equiv=\"refresh\" content=\"0;URL=tm-file://${output_dir}/index.html\"></head></html>"
-
- input
- none
- name
- Show for Current File / Project
- output
- showAsHTML
- scope
- source.ruby
- uuid
- 1AD6A138-2E89-4D6A-AB3F-416BF9CE968D
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Toggle ERb Tags.tmCommand b/bundles/ruby.tmbundle/Commands/Toggle ERb Tags.tmCommand
deleted file mode 100644
index 36dfed029..000000000
--- a/bundles/ruby.tmbundle/Commands/Toggle ERb Tags.tmCommand
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby -w
-
-require "#{ENV["TM_SUPPORT_PATH"]}/lib/escape"
-require "enumerator"
-
-TAGS = %w[<%= <%# <%- <%].freeze
-
-# locate caret (Allan's code)
-line = ENV['TM_LINE_NUMBER'].to_i - ENV['TM_INPUT_START_LINE'].to_i
-col = ENV['TM_LINE_INDEX'].to_i
-if ENV['TM_LINE_NUMBER'].to_i == ENV['TM_INPUT_START_LINE'].to_i
- col -= ENV['TM_INPUT_START_LINE_INDEX'].to_i
-end
-
-# read input
-input = $stdin.read
-
-# snippetize output
-lines = RUBY_VERSION < "1.9" ? input.to_a : input.lines.to_a
-lines[line] = e_sn(lines[line][0...col]) + "${0}" + e_sn(lines[line][col..-1])
-enum = RUBY_VERSION < "1.9" ? lines.enum_with_index :
- lines.each.with_index
-output = enum.inject(String.new) do |out, (l, i)|
- i == line ? out + l : out + e_sn(l)
-end
-
-# swap ERb tags
-result = output.sub(/\A<%[-#=]?/) { |match| TAGS[TAGS.index(match) - 1] }
-if result[2] == ?-
- result.sub!(/%>\Z/, "-%>")
-else
- result.sub!(/-%>\Z/, "%>")
-end
-print result
- disableOutputAutoIndent
-
- fallbackInput
- scope
- input
- selection
- keyEquivalent
- ^>
- name
- Toggle ERb Tags
- output
- insertAsSnippet
- scope
- source.ruby.embedded, source.ruby.rails.embedded, comment.block.erb, meta.erb
- uuid
- 835FAAC6-5431-436C-998B-241F7226B99B
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Toggle Quote Style.plist b/bundles/ruby.tmbundle/Commands/Toggle Quote Style.plist
deleted file mode 100644
index 16de1a596..000000000
--- a/bundles/ruby.tmbundle/Commands/Toggle Quote Style.plist
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby
-
-class String
- def escape(char)
- gsub(/\\.|#{Regexp.quote(char)}/) { |match| match == char ? "\\#{char}" : match }
- end
-
- def unescape(char)
- gsub(/\\./) { |match| match == "\\#{char}" ? char : match }
- end
-end
-
-print case str = STDIN.read
- # Handle standard quotes
- when /\A"(.*)"\z/m; "'" + $1.unescape('"').escape("'") + "'"
- when /\A'(.*)'\z/m; "%Q{" + $1.unescape("'").escape("}") + "}"
- when /\A%[Qq]?\{(.*)\}\z/m; '"' + $1.unescape("}").escape('"') + '"'
-
- # Handle the more esoteric quote styles
- when /\A%[Qq]?\[(.*)(\])\z/m,
- /\A%[Qq]?\((.*)(\))\z/m,
- /\A%[Qq]?<(.*)(>)\z/m; '"' + $1.unescape($2).escape('"') + '"'
- when /\A%[Qq]?(.)(.*)\1\z/m; '"' + $2.unescape($1).escape('"') + '"'
-
- # Handle shell escapes
- when /\A`(.*)`\z/m; "%x{" + $1.unescape("`").escape("}") + "}"
- when /\A%x\{(.*)\}\z/m; "`" + $1.unescape("}").escape("`") + "`"
-
- # Default case
- else str
-end
-
- fallbackInput
- scope
- input
- selection
- keyEquivalent
- ^"
- name
- Toggle Quote Style
- output
- replaceSelectedText
- scope
- source.ruby string.quoted.double, source.ruby string.quoted.single, source.ruby string
- uuid
- 6519CB08-8326-4B77-A251-54722FFBFC1F
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Toggle String:Symbol.tmCommand b/bundles/ruby.tmbundle/Commands/Toggle String:Symbol.tmCommand
deleted file mode 100644
index e97971296..000000000
--- a/bundles/ruby.tmbundle/Commands/Toggle String:Symbol.tmCommand
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- bundleUUID
- 467B298F-6227-11D9-BFB1-000D93589AF6
- command
- #!/usr/bin/env ruby
-
-print case str = STDIN.read
- # Handle standard quotes
- when /\A["'](\w+)["']\z/ then ":" + $1
- when /\A:(\w+)\z/ then '"' + $1 + '"'
- # Default case
- else str
-end
-
- fallbackInput
- scope
- input
- selection
- keyEquivalent
- ^:
- name
- Toggle String / Symbol
- output
- replaceSelectedText
- scope
- source.ruby string.quoted, source.ruby constant.other.symbol.ruby
- uuid
- B297E4B8-A8FF-49CE-B9C4-6D4911724D43
-
-
diff --git a/bundles/ruby.tmbundle/Commands/Toggle ‘do … end’ : ‘{ … }’.tmCommand b/bundles/ruby.tmbundle/Commands/Toggle ‘do … end’ : ‘{ … }’.tmCommand
deleted file mode 100644
index 29ef44b62..000000000
--- a/bundles/ruby.tmbundle/Commands/Toggle ‘do … end’ : ‘{ … }’.tmCommand
+++ /dev/null
@@ -1,150 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby -KU
-# encoding: UTF-8
-
-require "rexml/text"
-require "#{ENV["TM_SUPPORT_PATH"]}/lib/escape"
-
-# transform XML into normal and sanitized Ruby
-ruby, safe_ruby, scope = "", "", []
-STDIN.read.scan(/<(.*?)>|([^<]+)/) do
- if $1
- if $1[0] == ?/
- scope.pop
- else
- scope.push($1)
- end
- else
- unescaped = REXML::Text.unnormalize($2)
- ruby << unescaped
- # strip strings, regexes, and comments from safe_ruby but leave byte count
- if scope.any? { |s| s =~ /\A(?:string|comment)\b/ }
- safe_ruby << " " * unescaped.length
- else
- safe_ruby << unescaped
- end
- end
-end
-
-# find and mark the cursor
-line_number = ENV["TM_LINE_NUMBER"].to_i
-input_start_line = ENV["TM_INPUT_START_LINE"].to_i
-row = line_number - input_start_line
-col = ENV["TM_LINE_INDEX"].to_i
-if line_number == input_start_line
- col -= ENV["TM_INPUT_START_LINE_INDEX"].to_i
-end
-cursor = ruby[/\A(?:.*\n){#{row - 1}}.{#{col}}/].size
-CURSOR = [0xFFFC].pack("U")
-B = "(?:\\b|#{CURSOR})" # Note: /\w/u includes CURSOR
-ruby[cursor, 0] = CURSOR
-safe_ruby[cursor, 0] = CURSOR
-
-# find the block nearest to the cursor
-block_start, block_length = nil, nil
-loop do
- block_start = safe_ruby.rindex( /(\{|#{B}do#{B})/,
- block_start.nil? ? cursor : block_start - 1 )
- if block_start.nil? # block not found: give up and don't change the document
- print e_sn(ruby).sub(CURSOR, "$0")
- exit
- end
- block_length, nesting = 0, []
- if $1 == "{"
- re, starts, stop = /\{|\}|[^{}]+/, ["{"], "}"
- else
- re, starts, stop = /#{B}do#{B}|#{B}end#{B}|./m, ["do"], "end"
- end
- safe_ruby[block_start..-1].scan(re) do |token|
- block_length += token.length
- token.sub!(/\A#{CURSOR}/, "")
- token.sub!(/#{CURSOR}\z/, "")
- case token
- when *starts
- nesting << token
- when stop
- if nesting.last.nil?
- nesting << nil
- break
- else
- nesting.pop
- break if nesting.empty?
- end
- end
- end
- break if nesting.empty? and ruby[block_start, block_length].include? CURSOR
-end
-block = ruby[block_start, block_length]
-
-# toggle the block
-if block[0] == ?{
- block = block[1..-2]
- if block.include? "\n"
- block[0, 0] = " " if block =~ /\A#{CURSOR}?[A-Za-z0-9_]/
- block << " " if block =~ /[A-Za-z0-9_]#{CURSOR}?\z/
- block = "do#{block}end"
- else # expand the block
- block.strip!
- lines = %w[do]
- if block.sub!(/\A(#{CURSOR}?(\s*)\|[^|]*\|)/, "")
- lines.first << "#{' ' if $2.empty?}#{$1}"
- end
- indent = ruby[0...block_start][/^([ \t]*).*\Z/, 1]
- tab = ( ENV["TM_SOFT_TABS"] == "YES" ? " " * ENV["TM_TAB_SIZE"].to_i :
- "\t" )
- lines << "#{indent}#{tab}#{block.strip}"
- lines << "#{indent}end"
- block = lines.join("\n")
- end
-else
- block = block[2..-4]
- if block.include? "\n" # collapse the block
- lines = block.send(block.respond_to?(:lines) ? :lines : :to_s).to_a
- lines.first.send(
- "#{'r' if lines.first =~ /\A\s*#{CURSOR}?\s*\|[^|]*\|/}strip!"
- )
- lines[1..-1].each do |line|
- line.strip!
- end
- lines.first << "; " unless lines.first =~
- /\A\s*#{CURSOR}?\s*(?:\|[^|]*\|)?\s*#{CURSOR}?\z/
- lines.first << " " unless lines.first =~ /\s\z/
- lines[1..-2].each do |line|
- line << "; "
- end
- lines[-2].sub!(/; \z/, "") if lines.size > 2 and lines.last.empty?
- cursor_by_end = lines.size > 2 && lines.last == CURSOR
- lines[-2].sub!(/; \z/, " ") if cursor_by_end
- block = "{#{lines.join}#{' ' unless cursor_by_end}}"
- else
- block = "{#{block}}"
- end
-end
-
-# replace document
-print e_sn(ruby[0...block_start])
-print e_sn(block).sub(CURSOR, "$0")
-print e_sn(ruby[(block_start + block_length)..-1])
-
- input
- selection
- inputFormat
- xml
- keyEquivalent
- ^{
- name
- Toggle ‘do … end’ / ‘{ … }’
- output
- insertAsSnippet
- scope
- source.ruby
- uuid
- 59E811FF-E722-46BE-8938-04713612FABB
-
-
diff --git a/bundles/ruby.tmbundle/Commands/word_wrap() (worw).plist b/bundles/ruby.tmbundle/Commands/word_wrap() (worw).plist
deleted file mode 100644
index 5cdad7504..000000000
--- a/bundles/ruby.tmbundle/Commands/word_wrap() (worw).plist
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby
-$: << ENV['TM_SUPPORT_PATH'] + '/lib'
-require "ui"
-TextMate::UI.request_string(:title => "Wrap Size",
- :prompt => "Enter a character width:",
- :button1 => "Build Snippet") do |col|
- col = col.to_i
- print %Q{gsub!(/(.{1,#{col}}|\\S{#{col + 1},})(?: +|$\\n?)/, "\\\\1\\n")}
-end
-
- input
- none
- name
- word_wrap()
- output
- afterSelectedText
- scope
- source.ruby
- tabTrigger
- worw
- uuid
- 97054C4D-E4A3-45B1-9C00-B82DBCB30CAD
-
-
diff --git a/bundles/ruby.tmbundle/DragCommands/Require Ruby File.tmDragCommand b/bundles/ruby.tmbundle/DragCommands/Require Ruby File.tmDragCommand
deleted file mode 100644
index f8ea01ea6..000000000
--- a/bundles/ruby.tmbundle/DragCommands/Require Ruby File.tmDragCommand
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby -wKU
-
-require 'pathname'
-
-require "#{ENV['TM_SUPPORT_PATH']}/lib/escape.rb"
-
-from_path = Pathname.new(ENV['TM_FILEPATH'] || '.').dirname.realpath
-to_path = Pathname.new(ENV['TM_DROPPED_FILE']).realpath
-begin
- path = to_path.relative_path_from(from_path)
-rescue ArgumentError
- path = to_path
-end
-lib = path.to_s.sub(/\.rb\z/i, '')
-puts %Q{require "#{e_sn(lib).gsub('"', '\"')}"}
-
- draggedFileExtensions
-
- rb
-
- input
- selection
- name
- Require Ruby File
- output
- insertAsSnippet
- scope
- source.ruby
- uuid
- C122CD92-DDBE-4869-9C7A-CC2B254C9411
-
-
diff --git a/bundles/ruby.tmbundle/Macros/Benchmark_bmbm(__) do __ end.tmMacro b/bundles/ruby.tmbundle/Macros/Benchmark_bmbm(__) do __ end.tmMacro
deleted file mode 100644
index 96fa6c082..000000000
--- a/bundles/ruby.tmbundle/Macros/Benchmark_bmbm(__) do __ end.tmMacro
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
- commands
-
-
- command
- moveToBeginningOfDocumentAndModifySelection:
-
-
- argument
-
- command
- insert_requires.rb benchmark
- input
- selection
- output
- insertAsSnippet
-
- command
- executeCommandWithOptions:
-
-
- argument
-
- content
- TESTS = ${1:10_000}
-Benchmark.bmbm do |results|
- $0
-end
- name
- Benchmark.bmbm do .. end
- scope
- source.ruby
- tabTrigger
- bm-
- uuid
- 942F20E2-C40A-44B8-A3F2-99AAC68CB534
-
- command
- insertSnippetWithOptions:
-
-
- name
- Benchmark.bmbm do .. end
- scope
- source.ruby
- tabTrigger
- bm
- uuid
- C649F945-DAB8-4DA2-B73C-2EFF9D7D34F3
-
-
diff --git a/bundles/ruby.tmbundle/Macros/Delete forward:backward.tmMacro b/bundles/ruby.tmbundle/Macros/Delete forward:backward.tmMacro
deleted file mode 100644
index 0c8a71322..000000000
--- a/bundles/ruby.tmbundle/Macros/Delete forward:backward.tmMacro
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
- commands
-
-
- command
- deleteBackward:
-
-
- command
- deleteForward:
-
-
- keyEquivalent
-
- name
- Delete forward/backward
- scope
- source.ruby.embedded.source.empty
- uuid
- A83F68A9-F751-4BB4-AE16-56812878C16A
-
-
diff --git a/bundles/ruby.tmbundle/Macros/Overwrite } in #{ .. }.plist b/bundles/ruby.tmbundle/Macros/Overwrite } in #{ .. }.plist
deleted file mode 100644
index 4845d9652..000000000
--- a/bundles/ruby.tmbundle/Macros/Overwrite } in #{ .. }.plist
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
- commands
-
-
- command
- moveRightAndModifySelection:
-
-
- argument
-
- action
- replaceAll
- findInProjectIgnoreCase
-
- findString
- ((?m:.){2,})|\}|([^}])
- ignoreCase
-
- regularExpression
-
- replaceAllScope
- selection
- replaceString
- $1}$2
- wrapAround
-
-
- command
- findWithOptions:
-
-
- command
- moveLeft:
-
-
- command
- moveRight:
-
-
- keyEquivalent
- }
- name
- Overwrite '}' in #{ .. }
- scope
- source.ruby string.quoted source.ruby.embedded
- scopeType
- local
- uuid
- E5158F94-CC52-4424-A495-14EF9272653F
-
-
diff --git a/bundles/ruby.tmbundle/Macros/PStore_new( __ ).tmMacro b/bundles/ruby.tmbundle/Macros/PStore_new( __ ).tmMacro
deleted file mode 100644
index c7604d0b3..000000000
--- a/bundles/ruby.tmbundle/Macros/PStore_new( __ ).tmMacro
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
- commands
-
-
- command
- moveToBeginningOfDocumentAndModifySelection:
-
-
- argument
-
- command
- insert_requires.rb pstore
- input
- selection
- output
- insertAsSnippet
-
- command
- executeCommandWithOptions:
-
-
- argument
-
- content
- PStore.new(${1:"${2:file_name.pstore}"})
- name
- PStore.new( .. )
- scope
- source.ruby
- tabTrigger
- Pn-
- uuid
- 5B46ECFD-23A4-4F0C-9951-F64C19C72C2B
-
- command
- insertSnippetWithOptions:
-
-
- name
- PStore.new( .. )
- scope
- source.ruby
- tabTrigger
- Pn
- uuid
- 5AE7CFB4-418E-4E00-AD76-06DB755EE876
-
-
diff --git a/bundles/ruby.tmbundle/Macros/YAML.dump(.., file) (Yd).plist b/bundles/ruby.tmbundle/Macros/YAML.dump(.., file) (Yd).plist
deleted file mode 100644
index 0025b572b..000000000
--- a/bundles/ruby.tmbundle/Macros/YAML.dump(.., file) (Yd).plist
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
- commands
-
-
- command
- moveToBeginningOfDocumentAndModifySelection:
-
-
- argument
-
- command
- insert_requires.rb yaml
- input
- selection
- output
- insertAsSnippet
-
- command
- executeCommandWithOptions:
-
-
- argument
-
- bundlePath
- /Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle
- content
- File.open(${1:"${2:path/to/file}.yaml"}, "w") { |${3:file}| YAML.dump(${4:obj}, ${3:file}) }
- scope
- source.ruby
- supportPath
- /Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle/Support
- tabTrigger
- Yd-
- uuid
- 3BA6762A-BB6B-489E-8006-F30F386AEF48
-
- command
- insertSnippetWithOptions:
-
-
- keyEquivalent
-
- name
- YAML.dump(.., file)
- scope
- source.ruby
- scopeType
- local
- tabTrigger
- Yd
- uuid
- 9460392B-C036-4A76-A5AE-1191F10E4B1B
-
-
diff --git a/bundles/ruby.tmbundle/Macros/YAML.load(file) (Yl).plist b/bundles/ruby.tmbundle/Macros/YAML.load(file) (Yl).plist
deleted file mode 100644
index 84b2534c8..000000000
--- a/bundles/ruby.tmbundle/Macros/YAML.load(file) (Yl).plist
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
- commands
-
-
- command
- moveToBeginningOfDocumentAndModifySelection:
-
-
- argument
-
- command
- insert_requires.rb yaml
- input
- selection
- output
- insertAsSnippet
-
- command
- executeCommandWithOptions:
-
-
- argument
-
- bundlePath
- /Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle
- content
- File.open(${1:"${2:path/to/file}.yaml"}) { |${3:file}| YAML.load(${3:file}) }
- scope
- source.ruby
- supportPath
- /Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle/Support
- tabTrigger
- Yl-
- uuid
- 8343ACF4-EEB7-44B5-B835-94826466D4D5
-
- command
- insertSnippetWithOptions:
-
-
- keyEquivalent
-
- name
- YAML.load(file)
- scope
- source.ruby
- scopeType
- local
- tabTrigger
- Yl
- uuid
- 2C07D4E7-D74F-4AE4-82BE-B0BA82247AFA
-
-
diff --git a/bundles/ruby.tmbundle/Macros/class .. < DelegateClass .. initialize .. end (class).plist b/bundles/ruby.tmbundle/Macros/class .. < DelegateClass .. initialize .. end (class).plist
deleted file mode 100644
index e0cbb0f47..000000000
--- a/bundles/ruby.tmbundle/Macros/class .. < DelegateClass .. initialize .. end (class).plist
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
- commands
-
-
- command
- moveToBeginningOfDocumentAndModifySelection:
-
-
- argument
-
- command
- insert_requires.rb delegate
- input
- selection
- output
- insertAsSnippet
-
- command
- executeCommandWithOptions:
-
-
- argument
-
- bundlePath
- /Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle
- content
- class ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}} < DelegateClass(${2:ParentClass})
- def initialize${3/(^.*?\S.*)|.*/(?1:\()/}${3:args}${3/(^.*?\S.*)|.*/(?1:\))/}
- super(${4:del_obj})
-
- $0
- end
-
-
-end
- scope
- source.ruby
- supportPath
- /Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle/Support
- tabTrigger
- class-
- uuid
- AFE1D078-EA16-45F5-AD8A-FAC1B523D861
-
- command
- insertSnippetWithOptions:
-
-
- name
- class .. < DelegateClass .. initialize .. end
- scope
- source.ruby
- scopeType
- local
- tabTrigger
- cla
- uuid
- 121B334B-2AA6-4E9A-A8B8-BF93B627982B
-
-
diff --git a/bundles/ruby.tmbundle/Macros/each_char { |chr| .. } (eac).plist b/bundles/ruby.tmbundle/Macros/each_char { |chr| .. } (eac).plist
deleted file mode 100644
index de9c34445..000000000
--- a/bundles/ruby.tmbundle/Macros/each_char { |chr| .. } (eac).plist
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
- commands
-
-
- command
- moveToBeginningOfDocumentAndModifySelection:
-
-
- argument
-
- command
- insert_requires.rb jcode
- input
- selection
- output
- insertAsSnippet
-
- command
- executeCommandWithOptions:
-
-
- argument
-
- bundlePath
- /Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle
- content
- each_char { |${1:chr}| $0 }
- scope
- source.ruby
- supportPath
- /Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle/Support
- tabTrigger
- eac-
- uuid
- FDD73070-6D32-4301-A86A-C55B77C3D8ED
-
- command
- insertSnippetWithOptions:
-
-
- name
- each_char { |chr| .. }
- scope
- source.ruby
- scopeType
- local
- tabTrigger
- eac
- uuid
- 7E084412-80E6-4B70-8092-C03D1ECE4CD2
-
-
diff --git a/bundles/ruby.tmbundle/Macros/each_cons(..) { |group| .. } (eac).plist b/bundles/ruby.tmbundle/Macros/each_cons(..) { |group| .. } (eac).plist
deleted file mode 100644
index 3bec50ee6..000000000
--- a/bundles/ruby.tmbundle/Macros/each_cons(..) { |group| .. } (eac).plist
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
- commands
-
-
- command
- moveToBeginningOfDocumentAndModifySelection:
-
-
- argument
-
- command
- insert_requires.rb enumerator
- input
- selection
- output
- insertAsSnippet
-
- command
- executeCommandWithOptions:
-
-
- argument
-
- bundlePath
- /Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle
- content
- each_cons(${1:2}) { |${2:group}| $0 }
- scope
- source.ruby
- supportPath
- /Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle/Support
- tabTrigger
- eac-
- uuid
- 3C04589C-5127-478E-97B3-CA7DD2EA7ECD
-
- command
- insertSnippetWithOptions:
-
-
- name
- each_cons(..) { |group| .. }
- scope
- source.ruby
- scopeType
- local
- tabTrigger
- eac
- uuid
- EC73D5CC-5F05-46B9-A6F4-82037E4A38C9
-
-
diff --git a/bundles/ruby.tmbundle/Macros/each_slice(..) { |group| .. } (eas).plist b/bundles/ruby.tmbundle/Macros/each_slice(..) { |group| .. } (eas).plist
deleted file mode 100644
index d9540b75a..000000000
--- a/bundles/ruby.tmbundle/Macros/each_slice(..) { |group| .. } (eas).plist
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
- commands
-
-
- command
- moveToBeginningOfDocumentAndModifySelection:
-
-
- argument
-
- command
- insert_requires.rb enumerator
- input
- selection
- output
- insertAsSnippet
-
- command
- executeCommandWithOptions:
-
-
- argument
-
- bundlePath
- /Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle
- content
- each_slice(${1:2}) { |${2:group}| $0 }
- scope
- source.ruby
- supportPath
- /Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle/Support
- tabTrigger
- eas-
- uuid
- CD748479-D2A4-4AB5-95BD-4C89512BA210
-
- command
- insertSnippetWithOptions:
-
-
- name
- each_slice(..) { |group| .. }
- scope
- source.ruby
- scopeType
- local
- tabTrigger
- eas
- uuid
- 825B721D-4367-4DF7-98C0-F005695DF9E3
-
-
diff --git a/bundles/ruby.tmbundle/Macros/extend Forwardable (Forw).plist b/bundles/ruby.tmbundle/Macros/extend Forwardable (Forw).plist
deleted file mode 100644
index a2ea671eb..000000000
--- a/bundles/ruby.tmbundle/Macros/extend Forwardable (Forw).plist
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
- commands
-
-
- command
- moveToBeginningOfDocumentAndModifySelection:
-
-
- argument
-
- command
- insert_requires.rb forwardable
- input
- selection
- output
- insertAsSnippet
-
- command
- executeCommandWithOptions:
-
-
- argument
-
- bundlePath
- /Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle
- content
- extend Forwardable
- scope
- source.ruby
- supportPath
- /Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle/Support
- tabTrigger
- Forw-
- uuid
- 7F46C90A-595B-4B83-A4F7-058F63CE4218
-
- command
- insertSnippetWithOptions:
-
-
- name
- extend Forwardable
- scope
- source.ruby
- scopeType
- local
- tabTrigger
- Forw
- uuid
- 58FDEA60-10AF-4C49-AA09-29B77030DB25
-
-
diff --git a/bundles/ruby.tmbundle/Macros/map_with_index { |e, i| .. } (mapwi).plist b/bundles/ruby.tmbundle/Macros/map_with_index { |e, i| .. } (mapwi).plist
deleted file mode 100644
index 02fb7506b..000000000
--- a/bundles/ruby.tmbundle/Macros/map_with_index { |e, i| .. } (mapwi).plist
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
- commands
-
-
- command
- moveToBeginningOfDocumentAndModifySelection:
-
-
- argument
-
- command
- insert_requires.rb enumerator
- input
- selection
- output
- insertAsSnippet
-
- command
- executeCommandWithOptions:
-
-
- argument
-
- bundlePath
- /Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle
- content
- enum_with_index.map { |${1:e}, ${2:i}| $0 }
- scope
- source.ruby
- supportPath
- /Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle/Support
- tabTrigger
- mapwi-
- uuid
- BD4CFD7B-1AC0-4569-9BDA-FD491F41F4E6
-
- command
- insertSnippetWithOptions:
-
-
- name
- map_with_index { |e, i| .. }
- scope
- source.ruby
- scopeType
- local
- tabTrigger
- mapwi
- uuid
- BFB65D1C-62F1-485D-8A67-3E5A2E55107C
-
-
diff --git "a/bundles/ruby.tmbundle/Macros/require_gem \"__\".tmMacro" "b/bundles/ruby.tmbundle/Macros/require_gem \"__\".tmMacro"
deleted file mode 100644
index bc81569d2..000000000
--- "a/bundles/ruby.tmbundle/Macros/require_gem \"__\".tmMacro"
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
- commands
-
-
- command
- moveToBeginningOfDocumentAndModifySelection:
-
-
- argument
-
- command
- insert_requires.rb rubygems
- input
- selection
- output
- insertAsSnippet
-
- command
- executeCommandWithOptions:
-
-
- argument
-
- content
- require "$0"
- name
- require_gem ".."
- scope
- source.ruby
- tabTrigger
- reqg-
- uuid
- 34FEBB9F-73CD-4DD4-A0A3-1CF2A5E3DE78
-
- command
- insertSnippetWithOptions:
-
-
- name
- require_gem ".."
- scope
- source.ruby
- tabTrigger
- reqg
- uuid
- 33969819-62C5-4E03-B824-C2337205F364
-
-
diff --git a/bundles/ruby.tmbundle/Macros/xmlread(__).tmMacro b/bundles/ruby.tmbundle/Macros/xmlread(__).tmMacro
deleted file mode 100644
index 6efb2ad33..000000000
--- a/bundles/ruby.tmbundle/Macros/xmlread(__).tmMacro
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
- commands
-
-
- command
- moveToBeginningOfDocumentAndModifySelection:
-
-
- argument
-
- command
- insert_requires.rb rexml/document
- input
- selection
- output
- insertAsSnippet
-
- command
- executeCommandWithOptions:
-
-
- argument
-
- content
- REXML::Document.new(File.read(${1:"${2:path/to/file}"}))
- name
- xmlread(..)
- scope
- source.ruby
- tabTrigger
- xml-
- uuid
- B904D4AA-D15D-48A4-8EB2-563BAF489332
-
- command
- insertSnippetWithOptions:
-
-
- name
- xmlread(..)
- scope
- source.ruby
- tabTrigger
- xml
- uuid
- F6BF907E-FDF7-4D9B-9E57-BE159561349D
-
-
diff --git a/bundles/ruby.tmbundle/Preferences/Block typing pairs.plist b/bundles/ruby.tmbundle/Preferences/Block typing pairs.plist
deleted file mode 100644
index e13b89029..000000000
--- a/bundles/ruby.tmbundle/Preferences/Block typing pairs.plist
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
- name
- Typing Pairs: Block Opening
- scope
- keyword.control.start-block.ruby, meta.syntax.ruby.start-block
- settings
-
- smartTypingPairs
-
-
- "
- "
-
-
- (
- )
-
-
- {
- }
-
-
- [
- ]
-
-
- “
- ”
-
-
- |
- |
-
-
-
- uuid
- 6D75102B-6E51-4360-8F12-BE12327B6AE6
-
-
diff --git a/bundles/ruby.tmbundle/Preferences/Comments.plist b/bundles/ruby.tmbundle/Preferences/Comments.plist
deleted file mode 100644
index 8e0a72e27..000000000
--- a/bundles/ruby.tmbundle/Preferences/Comments.plist
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
- name
- Comments
- scope
- source.ruby
- settings
-
- shellVariables
-
-
- name
- TM_COMMENT_START
- value
- #
-
-
- name
- TM_COMMENT_START_2
- value
- =begin
-
-
-
- name
- TM_COMMENT_END_2
- value
- =end
-
-
-
-
- uuid
- 1D26F26C-C6F7-434F-84F8-FEE895372E8A
-
-
diff --git a/bundles/ruby.tmbundle/Preferences/Completion: ENV[…] variables.tmPreferences b/bundles/ruby.tmbundle/Preferences/Completion: ENV[…] variables.tmPreferences
deleted file mode 100644
index c0278fc83..000000000
--- a/bundles/ruby.tmbundle/Preferences/Completion: ENV[…] variables.tmPreferences
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- name
- Completion: ENV[…] variables
- scope
- meta.environment-variable.ruby string.quoted
- settings
-
- completionCommand
- env|grep "^$TM_CURRENT_WORD"|sort|cut -d= -f1
-
- uuid
- 1A7701FA-D866-498C-AD4C-7846538DB535
-
-
diff --git a/bundles/ruby.tmbundle/Preferences/Completion: require strings.tmPreferences b/bundles/ruby.tmbundle/Preferences/Completion: require strings.tmPreferences
deleted file mode 100644
index 60bdb4b76..000000000
--- a/bundles/ruby.tmbundle/Preferences/Completion: require strings.tmPreferences
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- name
- Completion: require strings
- scope
- meta.require.ruby string.quoted
- settings
-
- completionCommand
- #!/usr/bin/env ruby
- ptrn = /^#{Regexp.escape ENV["TM_CURRENT_WORD"].to_s}[^.]+\..+/
- puts( $LOAD_PATH.inject([]) do |res, path|
- res << Dir.new(path).grep(ptrn) { |file| file[/^[^.]+/] } if File.exists?(path)
- res
- end.sort.uniq )
-
- uuid
- AEDD6A5F-417F-4177-8589-B07518ACA9DE
-
-
diff --git a/bundles/ruby.tmbundle/Preferences/Miscellaneous.plist b/bundles/ruby.tmbundle/Preferences/Miscellaneous.plist
deleted file mode 100644
index 81bd04023..000000000
--- a/bundles/ruby.tmbundle/Preferences/Miscellaneous.plist
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
- name
- Indent
- scope
- source.ruby
- settings
-
- decreaseIndentPattern
- ^\s*([}\]]\s*$|(end|rescue|ensure|else|elsif|when)\b)
- increaseIndentPattern
- (?x)^
- (\s*
- (module|class|def
- |unless|if|else|elsif
- |case|when
- |begin|rescue|ensure
- |for|while|until
- |(?= .*? \b(do|begin|case|if|unless)\b )
- # the look-ahead above is to quickly discard non-candidates
- ( "(\\.|[^\\"])*+" # eat a double quoted string
- | '(\\.|[^\\'])*+' # eat a single quoted string
- | [^#"'] # eat all but comments and strings
- )*
- ( \s (do|begin|case)
- | [-+=&|*/~%^<>~](?<!\$.) \s*+ (if|unless)
- )
- )\b
- (?! [^;]*+ ; .*? \bend\b )
- |( "(\\.|[^\\"])*+" # eat a double quoted string
- | '(\\.|[^\\'])*+' # eat a single quoted string
- | [^#"'] # eat all but comments and strings
- )*
- ( \{ (?! [^}]*+ \} )
- | \[ (?! [^\]]*+ \] )
- )
- ).*$
-
- uuid
- 6FEAF60F-F0F3-4618-9259-DE93285F50D1
-
-
diff --git a/bundles/ruby.tmbundle/Preferences/Symbo List: Method.plist b/bundles/ruby.tmbundle/Preferences/Symbo List: Method.plist
deleted file mode 100644
index 53a5abea1..000000000
--- a/bundles/ruby.tmbundle/Preferences/Symbo List: Method.plist
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- name
- Symbol List: Method
- scope
- source.ruby meta.function
- settings
-
- showInSymbolList
- 1
- symbolTransformation
- s/^\s*def\s+/ /
-
- uuid
- 92E190C9-A861-4025-92D4-D6B5A24C22D4
-
-
diff --git a/bundles/ruby.tmbundle/Preferences/Symbol List: No Function Call.tmPreferences b/bundles/ruby.tmbundle/Preferences/Symbol List: No Function Call.tmPreferences
deleted file mode 100644
index 0b963aaec..000000000
--- a/bundles/ruby.tmbundle/Preferences/Symbol List: No Function Call.tmPreferences
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- name
- Symbol List: No Function Call
- scope
- source.ruby meta.function-call entity.name.function
- settings
-
- showInSymbolList
- 0
-
- uuid
- A5D50494-EB97-48DE-A2BE-322DF52A7A7A
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/# encoding: UTF-8.tmSnippet b/bundles/ruby.tmbundle/Snippets/# encoding: UTF-8.tmSnippet
deleted file mode 100644
index 7282c80ec..000000000
--- a/bundles/ruby.tmbundle/Snippets/# encoding: UTF-8.tmSnippet
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- content
- # encoding: ${1:UTF-8}
-
- name
- # encoding: UTF-8
- scope
- source.ruby
- tabTrigger
- utf8
- uuid
- B2C3ADE8-E19E-4B87-9C6C-593D490114C7
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/#!;usr;local;bin;ruby -w.plist b/bundles/ruby.tmbundle/Snippets/#!;usr;local;bin;ruby -w.plist
deleted file mode 100644
index 122046007..000000000
--- a/bundles/ruby.tmbundle/Snippets/#!;usr;local;bin;ruby -w.plist
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- content
- #!/usr/bin/env ruby${TM_RUBY_SWITCHES: -wKU}
-
- name
- #!/usr/bin/env ruby -wKU
- scope
- source.ruby
- tabTrigger
- rb
- uuid
- A05CBDD6-845D-45EB-94FB-F8787F5456BE
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/060 ruby if else.plist b/bundles/ruby.tmbundle/Snippets/060 ruby if else.plist
deleted file mode 100644
index f72cb4abd..000000000
--- a/bundles/ruby.tmbundle/Snippets/060 ruby if else.plist
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- content
- if ${1:condition}
- $2
-else
- $3
-end
- name
- if … else … end
- scope
- source.ruby
- tabTrigger
- ife
- uuid
- 667082E6-62C3-11D9-B8CF-000D93589AF6
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/070 ruby if.plist b/bundles/ruby.tmbundle/Snippets/070 ruby if.plist
deleted file mode 100644
index 4267dc2e7..000000000
--- a/bundles/ruby.tmbundle/Snippets/070 ruby if.plist
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- if ${1:condition}
- $0
-end
- name
- if … end
- scope
- source.ruby
- tabTrigger
- if
- uuid
- 6670835F-62C3-11D9-B8CF-000D93589AF6
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/080 ruby case.plist b/bundles/ruby.tmbundle/Snippets/080 ruby case.plist
deleted file mode 100644
index 35ea34dc6..000000000
--- a/bundles/ruby.tmbundle/Snippets/080 ruby case.plist
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- content
- case ${1:object}
-when ${2:condition}
- $0
-end
- name
- case … end
- scope
- source.ruby
- tabTrigger
- case
- uuid
- 667083EE-62C3-11D9-B8CF-000D93589AF6
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/:yields: RDoc comment.tmSnippet b/bundles/ruby.tmbundle/Snippets/:yields: RDoc comment.tmSnippet
deleted file mode 100644
index 7032a491f..000000000
--- a/bundles/ruby.tmbundle/Snippets/:yields: RDoc comment.tmSnippet
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- :yields: ${0:arguments}
- name
- :yields:
- scope
- source.ruby comment
- tabTrigger
- y
- uuid
- ED6368FB-A11D-4622-9F42-7879481094F1
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/Add '# =>' Marker.tmSnippet b/bundles/ruby.tmbundle/Snippets/Add '# =>' Marker.tmSnippet
deleted file mode 100644
index 527879fb1..000000000
--- a/bundles/ruby.tmbundle/Snippets/Add '# =>' Marker.tmSnippet
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- # =>
- name
- Add ‘# =>’ Marker
- scope
- source.ruby
- tabTrigger
- #
- uuid
- 88BC3896-DC39-4307-A271-21D33340F15A
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/Array.new(10) { |i| .. } (Arr).plist b/bundles/ruby.tmbundle/Snippets/Array.new(10) { |i| .. } (Arr).plist
deleted file mode 100644
index a407c1247..000000000
--- a/bundles/ruby.tmbundle/Snippets/Array.new(10) { |i| .. } (Arr).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- Array.new(${1:10}) { ${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}${2:i}${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:| )/}$0 }
- name
- Array.new(10) { |i| .. }
- scope
- source.ruby
- tabTrigger
- Array
- uuid
- DAE6A754-D906-4763-B816-CE67125CEF08
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/Benchmark_bmbm(__) do __ end.tmSnippet b/bundles/ruby.tmbundle/Snippets/Benchmark_bmbm(__) do __ end.tmSnippet
deleted file mode 100644
index 30d675513..000000000
--- a/bundles/ruby.tmbundle/Snippets/Benchmark_bmbm(__) do __ end.tmSnippet
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- content
- TESTS = ${1:10_000}
-Benchmark.bmbm do |results|
- $0
-end
- name
- Benchmark.bmbm do .. end
- scope
- source.ruby
- tabTrigger
- bm-
- uuid
- 942F20E2-C40A-44B8-A3F2-99AAC68CB534
-
-
diff --git "a/bundles/ruby.tmbundle/Snippets/Dir.glob(\"..\") do |file| .. end (Dir).plist" "b/bundles/ruby.tmbundle/Snippets/Dir.glob(\"..\") do |file| .. end (Dir).plist"
deleted file mode 100644
index 78929d1da..000000000
--- "a/bundles/ruby.tmbundle/Snippets/Dir.glob(\"..\") do |file| .. end (Dir).plist"
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- Dir.glob(${1:"${2:dir/glob/*}"}) { |${3:file}| $0 }
- name
- Dir.glob("..") { |file| .. }
- scope
- source.ruby
- tabTrigger
- Dir
- uuid
- 332AA973-AA71-48CB-AEE9-1D71E11019AC
-
-
diff --git "a/bundles/ruby.tmbundle/Snippets/Dir[\"__\"].tmSnippet" "b/bundles/ruby.tmbundle/Snippets/Dir[\"__\"].tmSnippet"
deleted file mode 100644
index e583af9c0..000000000
--- "a/bundles/ruby.tmbundle/Snippets/Dir[\"__\"].tmSnippet"
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- Dir[${1:"${2:glob/**/*.rb}"}]
- name
- Dir[".."]
- scope
- source.ruby
- tabTrigger
- Dir
- uuid
- 8EBBB26F-980E-404E-8366-74E5772298F6
-
-
diff --git "a/bundles/ruby.tmbundle/Snippets/File.foreach (\"..\") do |line| .. end (File).plist" "b/bundles/ruby.tmbundle/Snippets/File.foreach (\"..\") do |line| .. end (File).plist"
deleted file mode 100644
index facee8f76..000000000
--- "a/bundles/ruby.tmbundle/Snippets/File.foreach (\"..\") do |line| .. end (File).plist"
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- File.foreach(${1:"${2:path/to/file}"}) { |${3:line}| $0 }
- name
- File.foreach ("..") { |line| .. }
- scope
- source.ruby
- tabTrigger
- File
- uuid
- 8F594E5E-6F46-4E98-B5FB-1C8F3BA9828F
-
-
diff --git "a/bundles/ruby.tmbundle/Snippets/File_open(\"__\") { |file| __ }.tmSnippet" "b/bundles/ruby.tmbundle/Snippets/File_open(\"__\") { |file| __ }.tmSnippet"
deleted file mode 100644
index ec3258ccb..000000000
--- "a/bundles/ruby.tmbundle/Snippets/File_open(\"__\") { |file| __ }.tmSnippet"
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- File.open(${1:"${2:path/to/file}"}${3/(^[rwab+]+$)|.*/(?1:, ")/}${3:w}${3/(^[rwab+]+$)|.*/(?1:")/}) { |${4:file}| $0 }
- name
- File.open("..") { |file| .. }
- scope
- source.ruby
- tabTrigger
- File
- uuid
- 397FA09F-A30F-4EE4-920C-318D5004EE97
-
-
diff --git "a/bundles/ruby.tmbundle/Snippets/File_read(\"__\").tmSnippet" "b/bundles/ruby.tmbundle/Snippets/File_read(\"__\").tmSnippet"
deleted file mode 100644
index 1ee4856f7..000000000
--- "a/bundles/ruby.tmbundle/Snippets/File_read(\"__\").tmSnippet"
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- File.read(${1:"${2:path/to/file}"})
- name
- File.read("..")
- scope
- source.ruby
- tabTrigger
- File
- uuid
- 50C56AC8-48F3-42A0-AF10-8164464AFAEF
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/Hash.new { |hash, key| hash[key] = .. } (Has).plist b/bundles/ruby.tmbundle/Snippets/Hash.new { |hash, key| hash[key] = .. } (Has).plist
deleted file mode 100644
index c15bdc603..000000000
--- a/bundles/ruby.tmbundle/Snippets/Hash.new { |hash, key| hash[key] = .. } (Has).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- Hash.new { |${1:hash}, ${2:key}| ${1:hash}[${2:key}] = $0 }
- name
- Hash.new { |hash, key| hash[key] = .. }
- scope
- source.ruby
- tabTrigger
- Hash
- uuid
- E16EE658-1CA0-4950-954B-B962E50B754F
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/Insert ERb's <% __ %> or <%= __ %>.tmSnippet b/bundles/ruby.tmbundle/Snippets/Insert ERb's <% __ %> or <%= __ %>.tmSnippet
deleted file mode 100644
index 059584fbe..000000000
--- a/bundles/ruby.tmbundle/Snippets/Insert ERb's <% __ %> or <%= __ %>.tmSnippet
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- <%= ${0:$TM_SELECTED_TEXT} %>
- keyEquivalent
- ^>
- name
- Insert ERb’s <% .. %> or <%= .. %>
- scope
- text.html, source.yaml, meta.erb
- uuid
- FDFABCB9-DF58-4469-AE11-5407A4FF4D70
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/Marshal.dump(obj, file) (Md).plist b/bundles/ruby.tmbundle/Snippets/Marshal.dump(obj, file) (Md).plist
deleted file mode 100644
index 63c6e644e..000000000
--- a/bundles/ruby.tmbundle/Snippets/Marshal.dump(obj, file) (Md).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- File.open(${1:"${2:path/to/file}.dump"}, "wb") { |${3:file}| Marshal.dump(${4:obj}, ${3:file}) }
- name
- Marshal.dump(.., file)
- scope
- source.ruby
- tabTrigger
- Md
- uuid
- 0CB48BCA-3F6E-4AE0-85BC-08A1D2508216
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/Marshal.load(obj) (Ml).plist b/bundles/ruby.tmbundle/Snippets/Marshal.load(obj) (Ml).plist
deleted file mode 100644
index a9d2360c0..000000000
--- a/bundles/ruby.tmbundle/Snippets/Marshal.load(obj) (Ml).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- File.open(${1:"${2:path/to/file}.dump"}, "rb") { |${3:file}| Marshal.load(${3:file}) }
- name
- Marshal.load(obj)
- scope
- source.ruby
- tabTrigger
- Ml
- uuid
- 20AAD0BC-075D-4EC0-9057-E3E5E62C4125
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/PStore_new( __ ).tmSnippet b/bundles/ruby.tmbundle/Snippets/PStore_new( __ ).tmSnippet
deleted file mode 100644
index 1c0ece8b1..000000000
--- a/bundles/ruby.tmbundle/Snippets/PStore_new( __ ).tmSnippet
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- PStore.new(${1:"${2:file_name.pstore}"})
- name
- PStore.new( .. )
- scope
- source.ruby
- tabTrigger
- Pn-
- uuid
- 5B46ECFD-23A4-4F0C-9951-F64C19C72C2B
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/RDoc documentation block.tmSnippet b/bundles/ruby.tmbundle/Snippets/RDoc documentation block.tmSnippet
deleted file mode 100644
index 743328df6..000000000
--- a/bundles/ruby.tmbundle/Snippets/RDoc documentation block.tmSnippet
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- content
- `[[ $TM_LINE_INDEX != 0 ]] && echo; echo`=begin rdoc
- $0
-=end
- name
- New Block
- scope
- source.ruby
- tabTrigger
- =b
- uuid
- 05984208-D559-4C04-A69C-2019361A985A
- disableAutoIndent
-
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/Wrap in Begin … Rescue … End.plist b/bundles/ruby.tmbundle/Snippets/Wrap in Begin … Rescue … End.plist
deleted file mode 100644
index 3c3f8708b..000000000
--- a/bundles/ruby.tmbundle/Snippets/Wrap in Begin … Rescue … End.plist
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
- content
- ${TM_SELECTED_TEXT/([\t ]*).*/$1/m}begin
- ${3:${TM_SELECTED_TEXT/(\A.*)|(.+)|\n\z/(?1:$0:(?2:\t$0))/g}}
-${TM_SELECTED_TEXT/([\t ]*).*/$1/m}rescue ${1:Exception}${2/.+/ => /}${2:e}
-${TM_SELECTED_TEXT/([\t ]*).*/$1/m} $0
-${TM_SELECTED_TEXT/([\t ]*).*/$1/m}end
-
- keyEquivalent
- ^W
- name
- begin … rescue … end
- scope
- source.ruby - comment
- tabTrigger
- begin
- uuid
- 0F940CBC-2173-49FF-B6FD-98A62863F8F2
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/YAML.dump(.., file) (Yd-).plist b/bundles/ruby.tmbundle/Snippets/YAML.dump(.., file) (Yd-).plist
deleted file mode 100644
index 2003b259e..000000000
--- a/bundles/ruby.tmbundle/Snippets/YAML.dump(.., file) (Yd-).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- File.open(${1:"${2:path/to/file}.yaml"}, "w") { |${3:file}| YAML.dump(${4:obj}, ${3:file}) }
- name
- YAML.dump(.., file)
- scope
- source.ruby
- tabTrigger
- Yd-
- uuid
- 3BA6762A-BB6B-489E-8006-F30F386AEF48
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/YAML.load(file) (Yl-).plist b/bundles/ruby.tmbundle/Snippets/YAML.load(file) (Yl-).plist
deleted file mode 100644
index 096fc834a..000000000
--- a/bundles/ruby.tmbundle/Snippets/YAML.load(file) (Yl-).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- File.open(${1:"${2:path/to/file}.yaml"}) { |${3:file}| YAML.load(${3:file}) }
- name
- YAML.load(file)
- scope
- source.ruby
- tabTrigger
- Yl-
- uuid
- 8343ACF4-EEB7-44B5-B835-94826466D4D5
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/__END__.tmSnippet b/bundles/ruby.tmbundle/Snippets/__END__.tmSnippet
deleted file mode 100644
index eb9bf31f5..000000000
--- a/bundles/ruby.tmbundle/Snippets/__END__.tmSnippet
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- content
- __END__
-
- name
- __END__
- scope
- source.ruby
- tabTrigger
- end
- uuid
- 451A0596-1F72-4AFB-AF2F-45900FABB0F7
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/alias_method .. (am).plist b/bundles/ruby.tmbundle/Snippets/alias_method .. (am).plist
deleted file mode 100644
index 0813d00aa..000000000
--- a/bundles/ruby.tmbundle/Snippets/alias_method .. (am).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- alias_method :${1:new_name}, :${0:old_name}
- name
- alias_method ..
- scope
- source.ruby
- tabTrigger
- am
- uuid
- 988C8AEF-FC71-4455-9C4F-9338C05685A4
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/all? { |e| .. } (all).plist b/bundles/ruby.tmbundle/Snippets/all? { |e| .. } (all).plist
deleted file mode 100644
index 223f2be88..000000000
--- a/bundles/ruby.tmbundle/Snippets/all? { |e| .. } (all).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- all? { |${1:e}| $0 }
- name
- all? { |e| .. }
- scope
- source.ruby
- tabTrigger
- all
- uuid
- 07D1F987-7CDB-4EAD-B64A-27A93051700E
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/any? { |e| .. } (any).plist b/bundles/ruby.tmbundle/Snippets/any? { |e| .. } (any).plist
deleted file mode 100644
index d6b21091e..000000000
--- a/bundles/ruby.tmbundle/Snippets/any? { |e| .. } (any).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- any? { |${1:e}| $0 }
- name
- any? { |e| .. }
- scope
- source.ruby
- tabTrigger
- any
- uuid
- A3B9B76B-2BC5-425C-AB24-9FAAFC375798
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/application_code .. (app).plist b/bundles/ruby.tmbundle/Snippets/application_code .. (app).plist
deleted file mode 100644
index 2aaca06f0..000000000
--- a/bundles/ruby.tmbundle/Snippets/application_code .. (app).plist
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- if __FILE__ == \$PROGRAM_NAME
- $0
-end
- name
- application { .. }
- scope
- source.ruby
- tabTrigger
- app
- uuid
- E16D24D2-CC7E-4786-BE0B-1725FC865D78
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/assert(..) (as).plist b/bundles/ruby.tmbundle/Snippets/assert(..) (as).plist
deleted file mode 100644
index 1305934e6..000000000
--- a/bundles/ruby.tmbundle/Snippets/assert(..) (as).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- assert`snippet_paren.rb`${1:test}, "${0:Failure message.}"`snippet_paren.rb end`
- name
- assert(..)
- scope
- source.ruby
- tabTrigger
- as
- uuid
- B32C147D-44A6-478A-9D5D-189D7831E9A7
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/assert_equal.tmSnippet b/bundles/ruby.tmbundle/Snippets/assert_equal.tmSnippet
deleted file mode 100644
index c7f218443..000000000
--- a/bundles/ruby.tmbundle/Snippets/assert_equal.tmSnippet
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- assert_equal`snippet_paren.rb`${1:expected}, ${0:actual}`snippet_paren.rb end`
- name
- assert_equal(..)
- scope
- source.ruby
- tabTrigger
- ase
- uuid
- 43A61A22-6BEE-4997-961C-1CDE739C05FE
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/assert_in_delta(..) (asid).plist b/bundles/ruby.tmbundle/Snippets/assert_in_delta(..) (asid).plist
deleted file mode 100644
index ac46529c7..000000000
--- a/bundles/ruby.tmbundle/Snippets/assert_in_delta(..) (asid).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- assert_in_delta`snippet_paren.rb`${1:expected_float}, ${2:actual_float}, ${0:2 ** -20}`snippet_paren.rb end`
- name
- assert_in_delta(..)
- scope
- source.ruby
- tabTrigger
- asid
- uuid
- 429D0EF5-580D-4166-8F79-713DE96B77F1
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/assert_instance_of(..) (asio).plist b/bundles/ruby.tmbundle/Snippets/assert_instance_of(..) (asio).plist
deleted file mode 100644
index 3d576c653..000000000
--- a/bundles/ruby.tmbundle/Snippets/assert_instance_of(..) (asio).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- assert_instance_of`snippet_paren.rb`${1:ExpectedClass}, ${0:actual_instance}`snippet_paren.rb end`
- name
- assert_instance_of(..)
- scope
- source.ruby
- tabTrigger
- asio
- uuid
- 0E831E03-67E1-4357-8323-C60685C23C4F
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/assert_kind_of(..) (asko).plist b/bundles/ruby.tmbundle/Snippets/assert_kind_of(..) (asko).plist
deleted file mode 100644
index 3fb833290..000000000
--- a/bundles/ruby.tmbundle/Snippets/assert_kind_of(..) (asko).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- assert_kind_of`snippet_paren.rb`${1:ExpectedKind}, ${0:actual_instance}`snippet_paren.rb end`
- name
- assert_kind_of(..)
- scope
- source.ruby
- tabTrigger
- asko
- uuid
- 671F05E2-D9CC-485E-BB1B-B13EF20FAC65
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/assert_match(..) (asm).plist b/bundles/ruby.tmbundle/Snippets/assert_match(..) (asm).plist
deleted file mode 100644
index e585b0634..000000000
--- a/bundles/ruby.tmbundle/Snippets/assert_match(..) (asm).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- assert_match`snippet_paren.rb`/${1:expected_pattern}/, ${0:actual_string}`snippet_paren.rb end`
- name
- assert_match(..)
- scope
- source.ruby
- tabTrigger
- asm
- uuid
- 711ED6C3-0F18-41FB-9A7D-3094BB319A85
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/assert_nil(..) (asn).plist b/bundles/ruby.tmbundle/Snippets/assert_nil(..) (asn).plist
deleted file mode 100644
index 39c214d2c..000000000
--- a/bundles/ruby.tmbundle/Snippets/assert_nil(..) (asn).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- assert_nil`snippet_paren.rb`${0:instance}`snippet_paren.rb end`
- name
- assert_nil(..)
- scope
- source.ruby
- tabTrigger
- asn
- uuid
- 4C79256C-480A-459C-BDE8-BB0D972811DB
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/assert_no_match(..) (asnm).plist b/bundles/ruby.tmbundle/Snippets/assert_no_match(..) (asnm).plist
deleted file mode 100644
index f116d07d0..000000000
--- a/bundles/ruby.tmbundle/Snippets/assert_no_match(..) (asnm).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- assert_no_match`snippet_paren.rb`/${1:unexpected_pattern}/, ${0:actual_string}`snippet_paren.rb end`
- name
- assert_no_match(..)
- scope
- source.ruby
- tabTrigger
- asnm
- uuid
- A072BB1E-1DD1-45D3-9346-8CA3BA21B364
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/assert_not_equal(..) (asne).plist b/bundles/ruby.tmbundle/Snippets/assert_not_equal(..) (asne).plist
deleted file mode 100644
index 683044778..000000000
--- a/bundles/ruby.tmbundle/Snippets/assert_not_equal(..) (asne).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- assert_not_equal`snippet_paren.rb`${1:unexpected}, ${0:actual}`snippet_paren.rb end`
- name
- assert_not_equal(..)
- scope
- source.ruby
- tabTrigger
- asne
- uuid
- A243E96F-DC21-4AA0-B340-13A7674F6AFF
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/assert_not_nil(..) (asnn).plist b/bundles/ruby.tmbundle/Snippets/assert_not_nil(..) (asnn).plist
deleted file mode 100644
index e5b690982..000000000
--- a/bundles/ruby.tmbundle/Snippets/assert_not_nil(..) (asnn).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- assert_not_nil`snippet_paren.rb`${0:instance}`snippet_paren.rb end`
- name
- assert_not_nil(..)
- scope
- source.ruby
- tabTrigger
- asnn
- uuid
- 79FEC3CC-2A40-4611-9A85-ECDB22FE0701
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/assert_not_same(..) (asns).plist b/bundles/ruby.tmbundle/Snippets/assert_not_same(..) (asns).plist
deleted file mode 100644
index 1751c2887..000000000
--- a/bundles/ruby.tmbundle/Snippets/assert_not_same(..) (asns).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- assert_not_same`snippet_paren.rb`${1:unexpected}, ${0:actual}`snippet_paren.rb end`
- name
- assert_not_same(..)
- scope
- source.ruby
- tabTrigger
- asns
- uuid
- F91C25EC-EC76-498B-BFB5-FDA8F57C5875
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/assert_nothing_raised(..) { .. } (asnr).plist b/bundles/ruby.tmbundle/Snippets/assert_nothing_raised(..) { .. } (asnr).plist
deleted file mode 100644
index 71e570377..000000000
--- a/bundles/ruby.tmbundle/Snippets/assert_nothing_raised(..) { .. } (asnr).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- assert_nothing_raised(${1:Exception}) { $0 }
- name
- assert_nothing_raised(..) { .. }
- scope
- source.ruby
- tabTrigger
- asnr
- uuid
- 82F8EEE0-2452-411E-8102-7BFDDBCA2E72
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/assert_nothing_thrown { .. } (asnt).plist b/bundles/ruby.tmbundle/Snippets/assert_nothing_thrown { .. } (asnt).plist
deleted file mode 100644
index fde48e530..000000000
--- a/bundles/ruby.tmbundle/Snippets/assert_nothing_thrown { .. } (asnt).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- assert_nothing_thrown { $0 }
- name
- assert_nothing_thrown { .. }
- scope
- source.ruby
- tabTrigger
- asnt
- uuid
- 33639D7A-BD8C-4396-9C44-307B8AC87C9E
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/assert_operator(..) (aso).plist b/bundles/ruby.tmbundle/Snippets/assert_operator(..) (aso).plist
deleted file mode 100644
index 63253f281..000000000
--- a/bundles/ruby.tmbundle/Snippets/assert_operator(..) (aso).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- assert_operator`snippet_paren.rb`${1:left}, :${2:operator}, ${0:right}`snippet_paren.rb end`
- name
- assert_operator(..)
- scope
- source.ruby
- tabTrigger
- aso
- uuid
- 1B925A4D-8EE4-442B-9254-293599F5717F
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/assert_raise(..) { .. } (asr).plist b/bundles/ruby.tmbundle/Snippets/assert_raise(..) { .. } (asr).plist
deleted file mode 100644
index 80406001f..000000000
--- a/bundles/ruby.tmbundle/Snippets/assert_raise(..) { .. } (asr).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- assert_raise(${1:Exception}) { $0 }
- name
- assert_raise(..) { .. }
- scope
- source.ruby
- tabTrigger
- asr
- uuid
- 68B21F6F-5D89-41FA-A19C-F29C2F912B4E
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/assert_respond_to(..) (asrt).plist b/bundles/ruby.tmbundle/Snippets/assert_respond_to(..) (asrt).plist
deleted file mode 100644
index 2fc09f114..000000000
--- a/bundles/ruby.tmbundle/Snippets/assert_respond_to(..) (asrt).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- assert_respond_to`snippet_paren.rb`${1:object}, :${0:method}`snippet_paren.rb end`
- name
- assert_respond_to(..)
- scope
- source.ruby
- tabTrigger
- asrt
- uuid
- 09A11FDA-49FC-4466-8787-8D1D5D111A89
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/assert_same(..) (ass).plist b/bundles/ruby.tmbundle/Snippets/assert_same(..) (ass).plist
deleted file mode 100644
index f3191a9d4..000000000
--- a/bundles/ruby.tmbundle/Snippets/assert_same(..) (ass).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- assert_same`snippet_paren.rb`${1:expected}, ${0:actual}`snippet_paren.rb end`
- name
- assert_same(..)
- scope
- source.ruby
- tabTrigger
- ass
- uuid
- 29340695-E426-4F77-8CF7-C59360A549F4
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/assert_send(..) (ass).plist b/bundles/ruby.tmbundle/Snippets/assert_send(..) (ass).plist
deleted file mode 100644
index c0082b615..000000000
--- a/bundles/ruby.tmbundle/Snippets/assert_send(..) (ass).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- assert_send`snippet_paren.rb`[${1:object}, :${2:message}, ${0:args}]`snippet_paren.rb end`
- name
- assert_send(..)
- scope
- source.ruby
- tabTrigger
- ass
- uuid
- 7850AD5C-A90D-4E2C-A931-EADFF8D3D9A3
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/assert_throws(..) { .. } (ast).plist b/bundles/ruby.tmbundle/Snippets/assert_throws(..) { .. } (ast).plist
deleted file mode 100644
index a23e0672d..000000000
--- a/bundles/ruby.tmbundle/Snippets/assert_throws(..) { .. } (ast).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- assert_throws(:${1:expected}) { $0 }
- name
- assert_throws(..) { .. }
- scope
- source.ruby
- tabTrigger
- ast
- uuid
- 05655BD8-23C6-445F-BFD1-420BF25C3030
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/attr_accessor .. (rw).plist b/bundles/ruby.tmbundle/Snippets/attr_accessor .. (rw).plist
deleted file mode 100644
index 0b30409aa..000000000
--- a/bundles/ruby.tmbundle/Snippets/attr_accessor .. (rw).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- attr_accessor :${0:attr_names}
- name
- attr_accessor ..
- scope
- source.ruby
- tabTrigger
- rw
- uuid
- D7A7D3C9-1714-4C50-8CC0-D83A03883E8F
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/attr_reader .. (r).plist b/bundles/ruby.tmbundle/Snippets/attr_reader .. (r).plist
deleted file mode 100644
index 22436476d..000000000
--- a/bundles/ruby.tmbundle/Snippets/attr_reader .. (r).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- attr_reader :${0:attr_names}
- name
- attr_reader ..
- scope
- source.ruby
- tabTrigger
- r
- uuid
- A150C2D8-25B3-4339-BC92-8A0160A70486
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/attr_writer .. (w).plist b/bundles/ruby.tmbundle/Snippets/attr_writer .. (w).plist
deleted file mode 100644
index b23ab01ab..000000000
--- a/bundles/ruby.tmbundle/Snippets/attr_writer .. (w).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- attr_writer :${0:attr_names}
- name
- attr_writer ..
- scope
- source.ruby
- tabTrigger
- w
- uuid
- 3D383096-A03F-4EF8-9060-3C727045AB34
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/class .. < DelegateClass .. initialize .. end (class).plist b/bundles/ruby.tmbundle/Snippets/class .. < DelegateClass .. initialize .. end (class).plist
deleted file mode 100644
index 821541c30..000000000
--- a/bundles/ruby.tmbundle/Snippets/class .. < DelegateClass .. initialize .. end (class).plist
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
- content
- class ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}} < DelegateClass(${2:ParentClass})
- def initialize${3/(^.*?\S.*)|.*/(?1:\()/}${3:args}${3/(^.*?\S.*)|.*/(?1:\))/}
- super(${4:del_obj})
-
- $0
- end
-
-
-end
- name
- class .. < DelegateClass .. initialize .. end
- scope
- source.ruby
- tabTrigger
- cla-
- uuid
- AFE1D078-EA16-45F5-AD8A-FAC1B523D861
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/class .. < ParentClass .. initialize .. end.plist b/bundles/ruby.tmbundle/Snippets/class .. < ParentClass .. initialize .. end.plist
deleted file mode 100644
index 9a9deb158..000000000
--- a/bundles/ruby.tmbundle/Snippets/class .. < ParentClass .. initialize .. end.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- content
- class ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}} < ${2:ParentClass}
- def initialize${3/(^.*?\S.*)|.*/(?1:\()/}${3:args}${3/(^.*?\S.*)|.*/(?1:\))/}
- $0
- end
-
-
-end
- name
- class .. < ParentClass .. initialize .. end
- scope
- source.ruby
- tabTrigger
- cla
- uuid
- 0CCBE04E-F4E2-4E55-9506-7DE67ACF8388
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/class .. < Struct .. initialize .. end.plist b/bundles/ruby.tmbundle/Snippets/class .. < Struct .. initialize .. end.plist
deleted file mode 100644
index 9470cf480..000000000
--- a/bundles/ruby.tmbundle/Snippets/class .. < Struct .. initialize .. end.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- content
- ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}} = Struct.new(:${2:attr_names}) do
- def ${3:method_name}
- $0
- end
-
-
-end
- name
- ClassName = Struct .. do .. end
- scope
- source.ruby
- tabTrigger
- cla
- uuid
- 05DFF82C-5A29-4EBD-93FE-C165FFFB5EA8
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/class .. < Test;;Unit;;TestCase .. end (tc).plist b/bundles/ruby.tmbundle/Snippets/class .. < Test;;Unit;;TestCase .. end (tc).plist
deleted file mode 100644
index 6279a5736..000000000
--- a/bundles/ruby.tmbundle/Snippets/class .. < Test;;Unit;;TestCase .. end (tc).plist
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
- content
- require "test/unit"
-
-require "${1:library_file_name}"
-
-class Test${2:${1/([\w&&[^_]]+)|./\u$1/g}} < Test::Unit::TestCase
- def test_${3:case_name}
- $0
- end
-end
- name
- class .. < Test::Unit::TestCase .. end
- scope
- source.ruby
- tabTrigger
- tc
- uuid
- 31D1F145-33AB-4441-BA11-4D1C46928C4C
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/class .. end (cla).plist b/bundles/ruby.tmbundle/Snippets/class .. end (cla).plist
deleted file mode 100644
index 8839f4cbf..000000000
--- a/bundles/ruby.tmbundle/Snippets/class .. end (cla).plist
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- class ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}}
- $0
-end
- name
- class .. end
- scope
- source.ruby
- tabTrigger
- cla
- uuid
- BF487539-8085-4FF4-8601-1AD20FABAEDC
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/class .. initialize .. end.plist b/bundles/ruby.tmbundle/Snippets/class .. initialize .. end.plist
deleted file mode 100644
index ac79e1eae..000000000
--- a/bundles/ruby.tmbundle/Snippets/class .. initialize .. end.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- content
- class ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}}
- def initialize${2/(^.*?\S.*)|.*/(?1:\()/}${2:args}${2/(^.*?\S.*)|.*/(?1:\))/}
- $0
- end
-
-
-end
- name
- class .. initialize .. end
- scope
- source.ruby
- tabTrigger
- cla
- uuid
- 83EED068-8C1C-4BAF-9893-902DC00616AB
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/class .. instance_methods .. undef .. initialize .. end (class).plist b/bundles/ruby.tmbundle/Snippets/class .. instance_methods .. undef .. initialize .. end (class).plist
deleted file mode 100644
index 171b8c884..000000000
--- a/bundles/ruby.tmbundle/Snippets/class .. instance_methods .. undef .. initialize .. end (class).plist
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
- content
- class ${1:BlankSlate}
- instance_methods.each { |meth| undef_method(meth) unless meth =~ /\A__/ }
-
- def initialize${2/(^.*?\S.*)|.*/(?1:\()/}${2:args}${2/(^.*?\S.*)|.*/(?1:\))/}
- @${3:delegate} = ${4:delegate_object}
-
- $0
- end
-
- def method_missing(meth, *args, &block)
- @${3:delegate}.send(meth, *args, &block)
- end
-
-
-end
- name
- class BlankSlate .. initialize .. end
- scope
- source.ruby
- tabTrigger
- cla
- uuid
- E98FB8F9-7302-431D-8BF2-275A68A6126C
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/class << self __ end.tmSnippet b/bundles/ruby.tmbundle/Snippets/class << self __ end.tmSnippet
deleted file mode 100644
index 9da605c5e..000000000
--- a/bundles/ruby.tmbundle/Snippets/class << self __ end.tmSnippet
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- class << ${1:self}
- $0
-end
- name
- class << self .. end
- scope
- source.ruby
- tabTrigger
- cla
- uuid
- C7AAAE45-487A-4B61-8962-D47675AAC05F
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/class_from_name() (clafn).plist b/bundles/ruby.tmbundle/Snippets/class_from_name() (clafn).plist
deleted file mode 100644
index 01950c09c..000000000
--- a/bundles/ruby.tmbundle/Snippets/class_from_name() (clafn).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- split("::").inject(Object) { |par, const| par.const_get(const) }
- name
- class_from_name()
- scope
- source.ruby
- tabTrigger
- clafn
- uuid
- 2DBEE50B-3097-4A57-AB48-3586CF392D8B
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/classify { |e| .. } (clas).plist b/bundles/ruby.tmbundle/Snippets/classify { |e| .. } (clas).plist
deleted file mode 100644
index 38d0140ea..000000000
--- a/bundles/ruby.tmbundle/Snippets/classify { |e| .. } (clas).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- classify { |${1:e}| $0 }
- name
- classify { |e| .. }
- scope
- source.ruby
- tabTrigger
- cl
- uuid
- 5DA9E1E8-2C54-420A-9B84-B040A1AF2B9E
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/collect { |e| .. } (col).plist b/bundles/ruby.tmbundle/Snippets/collect { |e| .. } (col).plist
deleted file mode 100644
index 27a46f54e..000000000
--- a/bundles/ruby.tmbundle/Snippets/collect { |e| .. } (col).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- collect { |${1:e}| $0 }
- name
- collect { |e| .. }
- scope
- source.ruby
- tabTrigger
- col
- uuid
- 669A86AD-936F-4EDA-8E4E-6863804072DA
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/deep_copy(..) (dee).plist b/bundles/ruby.tmbundle/Snippets/deep_copy(..) (dee).plist
deleted file mode 100644
index 13bdd5838..000000000
--- a/bundles/ruby.tmbundle/Snippets/deep_copy(..) (dee).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- Marshal.load(Marshal.dump(${0:obj_to_copy}))
- name
- deep_copy(..)
- scope
- source.ruby
- tabTrigger
- deec
- uuid
- 0BA2B2F1-E767-4A03-9791-0AC0183251F1
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/def end.plist b/bundles/ruby.tmbundle/Snippets/def end.plist
deleted file mode 100644
index 3908170ce..000000000
--- a/bundles/ruby.tmbundle/Snippets/def end.plist
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- def ${1:method_name}
- $0
-end
- name
- def … end
- scope
- source.ruby
- tabTrigger
- def
- uuid
- 4E9A7A73-875C-11D9-897C-000393CBCE2E
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/def initialize __ end.tmSnippet b/bundles/ruby.tmbundle/Snippets/def initialize __ end.tmSnippet
deleted file mode 100644
index 129f13cae..000000000
--- a/bundles/ruby.tmbundle/Snippets/def initialize __ end.tmSnippet
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- def initialize${1/.+/(/}${1:args}${1/.+/)/}
- $0
-end
- name
- def initialize .. end
- scope
- source.ruby
- tabTrigger
- defi
- uuid
- 4E9D15B5-65D6-4A9A-9DEC-DE041D68C06F
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/def method_missing .. end (mm).plist b/bundles/ruby.tmbundle/Snippets/def method_missing .. end (mm).plist
deleted file mode 100644
index cdd874b6b..000000000
--- a/bundles/ruby.tmbundle/Snippets/def method_missing .. end (mm).plist
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- def method_missing(meth, *args, &blk)
- $0
-end
- name
- def method_missing .. end
- scope
- source.ruby
- tabTrigger
- defmm
- uuid
- 87D5F8AD-8DA6-4AED-A0D8-B51CAC980445
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/def self .. end (defs).plist b/bundles/ruby.tmbundle/Snippets/def self .. end (defs).plist
deleted file mode 100644
index 07c63bcd7..000000000
--- a/bundles/ruby.tmbundle/Snippets/def self .. end (defs).plist
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- def self.${1:class_method_name}
- $0
-end
- name
- def self .. end
- scope
- source.ruby
- tabTrigger
- defs
- uuid
- 7C6E88FA-CA0E-4110-8C75-A94E54286A75
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/def test_ .. end (t).plist b/bundles/ruby.tmbundle/Snippets/def test_ .. end (t).plist
deleted file mode 100644
index 9338f041e..000000000
--- a/bundles/ruby.tmbundle/Snippets/def test_ .. end (t).plist
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- def test_${1:case_name}
- $0
-end
- name
- def test_ .. end
- scope
- source.ruby
- tabTrigger
- deft
- uuid
- 00F66D41-25AF-4597-B67D-E540965A5222
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/def_delegator .. (defd).plist b/bundles/ruby.tmbundle/Snippets/def_delegator .. (defd).plist
deleted file mode 100644
index eac1a966d..000000000
--- a/bundles/ruby.tmbundle/Snippets/def_delegator .. (defd).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- def_delegator :${1:@del_obj}, :${2:del_meth}, :${3:new_name}
- name
- def_delegator ..
- scope
- source.ruby
- tabTrigger
- defd
- uuid
- C44ED391-614F-4BA2-BB0F-87668EEA9954
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/def_delegators .. (defds).plist b/bundles/ruby.tmbundle/Snippets/def_delegators .. (defds).plist
deleted file mode 100644
index e14ab54dd..000000000
--- a/bundles/ruby.tmbundle/Snippets/def_delegators .. (defds).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- def_delegators :${1:@del_obj}, :${0:del_methods}
- name
- def_delegators ..
- scope
- source.ruby
- tabTrigger
- defds
- uuid
- 4A6EFD6B-88E2-4822-AD48-03460EDBC796
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/define_method ___ end.tmSnippet b/bundles/ruby.tmbundle/Snippets/define_method ___ end.tmSnippet
deleted file mode 100644
index 3d9f84259..000000000
--- a/bundles/ruby.tmbundle/Snippets/define_method ___ end.tmSnippet
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- define_method :${1:method_name} do${2/.+/ |/}${2:args}${2/.+/|/}
- $0
-end
- name
- define_method ... end
- scope
- source.ruby
- tabTrigger
- defm
- uuid
- 7BC1E159-0C90-4B0D-8808-80165C11F59C
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/delete_if { |e| .. } (deli).plist b/bundles/ruby.tmbundle/Snippets/delete_if { |e| .. } (deli).plist
deleted file mode 100644
index fb90c95f7..000000000
--- a/bundles/ruby.tmbundle/Snippets/delete_if { |e| .. } (deli).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- delete_if { |${1:e}| $0 }
- name
- delete_if { |e| .. }
- scope
- source.ruby
- tabTrigger
- deli
- uuid
- 263C94DC-63CF-4BA3-9692-C5582CA8F1AB
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/detect { |e| .. } (det).plist b/bundles/ruby.tmbundle/Snippets/detect { |e| .. } (det).plist
deleted file mode 100644
index 855fd0afa..000000000
--- a/bundles/ruby.tmbundle/Snippets/detect { |e| .. } (det).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- detect { |${1:e}| $0 }
- name
- detect { |e| .. }
- scope
- source.ruby
- tabTrigger
- det
- uuid
- 6C6B9849-9631-49FF-A9F9-F0E94A1512C5
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/directory().tmSnippet b/bundles/ruby.tmbundle/Snippets/directory().tmSnippet
deleted file mode 100644
index 635f5d2bb..000000000
--- a/bundles/ruby.tmbundle/Snippets/directory().tmSnippet
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- File.dirname(__FILE__)
- name
- directory()
- scope
- source.ruby
- tabTrigger
- dir
- uuid
- 678BDB83-FBBD-4E8E-BE0B-E1A98AECB247
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/do |obj| .. end (doo).plist b/bundles/ruby.tmbundle/Snippets/do |obj| .. end (doo).plist
deleted file mode 100644
index 3e41d59d5..000000000
--- a/bundles/ruby.tmbundle/Snippets/do |obj| .. end (doo).plist
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- do${1/(^(?<var>\s*[a-z_][a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1: |)/}${1:variable}${1/(^(?<var>\s*[a-z_][a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}
- $0
-end
- name
- Insert do |variable| … end
- scope
- source.ruby
- tabTrigger
- do
- uuid
- 4B72C5C3-6CA7-41AC-B2F9-51DEA25D469E
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/downto(0) { |n| .. } (dow).plist b/bundles/ruby.tmbundle/Snippets/downto(0) { |n| .. } (dow).plist
deleted file mode 100644
index 01d7f7bbd..000000000
--- a/bundles/ruby.tmbundle/Snippets/downto(0) { |n| .. } (dow).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- downto(${1:0}) { ${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}${2:n}${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:| )/}$0 }
- name
- downto(0) { |n| .. }
- scope
- source.ruby
- tabTrigger
- dow
- uuid
- 4991BB86-736E-4758-B9B2-E4FA90B9368F
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/each { |e| .. } (ea).plist b/bundles/ruby.tmbundle/Snippets/each { |e| .. } (ea).plist
deleted file mode 100644
index ac3a07392..000000000
--- a/bundles/ruby.tmbundle/Snippets/each { |e| .. } (ea).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- each { |${1:e}| $0 }
- name
- each { |e| .. }
- scope
- source.ruby
- tabTrigger
- ea
- uuid
- ECBA4CA0-275F-460E-85BE-E82FEA2E2B26
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/each_byte { |byte| .. } (eab).plist b/bundles/ruby.tmbundle/Snippets/each_byte { |byte| .. } (eab).plist
deleted file mode 100644
index ae60e0af6..000000000
--- a/bundles/ruby.tmbundle/Snippets/each_byte { |byte| .. } (eab).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- each_byte { |${1:byte}| $0 }
- name
- each_byte { |byte| .. }
- scope
- source.ruby
- tabTrigger
- eab
- uuid
- 338EC03D-3FF4-4435-94E8-1CEF20CEC75D
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/each_char { |chr| .. } (eac-).plist b/bundles/ruby.tmbundle/Snippets/each_char { |chr| .. } (eac-).plist
deleted file mode 100644
index 7b08ce32d..000000000
--- a/bundles/ruby.tmbundle/Snippets/each_char { |chr| .. } (eac-).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- each_char { |${1:chr}| $0 }
- name
- each_char { |chr| .. }
- scope
- source.ruby
- tabTrigger
- eac-
- uuid
- FDD73070-6D32-4301-A86A-C55B77C3D8ED
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/each_cons(..) { |group| .. } (eac-).plist b/bundles/ruby.tmbundle/Snippets/each_cons(..) { |group| .. } (eac-).plist
deleted file mode 100644
index f8df1d2d7..000000000
--- a/bundles/ruby.tmbundle/Snippets/each_cons(..) { |group| .. } (eac-).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- each_cons(${1:2}) { |${2:group}| $0 }
- name
- each_cons(..) { |group| .. }
- scope
- source.ruby
- tabTrigger
- eac-
- uuid
- 3C04589C-5127-478E-97B3-CA7DD2EA7ECD
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/each_index { |i| .. } (eai).plist b/bundles/ruby.tmbundle/Snippets/each_index { |i| .. } (eai).plist
deleted file mode 100644
index 5066fef0d..000000000
--- a/bundles/ruby.tmbundle/Snippets/each_index { |i| .. } (eai).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- each_index { |${1:i}| $0 }
- name
- each_index { |i| .. }
- scope
- source.ruby
- tabTrigger
- eai
- uuid
- 689120C9-AB40-4081-8268-9362E00FA4A0
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/each_key { |key| .. } (eak).plist b/bundles/ruby.tmbundle/Snippets/each_key { |key| .. } (eak).plist
deleted file mode 100644
index 8cd5e7a94..000000000
--- a/bundles/ruby.tmbundle/Snippets/each_key { |key| .. } (eak).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- each_key { |${1:key}| $0 }
- name
- each_key { |key| .. }
- scope
- source.ruby
- tabTrigger
- eak
- uuid
- E54F7077-3C33-4B53-A4F7-21E16132D3AD
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/each_line { |line| .. } (eal).plist b/bundles/ruby.tmbundle/Snippets/each_line { |line| .. } (eal).plist
deleted file mode 100644
index e205a4ba1..000000000
--- a/bundles/ruby.tmbundle/Snippets/each_line { |line| .. } (eal).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- each_line$1 { |${2:line}| $0 }
- name
- each_line { |line| .. }
- scope
- source.ruby
- tabTrigger
- eal
- uuid
- 02913388-EE8E-4C55-AC94-94F3D751F47E
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/each_pair { |name, val| .. } (eap).plist b/bundles/ruby.tmbundle/Snippets/each_pair { |name, val| .. } (eap).plist
deleted file mode 100644
index 223292420..000000000
--- a/bundles/ruby.tmbundle/Snippets/each_pair { |name, val| .. } (eap).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- each_pair { |${1:name}, ${2:val}| $0 }
- name
- each_pair { |name, val| .. }
- scope
- source.ruby
- tabTrigger
- eap
- uuid
- 7A3CECED-452B-438E-A5C6-95B6BDC43243
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/each_slice { |group| .. } (eas).plist b/bundles/ruby.tmbundle/Snippets/each_slice { |group| .. } (eas).plist
deleted file mode 100644
index c5797c88a..000000000
--- a/bundles/ruby.tmbundle/Snippets/each_slice { |group| .. } (eas).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- each_slice(${1:2}) { |${2:group}| $0 }
- name
- each_slice(..) { |group| .. }
- scope
- source.ruby
- tabTrigger
- eas-
- uuid
- CD748479-D2A4-4AB5-95BD-4C89512BA210
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/each_value { |val| .. } (eav).plist b/bundles/ruby.tmbundle/Snippets/each_value { |val| .. } (eav).plist
deleted file mode 100644
index a42cb675f..000000000
--- a/bundles/ruby.tmbundle/Snippets/each_value { |val| .. } (eav).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- each_value { |${1:val}| $0 }
- name
- each_value { |val| .. }
- scope
- source.ruby
- tabTrigger
- eav
- uuid
- 844DBD70-BC23-4FBF-9C18-F4A610239DF2
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/each_with_index { |e, i| .. } (eawi).plist b/bundles/ruby.tmbundle/Snippets/each_with_index { |e, i| .. } (eawi).plist
deleted file mode 100644
index 6730e1e3b..000000000
--- a/bundles/ruby.tmbundle/Snippets/each_with_index { |e, i| .. } (eawi).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- each_with_index { |${1:e}, ${2:i}| $0 }
- name
- each_with_index { |e, i| .. }
- scope
- source.ruby
- tabTrigger
- eawi
- uuid
- 1DD13CF5-39C0-4F10-B655-56DACEBC7F94
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/elsif ___.tmSnippet b/bundles/ruby.tmbundle/Snippets/elsif ___.tmSnippet
deleted file mode 100644
index 9028eea1c..000000000
--- a/bundles/ruby.tmbundle/Snippets/elsif ___.tmSnippet
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- content
- elsif ${1:condition}
- $0
- name
- elsif ...
- scope
- source.ruby
- tabTrigger
- elsif
- uuid
- CD1609FA-47DA-4EE4-9C5B-5C56D953F5B1
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/embed string variable.plist b/bundles/ruby.tmbundle/Snippets/embed string variable.plist
deleted file mode 100644
index 397023a7e..000000000
--- a/bundles/ruby.tmbundle/Snippets/embed string variable.plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- #{${1:$TM_SELECTED_TEXT}}
- keyEquivalent
- #
- name
- Embedded Code — #{…}
- scope
- (string.quoted.double.ruby|string.interpolated.ruby) - string source
- uuid
- EEE6D060-C5A0-400D-A2E0-0835013C5365
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/extend Forwardable (Forw).plist b/bundles/ruby.tmbundle/Snippets/extend Forwardable (Forw).plist
deleted file mode 100644
index d10e907a5..000000000
--- a/bundles/ruby.tmbundle/Snippets/extend Forwardable (Forw).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- extend Forwardable
- name
- extend Forwardable
- scope
- source.ruby
- tabTrigger
- Forw-
- uuid
- 7F46C90A-595B-4B83-A4F7-058F63CE4218
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/fetch(name) { |key| .. } (fet).plist b/bundles/ruby.tmbundle/Snippets/fetch(name) { |key| .. } (fet).plist
deleted file mode 100644
index 7148ace4f..000000000
--- a/bundles/ruby.tmbundle/Snippets/fetch(name) { |key| .. } (fet).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- fetch(${1:name}) { ${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}${2:key}${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:| )/}$0 }
- name
- fetch(name) { |key| .. }
- scope
- source.ruby
- tabTrigger
- fet
- uuid
- 1F72122A-35AD-4BA1-AA01-889A10319666
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/fill(range) { |i| .. } (fil).plist b/bundles/ruby.tmbundle/Snippets/fill(range) { |i| .. } (fil).plist
deleted file mode 100644
index 3fc68b924..000000000
--- a/bundles/ruby.tmbundle/Snippets/fill(range) { |i| .. } (fil).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- fill(${1:range}) { ${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}${2:i}${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:| )/}$0 }
- name
- fill(range) { |i| .. }
- scope
- source.ruby
- tabTrigger
- fil
- uuid
- 6021BBDC-4AAD-447B-A0C2-A4BB31721558
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/find { |e| .. } (fin).plist b/bundles/ruby.tmbundle/Snippets/find { |e| .. } (fin).plist
deleted file mode 100644
index 6dc181a33..000000000
--- a/bundles/ruby.tmbundle/Snippets/find { |e| .. } (fin).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- find { |${1:e}| $0 }
- name
- find { |e| .. }
- scope
- source.ruby
- tabTrigger
- fin
- uuid
- E23FE534-8061-4828-98A5-46270B6910B0
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/find_all { |e| .. } (fina).plist b/bundles/ruby.tmbundle/Snippets/find_all { |e| .. } (fina).plist
deleted file mode 100644
index a1435b71d..000000000
--- a/bundles/ruby.tmbundle/Snippets/find_all { |e| .. } (fina).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- find_all { |${1:e}| $0 }
- name
- find_all { |e| .. }
- scope
- source.ruby
- tabTrigger
- fina
- uuid
- 197709C5-8382-4A59-B6D7-31A0CC0F23B7
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/flatten_once (fla).plist b/bundles/ruby.tmbundle/Snippets/flatten_once (fla).plist
deleted file mode 100644
index bda4f7778..000000000
--- a/bundles/ruby.tmbundle/Snippets/flatten_once (fla).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- inject(Array.new) { |${1:arr}, ${2:a}| ${1:arr}.push(*${2:a}) }
- name
- flatten_once()
- scope
- source.ruby
- tabTrigger
- flao
- uuid
- 3DDB99C4-486D-4C11-A217-5680FDD8EC19
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/flunk(..) (fl).plist b/bundles/ruby.tmbundle/Snippets/flunk(..) (fl).plist
deleted file mode 100644
index 14283b783..000000000
--- a/bundles/ruby.tmbundle/Snippets/flunk(..) (fl).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- flunk`snippet_paren.rb`"${1:Failure message.}"`snippet_paren.rb end`$0
- name
- flunk(..)
- scope
- source.ruby
- tabTrigger
- flu
- uuid
- DB457094-1AC9-4856-AEFC-43A9576B6775
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/grep(;pattern;) { |match| .. } (gre).plist b/bundles/ruby.tmbundle/Snippets/grep(;pattern;) { |match| .. } (gre).plist
deleted file mode 100644
index 404abb822..000000000
--- a/bundles/ruby.tmbundle/Snippets/grep(;pattern;) { |match| .. } (gre).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- grep(${1:/${2:pattern}/}) { |${3:match}| $0 }
- name
- grep(/pattern/) { |match| .. }
- scope
- source.ruby
- tabTrigger
- gre
- uuid
- 9D9E7BA3-8C5D-4532-83EA-326358C2F5BB
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/gsub(;..;) { |match| .. } (gsu).plist b/bundles/ruby.tmbundle/Snippets/gsub(;..;) { |match| .. } (gsu).plist
deleted file mode 100644
index 1808257be..000000000
--- a/bundles/ruby.tmbundle/Snippets/gsub(;..;) { |match| .. } (gsu).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- gsub(/${1:pattern}/) { ${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}${2:match}${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:| )/}$0 }
- name
- gsub(/../) { |match| .. }
- scope
- source.ruby
- tabTrigger
- gsu
- uuid
- 2514FC26-468C-4D08-A788-494A444C4286
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/hash pair (:).plist b/bundles/ruby.tmbundle/Snippets/hash pair (:).plist
deleted file mode 100644
index f26adea4e..000000000
--- a/bundles/ruby.tmbundle/Snippets/hash pair (:).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- :${1:key} => ${2:"${3:value}"}${4:, }
- name
- Hash Pair — :key => "value"
- scope
- source.ruby
- tabTrigger
- :
- uuid
- 840B9C4C-7037-4C3B-9028-EB9DC75EDB3E
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/hash pointer.plist b/bundles/ruby.tmbundle/Snippets/hash pointer.plist
deleted file mode 100644
index f91e23a4a..000000000
--- a/bundles/ruby.tmbundle/Snippets/hash pointer.plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- =>
- keyEquivalent
- ^l
- name
- Hash Pointer — =>
- scope
- source.ruby
- uuid
- B9E3A6DF-875D-11D9-897C-000393CBCE2E
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/include Comparable .. (Comp).plist b/bundles/ruby.tmbundle/Snippets/include Comparable .. (Comp).plist
deleted file mode 100644
index 1fc98c2c4..000000000
--- a/bundles/ruby.tmbundle/Snippets/include Comparable .. (Comp).plist
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- content
- include Comparable
-
-def <=>(other)
- $0
-end
- name
- include Comparable ..
- scope
- source.ruby
- tabTrigger
- Comp
- uuid
- 6C9D6B3D-D8E9-4606-9534-577C8D21FFF6
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/include Enumerable .. (Enum).plist b/bundles/ruby.tmbundle/Snippets/include Enumerable .. (Enum).plist
deleted file mode 100644
index c35135fb5..000000000
--- a/bundles/ruby.tmbundle/Snippets/include Enumerable .. (Enum).plist
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- content
- include Enumerable
-
-def each(&block)
- $0
-end
- name
- include Enumerable ..
- scope
- source.ruby
- tabTrigger
- Enum
- uuid
- AAD5D511-6BE7-41DA-8F2B-1593A48FBB08
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/inject(init) { |mem, var| .. } (inj).plist b/bundles/ruby.tmbundle/Snippets/inject(init) { |mem, var| .. } (inj).plist
deleted file mode 100644
index d1af9bd85..000000000
--- a/bundles/ruby.tmbundle/Snippets/inject(init) { |mem, var| .. } (inj).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- inject${1/.+/(/}${1:init}${1/.+/)/} { |${2:mem}, ${3:var}| $0 }
- name
- inject(init) { |mem, var| .. }
- scope
- source.ruby
- tabTrigger
- inj
- uuid
- B563E0D7-513D-49B4-9733-1B04A6F25A74
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/lambda { |args| .. } (lam).plist b/bundles/ruby.tmbundle/Snippets/lambda { |args| .. } (lam).plist
deleted file mode 100644
index 5eaffa23d..000000000
--- a/bundles/ruby.tmbundle/Snippets/lambda { |args| .. } (lam).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- lambda { ${1/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}${1:args}${1/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:| )/}$0 }
- name
- lambda { |args| .. }
- scope
- source.ruby
- tabTrigger
- lam
- uuid
- 21E75321-0CF7-45E8-A297-BCC7C0DDDD15
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/loop { __ }.tmSnippet b/bundles/ruby.tmbundle/Snippets/loop { __ }.tmSnippet
deleted file mode 100644
index 08c78d83f..000000000
--- a/bundles/ruby.tmbundle/Snippets/loop { __ }.tmSnippet
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- loop { $0 }
- name
- loop { .. }
- scope
- source.ruby
- tabTrigger
- loo
- uuid
- 567E3D18-BF2B-4379-8927-2777EC9F495E
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/map { |e| .. } (map).plist b/bundles/ruby.tmbundle/Snippets/map { |e| .. } (map).plist
deleted file mode 100644
index f151772de..000000000
--- a/bundles/ruby.tmbundle/Snippets/map { |e| .. } (map).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- map { |${1:e}| $0 }
- name
- map { |e| .. }
- scope
- source.ruby
- tabTrigger
- map
- uuid
- 5A3754FC-43A3-462B-AB42-E3E951872E6F
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/map_with_index { |e, i| .. } (mapwi).plist b/bundles/ruby.tmbundle/Snippets/map_with_index { |e, i| .. } (mapwi).plist
deleted file mode 100644
index 47d8f3c9e..000000000
--- a/bundles/ruby.tmbundle/Snippets/map_with_index { |e, i| .. } (mapwi).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- enum_with_index.map { |${1:e}, ${2:i}| $0 }
- name
- map_with_index { |e, i| .. }
- scope
- source.ruby
- tabTrigger
- mapwi-
- uuid
- BD4CFD7B-1AC0-4569-9BDA-FD491F41F4E6
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/max { |a, b| .. } (max).plist b/bundles/ruby.tmbundle/Snippets/max { |a, b| .. } (max).plist
deleted file mode 100644
index 2dc65c4dd..000000000
--- a/bundles/ruby.tmbundle/Snippets/max { |a, b| .. } (max).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- max { |a, b| $0 }
- name
- max { |a, b| .. }
- scope
- source.ruby
- tabTrigger
- max
- uuid
- 98182B9E-7C61-4824-BE4C-9CD69C816037
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/min { |a, b| .. } (min).plist b/bundles/ruby.tmbundle/Snippets/min { |a, b| .. } (min).plist
deleted file mode 100644
index 6d746f9d3..000000000
--- a/bundles/ruby.tmbundle/Snippets/min { |a, b| .. } (min).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- min { |a, b| $0 }
- name
- min { |a, b| .. }
- scope
- source.ruby
- tabTrigger
- min
- uuid
- CB03D11A-7204-48D0-92C1-E109034403E7
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/module .. ClassMethods .. end.plist b/bundles/ruby.tmbundle/Snippets/module .. ClassMethods .. end.plist
deleted file mode 100644
index 440e60b0c..000000000
--- a/bundles/ruby.tmbundle/Snippets/module .. ClassMethods .. end.plist
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
- content
- module ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}}
- module ClassMethods
- $0
- end
-
- module InstanceMethods
-
- end
-
- def self.included(receiver)
- receiver.extend ClassMethods
- receiver.send :include, InstanceMethods
- end
-end
- name
- module .. ClassMethods .. end
- scope
- source.ruby
- tabTrigger
- mod
- uuid
- A71A18CF-2D71-4BFF-AA0C-D9B8C59BC4EB
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/module .. end.plist b/bundles/ruby.tmbundle/Snippets/module .. end.plist
deleted file mode 100644
index 50db6ee1f..000000000
--- a/bundles/ruby.tmbundle/Snippets/module .. end.plist
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- module ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}}
- $0
-end
- name
- module .. end
- scope
- source.ruby
- tabTrigger
- mod
- uuid
- 2B73EC5F-06D2-460C-A14F-6FA05AFCF0CC
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/module .. module_function .. end.plist b/bundles/ruby.tmbundle/Snippets/module .. module_function .. end.plist
deleted file mode 100644
index 7a673972f..000000000
--- a/bundles/ruby.tmbundle/Snippets/module .. module_function .. end.plist
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- content
- module ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}}
- module_function
-
- $0
-end
- name
- module .. module_function .. end
- scope
- source.ruby
- tabTrigger
- mod
- uuid
- 0E85EC81-2FAB-4648-B590-119CC1BB6E41
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/namespace :__ do __ end.tmSnippet b/bundles/ruby.tmbundle/Snippets/namespace :__ do __ end.tmSnippet
deleted file mode 100644
index 03d06c3b5..000000000
--- a/bundles/ruby.tmbundle/Snippets/namespace :__ do __ end.tmSnippet
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- namespace :${1:${TM_FILENAME/\.\w+//}} do
- $0
-end
- name
- namespace :.. do .. end
- scope
- source.ruby
- tabTrigger
- nam
- uuid
- 05EE1046-5ED7-48F5-8693-1F066163B2F4
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/open yield block ({).plist b/bundles/ruby.tmbundle/Snippets/open yield block ({).plist
deleted file mode 100644
index febf9899a..000000000
--- a/bundles/ruby.tmbundle/Snippets/open yield block ({).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- { ${1/(^(?<var>\s*[a-z_][a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}${1:variable}${1/(^(?<var>\s*[a-z_][a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:| )/}${2:$TM_SELECTED_TEXT}
- name
- Insert { |variable| … }
- scope
- source.ruby - string - comment
- tabTrigger
- {
- uuid
- 855FC4EF-7B1E-48EE-AD4E-5ECB8ED79D1C
-
-
diff --git "a/bundles/ruby.tmbundle/Snippets/open(\"path;or;url\", \"w\") do |doc| .. end (ope).plist" "b/bundles/ruby.tmbundle/Snippets/open(\"path;or;url\", \"w\") do |doc| .. end (ope).plist"
deleted file mode 100644
index 4863ebb41..000000000
--- "a/bundles/ruby.tmbundle/Snippets/open(\"path;or;url\", \"w\") do |doc| .. end (ope).plist"
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- open(${1:"${2:path/or/url/or/pipe}"}${3/(^[rwab+]+$)|.*/(?1:, ")/}${3:w}${3/(^[rwab+]+$)|.*/(?1:")/}) { |${4:io}| $0 }
- name
- open("path/or/url", "w") { |io| .. }
- scope
- source.ruby
- tabTrigger
- ope
- uuid
- 418F1817-255F-430A-B09A-222964ED66A7
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/option_parse { .. } (optp).plist b/bundles/ruby.tmbundle/Snippets/option_parse { .. } (optp).plist
deleted file mode 100644
index dc144ecb9..000000000
--- a/bundles/ruby.tmbundle/Snippets/option_parse { .. } (optp).plist
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
- content
- require "optparse"
-
-options = {${1::default => "args"}}
-
-ARGV.options do |opts|
- opts.banner = "Usage: #{File.basename(\$PROGRAM_NAME)} [OPTIONS]${2/^\s*$|(.*\S.*)/(?1: )/}${2:OTHER_ARGS}"
-
- opts.separator ""
- opts.separator "Specific Options:"
-
- $0
-
- opts.separator "Common Options:"
-
- opts.on( "-h", "--help",
- "Show this message." ) do
- puts opts
- exit
- end
-
- begin
- opts.parse!
- rescue
- puts opts
- exit
- end
-end
-
- name
- option_parse { .. }
- scope
- source.ruby
- tabTrigger
- optp
- uuid
- C3C48948-4F49-484E-A8DE-DEB44723099E
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/partition { |e| .. } (par).plist b/bundles/ruby.tmbundle/Snippets/partition { |e| .. } (par).plist
deleted file mode 100644
index 0f4195d9f..000000000
--- a/bundles/ruby.tmbundle/Snippets/partition { |e| .. } (par).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- partition { |${1:e}| $0 }
- name
- partition { |e| .. }
- scope
- source.ruby
- tabTrigger
- par
- uuid
- 52B8BF63-F09E-4789-8407-06168A8AE666
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/pass(__).tmSnippet b/bundles/ruby.tmbundle/Snippets/pass(__).tmSnippet
deleted file mode 100644
index fdf055eb6..000000000
--- a/bundles/ruby.tmbundle/Snippets/pass(__).tmSnippet
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- pass`snippet_paren.rb`"${1:Message.}"`snippet_paren.rb end`$0
- name
- pass(..)
- scope
- source.ruby
- tabTrigger
- pas
- uuid
- F46A4687-E52D-40D2-9072-C215645EDBC6
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/path_from_here( __ ).tmSnippet b/bundles/ruby.tmbundle/Snippets/path_from_here( __ ).tmSnippet
deleted file mode 100644
index 810b0bbb4..000000000
--- a/bundles/ruby.tmbundle/Snippets/path_from_here( __ ).tmSnippet
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- File.join(File.dirname(__FILE__), *%w[${1:rel path here}])
- name
- path_from_here( .. )
- scope
- source.ruby
- tabTrigger
- patfh
- uuid
- A4E89D97-D5ED-48BB-B5FF-1BFB79211FCD
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/randomize (ran).plist b/bundles/ruby.tmbundle/Snippets/randomize (ran).plist
deleted file mode 100644
index 350e2cfbf..000000000
--- a/bundles/ruby.tmbundle/Snippets/randomize (ran).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- sort_by { rand }
- name
- randomize()
- scope
- source.ruby
- tabTrigger
- ran
- uuid
- B0CE57EC-FB2E-4482-8CCE-448DC2588715
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/reject { |e| .. } (rej).plist b/bundles/ruby.tmbundle/Snippets/reject { |e| .. } (rej).plist
deleted file mode 100644
index 4405e7f43..000000000
--- a/bundles/ruby.tmbundle/Snippets/reject { |e| .. } (rej).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- reject { |${1:e}| $0 }
- name
- reject { |e| .. }
- scope
- source.ruby
- tabTrigger
- rej
- uuid
- B79B9DAB-ABEF-44F6-BF7E-635E7BA11DFD
-
-
diff --git "a/bundles/ruby.tmbundle/Snippets/require \"..\" (req).plist" "b/bundles/ruby.tmbundle/Snippets/require \"..\" (req).plist"
deleted file mode 100644
index ec8d2656e..000000000
--- "a/bundles/ruby.tmbundle/Snippets/require \"..\" (req).plist"
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- require "$0"
- name
- require ".."
- scope
- source.ruby
- tabTrigger
- req
- uuid
- 97DE939B-D243-4D5C-B953-1C9090912E7C
-
-
diff --git "a/bundles/ruby.tmbundle/Snippets/require \"tc_..\" .. (ts).plist" "b/bundles/ruby.tmbundle/Snippets/require \"tc_..\" .. (ts).plist"
deleted file mode 100644
index 376ba0581..000000000
--- "a/bundles/ruby.tmbundle/Snippets/require \"tc_..\" .. (ts).plist"
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- content
- require "test/unit"
-
-require "tc_${1:test_case_file}"
-require "tc_${2:test_case_file}"
-
- name
- require "tc_.." ..
- scope
- source.ruby
- tabTrigger
- ts
- uuid
- 5297FD0C-98B1-4514-BBD1-1516810BECA6
-
-
diff --git "a/bundles/ruby.tmbundle/Snippets/require_gem \"__\".tmSnippet" "b/bundles/ruby.tmbundle/Snippets/require_gem \"__\".tmSnippet"
deleted file mode 100644
index fb4ff9d06..000000000
--- "a/bundles/ruby.tmbundle/Snippets/require_gem \"__\".tmSnippet"
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- require "$0"
- name
- require_gem ".."
- scope
- source.ruby
- tabTrigger
- reqg-
- uuid
- 34FEBB9F-73CD-4DD4-A0A3-1CF2A5E3DE78
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/results_report(__) { __ }.tmSnippet b/bundles/ruby.tmbundle/Snippets/results_report(__) { __ }.tmSnippet
deleted file mode 100644
index ece0ac97f..000000000
--- a/bundles/ruby.tmbundle/Snippets/results_report(__) { __ }.tmSnippet
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- results.report("${1:name}:") { TESTS.times { $0 } }
- name
- results.report(..) { .. }
- scope
- source.ruby
- tabTrigger
- rep
- uuid
- 1C60D589-DD46-4109-90CA-6B34AEA2F298
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/reverse_each { |e| .. } (rea).plist b/bundles/ruby.tmbundle/Snippets/reverse_each { |e| .. } (rea).plist
deleted file mode 100644
index 79adc1533..000000000
--- a/bundles/ruby.tmbundle/Snippets/reverse_each { |e| .. } (rea).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- reverse_each { |${1:e}| $0 }
- name
- reverse_each { |e| .. }
- scope
- source.ruby
- tabTrigger
- reve
- uuid
- F3C5F719-EF03-4FF7-A777-4A8402FE3B6B
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/scan(;..;) { |match| .. } (sca).plist b/bundles/ruby.tmbundle/Snippets/scan(;..;) { |match| .. } (sca).plist
deleted file mode 100644
index c79bb9ac1..000000000
--- a/bundles/ruby.tmbundle/Snippets/scan(;..;) { |match| .. } (sca).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- scan(/${1:pattern}/) { |${2:match}| $0 }
- name
- scan(/../) { |match| .. }
- scope
- source.ruby
- tabTrigger
- sca
- uuid
- 66802933-B49F-479B-9DF9-1D898FF1FA90
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/select { |e| .. } (sel).plist b/bundles/ruby.tmbundle/Snippets/select { |e| .. } (sel).plist
deleted file mode 100644
index a911413c0..000000000
--- a/bundles/ruby.tmbundle/Snippets/select { |e| .. } (sel).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- select { |${1:e}| $0 }
- name
- select { |e| .. }
- scope
- source.ruby
- tabTrigger
- sel
- uuid
- 4E409AA4-E7D4-46B7-A4E9-E32F992B33E9
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/singleton_class().tmSnippet b/bundles/ruby.tmbundle/Snippets/singleton_class().tmSnippet
deleted file mode 100644
index 29178d816..000000000
--- a/bundles/ruby.tmbundle/Snippets/singleton_class().tmSnippet
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- class << self; self end
- name
- singleton_class()
- scope
- source.ruby
- tabTrigger
- sinc
- uuid
- B46D35B8-5DEB-4C10-A110-BA1965A2EB9C
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/skip(__).tmSnippet b/bundles/ruby.tmbundle/Snippets/skip(__).tmSnippet
deleted file mode 100644
index 5e8da0f1e..000000000
--- a/bundles/ruby.tmbundle/Snippets/skip(__).tmSnippet
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- skip`snippet_paren.rb`"${1:Message.}"`snippet_paren.rb end`$0
- name
- skip(..)
- scope
- source.ruby
- tabTrigger
- ski
- uuid
- B186BAC0-D981-41AC-B8F4-34BAD2BC4EE6
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/sort { |a, b| .. } (sor).plist b/bundles/ruby.tmbundle/Snippets/sort { |a, b| .. } (sor).plist
deleted file mode 100644
index 91225fe37..000000000
--- a/bundles/ruby.tmbundle/Snippets/sort { |a, b| .. } (sor).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- sort { |a, b| $0 }
- name
- sort { |a, b| .. }
- scope
- source.ruby
- tabTrigger
- sor
- uuid
- 9E0B4D4B-2956-4B3A-800A-3D8CE54E66BF
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/sort_by { |e| .. } (sorb).plist b/bundles/ruby.tmbundle/Snippets/sort_by { |e| .. } (sorb).plist
deleted file mode 100644
index 5fe80040d..000000000
--- a/bundles/ruby.tmbundle/Snippets/sort_by { |e| .. } (sorb).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- sort_by { |${1:e}| $0 }
- name
- sort_by { |e| .. }
- scope
- source.ruby
- tabTrigger
- sorb
- uuid
- BA9440C9-36C3-4031-BB61-67B581D5B179
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/step(2) { |e| .. } (ste).plist b/bundles/ruby.tmbundle/Snippets/step(2) { |e| .. } (ste).plist
deleted file mode 100644
index 53f711807..000000000
--- a/bundles/ruby.tmbundle/Snippets/step(2) { |e| .. } (ste).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- step(${1:2}) { ${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}${2:n}${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:| )/}$0 }
- name
- step(2) { |e| .. }
- scope
- source.ruby
- tabTrigger
- ste
- uuid
- 36853A11-0307-4AE7-B835-7CE6358717A5
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/sub(;..;) { |match| .. } (sub).plist b/bundles/ruby.tmbundle/Snippets/sub(;..;) { |match| .. } (sub).plist
deleted file mode 100644
index 664f79108..000000000
--- a/bundles/ruby.tmbundle/Snippets/sub(;..;) { |match| .. } (sub).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- sub(/${1:pattern}/) { ${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}${2:match}${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:| )/}$0 }
- name
- sub(/../) { |match| .. }
- scope
- source.ruby
- tabTrigger
- sub
- uuid
- 8021944C-CEA4-4983-8D1C-78D18D4004A1
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/task :task_name => [:dependent, :tasks] do __ end.tmSnippet b/bundles/ruby.tmbundle/Snippets/task :task_name => [:dependent, :tasks] do __ end.tmSnippet
deleted file mode 100644
index a23be59df..000000000
--- a/bundles/ruby.tmbundle/Snippets/task :task_name => [:dependent, :tasks] do __ end.tmSnippet
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- content
- desc "${1:Task description}"
-task :${2:${3:task_name} => ${4:[:${5:dependent, :tasks}]}} do
- $0
-end
- name
- task :task_name => [:dependent, :tasks] do .. end
- scope
- source.ruby
- tabTrigger
- tas
- uuid
- A7BF14E6-59B1-42E5-8755-8A72BF13685E
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/times { |n| .. } (tim).plist b/bundles/ruby.tmbundle/Snippets/times { |n| .. } (tim).plist
deleted file mode 100644
index de5c52432..000000000
--- a/bundles/ruby.tmbundle/Snippets/times { |n| .. } (tim).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- times { ${1/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}${1:n}${1/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:| )/}$0 }
- name
- times { |n| .. }
- scope
- source.ruby
- tabTrigger
- tim
- uuid
- 206D54AF-E67A-4DF0-B7F4-3D42FEB81685
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/transaction( __ ) do __ end.tmSnippet b/bundles/ruby.tmbundle/Snippets/transaction( __ ) do __ end.tmSnippet
deleted file mode 100644
index 78506b545..000000000
--- a/bundles/ruby.tmbundle/Snippets/transaction( __ ) do __ end.tmSnippet
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- transaction${1/(^.*?\S.*)|.*/(?1:\()/}${1:true}${1/(^.*?\S.*)|.*/(?1:\))/} { $0 }
- name
- transaction( .. ) { .. }
- scope
- source.ruby
- tabTrigger
- tra
- uuid
- 46BF99AD-E172-4D49-BCF7-072F4730E1D9
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/unix_filter .. (uni).plist b/bundles/ruby.tmbundle/Snippets/unix_filter .. (uni).plist
deleted file mode 100644
index d6ede306a..000000000
--- a/bundles/ruby.tmbundle/Snippets/unix_filter .. (uni).plist
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- ARGF.each_line$1 do |${2:line}|
- $0
-end
- name
- unix_filter { .. }
- scope
- source.ruby
- tabTrigger
- unif
- uuid
- 8CEF9711-88D5-4202-AFB9-29EF4EFD25C1
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/unless (unless).plist b/bundles/ruby.tmbundle/Snippets/unless (unless).plist
deleted file mode 100644
index 44bd57732..000000000
--- a/bundles/ruby.tmbundle/Snippets/unless (unless).plist
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- unless ${1:condition}
- $0
-end
- name
- unless … end
- scope
- source.ruby
- tabTrigger
- unless
- uuid
- F53E098D-D08E-4CE2-990A-B0BD70E60614
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/until ___ end.tmSnippet b/bundles/ruby.tmbundle/Snippets/until ___ end.tmSnippet
deleted file mode 100644
index 7e0c91739..000000000
--- a/bundles/ruby.tmbundle/Snippets/until ___ end.tmSnippet
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- until ${1:condition}
- $0
-end
- name
- until ... end
- scope
- source.ruby
- tabTrigger
- until
- uuid
- 488B387C-50C0-4B2D-9260-5A7E7EAF9B42
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/untitled.plist b/bundles/ruby.tmbundle/Snippets/untitled.plist
deleted file mode 100644
index 6896806c8..000000000
--- a/bundles/ruby.tmbundle/Snippets/untitled.plist
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- content
- opts.on( "-${1:o}", "--${2:long-option-name}"${3/^\s*$|(.*\S.*)/(?1:, )/}${3:String},
- "${4:Option description.}" ) do |${6:opt}|
- $0
-end
- name
- option(..)
- scope
- source.ruby
- tabTrigger
- opt
- uuid
- 209D5D73-7A77-4931-A158-3FB6D5B48A88
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/upto(1.0;0.0) { |n| .. } (upt).plist b/bundles/ruby.tmbundle/Snippets/upto(1.0;0.0) { |n| .. } (upt).plist
deleted file mode 100644
index 28bdae36c..000000000
--- a/bundles/ruby.tmbundle/Snippets/upto(1.0;0.0) { |n| .. } (upt).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- upto(${1:1.0/0.0}) { ${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}${2:n}${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:| )/}$0 }
- name
- upto(1.0/0.0) { |n| .. }
- scope
- source.ruby
- tabTrigger
- upt
- uuid
- 51954118-81D7-42B6-9A10-BE23D8B9FFE2
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/usage_if() (usai).plist b/bundles/ruby.tmbundle/Snippets/usage_if() (usai).plist
deleted file mode 100644
index 5926f3d1e..000000000
--- a/bundles/ruby.tmbundle/Snippets/usage_if() (usai).plist
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- if ARGV.$1
- abort "Usage: #{\$PROGRAM_NAME} ${2:ARGS_GO_HERE}"
-end
- name
- usage_if()
- scope
- source.ruby
- tabTrigger
- usai
- uuid
- 21C0D711-F32A-4665-AA0D-B136F9DD3945
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/usage_unless() (usau).plist b/bundles/ruby.tmbundle/Snippets/usage_unless() (usau).plist
deleted file mode 100644
index 7292cc24b..000000000
--- a/bundles/ruby.tmbundle/Snippets/usage_unless() (usau).plist
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- unless ARGV.$1
- abort "Usage: #{\$PROGRAM_NAME} ${2:ARGS_GO_HERE}"
-end
- name
- usage_unless()
- scope
- source.ruby
- tabTrigger
- usau
- uuid
- 49D69DEC-6991-49F4-8D9B-BA60BFDD3D17
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/when.plist b/bundles/ruby.tmbundle/Snippets/when.plist
deleted file mode 100644
index 0dd73244a..000000000
--- a/bundles/ruby.tmbundle/Snippets/when.plist
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- content
- when ${1:condition}
- $0
- name
- when …
- scope
- source.ruby
- tabTrigger
- when
- uuid
- 48D8E498-C9A5-4B1B-9A18-71A5860276FB
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/while ___ end.tmSnippet b/bundles/ruby.tmbundle/Snippets/while ___ end.tmSnippet
deleted file mode 100644
index 700521895..000000000
--- a/bundles/ruby.tmbundle/Snippets/while ___ end.tmSnippet
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- while ${1:condition}
- $0
-end
- name
- while ... end
- scope
- source.ruby
- tabTrigger
- while
- uuid
- D121FC61-96A4-4B8F-8709-280EDA876FF3
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/xmlread(__).tmSnippet b/bundles/ruby.tmbundle/Snippets/xmlread(__).tmSnippet
deleted file mode 100644
index c45ac9c7a..000000000
--- a/bundles/ruby.tmbundle/Snippets/xmlread(__).tmSnippet
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- REXML::Document.new(File.read(${1:"${2:path/to/file}"}))
- name
- xmlread(..)
- scope
- source.ruby
- tabTrigger
- xml-
- uuid
- B904D4AA-D15D-48A4-8EB2-563BAF489332
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/xpath(__) { __ }.tmSnippet b/bundles/ruby.tmbundle/Snippets/xpath(__) { __ }.tmSnippet
deleted file mode 100644
index 93d3c3413..000000000
--- a/bundles/ruby.tmbundle/Snippets/xpath(__) { __ }.tmSnippet
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- content
- elements.each(${1:"${2://XPath}"}) do |${3:node}|
- $0
-end
- name
- xpath(..) { .. }
- scope
- source.ruby
- tabTrigger
- xpa
- uuid
- CC300D44-6C3F-4F6C-A8AB-86F5A2DC57CF
-
-
diff --git a/bundles/ruby.tmbundle/Snippets/zip(enums) { |row| .. } (zip).plist b/bundles/ruby.tmbundle/Snippets/zip(enums) { |row| .. } (zip).plist
deleted file mode 100644
index 068a568e1..000000000
--- a/bundles/ruby.tmbundle/Snippets/zip(enums) { |row| .. } (zip).plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- content
- zip(${1:enums}) { |${2:row}| $0 }
- name
- zip(enums) { |row| .. }
- scope
- source.ruby
- tabTrigger
- zip
- uuid
- FD010022-E0E7-44DB-827F-33F7D9310DA2
-
-
diff --git a/bundles/ruby.tmbundle/Support/RakeMate/rake_mate.rb b/bundles/ruby.tmbundle/Support/RakeMate/rake_mate.rb
deleted file mode 100644
index 8a8ee2347..000000000
--- a/bundles/ruby.tmbundle/Support/RakeMate/rake_mate.rb
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/usr/bin/env ruby
-
-require "#{ENV["TM_SUPPORT_PATH"]}/lib/escape"
-require "#{ENV["TM_SUPPORT_PATH"]}/lib/ui"
-require "#{ENV["TM_SUPPORT_PATH"]}/lib/web_preview"
-
-require "run_rake_task"
-
-require "erb"
-include ERB::Util
-require "pstore"
-
-RAKEMATE_VERSION = "2.0.0".freeze
-DEFAULT_TASK = "(default task)".freeze
-RAKEFILE_DIR = (ENV["TM_PROJECT_DIRECTORY"] || ENV["TM_DIRECTORY"]).freeze
-
-def html_error(error)
- puts error
- puts ""
- html_footer
- exit
-end
-
-html_header("RakeMate", "Rake")
-puts <<-HTML
-
RakeMate v#{RAKEMATE_VERSION} running on Ruby v#{RUBY_VERSION} (#{ENV["TM_RUBY"].strip})
->>> #{RAKEFILE_DIR}/Rakefile
-
-HTML
-
-rake = ENV["TM_RAKE"]
-if rake.nil? or not File.exist? rake
- html_error("Rake not found. Please set TM_RAKE.")
-end
-
-prefs = PStore.new( File.expand_path( "~/Library/Preferences/" +
- "com.macromates.textmate.run_rake" ) )
-
-Dir.chdir(RAKEFILE_DIR)
-tasks = fetch_rake_tasks
-
-unless $?.exited?
- html_error("Could not fetch task list.")
-end
-if tasks.include? "No Rakefile found"
- html_error("Could not locate a Rakefile in #{RAKEFILE_DIR}.")
-end
-
-tasks = [DEFAULT_TASK] + tasks.grep(/^rake\s+(\S+)/) { |t| t.split[1] }
-if last_task = tasks.index(prefs.transaction(true) { prefs[RAKEFILE_DIR] })
- tasks.unshift(tasks.slice!(last_task))
-end
-
-if task = TextMate::UI.request_item( :title => "Rake Tasks",
- :prompt => "Select a task to execute:",
- :items => tasks,
- :button1 => "Run Task")
- prefs.transaction { prefs[RAKEFILE_DIR] = task }
-
- testing = task =~ /test/i || task == DEFAULT_TASK
- run_rake_task(task == DEFAULT_TASK ? nil : task) do |line, mode|
- if testing and line =~ /^\d+ tests, \d+ assertions, (\d+) failures, (\d+) errors/
- print "#{line.chomp}
"
- elsif testing and line =~ /^(\s+)(\S.*?):(\d+)(?::in\s*`(.*?)')?/ and File.exist? $2
- indent, file, line, method = $1, $2, $3, $4
-
- url, display_name = '', 'untitled document';
- unless file == "-"
- url = '&url=file://' + e_url(File.expand_path(file))
- display_name = File.basename(file)
- end
-
- print "#{indent}" +
- (method ? "method #{h method}" : 'at top level') +
- " in #{h display_name} at line #{line}
"
- elsif mode == :char_by_char
- if %w[. E F].include? line
- print line.sub(/^[EF]$/, "\\&"),
- "
"
- else
- print htmlize(line)
- $stdout.flush
- next :line_by_line
- end
- else
- print htmlize(line)
- end
- $stdout.flush
- if mode == :char_by_char or (testing and line =~ /^Started\s*/)
- :char_by_char
- else
- :line_by_line
- end
- end
-end
-
-puts ""
-html_footer
diff --git a/bundles/ruby.tmbundle/Support/RakeMate/run_rake_task.rb b/bundles/ruby.tmbundle/Support/RakeMate/run_rake_task.rb
deleted file mode 100644
index 04c6efcfd..000000000
--- a/bundles/ruby.tmbundle/Support/RakeMate/run_rake_task.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env ruby -w
-
-require "#{ENV["TM_SUPPORT_PATH"]}/lib/escape"
-
-class RakeTaskRunner
- def initialize
- @mode = :line_by_line
- end
-
- def run(task = nil, *options, &block)
- build_rake_command(task, *options)
-
- open(@command) do |rake_task|
- if block.nil?
- rake_task.read
- else
- loop do
- break if rake_task.eof?
- new_content = @mode == :char_by_char ? rake_task.getc.chr :
- rake_task.gets
- @mode = block.arity == 2 ? block[new_content, @mode] :
- block[new_content]
- end
- end
- end
- end
-
- private
-
- def build_rake_command(task, *options)
- @command = "|"
- @command << ENV["TM_RAKE"] || "rake"
- @command << " " << e_sh(task) unless task.nil?
- unless options.empty?
- @command << " " << options.map { |arg| e_sh(arg) }.join(" ")
- end
- @command << " 2>&1"
- end
-end
-
-def run_rake_task(*args, &block)
- RakeTaskRunner.new.run(*args, &block)
-end
-
-def fetch_rake_tasks(*args, &block)
- RakeTaskRunner.new.run("--tasks", *args, &block)
-end
diff --git a/bundles/ruby.tmbundle/Support/RubyMate/catch_exception.rb b/bundles/ruby.tmbundle/Support/RubyMate/catch_exception.rb
deleted file mode 100644
index 84e377eda..000000000
--- a/bundles/ruby.tmbundle/Support/RubyMate/catch_exception.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-# encoding: utf-8
-
-STDOUT.sync = true
-STDERR.sync = true
-
-require 'pathname'
-
-at_exit do
- if (e = $!) && !e.instance_of?(SystemExit)
- require "#{ENV['TM_SUPPORT_PATH']}/lib/escape"
- require "cgi"
- io = IO.for_fd(ENV['TM_ERROR_FD'].to_i)
-
- io.write "
\n"
- io.write "
#{e.class.name}: #{CGI.escapeHTML e.message.sub(/`(\w+)'/, '‘\1’').sub(/ -- /, ' — ')}
\n"
-
- io.write "
\n"
-
- e.backtrace.each do |b|
- if b =~ /(.*?):(\d+)(?::in\s*`(.*?)')?/ then
- file, line, method = $1, $2, $3
-
- url, display_name = '', 'untitled document';
- if file != '-' && File.exists?(file) && !ENV['TM_SCRIPT_IS_UNTITLED'] then
- file = Pathname.new(file).realpath.to_s
- url = '&url=file://' + e_url(file)
- display_name = File.basename(file)
- end
-
- io << "| "
- io << (method ? "method #{CGI::escapeHTML method}" : 'at top level')
- io << " | \nin #{CGI::escapeHTML display_name} at line #{line} |
\n"
- end
- end
-
- io.write "
"
- io.flush
-
- exit!
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/RubyMate/run_script.rb b/bundles/ruby.tmbundle/Support/RubyMate/run_script.rb
deleted file mode 100755
index d6c6e932d..000000000
--- a/bundles/ruby.tmbundle/Support/RubyMate/run_script.rb
+++ /dev/null
@@ -1,133 +0,0 @@
-require ENV["TM_SUPPORT_PATH"] + "/lib/tm/executor"
-require ENV["TM_SUPPORT_PATH"] + "/lib/tm/save_current_document"
-
-require 'pathname'
-
-TextMate.save_current_document
-
-# For Run focused unit test, find the name of the test the user wishes to run.
-args = [ ]
-if ARGV.first == "--name="
- n = ENV['TM_LINE_NUMBER'].to_i
-
- spec, context, name, test_name = nil, nil, nil
-
- File.open(ENV['TM_FILEPATH']) do |f|
- # test/unit
- lines = f.read.split("\n")[0...n].reverse
- name = lines.find { |line| line =~ /^\s*def test[_a-z0-9]*[\?!]?/i }.to_s.sub(/^\s*def (.*?)\s*$/) { $1 }
- # test helper
- test_name = $2 || $3 if lines.find { |line| line =~ /^\s*test\s+('(.*)'|"(.*)")+\s*(\{|do)/ }
- # test/spec.
- spec = $3 || $4 if lines.find { |line| line =~ /^\s*(specify|it)\s+('(.*)'|"(.*)")+\s*(\{|do)/ }
- context = $3 || $4 if lines.find { |line| line =~ /^\s*(context|describe)\s+('(.*)'|"(.*)")+\s*(\{|do)/ }
- end
-
- if name and !name.empty?
- args << "--name=#{name}"
- elsif test_name and !test_name.empty?
- args << "--name=test_#{test_name.gsub(/\s+/,'_')}"
- elsif spec and !spec.empty? and context and !context.empty?
- args << %Q{--name="/test_spec \\{.*#{context}\\} \\d{3} \\[#{spec}\\]/"}
- else
- puts "Error: This doesn't appear to be a TestCase or spec."
- exit
- end
-end
-
-is_test_script = !(ENV["TM_FILEPATH"].match(/(?:\b|_)(?:tc|ts|test)(?:\b|_)/).nil? and
- File.read(ENV["TM_FILEPATH"]).match(/\brequire\b.+(?:test\/unit|test_helper)/).nil?)
-
-cmd = [ENV['TM_RUBY'] || 'ruby', '-KU', '-rcatch_exception']
-
-if is_test_script and not ENV['TM_FILE_IS_UNTITLED']
- path_ary = (ENV['TM_ORIG_FILEPATH'] || ENV['TM_FILEPATH']).split("/")
- if index = path_ary.rindex("test")
- test_path = "#{File.join(*path_ary[0..index])}:#{File.join(*path_ary[0..-2])}"
- lib_path = File.join( *( path_ary[0..-2] +
- [".."] * (path_ary.length - index - 1) ) +
- ["lib"] )
- if File.exist? lib_path
- cmd << "-I#{lib_path}:#{test_path}"
- else
- cmd << "-I#{test_path}"
- end
- end
-end
-
-cmd << ENV["TM_FILEPATH"]
-
-def path_to_url_chunk(path)
- unless path == "untitled"
- prefix = ''
- 2.times do
- begin
- file = Pathname.new(prefix + path).realpath.to_s
- return "url=file://#{e_url(file)}&"
- rescue Errno::ENOENT
- # Hmm lets try to prefix with project directory
- prefix = "#{ENV['TM_PROJECT_DIRECTORY']}/"
- end
- end
- else
- ''
- end
-end
-
-def actual_path_name(path)
- prefix = ''
- 2.times do
- begin
- file = Pathname.new(prefix + path).realpath.to_s
- url = '&url=file://' + e_url(file)
- display_name = File.basename(file)
- return file, url, display_name
- rescue Errno::ENOENT
- # Hmm lets try to prefix with project directory
- prefix = "#{ENV['TM_PROJECT_DIRECTORY']}/"
- end
- end
- return path, '', path
-end
-
-TextMate::Executor.run( cmd, :version_args => ["--version"],
- :script_args => args ) do |line, type|
- if is_test_script and type == :out
- if line =~ /\A[.EF]+\Z/
- line.gsub!(/([.])/, "
\\1")
- line.gsub!(/([EF])/, "
\\1")
- line + "
\n"
- else
- if line =~ /^(\s+)(\S.*?):(\d+)(?::in\s*`(.*?)')?/
- indent, file, line, method = $1, $2, $3, $4
- url, display_name = '', 'untitled document';
- unless file == "untitled"
- indent += " " if file.sub!(/^\[/, "")
- if file == '(eval)'
- display_name = file
- else
- file, url, display_name = actual_path_name(file)
- end
- end
- out = indent
- out += "
" unless url.empty?
- out += (method ? "method #{CGI::escapeHTML method}" : 'at top level')
- out += "" unless url.empty?
- out += " in
#{CGI::escapeHTML display_name} at line #{line}
"
- out
- elsif line =~ /test\_(should\_[\w\_]+)\((\w+)\)\s+\[([\w\_\/\.]+)\:(\d+)\]\:/ # shoulda 2.11.3 output test_should_fulfill(SomeTest) [test/unit/some_test.rb:42]:
- spec, mod, file, line = $1, $2, $3, $4
- spec.gsub!('_',' ')
- "
#{mod}: #{spec}:#{line}
"
- elsif line =~ /(\[[^\]]+\]\([^)]+\))\s+\[([\w\_\/\.]+)\:(\d+)\]/ # [spec](file) some text [function_name:line_no]
- spec, file, line = $1, $2, $3, $4
- "
#{spec}:#{line}
"
- elsif line =~ /([\w\_]+).*\[([\w\_\/\.]+)\:(\d+)\]/ # whatever_message....[function_name/.whatever:line_no]
- method, file, line = $1, $2, $3
- "
#{method}:#{line}
"
- elsif line =~ /^\d+ tests, \d+ assertions, (\d+) failures, (\d+) errors\b.*/
- "
#{$&}
\n"
- end
- end
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/RubyMate/test.rb b/bundles/ruby.tmbundle/Support/RubyMate/test.rb
deleted file mode 100644
index a4d207cdf..000000000
--- a/bundles/ruby.tmbundle/Support/RubyMate/test.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# encoding: utf-8
-
-# p __FILE__, $PROGRAM_NAME
-
-at_exit { puts "I am
the exit!" }
-puts "that’s nice"
-STDERR.write "this is my important stuff\n"
-
-system("echo 'bad!' 1>&2")
-
-require "erb"
-foo = "bar"
-p ERB.new("<%= foo %>").result
-
-def charlie
- sheen
-end
-
-charlie
diff --git a/bundles/ruby.tmbundle/Support/RubyMate/todo.txt b/bundles/ruby.tmbundle/Support/RubyMate/todo.txt
deleted file mode 100644
index dfca7c101..000000000
--- a/bundles/ruby.tmbundle/Support/RubyMate/todo.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-Syntax Errors
-=============
-Syntax errors will be written to stderr. We should catch these and turn them into clickable links.
-
-
-Exit Status
-===========
-The exit code from the process we span is not shown. This is a limitation of popen3, but we could role a replacement for that.
-
-
-Errors From Included Files
-==========================
-These could be shown differently to make them distinguishable.
diff --git a/bundles/ruby.tmbundle/Support/bin/insert_requires.rb b/bundles/ruby.tmbundle/Support/bin/insert_requires.rb
deleted file mode 100755
index 1baedf379..000000000
--- a/bundles/ruby.tmbundle/Support/bin/insert_requires.rb
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/usr/bin/env ruby
-
-$: << "#{ENV['TM_BUNDLE_SUPPORT']}/lib" if ENV.has_key?('TM_BUNDLE_SUPPORT')
-require "ruby_requires"
-
-code = STDIN.read
-if ARGV.empty?
- REQUIRES = { "abbrev" => [/\babbrev\b/],
- "base64" => [/\bBase64\b/],
- "benchmark" => [/\bBenchmark\b/],
- "bigdecimal" => [/\bBigDecimal\b/],
- "bigdecimal/math" => [/\bBigMath\b/],
- "cgi" => [/\bCGI\b/],
- "complex" => [/\bComplex\b/],
- "csv" => [/\bCSV\b/],
- "curses" => [/\bCurses\b/],
- "date" => [/\bDate(?:Time)?\b/],
- "dbm" => [/\bDBM\b/],
- "delegate" => [ /\bDelegateClass\b/, /\bDelegator\b/,
- /\bSimpleDelegator\b/ ],
- "digest" => [/\bMD5\b/, /\bSHA1\b/],
- "dl" => [/\bDL\b/],
- "enumerator" => [ /\b(?:enum|each)_(?:cons|slice)\b/,
- /\benum_(?:for|with_index)\b/,
- /\bto_enum\b/ ],
- "erb" => [/\bERB\b/],
- "etc" => [/\bEtc\b/],
- "fcntl" => [/\bFcntl\b/],
- "fileutils" => [/\bFileUtils\b/],
- "find" => [/\bFind(?:\.|::)find\b/],
- "forwardable" => [/\b(?:Single)?Forwardable\b/],
- "gdbm" => [/\bGDBM\b/],
- "generator" => [/\bGenerator\b/, /\bSyncEnumerator\b/],
- "getoptlong" => [/\bGetoptLong\b/],
- "gserver" => [/\bGServer\b/],
- "iconv" => [/\bIconv\b/],
- "ipaddr" => [/\bIpAddr\b/],
- "logger" => [/\bLogger\b/],
- "matrix" => [/\bMatrix\b/, /\bVector\b/],
- "monitor" => [/\bMonitor(?:Mixin)?\b/],
- "net/ftp" => [/\bNet::FTP\b/],
- "net/http" => [/\bNet::HTTP\b/],
- "net/imap" => [/\bNet::IMAP\b/],
- "net/pop" => [/\bNet::(?:APOP|POP3)\b/],
- "net/smtp" => [/\bNet::SMTP\b/],
- "net/telnet" => [/\bNet::Telnet\b/],
- "nkf" => [/\bNKF\b/],
- "observer" => [/\bObservable\b/],
- "open3" => [/\bOpen3\b/],
- "optparse" => [/\bOptionParser\b/],
- "ostruct" => [/\bOpenStruct\b/],
- "pathname" => [/\bPathname\b/],
- "ping" => [/\bPing\b/],
- "pp" => [/\bpp\b/],
- "pstore" => [/\bPStore\b/],
- "rational" => [/\bRational\b/],
- "rdoc/usage" => [/\bRDoc(?:\.|::)usage\b/],
- "rdoc/markup/simple_markup" \
- => [/\bSM::SimpleMarkup\b/],
- "rdoc/markup/simple_markup/to_html" \
- => [/\bSM::SimpleMarkup\b/],
- "rdoc/usage" => [/\bRDoc(?:\.|::)usage\b/],
- "resolv" => [/\bResolv\b/],
- "rexml/document" => [/\bREXML\b/],
- "rinda/tuplespace" => [/\bRinda::TupleSpace(?:Proxy)?\b/],
- "rinda/ring" => [/\bRinda::Ring(?:Finger|Server)?\b/],
- "rss" => [/\bRSS\b/],
- "scanf" => [/\bscanf\b/],
- "sdbm" => [/\bSDBM\b/],
- "set" => [/\b(?:Sorted)?Set\b/],
- "singleton" => [/\bSingleton\b/],
- "soap" => [/\bSOAP\b/],
- "socket" => [ /\b(?:TCP|UNIX)(?:Socket|Server)\b/,
- /\b(?:UDP)?Socket\b/ ],
- "stringio" => [/\bStringIO\b/],
- "strscan" => [/\bStringScanner\b/],
- "syslog" => [/\bSyslog\b/],
- "tempfile" => [/\bTempfile\b/],
- "test/unit" => [/\bTest::Unit\b/],
- "thread" => [ /\bConditionVariable\b/, /\bMutex\b/,
- /\b(?:Sized)?Queue\b/ ],
- "time" => [/\bTime(?:\.|::)parse\b/],
- "timeout" => [/\bTimeout(?:\.|::)timeout\b/],
- "tk" => [/\bTK\b/],
- "tmpdir" => [/\bDir(?:\.|::)tmpdir\b/],
- "tracer" => [/\bTracer\b/],
- "tsort" => [/\bTSort\b/],
- "uri" => [/\bURI\b/],
- "weakref" => [/\bWeakRef\b/],
- "webrick" => [/\bWEBrick\b/],
- "Win32API" => [/\bWin32(?:API)?\b/],
- "win32ole" => [/\bWIN32OLE\b/],
- "wsdl" => [/\bWSDL\b/],
- "xmlrpc" => [/\bXMLRPC\b/],
- "yaml" => [/\bYAML\b/],
- "zlib" => [/\bZlib\b/] }
-
- libs = REQUIRES.select { |lib, usage| usage.any? { |test| code =~ test } }.
- map { |kv| kv.first }
-
- print RubyRequires.add_requires(code, libs)
-else
- print RubyRequires.add_requires(code, ARGV)
-end
diff --git a/bundles/ruby.tmbundle/Support/bin/linked_ri.rb b/bundles/ruby.tmbundle/Support/bin/linked_ri.rb
deleted file mode 100755
index 8e85d6093..000000000
--- a/bundles/ruby.tmbundle/Support/bin/linked_ri.rb
+++ /dev/null
@@ -1,153 +0,0 @@
-#!/usr/bin/env ruby -w
-# encoding: utf-8
-
-# if we are not called directly from TM (e.g. JavaScript) the caller
-# should ensure that RUBYLIB is set properly
-$: << "#{ENV["TM_SUPPORT_PATH"]}/lib" if ENV.has_key? "TM_SUPPORT_PATH"
-LINKED_RI = "#{ENV["TM_BUNDLE_SUPPORT"]}/bin/linked_ri.rb"
-
-require "exit_codes"
-require "ui"
-require "web_preview"
-
-require "erb"
-include ERB::Util
-
-RI_EXE = [ ENV['TM_RUBY_RI'], 'qri', 'ri' ].find { |cmd| !cmd.to_s.empty? && (File.executable?(cmd) || ENV['PATH'].split(':').any? { |dir| File.executable? File.join(dir, cmd) }) ? cmd : false }
-
-term = ARGV.shift
-
-# first escape for use in the shell, then escape for use in a JS string
-def e_js_sh(str)
- (e_sh str).gsub("\\", "\\\\\\\\")
-end
-
-def link_methods(prefix, methods)
- methods.split(/(,\s*)/).map do |match|
- match[0] == ?, ?
- match : "#{match}"
- end.join
-end
-
-def htmlize_ri_output(text, term)
- text = text.gsub(/&/, '&').gsub(/, '<')
-
- text.sub!(/\A(-+\s+Class: )(.*)$\n*/) do
- "Class: " + $2.gsub(/([A-Z_]\w*)(\s+<)?/, "\\1\\2") + "
\n"
- end
-
- text.sub!(/\A(-+\s+)(([A-Z_]\w*::)*[A-Z_]\w*)((#|::|\.).*)$/) do
- method = $4
- namespace = $2.split("::")
- linked = (0...namespace.size).map do |i|
- "#{namespace[i]}"
- end
- "#{linked.join("::")}#{method}
\n"
- end
-
- text.sub!(/^(Includes:\s+-+\s+)(.+?)([ \t]*\n[ \t]*\n|\s*\Z)/m) do
- head, meths, foot = $1, $2, $3
- head + meths.gsub(/([A-Z_]\w*)\(([^)]*)\)/) do |match|
- "#{$1}(" +
- link_methods("#{$1}#", $2) + ")"
- end + foot
- end
-
- text.sub!(/^(Class methods:\s+-+\s+)(.+?)([ \t]*\n[ \t]*\n|\s*\Z)/m) do
- $1 + link_methods("#{term}::", $2) + $3
- end
-
- text.sub!(/^(Instance methods:\s+-+\s+)(.+?)([ \t]*\n[ \t]*\n|\s*\Z)/m) do
- $1 + link_methods("#{term}#", $2) + $3
- end
-
- text.gsub!(/(?:\n+-+$)?\n+([\w\s]+)[:.]$\n-+\n+/, "\n\n\\1
\n")
- text.gsub!(/^-+$/, '
')
-
- text.chomp + "
"
-end
-
-def ri(term)
- documentation = `#{e_sh LINKED_RI} '#{term}' 'js' 2>&1` \
- rescue "ri Command Error.
"
- if documentation =~ /\ACouldn't open the index/
- TextMate.exit_show_tool_tip(
- "Index needed by #{RI_EXE} not found.\n" +
- "You may need to run:\n\n" +
- " fastri-server -b"
- )
- elsif documentation =~ /\ACouldn't initialize DRb and locate the Ring server./
- TextMate.exit_show_tool_tip("Your fastri-server is not running.")
- elsif documentation =~ /Nothing known about /
- TextMate.exit_show_tool_tip(documentation)
- elsif documentation.sub!(/\A>>\s*/, "")
- choices = documentation.split
- choice = TextMate::UI.menu(choices)
- exit if choice.nil?
- ri(choices[choice])
- else
- [term, documentation]
- end
-end
-
-mode = ARGV.shift
-if mode.nil? then
-
- term = STDIN.read.strip
-
- if term.empty?
- term = TextMate::UI.request_string( :title => "Ruby Documentation Search",
- :prompt => "Enter a term to search for:",
- :button1 => "search")
- end
-
- TextMate.exit_show_tool_tip("Please select a term to look up.") if term.empty?
-
- term, documentation = ri(term)
-
- html_header("Documentation for ‘#{term}’", "RDoc", <<-HTML)
-
-HTML
- puts <<-HTML
-
-
-#{documentation}
-HTML
- html_footer
- TextMate.exit_show_html
-elsif mode == 'js' then
- documentation = `#{e_sh RI_EXE} -T -f plain #{e_sh term}` \
- rescue "ri Command Error.
"
-
- if documentation =~ /\A(?:\s*More than one method matched|-+\s+Multiple choices)/
- methods = documentation.split(/\n[ \t]*\n/).last.
- strip.split(/(?:,\s*|\n)/).map { |m| m[/\S+/] }.compact
- documentation = ">> #{methods.join(' ')}"
- else
- documentation = htmlize_ri_output(documentation, term)
- end
-
- puts documentation
-end
diff --git a/bundles/ruby.tmbundle/Support/bin/make_destructive.rb b/bundles/ruby.tmbundle/Support/bin/make_destructive.rb
deleted file mode 100644
index 153f20876..000000000
--- a/bundles/ruby.tmbundle/Support/bin/make_destructive.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env ruby
-
-require "escape"
-
-CURSOR = [0xFFFC].pack("U").freeze
-line = STDIN.read
-begin
- line[ENV["TM_LINE_INDEX"].to_i, 0] = CURSOR
-rescue
- exit
-end
-
-line.sub!(/\b(chomp|chop|collect|compact|delete|downcase|exit|flatten|gsub|lstrip|map|next|reject|reverse|rstrip|slice|sort|squeeze|strip|sub|succs|swapcase|tr|tr_s|uniq|upcase)\b(?!\!)/, "\\1!")
-
-line = e_sn(line)
-line.sub!(CURSOR, "$0")
-
-print line
diff --git a/bundles/ruby.tmbundle/Support/bin/snippet_paren.rb b/bundles/ruby.tmbundle/Support/bin/snippet_paren.rb
deleted file mode 100755
index 6b4bbbd39..000000000
--- a/bundles/ruby.tmbundle/Support/bin/snippet_paren.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env ruby -wKU
-
-minimize = ENV["TM_MINIMIZE_PARENS"].to_s =~ /\byes\b/i
-
-case ARGV.shift.to_s =~ /\bend\b/i ? :end : :start
-when :start
- print(minimize ? " " : "(")
-when :end
- print ")" unless minimize
-end
diff --git a/bundles/ruby.tmbundle/Support/lib/ruby_requires.rb b/bundles/ruby.tmbundle/Support/lib/ruby_requires.rb
deleted file mode 100644
index c589000a6..000000000
--- a/bundles/ruby.tmbundle/Support/lib/ruby_requires.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env ruby
-
-$: << "#{ENV['TM_SUPPORT_PATH']}/lib" if ENV.has_key?('TM_SUPPORT_PATH')
-require "escape"
-
-module RubyRequires
- module_function
-
- def build_requires( code, libs )
- libs.reject { |lib| code =~ /require\s*(['"])#{lib}\1/ }.
- map { |lib| "require \"#{lib}\"\n" }.join
- end
-
- def place_requires( code, new_reqs )
- return code unless new_reqs =~ /\S/
-
- code.dup.sub!(/(?:^[ \t]*require\s*(['"]).+?\1.*\n)+/, "\\{new_reqs}") ||
- code.sub(/\A(?:\s*(?:#.*)?\n)*/, "\\{new_reqs}\n")
- end
-
- def add_requires( code, reqs )
- new_reqs = build_requires(code, reqs)
- code = place_requires(code, new_reqs)
- e_sn(code)
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/README b/bundles/ruby.tmbundle/Support/vendor/README
deleted file mode 100644
index 8f9654a7c..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/README
+++ /dev/null
@@ -1,3 +0,0 @@
-Please remember that anything in this directory has a license of its own.
-
-These projects need to be chosen carefully, after ensuring that there license allows them to be bundled with TextMate, and all changes must comply with the project license.
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/CHANGES b/bundles/ruby.tmbundle/Support/vendor/rcodetools/CHANGES
deleted file mode 100644
index 0b102fece..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/CHANGES
+++ /dev/null
@@ -1,70 +0,0 @@
-rcodetools history
-==================
-User-visible changes since 0.8.5
---------------------------------
-* Fix DATA and __END__ handling in xmpfilter --tempfile (windows)
-
-User-visible changes since 0.8.4
---------------------------------
-* OOPS, added missing files.
-
-User-visible changes since 0.8.0
---------------------------------
-* xmpfilter: fixed multi-line annotation bugs
-
-User-visible changes since 0.7.0
---------------------------------
-* Support Ruby 1.9!
-* xmpfilter: multi-line annotation
-* xmpfilter --expectations generates expectations by Jay Fields
-* anything-rcodetools.el: new elisp
-* --tmpfile, --tempfile: use temporary file instead of open3 on un*x
-* rcodetools.el: smarter xmpfilter-command
-* rcodetools.el: rct-fork interface
-* rct-fork: require 'rubygems' initially
-* rct-fork: more stable
-
-User-visible changes since 0.5.0
---------------------------------
-* "test-driven completion" (TDC) support for Emacs and vim (see README.TDC)
-* --test (-t), --filename options for rct-complete and rct-doc, allowing to
- specify the test to be run for 100% accurate completion/documentation in the
- corresponding implementation
-* ruby-toggle-file: finds the test file corresponding to a given
- implementation and vice versa
-* rct-fork, rct-fork-client: allow to eliminate the overhead due to library
- loading (esp. useful for Rails)
-* rbtest: executes unit tests in a single Ruby script
-* --fork, --rbtest, --detect-rbtest supported by several commands
-* xmpfilter's --spec now autodetects the RSpec version and generates
- specifications with the appropriate syntax
-
-User-visible changes since 0.4.1
---------------------------------
-* --dev: adds project directories to $:
-* --completion-class-info: list completion candidates and class info
-* display completion candidates with description, both in emacs
- and vim (using the menu+preview window).
-
-User-visible changes since 0.4.0
---------------------------------
-* rct-meth-args: implemented -I
-* many bug fixes
-
-xmpfilter was integrated into rcodetools as of 0.4.0.
-
-xmpfilter history
-=================
-User-visible changes since 0.3.1 (2006-10-17)
-* implemented --debug
-* --[no]-warnings
-* --cd working_dir
-* --rails
-* --no-poetry
-* more intelligent assertions: try to find which local variables hold the
- values compared against in assertions/expectations
-* editor-independent completion (-C, --completion-emacs, --completion-vim)
-* quick method/class reference with -D (--refe, --ri*)
-
-User-visible changes since 0.3.0 (2006-10-16)
-* xmpfilter.rb --spec works on win32 too
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/README b/bundles/ruby.tmbundle/Support/vendor/rcodetools/README
deleted file mode 100644
index 036373fc4..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/README
+++ /dev/null
@@ -1,98 +0,0 @@
-
- rcodetools http://eigenclass.org/hiki.rb?rcodetools
- Copyright (c) 2005-2007 Mauricio Fernandez http://eigenclass.org
- Copyright (c) 2006-2008 rubikitch http://www.rubyist.net/~rubikitch/
-Use and distribution subject to the terms of the Ruby license.
-
-= Overview
-rcodetools is a collection of Ruby code manipulation tools.
-It includes xmpfilter and editor-independent Ruby development helper tools,
-as well as emacs and vim interfaces.
-
-Currently, rcodetools comprises:
-* xmpfilter: Automagic Test::Unit assertions/RSpec expectations and code annotations
-* rct-complete: Accurate method/class/constant etc. completions
-* rct-doc: Document browsing and code navigator
-* rct-meth-args: Precise method info (meta-prog. aware) and TAGS generation
-* rct-fork: Pre-load heavy library(Rails etc) and speed up rct-complete/rct-doc (server)
-* rct-fork-client: Run Ruby programs from state the rct-fork server has
-* ruby-toggle-file: Toggle implementation file and test file
-* rbtest: Embedded Test::Unit for small scripts
-
-See also README.xmpfilter.
-
-Originally rct-complete and rct-doc were subcommands of xmpfilter.
-Actually they use xmpfilter's code heavily.
-But the relationship between xmpfilter (annotation) and completion/doc is not
-intuitive, so I (rubikitch) split it into separate executables.
-
-= Usage
-xmpfilter, rct-complete and rct-doc take its input from stdin and write to
-stdout. They can run in several modes; see
- xmpfilter -h
- rct-complete -h
- rct-doc -h
- rct-meth-args -h
- rct-fork -h
- rct-fork-client -h
- ruby-toggle-file -h
- rbtest -h
-README.emacs and README.vim describe how to use rcodetools from your editor.
-
-= Accurate Completion Internal and Caveat
-rct-complete and rct-doc use xmpfilter engine, ie they get runtime information by executing code.
-In Ruby (dynamic languages), type of any expressions except literals cannot be known without actually executing code.
-Moreover Ruby has open classes and singleton methods.
-Rcodetools asks `ruby' run-time informations, so we can get very accurate informations.
-Completion and document browsing are essentially identical operations,
-they both need the object value in question.
-Therefore we discuss completion.
-
-rct-complete does:
-(1) replaces target line with completion magic
- (it calculates methods the target object has).
-(2) executes modified script.
-(3) once the control reaches completion magic, modified script exits.
-(4) outputs in specified format. (list candidates, EmacsLisp...)
-
-But this methodology has two big drawbacks, side-effects and inability to get any informations of uncovered code!
-
-An extreme side-effect example:
- File.unlink a_file
- File. <-
-
-If you call rct-complete, it removes a_file (sends a mail, accesses DB ...).
-So you must be careful to use, especially at TOPLEVEL.
-I (rubikitch) often experiment at TOPLEVEL with rcodetools, I NEVER use irb(sh) since rcodetools!
-
-An uncovered code example:
- def foo
- 1. <-
- end
-
-If the code does not call foo, we cannot do any completions.
-
-Useless eh? But we already have a way to elude the drawbacks, test scripts (unit tests)!
-Test scripts are self-enclosed and expected to be executed, so side-effects are not problem.
-Moreover tests call methods we write.
-Because Ruby's Test::Unit has an ability to test only one test method, we can do lightning-fast completion.
-Let's call it Test-Driven Completion (TDC).
-
-To support TDC, rct-complete has -t option.
-With -t, it concatenate modified script and test/unit code.
-If the control does not reach target line, test/unit code calls the line.
-
-How do we select test script and test method?
-The editor selects recently selected buffer of test script as test script of TDC,
-because the test-infected tend to go and return between test script and implementation script.
-It considers files matching /test.*\.rb/ as test script.
-It selects test method at the cursor position.
-
-TDC adds roles of test scripts.
-Enjoy TDC magic!
-
-See also README.TDC.
-
-
-= License
-rcodetools is licensed under the same terms as Ruby.
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/README.TDC b/bundles/ruby.tmbundle/Support/vendor/rcodetools/README.TDC
deleted file mode 100644
index 5a413dab0..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/README.TDC
+++ /dev/null
@@ -1,158 +0,0 @@
-
-= Overview
-
-Ruby is very dynamic language, therefore it is impossible to do
-accurate completion without executing script. While executing script
-from start to cursor point is often dangerous, executing unit test
-script covering current point is SAFE. I call this methodology
-`Test-Driven Completion' (TDC).
-
-As I have already stated in README, browsing documentation of method
-(rct-doc) is almost identical operation to completion. This
-discussion is applicable to rct-doc.
-
-= Why TDD Is Needed
-
-In the following code snippet:
-
- File.unlink a_file
- File. <-
-
-If you complete after `File.', rct-complete actually deletes a_file.
-Normally it is unpleasant.
-In real-life development, side-effect is inevitable.
-
-In the foo method which are not called:
-
- def foo
- 1. <-
- end
-
-If the code does not call foo, rct-complete cannot do any completions.
-Before TDC, if you want to do completion in methods, you have to write
-method call and remove it after completion. Too useless!!
-
-= Messianic Unit Test Script
-
-Recently Test-Driven Development (TDD) is widespread. Many developers
-write unit tests. Fortunately Ruby's unit tester, Test::Unit, is
-sophisticated enough to test one test method. Unit tests are
-self-enclosed: they must tear down resources, so executing unit tests
-are SAFE. TDC uses unit test to do completion.
-
-= TDC Methodology
-
-(1) Switch to unit test script.
-(2) Write a test for target method.
-(3) Switch to implementation script.
-(4) You can write target method WITH COMPLETION!
-(5) Back to (1)
-
-TDC methodology is almost identical to TDD. TDC is very easy for TDDers.
-
-= TDC With Example
-
-For simplicity, suppose that you are unfamiliar with Time class and
-you want to write a method to format date string.
-
-The directory structure and file contents is following:
-
- /tmp/mylib0/
- /tmp/mylib0/lib/
- mylib0.rb
- /tmp/mylib0/test/
- test_mylib0.rb
-
- List: mylib0.rb
- # contrived example of long-runtime method
- def mysleep(x)
- sleep x
- end
-
- def mytime(tm)
-
- end
-
-
- List: test_mylib0.rb
- require 'test/unit'
- require 'mylib0'
- class TestMylib0 < Test::Unit::TestCase
- def test_0_mysleep
- s = Time.now
- mysleep 3.0
- e = Time.now
- assert_in_delta 3.0, e-s, 0.01
- end
-
- def test_1_mytime
-
- end
- end
-
-These sample files are in demo/ directory.
-
-
-== Switch to unit test script.
-
-TDC starts with writing unit test as TDD does.
-Open test_mylib0.rb.
-
-== Write a test for target method.
-
-Suppose that you want to write mytime method and test_1_mytime test
-method, and that you want to experiment Time class first (before
-forming an assertion).
-
-In TDC, you do not have to write an assertion first: just write only a
-method call. If you are familiar with Time class, you are free to
-write an assertion, of course.
-
- def test_1_mytime
- mytime(Time.now)
- end
-
-At this time, the cursor position is in test_1_mytime test method.
-
-== Switch to implementation script.
-
-Open mylib0.rb with the `ruby-toggle-file' script. For example, in Emacs use
-the `ruby-toggle-buffer' command, and in vim the t (by default
-\t) binding. Since in TDD/TDC you often switch between the test and the
-implementation, it is much handier than typing the filename manually.
-
-The rct-complete uses latest-selected test script as TDC test script
-and test method at cursor position as TDC test method. In this case,
-test_mylib0.rb is TDC test script and test_1_mytime is TDC test
-method. If the cursor position of test_mylib0.rb is at the top,
-rct-complete executes whole test methods in test_mylib0.rb. Therefore
-latency of completion is longer.
-
-== You can write target method WITH COMPLETION!
-
-Fill mytime method.
-
- def mytime(tm)
- tm.
- end
-
-Do completion after `tm.'. Here! Your editor is listing methods `tm'
-accepts!! If your editor has help-on-candidate mechanism (eg. Emacs +
-Icicles), you would see documentation of each listed method.
-
-Then you find `Time#strftime' method. Type `str' and do completion.
-
- def mytime(tm)
- tm.strftime
- end
-
-Usage is... use `rct-doc' (in Emacs, `rct-ri') after `strftime'.
-
-After you are familiar with Time class, switch to test script and write assertions.
-
-= When Modifying Another Method
-
-If you want to modify already-written method, setting cursor position
-of corresponding test script to corresponding test method is better.
-It tells rct-complete new test script and test method, so you can do
-completion in the new method.
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/README.emacs b/bundles/ruby.tmbundle/Support/vendor/rcodetools/README.emacs
deleted file mode 100644
index c3acff5d3..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/README.emacs
+++ /dev/null
@@ -1,75 +0,0 @@
-
-rcodetools.el allows you to run rcodetools on a buffer.
-
-To eval the sexp, type C-e C-x C-e; `end-of-line' and `eval-last-sexp'.
-
-installation
-============
-
-If you use RI document feature, you must install ri-emacs first.
- http://rubyforge.org/projects/ri-emacs/
-
-If you feel RI and ri-emacs.rb startup is SLOW, you want to install FastRI.
-FastRI offers ri-emacs compatible layer, so you can use it with ri-ruby.el.
- http://eigenclass.org/hiki.rb?fastri
-
-Copy rcodetools.el to the appropriate directory, which is in load-path.
-Then require it.
- (require 'rcodetools)
-
-If you use icicles copy icicles-rcodetools.el too.
-Then require it.
- (require 'icicles-rcodetools)
-It provides wonderful `help on candidate' feature, RI document on each candidate during completion.
-
-If you use anything.el copy anything-rcodetools.el too.
-Then require it.
- (require 'anything-rcodetools)
-RI document on each candidate during completion.
-
-anything-show-completion.el shows selection (mehod) in buffer for completion.
-It is available in:
- http://www.emacswiki.org/cgi-bin/wiki/download/anything-show-completion.el
-
-I think anything-rcodetools is more convenient than icicles-rcodetools.
-I'm addicted to anything!
- http://www.emacswiki.org/cgi-bin/wiki/Anything
-
-xmpfilter on buffer
-===================
-
-# [EVAL IT] (describe-function 'xmp)
-
-If you want to add => marks, call comment-dwim twice.
-
-# [EVAL IT] (describe-function 'comment-dwim)
-
-method/class/constant completion
-================================
-
-# [EVAL IT] (describe-function 'rct-complete-symbol)
-
-If you use icicles-rcodetools or anything-rcodetools, you can browse RI document
-for selected candidate by typing C-M-RET (icicles) or C-z (anything.
-It is wonderful icicles and anything feature!!
-
-show RI document / jump to the definition
-=========================================
-
-# [EVAL IT] (describe-function 'rct-ri)
-
-By default rct-ri asks for a TAGS file, which is generated by tag generator like rtags.
-If there is a TAGS file, this command jumps to the definition of current method.
-If use do not use this feature, evaluate:
- (setq rct-find-tag-if-available nil)
-
-# [EVAL IT] (describe-variable 'rct-find-tag-if-available)
-
-speed-up xmpfilter and completion
-=================================
-
-# [EVAL IT] (describe-function 'rct-fork)
-# [EVAL IT] (describe-function 'rct-fork-kill)
-
-M-x rct-fork pre-loads heavy libraries (like rails).
-You need not every time wait for loading them anymore!
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/README.ja b/bundles/ruby.tmbundle/Support/vendor/rcodetools/README.ja
deleted file mode 100644
index 7a321169f..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/README.ja
+++ /dev/null
@@ -1,84 +0,0 @@
-
- rcodetools http://eigenclass.org/hiki.rb?rcodetools
- Copyright (c) 2005-2007 Mauricio Fernandez http://eigenclass.org
- Copyright (c) 2006-2008 rubikitch http://www.rubyist.net/~rubikitch/
-Use and distribution subject to the terms of the Ruby license.
-
-=
-rcodetools Ruby Υɤġ뷲Ǥ
-rcodetools ˤ xmpfilter ȥǥ˰¸ʤȯٱġ뤬ޤޤƤޤ
-Emacs Vim ΥեѰդƤޤ
-
-* xmpfilter: Test::Unit assert* / RSpec should* ư
-* rct-complete: ٥å̾饹̾̾䴰
-* rct-doc: ɥȻȡɥʥӥ
-* rct-meth-args: ٥åɾꥹȡTAGS ե
-* rct-fork: Rails Ť饤֥ͽɤ䴰®ʥС
-* rct-fork-client: rct-fork Фݻ֤ Ruby ץȤ¹Ԥ
-* ruby-toggle-file: ƥȥץȤȼץȤڤ괹
-* rbtest: ϥץȤΤ Test::Unit
-
-
-= Ȥ
-
-==
-ͤɽԤ # => äޤ
-
- a, b = "foo", "baz"
- a + b # =>
- a.size # =>
-
-xmpfilter ̤ȲΤ褦˼ͤɽƤޤ
-
- a, b = "foo", "baz"
- a + b # => "foobaz"
- a.size # => 3
-
-
-== Test::Unit assert ʸ
-
-ǤˤǤäƤץΥƥȥץȤΤݤǤ͡
-
- def test_insertion
- @o.insert "bar"
- @o.insert "baz"
- @o.size # =>
- @o.last # =>
- @o.first # =>
- @o.complex_computation # =>
- @o.last(2) # =>
- end
-
-xmpfilter-u ץˤ֤ڸƤޤ
-
- def test_insertion
- @o.insert "bar"
- @o.insert "baz"
- assert_equal(2, @o.size)
- assert_equal("baz", @o.last)
- assert_equal("bar", @o.first)
- assert_in_delta(3.14159265358979, @o.complex_computation, 0.0001)
- assert_equal(["baz", "bar"], @o.last(2))
- end
-
-RSpec ˤĤƤƱͤΤȤǤޤ-s ץ
-
-== 䴰ɥȻ
-
-ưˤ륹åȤƤ
-
-http://eigenclass.org/hiki.rb?rcodetools-screenshots
-
-== ܤȤ
--h ץĤȻѲǽʥץɽޤ
-
- xmpfilter -h
- rct-complete -h
- rct-doc -h
- rct-meth-args -h
- rct-fork -h
- rct-fork-client -h
- ruby-toggle-file -h
- rbtest -h
-
-README.emacs README.vim ˥ǥǤλȤܤƤޤ
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/README.method_analysis b/bundles/ruby.tmbundle/Support/vendor/rcodetools/README.method_analysis
deleted file mode 100644
index 53a482d05..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/README.method_analysis
+++ /dev/null
@@ -1,13 +0,0 @@
-
-method_analyzer.rb can be used to gather precise information about the exact
-methods called in your code, allowing you to explore it better with rct-doc
-(see README.emacs and README.vim for more information). This requires high
-code coverage, since it can only record such data when the code is executed.
-
-rct-meth-args can be used to generate fairly complete TAGS files. It operates
-by loading the specified files and tracking method definitions; therefore, it
-is meta-programming aware, unlike other implementations.
-
-You can use them conveniently by adding the code shown in
-Rakefile.method_analysis to your Rakefile.
-
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/README.vim b/bundles/ruby.tmbundle/Support/vendor/rcodetools/README.vim
deleted file mode 100644
index ea7c7c59f..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/README.vim
+++ /dev/null
@@ -1,111 +0,0 @@
-
-Copy rcodetools.vim to your plugin directory (typically $HOME/.vim/plugin) in
-order to enable accurate code completion, quick RI execution and exact tag
-jumping.
-
-Switching between implementation and test files
-===============================================
-The t binding (by default \t) will call ruby-toggle-file to
-switch from test to implementation and vice versa. Moreover, when you switch
-from the test to the implementation, rcodetools will remember which test
-you were editing (based on the cursor position), and call it as needed for
-advanced code completion or precise RI documentation, as documented below.
-
-The actual binding can be changed in your .vimrc as follows:
- let g:RCT_toggle_binding="" " use ^X^T to go test <=> implementation
-
-Code completion
-===============
-rcodetools.vim redefines user-defined completion for Ruby programs, so you can
-use the intelligent, 100%-accurate completion with in insert mode.
-Note that this runs the code to obtain the exact candidate list.
-
-If you've set completeopt to menu,preview then rcodetools.vim can display
-information about the completion candidates. The menu will show the synopsis
-as given in the RI documentation, and the preview window will contain the full
-RI documentation.
-
-This functionality relies on fri for quick lookups. It can be enabled by setting
-
- let g:rct_completion_use_fri = 1 " 0 by default (disabled)
-
-in your .vimrc (don't forget to run fastri-server too).
-Obtaining the documentation for many candidates can be slow, so you can set
-the threshold above which additional documentation will not be shown with
-
- " 20 by default, about a couple secs max wait on a normal machine
- let g:rct_completion_info_max_len = 20
-
-Quick RI documentation and exact tag jumping
-============================================
-When you're editing a Ruby file, will jump to the definition of the
-chosen element if found in the TAGS file; otherwise, it will call RI and show
-the documentation in a new window.
-You can specify the RI executable to use by adding something like
- let g:RCT_ri_cmd = "ri -T -f plain "
-to your .vimrc. (rcodetools.vim also honors b:RCT_RI_cmd and w:RCT_RI_cmd if set).
-By default, "fri -f plain " will be used. fri (FastRI) is an improved RI
-documentation browser, which features more intelligent search modes, gem
-integration, vastly better performance... You can find it at
-http://eigenclass.org/hiki.rb?fastri and it's also available in gem format
-gem install fastri
-
-If you want to call RI for the word the cursor is on (instead of jumping to
-the definition if found), you can use this binding:
- r (\r by default if you haven't changed your localleader)
-You can specify another binding in your .vimrc as follows:
- let g:RCT_ri_binding="" " use ^X^R to call vim on current word
-
-Using xmpfilter
-===============
-xmpfilter takes code from stdin and outputs to stdout so you can filter
-your code with ! as usual.
-
-If you use xmpfilter often, you might want to use mappings like the
-following, which allow you to:
-* add annotations
-* expand assertions
-* insert/remove # => markers
-
-
-
-" plain annotations
-map !xmpfilter -a
-nmap V
-imap a
-
-" Test::Unit assertions; use -s to generate RSpec expectations instead
-map !xmpfilter -u
-nmap V
-imap a
-
-" Annotate the full buffer
-" I actually prefer ggVG to %; it's a sort of poor man's visual bell
-nmap mzggVG!xmpfilter -a'z
-imap
-
-" assertions
-nmap mzggVG!xmpfilter -u'z
-imap a
-
-" Add # => markers
-vmap !xmpfilter -m
-nmap V
-imap a
-
-" Remove # => markers
-vmap ms:call RemoveRubyEval()
-nmap V
-imap a
-
-
-function! RemoveRubyEval() range
- let begv = a:firstline
- let endv = a:lastline
- normal Hmt
- set lz
- execute ":" . begv . "," . endv . 's/\s*# \(=>\|!!\).*$//e'
- normal 'tzt`s
- set nolz
- redraw
-endfunction
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/README.xmpfilter b/bundles/ruby.tmbundle/Support/vendor/rcodetools/README.xmpfilter
deleted file mode 100644
index 1ea49dcb9..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/README.xmpfilter
+++ /dev/null
@@ -1,287 +0,0 @@
-
-xmpfilter http://eigenclass.org/hiki.rb?xmpfilter
-Copyright (c) 2005-2008 Mauricio Fernandez http://eigenclass.org
- rubikitch
-Use and distribution subject to the terms of the Ruby license.
-
-Overview
-========
-xmpfilter is a small tool that can be used to
-* generate Test::Unit assertions, RSpec expectations and
- expectations blocks semi-automatically
-* annotate source code with intermediate results (a bit like irb
- --simple-prompt but only for the lines explicitly marked with # =>)
- Very useful for example code (such as postings to ruby-talk).
-
-Usage
-=====
-xmpfilter takes its input from stdin and writes to stdout. It can run in
-several modes (annotation, Test::Unit assertion expansion, RSpec expectation
-generation, expectations expectations generation, marker insertion); see
- xmpfilter -h
-README.emacs and README.vim describe how to use xmpfilter from your editor.
-
-Example: code annotation
-========================
-Just add "# =>" markers to the lines whose values you want to be shown:
-
- a, b = "foo", "baz"
- a + b # =>
- a.size # =>
-
-will be expanded to (in one keypress in a decent editor, see README.emacs and
-README.vim)
-
- a, b = "foo", "baz"
- a + b # => "foobaz"
- a.size # => 3
-
-This saves much cut&pasting when you're posting to ruby-list/ruby-talk/ruby-core
-(We use it all the time).
-
-
-Example: multi-line code annotation
-===================================
-Just add "# =>" markers to the next lines whose values you want to be shown with pp:
-
-a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342,
- 1332333333,6,8 ]
-1 # =>
-a
-# =>
-
-will be expanded to (in one keypress in a decent editor, see README.emacs and
-README.vim)
-
-a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342,
- 1332333333,6,8 ]
-1 # => 1
-a
-# => ["1111111111111111111111111111111111111111111111111111",
-# 123334324234242342,
-# 1332333333,
-# 6,
-# 8]
-
-
-Example: assertion generation
-=============================
-
-xmpfilter can generate assertions based on the current behavior of the code
-to be tested (iow. the current behavior is assumed to be correct and is used
-to generate assertions which won't be modified by further runs of
-xmpfilter), making it quite useful for regression testing.
-
-Imagine you have a ComplexClass you want to test. You might start with
-
- class TestComplexClass < Test::Unit::TestCase
- def setup; @o = ComplexClass.new("foo", false) end
- end
-
-and then want to add some tests:
-
- def test_insertion
- @o.insert "bar"
- @o.insert "baz"
- # ... assertions here
- end
-
-At this point, you want to add several assertions to verify that the values
-returned by @o.size, @o.last, @o.first, @o.complex_computation and @o.last(2)
-are correct. You can just write the following and feed the file to
-xmpfilter in -u mode (the # => markers can also be inserted by
-xmpfilter, see README.vim for more information:
-
- def test_insertion
- @o.insert "bar"
- @o.insert "baz"
- @o.size # =>
- @o.last # =>
- @o.first # =>
- @o.complex_computation # =>
- @o.last(2) # =>
- end
-
-xmpfilter will run the test and remember what happened in each marked line,
-and then rewrite the code so that it looks for instance like
-
- def test_insertion
- @o.insert "bar"
- @o.insert "baz"
- assert_equal(2, @o.size)
- assert_equal("baz", @o.last)
- assert_equal("bar", @o.first)
- assert_in_delta(3.14159265358979, @o.complex_computation, 0.0001)
- assert_equal(["baz", "bar"], @o.last(2))
- end
-
-As you can see, it can save some typing.
-
-You can edit the generated assertions as you want: xmpfilter will not
-modify lines without the "# =>" marker. xmpfilter can be used repeatedly as
-you add more assertions. Imagine you want to verify that @o.last(3) raises an
-ArgumentError. You can simply add one line marked with # => :
-
- ...
- assert_in_delta(3.14159265358979, @o.complex_computation, 0.0001)
- assert_equal(["baz", "bar"], @o.last(2))
- @o.last(3) # =>
- end
-
-and have it expanded by xmpfilter:
-
- ...
- assert_in_delta(3.14159265358979, @o.complex_computation, 0.0001)
- assert_equal(["baz", "bar"], @o.last(2))
- assert_raise(ArgumentError){ @o.last(3) }
- end
-
-
-Example: RSpec expectations
-===========================
-Here's some code before and after filtering it with xmpfilter:
-
- class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1
- end
-
- context "Testing xmpfilter's expectation expansion" do
- setup do
- @o = X.new
- end
-
- specify "Should expand should_equal expectations" do
- @o.foo(true) # =>
- @o.foo(true).a # =>
- @o.foo(false) # =>
- end
-
- specify "Should expand should_raise expectations" do
- @o.bar # =>
- end
-
- specify "Should expand should_be_nil expectations" do
- @o.baz # =>
- end
-
- specify "Should expand correct expectations for complex values" do
- @o.babar # =>
- end
-
- specify "Should expand should_be_close expectations" do
- @o.fubar(10) # =>
- end
- end
-
-
-after piping it to xmpfilter -s:
-
- class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1 # !> already initialized constant A
- end
-
- context "Testing xmpfilter's expectation expansion" do
- setup do
- @o = X.new
- end
-
- specify "Should expand should_equal expectations" do
- (@o.foo(true)).should_be_a_kind_of X::Y
- (@o.foo(true).inspect).should_equal "#"
- (@o.foo(true).a).should_equal 2
- (@o.foo(false)).should_equal 2
- end
-
- specify "Should expand should_raise expectations" do
- lambda{(@o.bar)}.should_raise RuntimeError
- end
-
- specify "Should expand should_be_nil expectations" do
- (@o.baz).should_be_nil
- end
-
- specify "Should expand correct expectations for complex values" do
- (@o.babar).should_equal [1, 2]
- end
-
- specify "Should expand should_be_close expectations" do
- (@o.fubar(10)).should_be_close(101.0, 0.0001)
- end
- end
-
-
-Example: expectations expectations
-==================================
-Expectations is a light-weight unit testing framework by Jay Fields.
-(http://expectations.rubyforge.org)
-
-Here's some code before and after filtering it with xmpfilter:
-
- require 'rubygems'
- require 'expectations'
-
- S = Struct.new :a
- Expectations do
- 1 + 1 # =>
- "a".length # =>
- [][1] # =>
- 1.hoge # =>
- 1.1 + 1.0 # =>
- S.new(1) # =>
- end
-
-after piping it to xmpfilter --expectations:
-
- require 'rubygems'
- require 'expectations'
-
- S = Struct.new :a
- Expectations do
- expect 2 do
- 1 + 1
- end
-
- expect 1 do
- "a".length
- end
-
- expect nil do
- [][1]
- end
-
- expect NoMethodError do
- 1.hoge
- end
-
- expect 2.0999..2.1001 do
- 1.1 + 1.0
- end
-
- expect S do
- S.new(1)
- end
-
- expect "#" do
- S.new(1).inspect
- end
-
- end
-
-
-License
-=======
-xmpfilter is licensed under the same terms as Ruby.
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/Rakefile b/bundles/ruby.tmbundle/Support/vendor/rcodetools/Rakefile
deleted file mode 100644
index 7d2c227f8..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/Rakefile
+++ /dev/null
@@ -1,121 +0,0 @@
-
-PKG_REVISION = ".0"
-
-$:.unshift "lib" if File.directory? "lib"
-require 'rcodetools/xmpfilter'
-require 'rake/testtask'
-include Rcodetools
-RCT_VERSION = XMPFilter::VERSION
-
-desc "Run the unit tests in pure-Ruby mode ."
-Rake::TestTask.new(:test) do |t|
- t.test_files = FileList['test/test*.rb']
- t.verbose = true
-end
-
-begin
- require 'rcov/rcovtask'
- desc "Run rcov."
- Rcov::RcovTask.new do |t|
- t.rcov_opts << "--xrefs" # comment to disable cross-references
- t.test_files = FileList['test/test_*.rb'].to_a - ["test/test_functional.rb"]
- t.verbose = true
- end
-
- desc "Save current coverage state for later comparisons."
- Rcov::RcovTask.new(:rcovsave) do |t|
- t.rcov_opts << "--save"
- t.test_files = FileList['test/test_*.rb'].to_a - ["test/test_functional.rb"]
- t.verbose = true
- end
-rescue LoadError
- # rcov is not installed
-end
-task :default => :test
-
-
-#{{{ Package tasks
-PKG_FILES = FileList[
- "bin/xmpfilter", "bin/rct-*", "bin/ruby-toggle-file", "bin/rbtest",
-"lib/**/*.rb",
-"CHANGES", "rcodetools.*", "icicles-rcodetools.el", "anything-rcodetools.el",
-"README", "README.*", "THANKS",
-"Rakefile", "Rakefile.method_analysis",
-"setup.rb",
-"test/**/*.rb","test/**/*.taf"
-]
-
-begin
- require 'rake/gempackagetask'
- Spec = Gem::Specification.new do |s|
- s.name = "rcodetools"
- s.version = RCT_VERSION + PKG_REVISION
- s.summary = "rcodetools is a collection of Ruby code manipulation tools"
- s.description = <, "Mauricio Fernandez" }
- s.homepage = "http://eigenclass.org/hiki.rb?rcodetools"
- s.bindir = "bin"
- s.executables = %w[rct-complete rct-doc xmpfilter rct-meth-args]
- s.has_rdoc = true
- s.extra_rdoc_files = %w[README]
- s.rdoc_options << "--main" << "README" << "--title" << 'rcodetools'
- s.test_files = Dir["test/test_*.rb"]
- s.post_install_message = < [:test]
- Rake::GemPackageTask.new(Spec) do |p|
- p.need_tar_gz = true
- end
-
-rescue LoadError
- # RubyGems not installed
-end
-
-desc "install by setup.rb"
-task :install do
- sh "sudo ruby setup.rb install"
-end
-
-desc "release in rubyforge (package is created)"
-task :release_only do
- sh "rubyforge login"
- sh "rubyforge add_release rcodetools rcodetools #{RCT_VERSION} pkg/rcodetools-#{RCT_VERSION}.0.tar.gz "
- sh "rubyforge add_file rcodetools rcodetools #{RCT_VERSION} pkg/rcodetools-#{RCT_VERSION}.0.gem "
-end
-
-desc "release in rubyforge"
-task :release => [:package, :release_only]
-
-# vim: set sw=2 ft=ruby:
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/Rakefile.method_analysis b/bundles/ruby.tmbundle/Support/vendor/rcodetools/Rakefile.method_analysis
deleted file mode 100644
index 1dc8e0414..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/Rakefile.method_analysis
+++ /dev/null
@@ -1,30 +0,0 @@
-
-# Rake tasks to generate TAGS and gather method analysis information.
-# See README.method_analysis for more information.
-
-## my standard Rakefile
-task :tags => "TAGS"
-
-desc "Generate method_analysis by ruby -rmethod_analyzer."
-task :analyze => [:_prepare_method_analyze, :tags] do
- at_exit { sh "ls -l method_analysis" }
-end
-
-task :_prepare_method_analyze do
- ENV['METHOD_ANALYZER_FORMAT']="marshal"
- sh "rm -f method_analysis"
- puts "generating method_analysis"
-end
-
-## application-specific Rakefile (RTtool)
-task :analyze do
- sh "ruby -Ilib -rmethod_analyzer test/test.rb"
- sh "ruby -Ilib -rmethod_analyzer test/test-rt2html-lib.rb"
- sh "ruby -Ilib -rmethod_analyzer test/test-rtparser.rb"
-end
-
-file "TAGS" => FileList["lib/rt/*.rb"] do
- sh "rct-meth-args -t lib/rt/*.rb > TAGS"
-end
-
-
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/THANKS b/bundles/ruby.tmbundle/Support/vendor/rcodetools/THANKS
deleted file mode 100644
index 0ed1e3763..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/THANKS
+++ /dev/null
@@ -1,11 +0,0 @@
-Some names forgotten, tell me if you care :) -- mfp
-
-rubikitch
-* expanded xmp3.rb (a previous version of xmpfilter.rb) to support RSpec expectations
-* wrote the elisp magic to use xmpfilter.rb with emacs
-* made the 100% accurate, editor-independent completion system
-[rubikitch took xmpfilter and turned it into the much more powerful
-rcodetools, so there are way too many things to list them here :)]
-
-Adagios
-* found & fixed problem with rcodetools.vim plugin on win32
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/anything-rcodetools.el b/bundles/ruby.tmbundle/Support/vendor/rcodetools/anything-rcodetools.el
deleted file mode 100644
index e21a743de..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/anything-rcodetools.el
+++ /dev/null
@@ -1,151 +0,0 @@
-;;; anything-rcodetools.el --- accurate Ruby method completion with anything
-;; $Id: anything-rcodetools.el,v 1.13 2009/04/20 16:25:37 rubikitch Exp $
-
-;;; Copyright (c) 2007 rubikitch
-
-;; Author: rubikitch
-;; URL: http://www.emacswiki.org/cgi-bin/wiki/download/anything-rcodetools.el
-
-;;; Use and distribution subject to the terms of the Ruby license.
-
-;;; Commentary:
-
-;; (0) You need rcodetools, anything.el and FastRI. Note that you do not have to
-;; configure anything.el if you use anything.el for this package.
-;; (1) You need to add to .emacs:
-;; (require 'anything)
-;; (require 'anything-rcodetools)
-;; ;; Command to get all RI entries.
-;; (setq rct-get-all-methods-command "PAGER=cat fri -l")
-;; ;; See docs
-;; (define-key anything-map "\C-z" 'anything-execute-persistent-action)
-
-;;; Commands:
-;;
-;; Below are complete command list:
-;;
-;;
-;;; Customizable Options:
-;;
-;; Below are customizable option list:
-;;
-
-;;; History:
-
-;; $Log: anything-rcodetools.el,v $
-;; Revision 1.13 2009/04/20 16:25:37 rubikitch
-;; Set anything-samewindow to nil
-;;
-;; Revision 1.12 2009/04/18 10:12:02 rubikitch
-;; Adjust to change of `use-anything-show-completion'
-;;
-;; Revision 1.11 2009/04/17 20:21:47 rubikitch
-;; * require anything
-;; * require anything-show-completion.el if available
-;;
-;; Revision 1.10 2009/04/17 20:11:03 rubikitch
-;; removed old code
-;;
-;; Revision 1.9 2009/04/17 20:07:52 rubikitch
-;; * use --completion-emacs-anything option
-;; * New implementation of `anything-c-source-complete-ruby-all'
-;;
-;; Revision 1.8 2009/04/15 10:25:25 rubikitch
-;; Set `anything-execute-action-at-once-if-one' t
-;;
-;; Revision 1.7 2009/04/15 10:24:23 rubikitch
-;; regexp bug fix
-;;
-;; Revision 1.6 2008/01/14 17:59:34 rubikitch
-;; * uniform format (anything-c-source-complete-ruby, anything-c-source-complete-ruby-all)
-;; * rename command: anything-c-ri -> anything-rct-ri
-;;
-;; Revision 1.5 2008/01/13 17:54:04 rubikitch
-;; anything-current-buffer advice.
-;;
-;; Revision 1.4 2008/01/08 14:47:34 rubikitch
-;; Added (require 'rcodetools).
-;; Revised commentary.
-;;
-;; Revision 1.3 2008/01/04 09:32:29 rubikitch
-;; *** empty log message ***
-;;
-;; Revision 1.2 2008/01/04 09:21:23 rubikitch
-;; fixed typo
-;;
-;; Revision 1.1 2008/01/04 09:21:05 rubikitch
-;; Initial revision
-;;
-
-;;; Code:
-
-(require 'anything)
-(require 'rcodetools)
-(when (require 'anything-show-completion nil t)
- (use-anything-show-completion 'rct-complete-symbol--anything
- '(length pattern)))
-
-(defun anything-rct-ri (meth)
- (ri (get-text-property 0 'desc meth)))
-
-(defun anything-rct-complete (meth)
- (save-excursion
- (set-buffer anything-current-buffer)
- (search-backward pattern)
- (delete-char (length pattern)))
- (insert meth))
-
-(setq rct-complete-symbol-function 'rct-complete-symbol--anything)
-(defvar anything-c-source-complete-ruby
- '((name . "Ruby Method Completion")
- (candidates . rct-method-completion-table)
- (init
- . (lambda ()
- (condition-case x
- (rct-exec-and-eval rct-complete-command-name "--completion-emacs-anything")
- ((error) (setq rct-method-completion-table nil)))))
- (action
- ("Completion" . anything-rct-complete)
- ("RI" . anything-rct-ri))
- (volatile)
- (persistent-action . anything-rct-ri)))
-
-(defvar rct-get-all-methods-command "PAGER=cat fri -l")
-(defvar anything-c-source-complete-ruby-all
- '((name . "Ruby Method Completion (ALL)")
- (init
- . (lambda ()
- (unless (anything-candidate-buffer)
- (with-current-buffer (anything-candidate-buffer 'global)
- (call-process-shell-command rct-get-all-methods-command nil t)
- (goto-char 1)
- (while (re-search-forward "^.+[:#.]\\([^:#.]+\\)$" nil t)
- (replace-match "\\1\t[\\&]"))))))
- (candidates-in-buffer
- . (lambda ()
- (let ((anything-pattern (format "^%s.*%s" (regexp-quote pattern) anything-pattern)))
- (anything-candidates-in-buffer))))
- (display-to-real
- . (lambda (line)
- (if (string-match "\t\\[\\(.+\\)\\]$" line)
- (propertize (substring line 0 (match-beginning 0))
- 'desc (match-string 1 line))
- line)))
- (action
- ("Completion" . anything-rct-complete)
- ("RI" . anything-rct-ri))
- (persistent-action . anything-rct-ri)))
-
-
-(defun rct-complete-symbol--anything ()
- (interactive)
- (let ((anything-execute-action-at-once-if-one t)
- anything-samewindow)
- (anything '(anything-c-source-complete-ruby
- anything-c-source-complete-ruby-all))))
-
-(provide 'anything-rcodetools)
-
-;; How to save (DO NOT REMOVE!!)
-;; (emacswiki-post "anything-rcodetools.el")
-;;; install-elisp.el ends here
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/bin/rbtest b/bundles/ruby.tmbundle/Support/vendor/rcodetools/bin/rbtest
deleted file mode 100755
index ab51c9425..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/bin/rbtest
+++ /dev/null
@@ -1,266 +0,0 @@
-#! /usr/local/bin/ruby18
-# Copyright (c) 2006-2007 rubikitch
-#
-# Use and distribution subject to the terms of the Ruby license.
-
-USAGE = <<'XXX'
-Usage: rbtest SCRIPT [-S RUBY_INTERPRETER] [Test::Unit OPTIONS]
-Usage: rbtest [-h] [--help] [--example]
-
-I am rbtest, embedded Test::Unit executor for one-file scripts.
-Splitting a small script into many files (executables, libraries and tests) is cumbersome.
-And it is handy to put unit tests near implementations like D language, which has
-built-in unittest keyword.
-
-Embedded Test::Unit is simpler than vanilla Test::Unit.
-You do not have to define a Test::Unit::TestCase subclass,
-it is automagically defined and executed by me.
-Embedded Test::Unit uses =begin/=end comment blocks.
-
-"=begin TEST_METHOD_NAME" blocks define test methods, eg. "=begin test_foo".
-"=begin rbtest" blocks define utility methods and setup/teardown methods.
-
-Of course, you MUST use "if __FILE__ ==$0" idiom to split executable and class/method/function.
-
-I am also an real-life example of rbtest usage.
-Issue:
- rbtest --example
-to show me.
-
-
-options:
- -h, --help Print usage.
- -S RUBY_INTERPRETER Use Ruby interpreter RUBY_INTERPRETER.
- --example Print this file.
- --output Print internally-generated test script (for debug).
-XXX
-
-
-def first_test(script_filename)
- "require 'test/unit';" +
- "load '#{script_filename}';" +
- "class TestByRbtest < Test::Unit::TestCase;"
-end
-
-=begin rbtest
-def setup
-end
-
-def unindent(s)
- s.lines.map{|x| x[1..-1]}.join
-end
-=end
-
-=begin test_script_to_test_script
-# indent is needed to avoid syntax error.
-script = < http://eigenclass.org
-# 2006-2007 rubikitch http://www.rubyist.net/~rubikitch/
-#
-# Use and distribution subject to the same conditions as Ruby.
-
-require 'rcodetools/options'
-include Rcodetools
-$VERBOSE = nil
-$__method_args_off = true
-
-if ARGV.empty? or ARGV.include? '-h' or ARGV.include? '--help'
- puts < [ ...]
-
--Idirectory specify $LOAD_PATH directory (same as ruby)
---dev Add this project's bin/ and lib/ to $LOAD_PATH.
- A directory that has Rakefile is considered as project base direcotry.
--i omit instance methods defined in classes
--m omit instance methods defined in modules
--c omit class methods
-
--n print the filename and line number with output lines
--t generate TAGS output
---summarize summary output sorted by method name
-
-The given files will be #require()d in order.
-Examples:
- rct-meth-args complex
- rct-meth-args thread
- rct-meth-args -c rubygems
-EOF
- exit # '
-end
-
-def debugprint(*args)
- $stderr.puts(*args) if $DEBUG
-end
-
-module MethodArgs
- MAX_ARGS = 20
-
- private
- def needed_args(arity)
- arity >= 0 ? arity : arity.abs - 1
- end
-
- def with_tracer
- begin
- set_trace_func @__trace_func
- yield
- ensure
- set_trace_func nil
- end
- end
-
- module LineContents
- # usage: Contents[filename][lineno]
- Contents = Hash.new{ |h,k|
- sum = 0
- # Unshift is needed because lineno starts with 1.
- h[k] = File.readlines(k).map{ |line| [line.chomp, sum+=line.length] }.unshift nil
- }
- def content
- Contents[filename][lineno.to_i][0] rescue ""
- end
-
- def byte
- Contents[filename][lineno.to_i-1][1] rescue 0
- end
-
- def arg_desc
- # TODO
- desc = content[ /\((.+)\)/]
- desc.gsub!(/(\S),(\S)/, '\1, \2')
- desc.gsub!(/(\S)=(\S)/, '\1 = \2')
- desc
- end
-
- FileNameCache = Hash.new{ |h,k| h[k] = File.expand_path(k) }
- def full_filename
- FileNameCache[filename]
- end
- end
-
- class Location < Struct.new(:filename, :lineno)
- include LineContents
- end
-
- class Printer
- def method_info(io, x)
- prefix = x[:location] ? "#{x[:location].filename}:#{x[:location].lineno}:" : ""
- io.puts "#{prefix}#{x[:fullname]}#{x[:arg_desc]}" unless x[:klass].to_s == ""
- end
-
- def included_location(io, x)
- x[:callsite] and io.print "#{x[:callsite].filename}:#{x[:callsite].lineno}:"
- io.puts([ x[:comment], x[:mod], x[:flag], x[:self] ].join(" "))
- end
- end
-
- class SummarizePrinter
- def initialize
- @hash = Hash.new
- at_exit { print_result }
- end
-
- def method_info(io, x)
- @io = io
- prefix = x[:location] ? "#{x[:location].filename}:#{x[:location].lineno}:" : ""
- (@hash[x[:meth]]||=[]) << "#{prefix}#{x[:fullname]}#{x[:arg_desc]}" unless x[:klass].to_s == ""
- end
-
- def included_location(io, x)
- # not implemented
- end
-
- def print_result
- @hash.keys.sort.each do |meth|
- @io.puts meth
- @hash[meth].each do |line|
- @io.puts line
- end
- @io.puts
- end
- end
- end
-
- class TagsPrinter
- def initialize
- @previous_filename = ""
- end
-
- def output_filename(filename)
- if @previous_filename != filename
- @previous_filename = filename
- puts "\cl"
- puts "#{filename},0"
- end
- end
-
- def method_info(io, x)
- return unless x[:location]
- output_filename x[:location].full_filename
- io.puts "#{x[:location].content}::#{x[:fullname]}#{x[:location].lineno},#{x[:location].byte}"
- end
-
- def included_location(io, x)
- return unless x[:callsite]
- output_filename x[:callsite].full_filename
- io.puts "#{x[:callsite].content}::#{x[:mod]}#{x[:callsite].lineno},#{x[:callsite].byte}"
- end
- end
-
- def _print_method_info(klass, is_singleton, meth, arg_desc=nil, location=nil, with_location=$__with_location, printer=$__printer)
- arg_desc ||= "(...)"
- arg_desc = " " + arg_desc unless arg_desc.empty?
- flag = is_singleton ? "." : "#"
- x = { :arg_desc => arg_desc, :klass => klass,
- :meth => meth.to_s,
- :fullname => [klass, flag, meth].join,
- :location => with_location && location,
- }
- printer.method_info $>, x
- end
-
- def output_attr_info(klass, object, meth, is_singleton, location)
- arg_desc = meth.to_s =~ /=$/ ? "(value)" : ""
- _print_method_info klass, is_singleton, meth, arg_desc, location
- end
-
- def output_method_info(klass, object, meth, is_singleton = false, by_attr = nil, by_define_method = nil)
- return if $__method_args_off
- file = line = params = values = nil
- location = nil
- begin
- unless %w[initialize].include?(meth.to_s)
- if is_singleton
- return if class << klass; private_instance_methods(true) end.include?(meth.to_s)
- else
- return if class << object; private_instance_methods(true) end.include?(meth.to_s)
- end
- end
- rescue TypeError # no virtual class
- end
-
- arity = is_singleton ? object.method(meth).arity : klass.instance_method(meth).arity
- @__trace_func = lambda{|event, file, line, id, binding, classname|
- begin
- debugprint "!EVENT: #{event} #{classname}##{id}, #{file} #{line}"
- debugprint "(#{self} #{meth})"
- if event[/call/] && classname == self && id == meth
- location = Location.new(file, line) if event == 'call'
- debugprint "EVENT: #{event} #{classname}##{id}"
- throw :done
- end
- rescue Exception
- nil # rcov workaround
- end
- }
- if by_define_method
- _print_method_info klass, is_singleton, meth, nil, by_define_method
- return
- end
-
- if by_attr
- output_attr_info klass, object, meth, is_singleton, by_attr
- return
- end
-
- catch(:done) do
- begin
- with_tracer { object.send(meth, *(0...needed_args(arity))) }
- rescue Exception
- nil # rcov workaround
- end
- end
-
- arg_desc = location.arg_desc
-
- _print_method_info klass, is_singleton, meth, arg_desc, location
- rescue Exception
- debugprint "GOT EXCEPTION while processing #{klass} #{meth}"
- debugprint $!.class
- debugprint $!.message
- debugprint $!.backtrace
- _print_method_info klass, is_singleton, meth, nil, location
- ensure
- set_trace_func(nil)
- end
-end
-
-class Object
- include MethodArgs
-end
-
-class Module
- class CallSite # compatible with Location
- include MethodArgs::LineContents
- def initialize(caller_string)
- @filename, @lineno, @in = caller_string.split(/:/)
- end
- attr_reader :filename, :lineno
- end
-
- def _method_defined_with(ivar, caller, &block)
- begin
- instance_variable_set(ivar, caller)
- yield
- ensure
- instance_variable_set(ivar, false)
- end
- end
-
- def with_attr(caller, &block)
- _method_defined_with :@by_attr, caller, &block
- end
-
- def with_define_method(caller, &block)
- _method_defined_with :@by_define_method, caller, &block
- end
-
- [ :attr, :attr_reader, :attr_writer, :attr_accessor ].each do |meth|
- attr = instance_method(meth)
- define_method(meth) do |*args|
- with_attr(CallSite.new(caller(1)[0])){ attr.bind(self).call(*args) }
- end
- end
-
- alias :__define_method_orig :define_method
- def define_method(*args, &body)
- with_define_method(CallSite.new(caller(1)[0])){ __define_method_orig(*args, &body) }
- end
-
-end
-
-new_args = []
-omissions = {}
-$__with_location = false
-$__printer = Printer.new
-i_opt_p = false
-
-ARGV.each do |arg|
- case arg
- when "-n"; $__with_location = true
- when "-t"; $__printer = TagsPrinter.new; $__with_location = true
- when "--summarize"; $__printer = SummarizePrinter.new
- when /-I(.+)$/; $:.unshift $1
- when "-I"; i_opt_p = true
- when "--dev"; OptionHandler.auto_include_paths($:, Dir.pwd)
- when /^-.$/; omissions[$&] = true
- else
- if i_opt_p
- $:.unshift arg
- i_opt_p = false
- else
- new_args << arg
- end
- end
-end
-
-ARGV.replace new_args
-
-class Object
- ALLOCATOR = Hash.new{|h,k| h[k] = k.allocate }.merge(Fixnum=>1,
- Bignum=>10000000000000000,
- Float=>1.1,
- Symbol=>:method_args_tmp,
- Binding=>binding,
- UnboundMethod=>instance_method(:object_id),
- Method=>method(:object_id),
- Proc=>lambda{},
- Continuation=>callcc{|c|c},
- Thread=>Thread.new{},
- FalseClass=>false,
- TrueClass=>true,
- NilClass=>nil,
- Struct=>Struct.new(:a).new(1))
-
-# ABSTRACT_CLASSES = %w[Digest::Base ]
- def self.method_added(meth)
-# if ABSTRACT_CLASSES.include? self.to_s
-# _print_method_info self, false, meth
-# return
-# end
- begin
- o = ALLOCATOR[self]
- rescue Exception # for abstract classes
- nil
- end
- output_method_info(self, o, meth, false, @by_attr, @by_define_method)
- end
-end unless omissions["-i"]
-
-class Module
- method_added = instance_method(:method_added)
- define_method(:method_added) do |meth|
- begin
- if instance_of? Module
- o = Object.new
- o.extend(self)
- output_method_info(self, o, meth, false, @by_attr, @by_define_method)
- end
- method_added.bind(self).call(meth)
- rescue Exception
- _print_method_info self, false, meth
- end
- end
-end unless omissions["-m"]
-
-
-class Class
- def singleton_method_added(meth)
- by_attr = class << self; @by_attr; end
- by_define_method = class << self; @by_define_method; end
- output_method_info(self, self, meth, true, by_attr, by_define_method)
- rescue Exception
- _print_method_info self, true, meth
- end
-end unless omissions["-c"]
-
-#### include / extend
-class Module
- def _print_included_location(mod, caller_string, comment, flag, with_location=$__with_location, printer=$__printer)
- if caller_string # nil when the class is defined by C
- x = { :comment => comment, :mod => mod, :flag => flag, :self => self,
- :callsite => with_location && CallSite.new(caller_string)
- }
- printer.included_location $>, x
- end
- end
-
- undef_method :included
- def included(mod)
- _print_included_location mod, caller(0)[1], "include", "<="
- end
-
- undef_method :extended
- def extended(mod)
- _print_included_location mod, caller(0)[1], "extend", "<-" if Module === mod
- end
-end
-
-#### inheritance
-class Class
- undef :inherited
- def inherited(klass, caller_level=0)
- _print_included_location klass, caller(caller_level)[1], "class", "<" unless self == Object
- end
-end
-
-#### Struct inspection
-class << Struct
- def to_s
- orig = super
- if orig =~ /" : ""
- else
- orig
- end
- end
-
- def inherited(klass)
- if self == Struct
- @inherited_delay = lambda{ super(klass, 3) }
- else
- super(klass, 1)
- end
- end
-
- @@struct_initializing = false
- def method_added(meth)
- super unless @@struct_initializing
- end
-
- orig_new = instance_method(:new)
- define_method(:new) do |*args|
- begin
- @@struct_initializing = true
- orig_new.bind(self).call(*args)
- ensure
- @@struct_initializing = false
- @inherited_delay[]
- end
- end
-
-end
-
-$__method_args_off = false
-
-ARGV.each{|x|
- begin
- require x
- rescue LoadError
- load x
- end
-}
-
-$__method_args_off = true
-# END { puts "zzzz OK" }
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/bin/ruby-toggle-file b/bundles/ruby.tmbundle/Support/vendor/rcodetools/bin/ruby-toggle-file
deleted file mode 100644
index 9adccc929..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/bin/ruby-toggle-file
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /usr/local/bin/ruby18
-require 'ruby_toggle_file'
-require 'optparse'
-
-USAGE = < markers.") do
- klass = XMPAddMarkers
- end
-
- opts.handle_interpreter options
-
- opts.separator ""
- opts.separator "Specific options:"
- opts.on("-l N", "--min-line-length N", Integer, "Align markers to N spaces.") do |min_codeline_size|
- options[:min_codeline_size] = min_codeline_size
- end
- opts.on("--rails", "Setting appropriate for Rails.",
- "(no warnings, find working directory,",
- " Test::Unit assertions)") do
- require 'rcodetools/xmptestunitfilter'
- options[:warnings] = false
- klass = XMPTestUnitFilter
- rails_settings = true
- end
- opts.on("--[no-]poetry", "Whether to use extra parentheses.",
- "(default: use them)") do |poetry_p|
- options[:use_parentheses] = !poetry_p
- end
- opts.on("--[no-]warnings", "Whether to add warnings (# !>).",
- "(default: enabled)") {|warnings_p| options[:warnings] = warnings_p }
- opts.on("-q", "--quiet", "Supress standard output.") do
- options[:output_stdout] = false
- end
-
- opts.handle_misc options
-end
-
-set_extra_opts options
-opts.parse!(ARGV)
-
-if rails_settings && !options[:wd]
- if File.exist? ARGF.path
- options[:wd] = File.dirname(ARGF.path)
- elsif File.exist? "test/unit"
- options[:wd] = "test/unit"
- elsif File.exist? "unit"
- options[:wd] = "unit"
- end
-end
-targetcode = ARGF.read
-Dir.chdir options[:wd] if options[:wd]
-
-if XMPFilter.detect_rbtest(targetcode, options)
- require 'rcodetools/xmptestunitfilter'
- klass = XMPTestUnitFilter
-end
-
-# Do the job. dispatched by klass.
-puts klass.run(targetcode, options)
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/icicles-rcodetools.el b/bundles/ruby.tmbundle/Support/vendor/rcodetools/icicles-rcodetools.el
deleted file mode 100644
index a6de2ca6e..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/icicles-rcodetools.el
+++ /dev/null
@@ -1,35 +0,0 @@
-;;; icicles-rcodetools.el -- accurate completion with icicles
-
-;;; Copyright (c) 2006-2007 rubikitch
-;;;
-;;; Use and distribution subject to the terms of the Ruby license.
-
-(require 'icicles)
-(require 'rcodetools)
-
-(setq rct-complete-symbol-function 'rct-complete-symbol--icicles)
-(icicle-define-command rct-complete-symbol--icicles
- "Perform ruby method and class completion on the text around point with icicles.
-C-M-RET shows RI documentation on each candidate.
-See also `rct-interactive'."
-
- (lambda (result)
- (save-excursion
- (search-backward pattern)
- (setq beg (point)))
- (delete-region beg end)
- (insert result)) ;/function
- "rct-complete: " ;prompt
- rct-method-completion-table
- nil nil pattern nil nil nil
- ((end (point)) beg
- (icicle-list-join-string "\t")
- (icicle-list-use-nth-parts '(1))
- (icicle-point-position-in-candidate 'input-end)
- pattern klass alist
- (icicle-candidate-help-fn
- (lambda (result)
- (ri (cdr (assoc result alist)))))) ;bindings
- (rct-exec-and-eval rct-complete-command-name "--completion-emacs-icicles"))
-
-(provide 'icicles-rcodetools)
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/method_analyzer.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/method_analyzer.rb
deleted file mode 100644
index 4f71cc274..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/method_analyzer.rb
+++ /dev/null
@@ -1,107 +0,0 @@
-class Module
- remove_method :attr_reader
- def attr_reader(*names)
- names.each do |name|
- module_eval "def #{name}() @#{name} end"
- end
- end
- remove_method :attr_writer
- def attr_writer(*names)
- names.each do |name|
- module_eval "def #{name}=(x) @#{name}=x end"
- end
- end
- remove_method :attr_accessor
- def attr_accessor(*names)
- attr_reader(*names)
- attr_writer(*names)
- end
- remove_method :attr
- def attr(name, writer=false)
- attr_reader name
- attr_writer name if writer
- end
-end
-
-
-module MethodAnalyzer
- @@methods = Hash.new{ |h,k| h[k] = Hash.new{ |h,k| h[k] = []} }
- @@whereis = []
- @@expand_path = Hash.new{ |h,k| h[k] = File.expand_path(k)}
-
- def self.trace_func(event, file, line, id, binding, klass, *rest)
- return if file == __FILE__
- return if (event != 'call' and event != 'c-call')
- return if klass == Class and id == :inherited
- return if klass == Module and id == :method_added
- return if klass == Kernel and id == :singleton_method_added
- saved_crit = Thread.critical
- Thread.critical = true
-
- the_self = eval("self",binding)
- flag = Class === the_self ? "." : "#"
- #klass = klass == Kernel ? Object : klass
- fullname = "#{klass}#{flag}#{id}"
- file.replace @@expand_path[file]
- if event == 'call'
- @@whereis << [file, line, fullname] if file !~ /\(eval\)$/
- file, line, rest = caller(4)[0].split(/:/)
- file.replace @@expand_path[file] # DRY
- p caller(0) if $DEBUG
- line = line.to_i
- end
- @@methods[file][line] << fullname if event =~ /call/
-
- Thread.critical = saved_crit
- end
-
- def self.at_exit__output_marshal
- at_exit do
- set_trace_func nil
- dbfile = "method_analysis"
- old = Marshal.load(File.read(dbfile)) rescue {}
- open(dbfile, "wb") do |io|
- # Because Marshal.dump cannot handle hashes with default_proc
- @@methods.default = nil
- @@methods.each_value{ |v| v.default=nil; v.each_value{ |vv| vv.uniq! } }
- Marshal.dump(@@methods.merge(old), io)
- end
- end
- end
-
-
- def self.at_exit__output_text
- at_exit do
- set_trace_func nil
- puts "method fullnames"
- @@methods.sort.each do |file, lines|
- lines.sort.each do |line, methods|
- printf "%s:%s:%s\n", file, line, methods.uniq.join(" ")
- end
- end
-
- puts
- puts "method definitions"
- @@whereis.sort.uniq.each do |file, line, fullname |
- printf "%s:%s:%s\n", file, line, fullname
- end
-
- end
- end
-
- def self.set_at_exit
- case ENV['METHOD_ANALYZER_FORMAT']
- when 'marshal'
- at_exit__output_marshal
- else
- at_exit__output_text
- end
- end
-
- set_at_exit
- set_trace_func method(:trace_func).to_proc
-end
-
-if __FILE__ == $0
- load "./test/data/method_analyzer-data.rb"
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/compat.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/compat.rb
deleted file mode 100644
index 13e50832b..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/compat.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-if RUBY_VERSION >= "1.9"
- class String
- alias :each :each_line
- include Enumerable
- end
-
- module Enumerable
- alias :enum_with_index :each_with_index
- end
-
- class Array
- alias :to_s :join
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/completion.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/completion.rb
deleted file mode 100644
index ccc936a3c..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/completion.rb
+++ /dev/null
@@ -1,406 +0,0 @@
-# Nearly 100% accurate completion for any editors!!
-# by rubikitch
-
-require 'rcodetools/xmpfilter'
-require 'enumerator'
-
-module Rcodetools
-
-# Common routines for XMPCompletionFilter/XMPDocFilter
-module ProcessParticularLine
- def fill_literal!(expr)
- [ "\"", "'", "`" ].each do |q|
- expr.gsub!(/#{q}(.+)#{q}/){ '"' + "x"*$1.length + '"' }
- end
- expr.gsub!(/(%([wWqQxrs])?(\W))(.+?)\3/){
- percent = $2 == 'x' ? '%'+$3 : $1 # avoid executing shell command
- percent + "x"*$4.length + $3
- }
- [ %w[( )], %w[{ }], %w![ ]!, %w[< >] ].each do |b,e|
- rb, re = [b,e].map{ |x| Regexp.quote(x)}
- expr.gsub!(/(%([wWqQxrs])?(#{rb}))(.+)#{re}/){
- percent = $2 == 'x' ? '%'+$3 : $1 # avoid executing shell command
- percent + "x"*$4.length + e
- }
- end
- end
-
- module ExpressionExtension
- attr_accessor :eval_string
- attr_accessor :meth
- end
- OPERATOR_CHARS = '\|^&<>=~\+\-\*\/%\['
- def set_expr_and_postfix!(expr, column, ®exp)
- expr.extend ExpressionExtension
-
- @postfix = ""
- expr_orig = expr.clone
- column ||= expr.length
- last_char = expr[column-1]
- expr.replace expr[ regexp[column] ]
- debugprint "expr_orig=#{expr_orig}", "expr(sliced)=#{expr}"
- right_stripped = Regexp.last_match.post_match
- _handle_do_end right_stripped
- aref_or_aset = aref_or_aset? right_stripped, last_char
- debugprint "aref_or_aset=#{aref_or_aset.inspect}"
- set_last_word! expr, aref_or_aset
- fill_literal! expr_orig
- _handle_brackets expr_orig, expr
- expr << aref_or_aset if aref_or_aset
- _handle_keywords expr_orig, column
- debugprint "expr(processed)=#{expr}"
- expr
- end
-
- def _handle_do_end(right_stripped)
- right_stripped << "\n"
- n_do = right_stripped.scan(/[\s\)]do\s/).length
- n_end = right_stripped.scan(/\bend\b/).length
- @postfix = ";begin" * (n_do - n_end)
- end
-
- def _handle_brackets(expr_orig, expr)
- [ %w[{ }], %w[( )], %w![ ]! ].each do |left, right|
- n_left = expr_orig.count(left) - expr.count(left)
- n_right = expr_orig.count(right) - expr.count(right)
- n = n_left - n_right
- @postfix << ";#{left}" * n if n >= 0
- end
- end
-
- def _handle_keywords(expr_orig, column)
- %w[if unless while until for].each do |keyw|
- pos = expr_orig.index(/\b#{keyw}\b/)
- @postfix << ";begin" if pos and pos < column # if * xxx
-
- pos = expr_orig.index(/;\s*#{keyw}\b/)
- @postfix << ";begin" if pos and column < pos # * ; if xxx
- end
- end
-
- def aref_or_aset?(right_stripped, last_char)
- if last_char == ?[
- case right_stripped
- when /\]\s*=/ then "[]="
- when /\]/ then "[]"
- end
- end
- end
-
- def set_last_word!(expr, aref_or_aset=nil)
- debugprint "expr(before set_last_word)=#{expr}"
- if aref_or_aset
- opchars = ""
- else
- opchars = expr.slice!(/\s*[#{OPERATOR_CHARS}]+$/)
- debugprint "expr(strip opchars)=#{expr}"
- end
-
- expr.replace(if expr =~ /[\"\'\`]$/ # String operations
- "''"
- else
- fill_literal! expr
- phrase = current_phrase(expr)
- if aref_or_aset
- expr.eval_string = expr[0..-2]
- expr.meth = aref_or_aset
- elsif phrase.match( /^(.+)\.(.*)$/ )
- expr.eval_string, expr.meth = $1, $2
- elsif opchars != ''
- expr
- end
- debugprint "expr.eval_string=#{expr.eval_string}", "expr.meth=#{expr.meth}"
- phrase
- end << (opchars || '')) # ` font-lock hack
- debugprint "expr(after set_last_word)=#{expr}"
- end
-
- def current_phrase(expr)
- paren_level = 0
- start = 0
- (expr.length-1).downto(0) do |i|
- c = expr[i,1]
- if c =~ /[\)\}\]]/
- paren_level += 1
- next
- end
- if paren_level > 0
- next if c =~ /[, ]/
- else
- break (start = i+1) if c =~ /[ ,\(\{\[]/
- end
- if c =~ /[\(\{\[]/
- paren_level -= 1
- break (start = i+1) if paren_level < 0
- end
- end
- expr[start..-1]
- end
-
- def add_BEGIN
- <\\Z] )[1].sub(/\\A.*?\\((.*?)\\)(.*)\\Z/){ "\#{$1}\#{$2}" }.sub(/##/) { "\#{$1}." }
- #{result} = #{v}.to_s + ".new" if #{result} == 'Class#new' and #{v}.private_method_defined?(:initialize)
- #{result} = "Object#" + #{meth} if #{result} =~ /^Kernel#/ and Kernel.instance_methods(false).map{|x| x.to_s}.include? #{meth}
- #{result}
-EOC
- end
-
-end
-
-# Nearly 100% accurate completion for any editors!!
-# by rubikitch
-class XMPCompletionFilter < XMPFilter
- include ProcessParticularLine
-
- class << self
- attr_accessor :candidates_with_description_flag
- end
- @candidates_with_description_flag = false
-
- # String completion begins with this.
- attr :prefix
-
- def self.run(code, opts)
- new(opts).completion_code(code, opts[:lineno], opts[:column])
- end
-
- def magic_help_code(recv, meth)
- oneline_ize __magic_help_code("#{VAR}_result", recv, meth)
- end
-
- def methods_map_code(recv)
- # delimiter is \0
- m = "#{VAR}_m"
- mhc = magic_help_code((recv), m)
- %Q[map{|%s| "\#{%s}\\0" + %s}] % [m, m, mhc]
- end
-
- def split_method_info(minfo)
- minfo.split(/\0/,2)
- end
-
- def prepare_line(expr, column)
- set_expr_and_postfix!(expr, column){|c| /^.{#{c}}/ }
- @prefix = expr
- case expr
- when /^\$\w*$/ # global variable
- __prepare_line 'nil', 'global_variables', '%n'
- when /^@@\w*$/ # class variable
- __prepare_line 'nil', 'Module === self ? class_variables : self.class.class_variables', '%n'
- when /^@\w*$/ # instance variable
- __prepare_line 'nil', 'instance_variables', '%n'
- when /^([A-Z].*)::([^.]*)$/ # nested constants / class methods
- @prefix = $2
- __prepare_line $1, "#$1.constants | #$1.methods(true)",
- %Q[#$1.constants + #$1.methods(true).#{methods_map_code($1)}]
- when /^[A-Z]\w*$/ # normal constants
- __prepare_line 'nil', 'Module.constants', '%n'
- when /^(.*::.+)\.(.*)$/ # toplevel class methods
- @prefix = $2
- __prepare_line $1, "#$1.methods",
- %Q[%n.#{methods_map_code($1)}]
- when /^(::.+)::(.*)$/ # toplevel nested constants
- @prefix = $2
- __prepare_line $1, "#$1.constants | #$1.methods",
- %Q[#$1.constants + #$1.methods.#{methods_map_code($1)}]
- when /^::(.*)/ # toplevel constant
- @prefix = $1
- __prepare_line 'nil', 'Object.constants', '%n'
- when /^(:[^:.]*)$/ # symbol
- __prepare_line 'nil', 'Symbol.all_symbols.map{|s| ":" + s.id2name}', '%n'
- when /\.([^.]*)$/ # method call
- @prefix = $1
- recv = Regexp.last_match.pre_match
- __prepare_line recv, "(#{recv}).methods(true)",
- %Q[%n.#{methods_map_code(recv)}]
- else # bare words
- __prepare_line 'self', "methods | private_methods | local_variables | self.class.constants",
- %Q[(methods | private_methods).#{methods_map_code('self')} + local_variables | self.class.constants]
- end
- end
-
- def __prepare_line(recv, all_completion_expr, all_completion_expr_verbose)
- if self.class.candidates_with_description_flag
- ___prepare_line(recv, all_completion_expr_verbose.gsub(/%n/, '('+all_completion_expr+')'))
- else
- ___prepare_line(recv, all_completion_expr)
- end
-
- end
-
- def ___prepare_line(recv, all_completion_expr)
- v = "#{VAR}"
- rcv = "#{VAR}_recv"
- idx = 1
- oneline_ize(< " + #{rcv}.to_s + " " + #{v}.join(" ")) || #{v}
-exit
-EOC
- end
-
- def candidates_with_class(code, lineno, column=nil)
- klass, methods = runtime_data_with_class(code, lineno, column) rescue ["", ""]
- raise NoCandidates, "No candidates." if methods.nil? or methods.empty?
- [klass, methods.split(/ /).sort]
- end
-
- # Array of completion candidates.
- class NoCandidates < RuntimeError; end
- def candidates(code, lineno, column=nil)
- candidates_with_class(code, lineno, column)[1]
- end
-
- # Completion code for editors.
- def completion_code(code, lineno, column=nil)
- candidates(code, lineno, column).join("\n") rescue "\n"
- end
-end
-
-# for debugging XMPCompletionEmacsFilter
-class XMPCompletionVerboseFilter < XMPCompletionFilter
- @candidates_with_description_flag = true
-end
-
-class XMPCompletionClassInfoFilter < XMPCompletionFilter
- @candidates_with_description_flag = true
-
- def completion_code(code, lineno, column=nil)
- candidates(code, lineno, column).join("\n").tr("\0", "\t")
- rescue NoCandidates
- ""
- end
-end
-
-class XMPCompletionEmacsFilter < XMPCompletionFilter
- @candidates_with_description_flag = true
-
- def completion_code(code, lineno, column=nil)
- elisp = "(progn\n"
- table = "(setq rct-method-completion-table '("
- alist = "(setq alist '("
- begin
- candidates(code, lineno, column).sort.each do |minfo|
- meth, description = split_method_info(minfo)
- table << format('("%s") ', meth)
- alist << format('("%s\\t[%s]") ', meth, description)
- end
- table << "))\n"
- alist << "))\n"
- rescue Exception => err
- return error_code(err)
- end
- elisp << table << alist
- elisp << %Q[(setq pattern "#{prefix}")\n]
- elisp << %Q[(try-completion pattern rct-method-completion-table nil)\n]
- elisp << ")" # /progn
- end
-
- def error_code(err)
- case err
- when NoCandidates
- %Q[(error "#{err.message}")]
- else
- %Q[(error "#{err.message}\n#{err.backtrace.join("\n")}")]
- end
-
- end
-end
-
-class XMPCompletionEmacsIciclesFilter < XMPCompletionEmacsFilter
- @candidates_with_description_flag = true
-
- def completion_code(code, lineno, column=nil)
- elisp = "(progn\n"
- table = "(setq rct-method-completion-table '("
- help_alist = "(setq alist '("
-
- begin
- klass, cands = candidates_with_class(code, lineno, column)
- cands.sort.each do |minfo|
- meth, description = split_method_info(minfo)
- table << format('("%s\\t[%s]") ', meth, description)
- help_alist << format('("%s" . "%s")', meth, description)
- end
- table << "))\n"
- help_alist << "))\n"
- rescue Exception => err
- return error_code(err)
- end
- elisp << table << help_alist
- elisp << %Q[(setq pattern "#{prefix}")\n]
- elisp << %Q[(setq klass "#{klass}")\n]
- elisp << ")" # /progn
- end
-end
-
-class XMPCompletionEmacsAnythingFilter < XMPCompletionEmacsFilter
- @candidates_with_description_flag = true
-
- def completion_code(code, lineno, column=nil)
- elisp = "(progn\n"
- table = "(setq rct-method-completion-table `("
-
- begin
- klass, cands = candidates_with_class(code, lineno, column)
- cands.sort.each do |minfo|
- meth, description = split_method_info(minfo)
- table << format('("%s\\t[%s]" . ,(propertize "%s" \'desc "%s")) ',
- meth, description, meth, description)
- end
- table << "))\n"
- rescue Exception => err
- return error_code(err)
- end
- elisp << table
- elisp << %Q[(setq pattern "#{prefix}")\n]
- elisp << %Q[(setq klass "#{klass}")\n]
- elisp << ")" # /progn
- end
-end
-
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/doc.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/doc.rb
deleted file mode 100644
index 9a3e752db..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/doc.rb
+++ /dev/null
@@ -1,168 +0,0 @@
-require 'rcodetools/completion'
-# Call Ri for any editors!!
-# by rubikitch
-module Rcodetools
-
-class XMPDocFilter < XMPFilter
- include ProcessParticularLine
-
- def initialize(opts = {})
- super
- @filename = opts[:filename]
- extend UseMethodAnalyzer if opts[:use_method_analyzer]
- end
-
- def self.run(code, opts)
- new(opts).doc(code, opts[:lineno], opts[:column])
- end
-
- def prepare_line(expr, column)
- set_expr_and_postfix!(expr, column){|c|
- withop_re = /^.{#{c-1}}[#{OPERATOR_CHARS}]+/
- if expr =~ withop_re
- withop_re
- else
- /^.{#{c}}[\w#{OPERATOR_CHARS}]*/
- end
- }
- recv = expr
-
- # When expr already knows receiver and method,
- return(__prepare_line :recv => expr.eval_string, :meth => expr.meth) if expr.eval_string
-
- case expr
- when /^(?:::)?([A-Z].*)(?:::|\.)(.*)$/ # nested constants / class methods
- __prepare_line :klass => $1, :meth_or_constant => $2
- when /^(?:::)?[A-Z]/ # normal constants
- __prepare_line :klass => expr
- when /\.([^.]*)$/ # method call
- __prepare_line :recv => Regexp.last_match.pre_match, :meth => $1
- when /^(.+)(\[\]=?)$/ # [], []=
- __prepare_line :recv => $1, :meth => $2
- when /[#{OPERATOR_CHARS}]+$/ # operator
- __prepare_line :recv => Regexp.last_match.pre_match, :meth => $&
- else # bare words
- __prepare_line :recv => "self", :meth => expr
- end
- end
-
- def __prepare_line(x)
- v = "#{VAR}"
- result = "#{VAR}_result"
- klass = "#{VAR}_klass"
- flag = "#{VAR}_flag"
- which_methods = "#{VAR}_methods"
- ancestor_class = "#{VAR}_ancestor_class"
- idx = 1
- recv = x[:recv] || x[:klass] || raise(ArgumentError, "need :recv or :klass")
- meth = x[:meth_or_constant] || x[:meth]
- debugprint "recv=#{recv}", "meth=#{meth}"
- if meth
- # imported from fastri/MagicHelp
- code = <<-EOC
-#{v} = (#{recv})
-$stderr.print("#{MARKER}[#{idx}] => " + #{v}.class.to_s + " ")
-
-if Module === #{v} and '#{meth}' =~ /^[A-Z]/ and #{v}.const_defined?('#{meth}')
- #{result} = #{v}.to_s + "::#{meth}"
-else
- #{__magic_help_code result, v, meth.dump}
-end
-
-$stderr.puts(#{result})
-exit
- EOC
- else
- code = <<-EOC
-#{v} = (#{recv})
-$stderr.print("#{MARKER}[#{idx}] => " + #{v}.class.to_s + " ")
-$stderr.puts(#{v}.to_s)
-exit
- EOC
- end
- oneline_ize(code)
- end
-
- # overridable by module
- def _doc(code, lineno, column)
- end
-
- def doc(code, lineno, column=nil)
- _doc(code, lineno, column) or runtime_data(code, lineno, column).to_s
- end
-
- module UseMethodAnalyzer
- METHOD_ANALYSIS = "method_analysis"
- def have_method_analysis
- File.file? METHOD_ANALYSIS
- end
-
- def find_method_analysis
- here = Dir.pwd
- oldpwd = here
- begin
- while ! have_method_analysis
- Dir.chdir("..")
- if Dir.pwd == here
- return nil # not found
- end
- here = Dir.pwd
- end
- ensure
- Dir.chdir oldpwd
- end
- yield(File.join(here, METHOD_ANALYSIS))
- end
-
- def _doc(code, lineno, column=nil)
- find_method_analysis do |ma_file|
- methods = open(ma_file, "rb"){ |f| Marshal.load(f)}
- line = File.readlines(@filename)[lineno-1]
- current_method = line[ /^.{#{column}}\w*/][ /\w+[\?!]?$/ ].sub(/:+/,'')
- filename = @filename # FIXME
- begin
- methods[filename][lineno].grep(Regexp.new(Regexp.quote(current_method)))[0]
- rescue NoMethodError
- raise "doc/method_analyzer:cannot find #{current_method}"
- end
-
- end
- end
- end
-
-end
-
-# ReFe is so-called `Japanese Ri'.
-class XMPReFeFilter < XMPDocFilter
- def doc(code, lineno, column=nil)
- "refe '#{super}'"
- end
-end
-
-class XMPRiFilter < XMPDocFilter
- def doc(code, lineno, column=nil)
- "ri '#{super.sub(/\./, '::')}'"
- end
-end
-
-class XMPRiEmacsFilter < XMPDocFilter
- def doc(code, lineno, column=nil)
- begin
- %!(rct-find-tag-or-ri "#{super}")!
- rescue Exception => err
- return %Q[(error "#{err.message}")]
- end
- end
-end
-
-class XMPRiVimFilter < XMPDocFilter
- def doc(code, lineno, column=nil)
- begin
- %{call RCT_find_tag_or_ri("#{super}")}
- rescue Exception => err
- return %Q[echo #{err.message.inspect}]
- end
- end
-end
-
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/fork.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/fork.rb
deleted file mode 100644
index 87fc2645c..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/fork.rb
+++ /dev/null
@@ -1,210 +0,0 @@
-## Rcodetools version of ruby_fork
-#
-# Based on ruby_fork.rb by Ryan Davis, Eric Hodel, Zen Spider Software
-#
-# (The MIT License)
-#
-# Copyright (c) 2006 Ryan Davis, Eric Hodel, Zen Spider Software
-# 2007 rubikitch
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-require 'optparse'
-require 'socket'
-require 'rcodetools/fork_config'
-
-module Rcodetools
-module Fork
-
- USAGE_HELP = < [],
- :code => [],
- :extra_paths => [],
- :port => PORT,
- }
-
- def self.add_env_args(opts, settings)
- opts.separator ''
- opts.separator 'Process environment options:'
-
- opts.separator ''
- opts.on('-e CODE', 'Execute CODE in parent process.',
- 'May be specified multiple times.') do |code|
- settings[:code] << code
- end
-
- opts.separator ''
- opts.on('-I DIRECTORY', 'Adds DIRECTORY to $LOAD_PATH.',
- 'May be specified multiple times.') do |dir|
- settings[:extra_paths] << dir
- end
-
- opts.separator ''
- opts.on('-r LIBRARY', 'Require LIBRARY in the parent process.',
- 'May be specified multiple times.') do |lib|
- settings[:requires] << lib
- end
- end
-
- def self.parse_client_args(args)
- settings = Marshal.load Marshal.dump(DEFAULT_SETTINGS)
-
- opts = OptionParser.new do |opts|
- opts.banner = "Usage: #{$0} [options]\n#{USAGE_HELP}"
-
- opts.separator ''
- opts.on('-p', '--port PORT',
- 'Listen for connections on PORT.',
- "Default: #{settings[:port]}") do |port|
- settings[:port] = port.to_i
- end
-
- opts.separator ''
- opts.on('-h', '--help', 'You\'re looking at it.') do
- $stderr.puts opts
- exit 1
- end
-
- add_env_args opts, settings
- end
-
- opts.parse! args
-
- return settings
- end
-
- def self.parse_server_args(args)
- settings = Marshal.load Marshal.dump(DEFAULT_SETTINGS)
-
- opts = OptionParser.new do |opts|
- opts.banner = "Usage: #{$0} [options]\n#{USAGE_HELP}"
-
- opts.separator ''
- opts.on('-p', '--port PORT',
- 'Listen for connections on PORT.',
- "Default: #{settings[:port]}") do |port|
- settings[:port] = port.to_i
- end
-
- opts.separator ''
- opts.on('-h', '--help', 'You\'re looking at it.') do
- $stderr.puts opts
- exit 1
- end
-
- add_env_args opts, settings
- end
-
- opts.parse! args
-
- return settings
- end
-
- def self.start_client(args = ARGV)
- trap 'INT' do exit 1 end # Exit gracefully
-
- settings = parse_client_args args
-
- args = Marshal.dump [settings, ARGV]
-
- socket = TCPSocket.new 'localhost', settings[:port]
-
- socket.puts args.length
- socket.write args
- socket.close_write
- end
-
- def self.start_server(args = ARGV)
- begin
- require 'rubygems'
- rescue LoadError
- end
- write_pwd
- settings = parse_server_args args
- setup_environment settings
-
- server = TCPServer.new 'localhost', settings[:port]
-
- $stderr.puts "#{$0} Running as PID #{$$} on #{settings[:port]}"
-
- loop do
- Thread.new server.accept do |socket|
- begin
- args_length = socket.gets.to_i
- args = socket.read args_length
- settings, argv = Marshal.load args
- fork do
- ARGV.replace argv
- setup_environment settings
- socket.close
- end
- socket.close # close my copy.
- rescue => e
- socket.close if socket
- end
- end
- end
- rescue Interrupt, SystemExit
- File.unlink PWD_FILE
- rescue Exception => e
- File.unlink PWD_FILE
- puts "Failed to catch #{e.class}:#{e.message}"
- puts "\t#{e.backtrace.join "\n\t"}"
- end
-
- def self.setup_environment(settings)
- settings[:extra_paths].map! { |dir| dir.split ':' }
- settings[:extra_paths].flatten!
- settings[:extra_paths].each { |dir| $:.unshift dir }
-
- begin
- settings[:requires].each { |file| require file }
- settings[:code].each { |code| eval code, TOPLEVEL_BINDING }
- rescue Exception
- $@.reject! {|s| s =~ %r!rcodetools/fork\.rb!}
- raise
- end
- end
-
-end
-
-end
-
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/fork_config.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/fork_config.rb
deleted file mode 100644
index e22b4cd1f..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/fork_config.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-
-module Rcodetools
-
-module Fork
- PORT = 9085
- # Contains $PWD of rct-fork server. Exists only while running.
- PWD_FILE = File.expand_path "~/.rct-fork.pwd"
-
- def self.chdir_fork_directory
- if run?
- Dir.chdir File.read(PWD_FILE)
- else
- raise "rct-fork is not running."
- end
- end
-
- def self.write_pwd
- open(PWD_FILE, "w"){|f| f.print Dir.pwd }
- end
-
- def self.run?
- File.file? PWD_FILE
- end
-end
-
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/options.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/options.rb
deleted file mode 100644
index 8ba920986..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/options.rb
+++ /dev/null
@@ -1,136 +0,0 @@
-require 'optparse'
-
-module Rcodetools
-# Domain specific OptionParser extensions
-module OptionHandler
- def set_banner
- self.banner = "Usage: #{$0} [options] [inputfile] [-- cmdline args]"
- end
-
- def handle_position(options)
- separator ""
- separator "Position options:"
- on("--line=LINE", "Current line number.") do |n|
- options[:lineno] = n.to_i
- end
- on("--column=COLUMN", "Current column number in BYTE.") do |n|
- options[:column] = n.to_i
- end
- on("-t TEST", "--test=TEST",
- "Execute test script. ",
- "TEST is TESTSCRIPT, TESTSCRIPT@TESTMETHOD, or TESTSCRIPT@LINENO.",
- "You must specify --filename option.") do |t|
- options[:test_script], options[:test_method] = t.split(/@/)
- end
- on("--filename=FILENAME", "Filename of standard input.") do |f|
- options[:filename] = f
- end
- end
-
- def handle_interpreter(options)
- separator ""
- separator "Interpreter options:"
- on("-S FILE", "--interpreter FILE", "Use interpreter FILE.") do |interpreter|
- options[:interpreter] = interpreter
- end
- on("-I PATH", "Add PATH to $LOAD_PATH") do |path|
- options[:include_paths] << path
- end
- on("--dev", "Add this project's bin/ and lib/ to $LOAD_PATH.",
- "A directory with a Rakefile is considered a project base directory.") do
- auto_include_paths(options[:include_paths], Dir.pwd)
- end
- on("-r LIB", "Require LIB before execution.") do |lib|
- options[:libs] << lib
- end
- on("-e EXPR", "--eval=EXPR", "--stub=EXPR", "Evaluate EXPR after execution.") do |expr|
- options[:evals] << expr
- end
- on("--fork", "Use rct-fork-client if rct-fork is running.") do
- options[:detect_rct_fork] = true
- end
- on("--rbtest", "Use rbtest.") do
- options[:use_rbtest] = true
- end
- on("--detect-rbtest", "Use rbtest if '=begin test_*' blocks exist.") do
- options[:detect_rbtest] = true
- end
- end
-
- def handle_misc(options)
- separator ""
- separator "Misc options:"
- on("--cd DIR", "Change working directory to DIR.") do |dir|
- options[:wd] = dir
- end
- on("--debug", "Write transformed source code to xmp-tmp.PID.rb.") do
- options[:dump] = "xmp-tmp.#{Process.pid}.rb"
- end
- on("--tmpfile", "--tempfile", "Use tmpfile instead of open3. (non-windows)") do
- options[:execute_ruby_tmpfile] = true
- end
- on("-w N", "--width N", Integer, "Set width of multi-line annotation. (xmpfilter only)") do |width|
- options[:width] = width
- end
- separator ""
- on("-h", "--help", "Show this message") do
- puts self
- exit
- end
- on("-v", "--version", "Show version information") do
- puts "#{File.basename($0)} #{XMPFilter::VERSION}"
- exit
- end
- end
-
- def auto_include_paths(include_paths, pwd)
- if pwd =~ %r!^(.+)/(lib|bin)!
- include_paths.unshift("#$1/lib").unshift("#$1/bin")
- elsif File.file? "#{pwd}/Rakefile" or File.file? "#{pwd}/rakefile"
- include_paths.unshift("#{pwd}/lib").unshift("#{pwd}/bin")
- end
- end
- module_function :auto_include_paths
-
-end
-
-def set_extra_opts(options)
- if idx = ARGV.index("--")
- options[:options] = ARGV[idx+1..-1]
- ARGV.replace ARGV[0...idx]
- else
- options[:options] = []
- end
-end
-
-def check_opts(options)
- if options[:test_script]
- unless options[:filename]
- $stderr.puts "You must specify --filename as well as -t(--test)."
- exit 1
- end
- end
-end
-
-DEFAULT_OPTIONS = {
- :interpreter => "ruby",
- :options => ["hoge"],
- :min_codeline_size => 50,
- :width => 79,
- :libs => [],
- :evals => [],
- :include_paths => [],
- :dump => nil,
- :wd => nil,
- :warnings => true,
- :use_parentheses => true,
- :column => nil,
- :output_stdout => true,
- :test_script => nil,
- :test_method => nil,
- :detect_rct_fork => false,
- :use_rbtest => false,
- :detect_rbtest => false,
- :execute_ruby_tmpfile => false,
- }
-end # /Rcodetools
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/xmpfilter.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/xmpfilter.rb
deleted file mode 100755
index a174b5180..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/xmpfilter.rb
+++ /dev/null
@@ -1,379 +0,0 @@
-#!/usr/bin/env ruby
-# Copyright (c) 2005-2008 Mauricio Fernandez http://eigenclass.org
-# rubikitch
-# Use and distribution subject to the terms of the Ruby license.
-
-# This is needed regexps cannot match with invalid-encoding strings.
-# xmpfilter is unaware of script encoding.
-Encoding.default_external = "ASCII-8BIT" if RUBY_VERSION >= "1.9"
-
-ENV['HOME'] ||= "#{ENV['HOMEDRIVE']}#{ENV['HOMEPATH']}"
-require 'rcodetools/fork_config'
-require 'rcodetools/compat'
-require 'tmpdir'
-
-module Rcodetools
-
-class XMPFilter
- VERSION = "0.8.7"
-
- MARKER = "!XMP#{Time.new.to_i}_#{Process.pid}_#{rand(1000000)}!"
- XMP_RE = Regexp.new("^" + Regexp.escape(MARKER) + '\[([0-9]+)\] (=>|~>|==>) (.*)')
- VAR = "_xmp_#{Time.new.to_i}_#{Process.pid}_#{rand(1000000)}"
- WARNING_RE = /.*:([0-9]+): warning: (.*)/
-
- RuntimeData = Struct.new(:results, :exceptions, :bindings)
-
- INITIALIZE_OPTS = {:interpreter => "ruby", :options => [], :libs => [],
- :include_paths => [], :warnings => true,
- :use_parentheses => true}
-
- def windows?
- /win|mingw/ =~ RUBY_PLATFORM && /darwin/ !~ RUBY_PLATFORM
- end
-
- Interpreter = Struct.new(:options, :execute_method, :accept_debug, :accept_include_paths, :chdir_proc)
- INTERPRETER_RUBY = Interpreter.new(["-w"],
- :execute_ruby, true, true, nil)
- INTERPRETER_RBTEST = Interpreter.new(["-S", "rbtest"],
- :execute_script, false, false, nil)
- INTERPRETER_FORK = Interpreter.new(["-S", "rct-fork-client"],
- :execute_tmpfile, false, true,
- lambda { Fork::chdir_fork_directory })
-
- def self.detect_rbtest(code, opts)
- opts[:use_rbtest] ||= (opts[:detect_rbtest] and code =~ /^=begin test./) ? true : false
- end
-
- # The processor (overridable)
- def self.run(code, opts)
- new(opts).annotate(code)
- end
-
- def initialize(opts = {})
- options = INITIALIZE_OPTS.merge opts
- @interpreter_info = INTERPRETER_RUBY
- @interpreter = options[:interpreter]
- @options = options[:options]
- @libs = options[:libs]
- @evals = options[:evals] || []
- @include_paths = options[:include_paths]
- @output_stdout = options[:output_stdout]
- @dump = options[:dump]
- @warnings = options[:warnings]
- @parentheses = options[:use_parentheses]
- @ignore_NoMethodError = options[:ignore_NoMethodError]
- test_script = options[:test_script]
- test_method = options[:test_method]
- filename = options[:filename]
- @execute_ruby_tmpfile = options[:execute_ruby_tmpfile]
- @postfix = ""
- @stdin_path = nil
- @width = options[:width]
-
- initialize_rct_fork if options[:detect_rct_fork]
- initialize_rbtest if options[:use_rbtest]
- initialize_for_test_script test_script, test_method, filename if test_script and !options[:use_rbtest]
- end
-
- def initialize_rct_fork
- if Fork::run?
- @interpreter_info = INTERPRETER_FORK
- end
- end
-
- def initialize_rbtest
- @interpreter_info = INTERPRETER_RBTEST
- end
-
- def initialize_for_test_script(test_script, test_method, filename)
- test_script.replace File.expand_path(test_script)
- filename.replace File.expand_path(filename)
- unless test_script == filename
- basedir = common_path(test_script, filename)
- relative_filename = filename[basedir.length+1 .. -1].sub(%r!^lib/!, '')
- @evals << %Q!$LOADED_FEATURES << #{relative_filename.dump}!
- @evals << safe_require_code('test/unit')
- @evals << %Q!load #{test_script.dump}!
- end
- test_method = get_test_method_from_lineno(test_script, test_method.to_i) if test_method =~ /^\d/
- @evals << %Q!Test::Unit::AutoRunner.run(false, nil, ["-n", #{test_method.dump}])! if test_method
- end
-
- def get_test_method_from_lineno(filename, lineno)
- lines = File.readlines(filename)
- (lineno-1).downto(0) do |i|
- if lines[i] =~ /^ *def *(test_[A-Za-z0-9?!_]+)$/
- return $1
- end
- end
- nil
- end
-
- def common_path(a, b)
- (a.split(File::Separator) & b.split(File::Separator)).join(File::Separator)
- end
-
- def add_markers(code, min_codeline_size = 50)
- maxlen = code.map{|x| x.size}.max
- maxlen = [min_codeline_size, maxlen + 2].max
- ret = ""
- code.each do |l|
- l = l.chomp.gsub(/ # (=>|!>).*/, "").gsub(/\s*$/, "")
- ret << (l + " " * (maxlen - l.size) + " # =>\n")
- end
- ret
- end
-
- SINGLE_LINE_RE = /^(?!(?:\s+|(?:\s*#.+)?)# ?=>)(.*) # ?=>.*/
- MULTI_LINE_RE = /^(.*)\n(( *)# ?=>.*(?:\n|\z))(?: *# .*\n)*/
- def annotate(code)
- idx = 0
- code = code.gsub(/ # !>.*/, '')
- newcode = code.gsub(SINGLE_LINE_RE){ prepare_line($1, idx += 1) }
- newcode.gsub!(MULTI_LINE_RE){ prepare_line($1, idx += 1, true)}
- File.open(@dump, "w"){|f| f.puts newcode} if @dump
- execute(newcode) do |stdout, stderr|
- output = stderr.readlines
- runtime_data = extract_data(output)
- idx = 0
- annotated = code.gsub(SINGLE_LINE_RE) { |l|
- expr = $1
- if /^\s*#/ =~ l
- l
- else
- annotated_line(l, expr, runtime_data, idx += 1)
- end
- }
- annotated.gsub!(/ # !>.*/, '')
- annotated.gsub!(/# (>>|~>)[^\n]*\n/m, "");
- annotated.gsub!(MULTI_LINE_RE) { |l|
- annotated_multi_line(l, $1, $3, runtime_data, idx += 1)
- }
- ret = final_decoration(annotated, output)
- if @output_stdout and (s = stdout.read) != ""
- ret << s.inject(""){|s,line| s + "# >> #{line}".chomp + "\n" }
- end
- ret
- end
- end
-
- def annotated_line(line, expression, runtime_data, idx)
- "#{expression} # => " + (runtime_data.results[idx].map{|x| x[1]} || []).join(", ")
- end
-
- def annotated_multi_line(line, expression, indent, runtime_data, idx)
- pretty = (runtime_data.results[idx].map{|x| x[1]} || []).join(", ")
- first, *rest = pretty.to_a
- rest.inject("#{expression}\n#{indent}# => #{first || "\n"}") {|s, l| s << "#{indent}# " << l }
- end
-
- def prepare_line_annotation(expr, idx, multi_line=false)
- v = "#{VAR}"
- blocal = "__#{VAR}"
- blocal2 = "___#{VAR}"
- lastmatch = "____#{VAR}"
- if multi_line
- pp = safe_require_code "pp"
- result = "((begin; #{lastmatch} = $~; PP.pp(#{v}, '', #{@width-5}).gsub(/\\r?\\n/, 'PPPROTECT'); ensure; $~ = #{lastmatch} end))"
- else
- pp = ''
- result = "#{v}.inspect"
- end
- oneline_ize(<<-EOF).chomp
-#{pp}
-#{v} = (#{expr})
-$stderr.puts("#{MARKER}[#{idx}] => " + #{v}.class.to_s + " " + #{result}) || begin
- $stderr.puts local_variables
- local_variables.each{|#{blocal}|
- #{blocal2} = eval(#{blocal})
- if #{v} == #{blocal2} && #{blocal} != %#{expr}.strip
- $stderr.puts("#{MARKER}[#{idx}] ==> " + #{blocal})
- elsif [#{blocal2}] == #{v}
- $stderr.puts("#{MARKER}[#{idx}] ==> [" + #{blocal} + "]")
- end
- }
- nil
-rescue Exception
- nil
-end || #{v}
- EOF
-
- end
- alias_method :prepare_line, :prepare_line_annotation
-
- def safe_require_code(lib)
- oldverbose = "$#{VAR}_old_verbose"
- "#{oldverbose} = $VERBOSE; $VERBOSE = false; require '#{lib}'; $VERBOSE = #{oldverbose}"
- end
- private :safe_require_code
-
- def execute_ruby(code)
- meth = (windows? or @execute_ruby_tmpfile) ? :execute_tmpfile : :execute_popen
- __send__ meth, code
- end
-
- def split_shbang(script)
- ary = script.each_line.to_a
- if ary[0] =~ /^#!/ and ary[1] =~ /^#.*coding/
- [ary[0..1], ary[2..-1]]
- elsif ary[0] =~ /^#!|^#.*coding/
- [[ary[0]], ary[1..-1]]
- else
- [[], ary]
- end
- end
- private :split_shbang
-
- def execute_tmpfile(code)
- ios = %w[_ stdin stdout stderr]
- stdin, stdout, stderr = (1..3).map do |i|
- fname = if $DEBUG
- "xmpfilter.tmpfile_#{ios[i]}.rb"
- else
- "xmpfilter.tmpfile_#{Process.pid}-#{i}.rb"
- end
- f = File.open(fname, "w+")
- f
- end
- # stdin.puts code
- # stdin.close
- shbang_magic_comment, rest = split_shbang(code)
- @stdin_path = File.expand_path stdin.path
- stdin.print shbang_magic_comment
- stdin.print <<-EOF.map{|l| l.strip}.join(";")
- $stdout.reopen('#{File.expand_path(stdout.path)}', 'w')
- $stderr.reopen('#{File.expand_path(stderr.path)}', 'w')
- $0 = '#{File.expand_path(stdin.path)}'
- ARGV.replace(#{@options.inspect})
- END { #{@evals.join(";")} }
- EOF
- stdin.print ";#{rest}"
-
- debugprint "execute command = #{(interpreter_command << stdin.path).join ' '}"
- stdin.close
- oldpwd = Dir.pwd
- @interpreter_info.chdir_proc and @interpreter_info.chdir_proc.call
- system(*(interpreter_command << stdin.path))
- Dir.chdir oldpwd
- [stdout, stderr]
- end
-
- def execute_popen(code)
- require 'open3'
- stdin, stdout, stderr = Open3::popen3(*interpreter_command)
- stdin.puts code
- @evals.each{|x| stdin.puts x } unless @evals.empty?
- stdin.close
- [stdout, stderr]
- end
-
- def execute_script(code)
- path = File.expand_path("xmpfilter.tmpfile_#{Process.pid}.rb", Dir.tmpdir)
- File.open(path, "w"){|f| f.puts code}
- at_exit { File.unlink path if File.exist? path}
- stdout_path, stderr_path = (1..2).map do |i|
- fname = "xmpfilter.tmpfile_#{Process.pid}-#{i}.rb"
- File.expand_path(fname, Dir.tmpdir)
- end
- args = *(interpreter_command << %["#{path}"] << "2>" <<
- %["#{stderr_path}"] << ">" << %["#{stdout_path}"])
- system(args.join(" "))
-
- [stdout_path, stderr_path].map do |fullname|
- f = File.open(fullname, "r")
- # at_exit {
- # f.close unless f.closed?
- # File.unlink fullname if File.exist? fullname
- # }
- f
- end
- end
-
- def execute(code)
- stdout, stderr = __send__ @interpreter_info.execute_method, code
- if block_given?
- begin
- yield stdout, stderr
- ensure
- for out in [stdout, stderr]
- path = out.path rescue nil
- out.close
-# File.unlink path if path
- end
- end
- else
- [stdout, stderr]
- end
- end
-
- def interpreter_command
- # BUG interpreter option arguments containing space are not
- # accepted. But it seems to be rare case.
- r = @interpreter.split + @interpreter_info.options
- r << "-d" if $DEBUG and @interpreter_info.accept_debug
- r << "-I#{@include_paths.join(":")}" if @interpreter_info.accept_include_paths and !@include_paths.empty?
- @libs.each{|x| r << "-r#{x}" } unless @libs.empty?
- (r << "-").concat @options unless @options.empty?
- r
- end
-
- def extract_data(output)
- results = Hash.new{|h,k| h[k] = []}
- exceptions = Hash.new{|h,k| h[k] = []}
- bindings = Hash.new{|h,k| h[k] = []}
- output.grep(XMP_RE).each do |line|
- result_id, op, result = XMP_RE.match(line).captures
- case op
- when "=>"
- klass, value = /(\S+)\s+(.*)/.match(result).captures
- results[result_id.to_i] << [klass, value.gsub(/PPPROTECT/, "\n")]
- when "~>"
- exceptions[result_id.to_i] << result
- when "==>"
- bindings[result_id.to_i] << result unless result.index(VAR)
- end
- end
- RuntimeData.new(results, exceptions, bindings)
- end
-
- def final_decoration(code, output)
- warnings = {}
- output.join.grep(WARNING_RE).map do |x|
- md = WARNING_RE.match(x)
- warnings[md[1].to_i] = md[2]
- end
- idx = 0
- ret = code.map do |line|
- w = warnings[idx+=1]
- if @warnings
- w ? (line.chomp + " # !> #{w}") : line
- else
- line
- end
- end
- output = output.reject{|x| /^-:[0-9]+: warning/.match(x)}
- if exception = /^-e?:[0-9]+:.*|^(?!!XMP)[^\n]+:[0-9]+:in .*/m.match(output.join)
- err = exception[0]
- err.gsub!(Regexp.union(@stdin_path), '-') if @stdin_path
- ret << err.map{|line| "# ~> " + line }
- end
- ret
- end
-
- def oneline_ize(code)
- "((" + code.gsub(/\r?\n|\r/, ';') + "));#{@postfix}\n"
- end
-
- def debugprint(*args)
- $stderr.puts(*args) if $DEBUG
- end
-end # clas XMPFilter
-
-class XMPAddMarkers < XMPFilter
- def self.run(code, opts)
- new(opts).add_markers(code, opts[:min_codeline_size])
- end
-end
-
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/xmptestunitfilter.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/xmptestunitfilter.rb
deleted file mode 100644
index e3fe395f2..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/lib/rcodetools/xmptestunitfilter.rb
+++ /dev/null
@@ -1,314 +0,0 @@
-require 'rcodetools/xmpfilter'
-
-module Rcodetools
-
-FLOAT_TOLERANCE = 0.0001
-class XMPTestUnitFilter < XMPFilter
- def initialize(opts = {})
- super
- @output_stdout = false
- mod = @parentheses ? :WithParentheses : :Poetry
- extend self.class.const_get(mod) unless opts[:_no_extend_module]
- end
-
- private
- def annotated_line(line, expression, runtime_data, idx)
- indent = /^\s*/.match(line)[0]
- assertions(expression.strip, runtime_data, idx).map{|x| indent + x}.join("\n")
- end
-
- def prepare_line(expr, idx)
- basic_eval = prepare_line_annotation(expr, idx)
- %|begin; #{basic_eval}; rescue Exception; $stderr.puts("#{MARKER}[#{idx}] ~> " + $!.class.to_s); end|
- end
-
- def assertions(expression, runtime_data, index)
- exceptions = runtime_data.exceptions
- ret = []
-
- unless (vars = runtime_data.bindings[index]).empty?
- vars.each{|var| ret << equal_assertion(var, expression) }
- end
- if !(wanted = runtime_data.results[index]).empty? || !exceptions[index]
- case (wanted[0][1] rescue 1)
- when "nil"
- ret.concat nil_assertion(expression)
- else
- case wanted.size
- when 1
- ret.concat _value_assertions(wanted[0], expression)
- else
- # discard values from multiple runs
- ret.concat(["#xmpfilter: WARNING!! extra values ignored"] +
- _value_assertions(wanted[0], expression))
- end
- end
- else
- ret.concat raise_assertion(expression, exceptions, index)
- end
-
- ret
- end
-
- OTHER = Class.new
- def _value_assertions(klass_value_txt_pair, expression)
- klass_txt, value_txt = klass_value_txt_pair
- value = eval(value_txt) || OTHER.new
- # special cases
- value = nil if value_txt.strip == "nil"
- value = false if value_txt.strip == "false"
- value_assertions klass_txt, value_txt, value, expression
- rescue Exception
- return object_assertions(klass_txt, value_txt, expression)
- end
-
- def raise_assertion(expression, exceptions, index)
- ["assert_raise(#{exceptions[index][0]}){#{expression}}"]
- end
-
- module WithParentheses
- def nil_assertion(expression)
- ["assert_nil(#{expression})"]
- end
-
- def value_assertions(klass_txt, value_txt, value, expression)
- case value
- when Float
- ["assert_in_delta(#{value.inspect}, #{expression}, #{FLOAT_TOLERANCE})"]
- when Numeric, String, Hash, Array, Regexp, TrueClass, FalseClass, Symbol, NilClass
- ["assert_equal(#{value_txt}, #{expression})"]
- else
- object_assertions(klass_txt, value_txt, expression)
- end
- end
-
- def object_assertions(klass_txt, value_txt, expression)
- [ "assert_kind_of(#{klass_txt}, #{expression})",
- "assert_equal(#{value_txt.inspect}, #{expression}.inspect)" ]
- end
-
- def equal_assertion(expected, actual)
- "assert_equal(#{expected}, #{actual})"
- end
- end
-
- module Poetry
- def nil_assertion(expression)
- ["assert_nil #{expression}"]
- end
-
- def value_assertions(klass_txt, value_txt, value, expression)
- case value
- when Float
- ["assert_in_delta #{value.inspect}, #{expression}, #{FLOAT_TOLERANCE}"]
- when Numeric, String, Hash, Array, Regexp, TrueClass, FalseClass, Symbol, NilClass
- ["assert_equal #{value_txt}, #{expression}"]
- else
- object_assertions klass_txt, value_txt, expression
- end
- end
-
- def object_assertions(klass_txt, value_txt, expression)
- [ "assert_kind_of #{klass_txt}, #{expression} ",
- "assert_equal #{value_txt.inspect}, #{expression}.inspect" ]
- end
-
- def equal_assertion(expected, actual)
- "assert_equal #{expected}, #{actual}"
- end
- end
-end
-
-class XMPRSpecFilter < XMPTestUnitFilter
- def initialize(x={})
- super(x.merge(:_no_extend_module => true))
- load_rspec
- specver = (Spec::VERSION::STRING rescue "1.0.0")
- api_module = specver >= "0.8.0" ? NewAPI : OldAPI
- @interpreter_info.execute_method = :execute_script
- mod = @parentheses ? :WithParentheses : :Poetry
- extend api_module.const_get(mod)
- extend api_module
- end
-
- private
- def load_rspec
- begin
- require 'spec/version'
- rescue LoadError
- require 'rubygems'
- begin
- require 'spec/version'
- rescue LoadError # if rspec isn't available, use most recent conventions
- end
- end
- end
-
-# alias :execute :execute_script
-
- def interpreter_command
- [@interpreter] + @libs.map{|x| "-r#{x}"}
- end
-
- module NewAPI
- def raise_assertion(expression, exceptions, index)
- ["lambda{#{expression}}.should raise_error(#{exceptions[index][0]})"]
- end
-
- module WithParentheses
- def nil_assertion(expression)
- ["(#{expression}).should be_nil"]
- end
-
- def value_assertions(klass_txt, value_txt, value, expression)
- case value
- when Float
- ["(#{expression}).should be_close(#{value.inspect}, #{FLOAT_TOLERANCE})"]
- when Numeric, String, Hash, Array, Regexp, TrueClass, FalseClass, Symbol, NilClass
- ["(#{expression}).should == (#{value_txt})"]
- else
- object_assertions klass_txt, value_txt, expression
- end
- end
-
- def object_assertions(klass_txt, value_txt, expression)
- [ "(#{expression}).should be_a_kind_of(#{klass_txt})",
- "(#{expression}.inspect).should == (#{value_txt.inspect})" ]
- end
-
- def equal_assertion(expected, actual)
- "(#{actual}).should == (#{expected})"
- end
- end
-
- module Poetry
- def nil_assertion(expression)
- ["#{expression}.should be_nil"]
- end
-
- def value_assertions(klass_txt, value_txt, value, expression)
- case value
- when Float
- ["#{expression}.should be_close(#{value.inspect}, #{FLOAT_TOLERANCE})"]
- when Numeric, String, Hash, Array, Regexp, TrueClass, FalseClass, Symbol, NilClass
- ["#{expression}.should == #{value_txt}"]
- else
- object_assertions klass_txt, value_txt, expression
- end
- end
-
- def object_assertions(klass_txt, value_txt, expression)
- [ "#{expression}.should be_a_kind_of(#{klass_txt})",
- "#{expression}.inspect.should == #{value_txt.inspect}" ]
- end
-
- def equal_assertion(expected, actual)
- "#{actual}.should == #{expected}"
- end
- end
- end
-
- module OldAPI
- # old rspec, use deprecated syntax
- def raise_assertion(expression, exceptions, index)
- ["lambda{#{expression}}.should_raise_error(#{exceptions[index][0]})"]
- end
-
- module WithParentheses
- def nil_assertion(expression)
- ["(#{expression}).should_be_nil"]
- end
-
- def value_assertions(klass_txt, value_txt, value, expression)
- case value
- when Float
- ["(#{expression}).should_be_close(#{value.inspect}, #{FLOAT_TOLERANCE})"]
- when Numeric, String, Hash, Array, Regexp, TrueClass, FalseClass, Symbol, NilClass
- ["(#{expression}).should_equal(#{value_txt})"]
- else
- object_assertions klass_txt, value_txt, expression
- end
- end
-
- def object_assertions(klass_txt, value_txt, expression)
- [ "(#{expression}).should_be_a_kind_of(#{klass_txt})",
- "(#{expression}.inspect).should_equal(#{value_txt.inspect})" ]
- end
-
- def equal_assertion(expected, actual)
- "(#{actual}).should_equal(#{expected})"
- end
- end
-
- module Poetry
- def nil_assertion(expression)
- ["#{expression}.should_be_nil"]
- end
-
- def value_assertions(klass_txt, value_txt, value, expression)
- case value
- when Float
- ["#{expression}.should_be_close #{value.inspect}, #{FLOAT_TOLERANCE}"]
- when Numeric, String, Hash, Array, Regexp, TrueClass, FalseClass, Symbol, NilClass
- ["#{expression}.should_equal #{value_txt}"]
- else
- object_assertions klass_txt, value_txt, expression
- end
- end
-
- def object_assertions(klass_txt, value_txt, expression)
- [ "#{expression}.should_be_a_kind_of #{klass_txt}",
- "#{expression}.inspect.should_equal #{value_txt.inspect}" ]
- end
-
- def equal_assertion(expected, actual)
- "#{actual}.should_equal #{expected}"
- end
- end
- end
-
-
-end
-
-class XMPExpectationsFilter < XMPTestUnitFilter
- def initialize(x={})
- super(x.merge(:_no_extend_module => true))
- @warnings = false
- end
-
- def expectation(expected, actual)
- < 'unit', 'controllers' => 'functional' }
- RAILS_TESTNAME2MVC = RAILS_MVC2TESTNAME.invert
- def test_file_00_rails(implementation, basedir, dir, node) # rails
- if m = %r!app/(models|controllers)/(.+)\.rb$!.match(implementation)
- "%stest/%s/%s_test.rb" % [ m.pre_match, RAILS_MVC2TESTNAME[m[1]], m[2] ]
- end
- end
-
- def test_file_05_rails_lib(implementation, basedir, dir, node)
- if basedir and File.directory?( File.join(basedir, "app") )
- "#{basedir}test/unit/test_#{node}.rb"
- end
- end
-
- def test_file_10_no_match(implementation, basedir, dir, node)
- if [basedir, dir, node].all?{|x| x.nil?}
- "#{File.dirname(implementation)}/test_#{File.basename(implementation)}"
- end
- end
-
- def test_file_20_simple(implementation, basedir, dir, node) # test/test_NODE.rb
- exist "#{basedir}test/test_#{node}.rb"
- end
-
- def test_file_30_flat(implementation, basedir, dir, node) # lib/XXX/NODE.rb -> test/test_NODE.rb
- exist "#{basedir}test/test_#{node}.rb" if dir
- end
-
- def test_file_99_autotest_default(implementation, basedir, dir, node) # lib/XXX/NODE.rb -> test/XXX/test_NODE.rb
- "#{basedir}test/#{dir}test_#{node}.rb"
- end
-
- def implementation_file_00_rails(test, basedir, dir, node)
- if m = %r!test/(unit|functional)/(.+)_test.rb$!.match(test)
- "%sapp/%s/%s.rb" % [ m.pre_match, RAILS_TESTNAME2MVC[m[1]], m[2] ]
- end
- end
-
- def implementation_file_10_no_match(test, basename, dir, node)
- if dir == nil and node == nil and test =~ %r!/test_(.+)\.rb$!
- test.sub("/test_", "/")
- end
- end
-
- def implementation_file_20(test, basedir, dir, node)
- exist("#{basedir}lib/#{dir}#{node}.rb")
- end
-
- def implementation_file_30_flat(test, basedir, dir, node)
- Dir[ "#{basedir}lib/**/#{node}.rb" ].first
- end
-
- def implementation_file_99_default(test, basedir, dir, node)
- "#{basedir}lib/#{dir}#{node}.rb"
- end
-
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/license.txt b/bundles/ruby.tmbundle/Support/vendor/rcodetools/license.txt
deleted file mode 100644
index e2eb45cde..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/license.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-
- rcodetools http://eigenclass.org/hiki.rb?rcodetools
- Copyright (c) 2005-2007 Mauricio Fernandez http://eigenclass.org
- Copyright (c) 2006-2008 rubikitch http://www.rubyist.net/~rubikitch/
-Use and distribution subject to the terms of the Ruby license.
-
-= License
-rcodetools is licensed under the same terms as Ruby.
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/rcodetools.el b/bundles/ruby.tmbundle/Support/vendor/rcodetools/rcodetools.el
deleted file mode 100644
index e5c90af96..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/rcodetools.el
+++ /dev/null
@@ -1,430 +0,0 @@
-;;; rcodetools.el -- annotation / accurate completion / browsing documentation
-
-;;; Copyright (c) 2006-2008 rubikitch
-;;;
-;;; Use and distribution subject to the terms of the Ruby license.
-
-(defvar xmpfilter-command-name "ruby -S xmpfilter --dev --fork --detect-rbtest"
- "The xmpfilter command name.")
-(defvar rct-doc-command-name "ruby -S rct-doc --dev --fork --detect-rbtest"
- "The rct-doc command name.")
-(defvar rct-complete-command-name "ruby -S rct-complete --dev --fork --detect-rbtest"
- "The rct-complete command name.")
-(defvar ruby-toggle-file-command-name "ruby -S ruby-toggle-file"
- "The ruby-toggle-file command name.")
-(defvar rct-fork-command-name "ruby -S rct-fork")
-(defvar rct-option-history nil) ;internal
-(defvar rct-option-local nil) ;internal
-(make-variable-buffer-local 'rct-option-local)
-(defvar rct-debug nil
- "If non-nil, output debug message into *Messages*.")
-;; (setq rct-debug t)
-
-(defadvice comment-dwim (around rct-hack activate)
- "If comment-dwim is successively called, add => mark."
- (if (and (eq major-mode 'ruby-mode)
- (eq last-command 'comment-dwim)
- ;; TODO =>check
- )
- (insert "=>")
- ad-do-it))
-;; To remove this advice.
-;; (progn (ad-disable-advice 'comment-dwim 'around 'rct-hack) (ad-update 'comment-dwim))
-
-(defun rct-current-line ()
- "Return the vertical position of point..."
- (+ (count-lines (point-min) (point))
- (if (= (current-column) 0) 1 0)))
-
-(defun rct-save-position (proc)
- "Evaluate proc with saving current-line/current-column/window-start."
- (let ((line (rct-current-line))
- (col (current-column))
- (wstart (window-start)))
- (funcall proc)
- (goto-char (point-min))
- (forward-line (1- line))
- (move-to-column col)
- (set-window-start (selected-window) wstart)))
-
-(defun rct-interactive ()
- "All the rcodetools-related commands with prefix args read rcodetools' common option. And store option into buffer-local variable."
- (list
- (let ((option (or rct-option-local "")))
- (if current-prefix-arg
- (setq rct-option-local
- (read-from-minibuffer "rcodetools option: " option nil nil 'rct-option-history))
- option))))
-
-(defun rct-shell-command (command &optional buffer)
- "Replacement for `(shell-command-on-region (point-min) (point-max) command buffer t' because of encoding problem."
- (let ((input-rb (concat (make-temp-name "xmptmp-in") ".rb"))
- (output-rb (concat (make-temp-name "xmptmp-out") ".rb"))
- (coding-system-for-read buffer-file-coding-system))
- (write-region (point-min) (point-max) input-rb nil 'nodisp)
- (shell-command
- (rct-debuglog (format "%s %s > %s" command input-rb output-rb))
- t " *rct-error*")
- (with-current-buffer (or buffer (current-buffer))
- (insert-file-contents output-rb nil nil nil t))
- (delete-file input-rb)
- (delete-file output-rb)))
-
-(defvar xmpfilter-command-function 'xmpfilter-command)
-(defun xmp (&optional option)
- "Run xmpfilter for annotation/test/spec on whole buffer.
-See also `rct-interactive'. "
- (interactive (rct-interactive))
- (rct-save-position
- (lambda ()
- (rct-shell-command (funcall xmpfilter-command-function option)))))
-
-(defun xmpfilter-command (&optional option)
- "The xmpfilter command line, DWIM."
- (setq option (or option ""))
- (flet ((in-block (beg-re)
- (save-excursion
- (goto-char (point-min))
- (when (re-search-forward beg-re nil t)
- (let ((s (point)) e)
- (when (re-search-forward "^end\n" nil t)
- (setq e (point))
- (goto-char s)
- (re-search-forward "# => *$" e t)))))))
- (cond ((in-block "^class.+< Test::Unit::TestCase$")
- (format "%s --unittest %s" xmpfilter-command-name option))
- ((in-block "^\\(describe\\|context\\).+do$")
- (format "%s --spec %s" xmpfilter-command-name option))
- (t
- (format "%s %s" xmpfilter-command-name option)))))
-
-;;;; Completion
-(defvar rct-method-completion-table nil) ;internal
-(defvar rct-complete-symbol-function 'rct-complete-symbol--normal
- "Function to use rct-complete-symbol.")
-;; (setq rct-complete-symbol-function 'rct-complete-symbol--icicles)
-(defvar rct-use-test-script t
- "Whether rct-complete/rct-doc use test scripts.")
-
-(defun rct-complete-symbol (&optional option)
- "Perform ruby method and class completion on the text around point.
-This command only calls a function according to `rct-complete-symbol-function'.
-See also `rct-interactive', `rct-complete-symbol--normal', and `rct-complete-symbol--icicles'."
- (interactive (rct-interactive))
- (call-interactively rct-complete-symbol-function))
-
-(defun rct-complete-symbol--normal (&optional option)
- "Perform ruby method and class completion on the text around point.
-See also `rct-interactive'."
- (interactive (rct-interactive))
- (let ((end (point)) beg
- pattern alist
- completion)
- (setq completion (rct-try-completion)) ; set also pattern / completion
- (save-excursion
- (search-backward pattern)
- (setq beg (point)))
- (cond ((eq completion t) ;sole completion
- (message "%s" "Sole completion"))
- ((null completion) ;no completions
- (message "Can't find completion for \"%s\"" pattern)
- (ding))
- ((not (string= pattern completion)) ;partial completion
- (delete-region beg end) ;delete word
- (insert completion)
- (message ""))
- (t
- (message "Making completion list...")
- (with-output-to-temp-buffer "*Completions*"
- (display-completion-list
- (all-completions pattern alist)))
- (message "Making completion list...%s" "done")))))
-
-;; (define-key ruby-mode-map "\M-\C-i" 'rct-complete-symbol)
-
-(defun rct-debuglog (logmsg)
- "if `rct-debug' is non-nil, output LOGMSG into *Messages*. Returns LOGMSG."
- (if rct-debug
- (message "%s" logmsg))
- logmsg)
-
-(defun rct-exec-and-eval (command opt)
- "Execute rct-complete/rct-doc and evaluate the output."
- (let ((eval-buffer (get-buffer-create " *rct-eval*")))
- ;; copy to temporary buffer to do completion at non-EOL.
- (rct-shell-command
- (format "%s %s %s --line=%d --column=%d %s"
- command opt (or rct-option-local "")
- (rct-current-line)
- ;; specify column in BYTE
- (string-bytes
- (encode-coding-string
- (buffer-substring (point-at-bol) (point))
- buffer-file-coding-system))
- (if rct-use-test-script (rct-test-script-option-string) ""))
- eval-buffer)
- (message "")
- (eval (with-current-buffer eval-buffer
- (goto-char 1)
- (unwind-protect
- (read (current-buffer))
- (unless rct-debug (kill-buffer eval-buffer)))))))
-
-(defun rct-test-script-option-string ()
- (if (null buffer-file-name)
- ""
- (let ((test-buf (rct-find-test-script-buffer))
- (bfn buffer-file-name)
- bfn2 t-opt test-filename)
- (if (and test-buf
- (setq bfn2 (buffer-local-value 'buffer-file-name test-buf))
- (file-exists-p bfn2))
- ;; pass test script's filename and lineno
- (with-current-buffer test-buf
- (setq t-opt (format "%s@%s" buffer-file-name (rct-current-line)))
- (format "-t %s --filename=%s" t-opt bfn))
- ""))))
-
-(require 'cl)
-
-(defun rct-find-test-script-buffer (&optional buffer-list)
- "Find the latest used Ruby test script buffer."
- (setq buffer-list (or buffer-list (buffer-list)))
- (dolist (buf buffer-list)
- (with-current-buffer buf
- (if (and buffer-file-name (string-match "test.*\.rb$" buffer-file-name))
- (return buf)))))
-
-;; (defun rct-find-test-method (buffer)
-;; "Find test method on point on BUFFER."
-;; (with-current-buffer buffer
-;; (save-excursion
-;; (forward-line 1)
-;; (if (re-search-backward "^ *def *\\(test_[A-Za-z0-9?!_]+\\)" nil t)
-;; (match-string 1)))))
-
-(defun rct-try-completion ()
- "Evaluate the output of rct-complete."
- (rct-exec-and-eval rct-complete-command-name "--completion-emacs"))
-
-;;;; TAGS or Ri
-(autoload 'ri "ri-ruby" nil t)
-(defvar rct-find-tag-if-available t
- "If non-nil and the method location is in TAGS, go to the location instead of show documentation.")
-(defun rct-ri (&optional option)
- "Browse Ri document at the point.
-If `rct-find-tag-if-available' is non-nil, search the definition using TAGS.
-
-See also `rct-interactive'. "
- (interactive (rct-interactive))
- (rct-exec-and-eval
- rct-doc-command-name
- (concat "--ri-emacs --use-method-analyzer "
- (if (buffer-file-name)
- (concat "--filename=" (buffer-file-name))
- ""))))
-
-(defun rct-find-tag-or-ri (fullname)
- (if (not rct-find-tag-if-available)
- (ri fullname)
- (condition-case err
- (let ()
- (visit-tags-table-buffer)
- (find-tag-in-order (concat "::" fullname) 'search-forward '(tag-exact-match-p) nil "containing" t))
- (error
- (ri fullname)))))
-
-;;;;
-(defun ruby-toggle-buffer ()
- "Open a related file to the current buffer. test<=>impl."
- (interactive)
- (find-file (shell-command-to-string
- (format "%s %s" ruby-toggle-file-command-name buffer-file-name))))
-
-;;;; rct-fork support
-(defun rct-fork (options)
- "Run rct-fork.
-Rct-fork makes xmpfilter and completion MUCH FASTER because it pre-loads heavy libraries.
-When rct-fork is running, the mode-line indicates it to avoid unnecessary run.
-To kill rct-fork process, use \\[rct-fork-kill].
-"
- (interactive (list
- (read-string "rct-fork options (-e CODE -I LIBDIR -r LIB): "
- (rct-fork-default-options))))
- (rct-fork-kill)
- (rct-fork-minor-mode 1)
- (start-process-shell-command
- "rct-fork" "*rct-fork*" rct-fork-command-name options))
-
-(defun rct-fork-default-options ()
- "Default options for rct-fork by collecting requires."
- (mapconcat
- (lambda (lib) (format "-r %s" lib))
- (save-excursion
- (goto-char (point-min))
- (loop while (re-search-forward "\\ ['\"]\\([^'\"]+\\)['\"]" nil t)
- collect (match-string-no-properties 1)))
- " "))
-
-(defun rct-fork-kill ()
- "Kill rct-fork process invoked by \\[rct-fork]."
- (interactive)
- (when rct-fork-minor-mode
- (rct-fork-minor-mode -1)
- (interrupt-process "rct-fork")))
-(define-minor-mode rct-fork-minor-mode
- "This minor mode is turned on when rct-fork is run.
-It is nothing but an indicator."
- :lighter " " :global t)
-
-;;;; unit tests
-(when (and (fboundp 'expectations))
- (require 'ruby-mode)
- (require 'el-mock nil t)
- (expectations
- (desc "comment-dwim advice")
- (expect "# =>"
- (with-temp-buffer
- (ruby-mode)
- (setq last-command nil)
- (call-interactively 'comment-dwim)
- (setq last-command 'comment-dwim)
- (call-interactively 'comment-dwim)
- (buffer-string)))
- (expect (regexp "^1 +# =>")
- (with-temp-buffer
- (ruby-mode)
- (insert "1")
- (setq last-command nil)
- (call-interactively 'comment-dwim)
- (setq last-command 'comment-dwim)
- (call-interactively 'comment-dwim)
- (buffer-string)))
-
- (desc "rct-current-line")
- (expect 1
- (with-temp-buffer
- (rct-current-line)))
- (expect 1
- (with-temp-buffer
- (insert "1")
- (rct-current-line)))
- (expect 2
- (with-temp-buffer
- (insert "1\n")
- (rct-current-line)))
- (expect 2
- (with-temp-buffer
- (insert "1\n2")
- (rct-current-line)))
-
- (desc "rct-save-position")
- (expect (mock (set-window-start * 7) => nil)
- (stub window-start => 7)
- (with-temp-buffer
- (insert "abcdef\nghi")
- (rct-save-position #'ignore)))
- (expect 2
- (with-temp-buffer
- (stub window-start => 1)
- (stub set-window-start => nil)
- (insert "abcdef\nghi")
- (rct-save-position #'ignore)
- (rct-current-line)))
- (expect 3
- (with-temp-buffer
- (stub window-start => 1)
- (stub set-window-start => nil)
- (insert "abcdef\nghi")
- (rct-save-position #'ignore)
- (current-column)))
-
- (desc "rct-interactive")
- (expect '("read")
- (let ((current-prefix-arg t))
- (stub read-from-minibuffer => "read")
- (rct-interactive)))
- (expect '("-S ruby19")
- (let ((current-prefix-arg nil)
- (rct-option-local "-S ruby19"))
- (stub read-from-minibuffer => "read")
- (rct-interactive)))
- (expect '("")
- (let ((current-prefix-arg nil)
- (rct-option-local))
- (stub read-from-minibuffer => "read")
- (rct-interactive)))
-
- (desc "rct-shell-command")
- (expect "1+1 # => 2\n"
- (with-temp-buffer
- (insert "1+1 # =>\n")
- (rct-shell-command "xmpfilter")
- (buffer-string)))
-
- (desc "xmp")
-
- (desc "xmpfilter-command")
- (expect "xmpfilter --rails"
- (let ((xmpfilter-command-name "xmpfilter"))
- (with-temp-buffer
- (insert "class TestFoo < Test::Unit::TestCase\n")
- (xmpfilter-command "--rails"))))
- (expect "xmpfilter "
- (let ((xmpfilter-command-name "xmpfilter"))
- (with-temp-buffer
- (insert "context 'foo' do\n")
- (xmpfilter-command))))
- (expect "xmpfilter "
- (let ((xmpfilter-command-name "xmpfilter"))
- (with-temp-buffer
- (insert "describe Array do\n")
- (xmpfilter-command))))
- (expect "xmpfilter --unittest --rails"
- (let ((xmpfilter-command-name "xmpfilter"))
- (with-temp-buffer
- (insert "class TestFoo < Test::Unit::TestCase\n"
- " def test_0\n"
- " 1 + 1 # =>\n"
- " end\n"
- "end\n")
- (xmpfilter-command "--rails"))))
- (expect "xmpfilter --spec "
- (let ((xmpfilter-command-name "xmpfilter"))
- (with-temp-buffer
- (insert "context 'foo' do\n"
- " specify \"foo\" do\n"
- " 1 + 1 # =>\n"
- " end\n"
- "end\n")
- (xmpfilter-command))))
- (expect "xmpfilter --spec "
- (let ((xmpfilter-command-name "xmpfilter"))
- (with-temp-buffer
- (insert "describe Array do\n"
- " it \"foo\" do\n"
- " [1] + [1] # =>\n"
- " end\n"
- "end\n")
- (xmpfilter-command))))
- (expect "xmpfilter "
- (let ((xmpfilter-command-name "xmpfilter"))
- (with-temp-buffer
- (insert "1 + 2\n")
- (xmpfilter-command))))
-
- (desc "rct-fork")
- (expect t
- (stub start-process-shell-command => t)
- (stub interrupt-process => t)
- (rct-fork "-r activesupport")
- rct-fork-minor-mode)
- (expect nil
- (stub start-process-shell-command => t)
- (stub interrupt-process => t)
- (rct-fork "-r activesupport")
- (rct-fork-kill)
- rct-fork-minor-mode)
- ))
-
-(provide 'rcodetools)
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/rcodetools.elc b/bundles/ruby.tmbundle/Support/vendor/rcodetools/rcodetools.elc
deleted file mode 100644
index a5c67c0ed..000000000
Binary files a/bundles/ruby.tmbundle/Support/vendor/rcodetools/rcodetools.elc and /dev/null differ
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/rcodetools.gif b/bundles/ruby.tmbundle/Support/vendor/rcodetools/rcodetools.gif
deleted file mode 100644
index 7c35fe78d..000000000
Binary files a/bundles/ruby.tmbundle/Support/vendor/rcodetools/rcodetools.gif and /dev/null differ
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/rcodetools.sxmp b/bundles/ruby.tmbundle/Support/vendor/rcodetools/rcodetools.sxmp
deleted file mode 100644
index a81418acd..000000000
Binary files a/bundles/ruby.tmbundle/Support/vendor/rcodetools/rcodetools.sxmp and /dev/null differ
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/rcodetools.vim b/bundles/ruby.tmbundle/Support/vendor/rcodetools/rcodetools.vim
deleted file mode 100644
index 0796f007d..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/rcodetools.vim
+++ /dev/null
@@ -1,173 +0,0 @@
-" Copyright (C) 2006 Mauricio Fernandez
-" rcodetools support plugin
-"
-
-if exists("loaded_rcodetools")
- finish
-endif
-
-let loaded_rcodetools = 1
-let s:save_cpo = &cpo
-set cpo&vim
-
-"{{{ set s:sid
-
-map xx xx
-let s:sid = maparg("xx")
-unmap xx
-let s:sid = substitute(s:sid, 'xx', '', '')
-
-"{{{ function: s:spellgetoption(name, default)
-" grab a user-specified option to override the default provided. options are
-" searched in the window, buffer, then global spaces.
-function! s:GetOption(name, default)
- if exists("w:{&filetype}_" . a:name)
- execute "return w:{&filetype}_".a:name
- elseif exists("w:" . a:name)
- execute "return w:".a:name
- elseif exists("b:{&filetype}_" . a:name)
- execute "return b:{&filetype}_".a:name
- elseif exists("b:" . a:name)
- execute "return b:".a:name
- elseif exists("g:{&filetype}_" . a:name)
- execute "return g:{&filetype}_".a:name
- elseif exists("g:" . a:name)
- execute "return g:".a:name
- else
- return a:default
- endif
-endfunction
-
-"{{{ IsOptionSet
-function! s:IsOptionSet(name)
- let bogus_val = "df hdsoi3y98 hjsdfhdkj"
- return s:GetOption(a:name, bogus_val) == bogus_val ? 0 : 1
-endfunction
-
-
-"{{{ RCT_completion function
-
-let s:last_test_file = ""
-let s:last_test_lineno = 0
-
-let s:rct_completion_col = 0
-let s:rct_tmpfile = ""
-
-function! RCT_command_with_test_options(cmd)
- if s:last_test_file != ""
- return a:cmd .
- \ "-" . "-filename='" . expand("%:p") . "' " .
- \ "-t '" . s:last_test_file . "@" . s:last_test_lineno . "' "
- endif
- return a:cmd
-endfunction
-
-function! RCT_completion(findstart, base)
- if a:findstart
- let s:rct_completion_col = col('.') - 1
- let s:rct_tmpfile = "tmp-rcodetools" . strftime("Y-%m-%d-%H-%M-%S.rb")
- silent exec ":w " . s:rct_tmpfile
- return strridx(getline('.'), '.', col('.')) + 1
- else
- let line = line('.')
- let column = s:rct_completion_col
-
- let command = "rct-complete --completion-class-info --dev --fork --line=" .
- \ line . " --column=" . column . " "
- let command = RCT_command_with_test_options(command) . s:rct_tmpfile
-
- let data = split(system(command), '\n')
-
- for dline in data
- let parts = split(dline, "\t")
- let name = get(parts, 0)
- let selector = get(parts, 1)
- echo name
- echo selector
- if s:GetOption('rct_completion_use_fri', 0) && s:GetOption('rct_completion_info_max_len', 20) >= len(data)
- let fri_data = system('fri -f plain ' . "'" . selector . "'" . ' 2>/dev/null')
- call complete_add({'word': name,
- \ 'menu': get(split(fri_data), 2, ''),
- \ 'info': fri_data } )
- else
- call complete_add(name)
- endif
- if complete_check()
- break
- endif
- endfor
-
- call delete(s:rct_tmpfile)
- return []
- endif
-endfunction
-
-"{{{ ri functions
-
-function! RCT_new_ri_window()
- execute "new"
- execute "set bufhidden=delete buftype=nofile noswapfile nobuflisted"
- execute 'nmap 2u'
- execute 'nmap :call' . s:sid . 'RCT_execute_ri(expand(""))'
-endfunction
-
-function! RCT_execute_ri(query_term)
- silent %delete _
- let term = matchstr(a:query_term, '\v[^,.;]+')
- let cmd = s:GetOption("RCT_ri_cmd", "fri -f plain ")
- let text = system(cmd . "'" . term . "'")
- call append(0, split(text, "\n"))
- normal gg
-endfunction
-
-function! RCT_find_tag_or_ri(fullname)
- " rubikitch: modified for rtags-compatible tags
- let tagname = '::' . a:fullname
- let tagresults = taglist(tagname)
- if len(tagresults) != 0
- execute "tjump " . tagname
- else
- call RCT_new_ri_window()
- call RCT_execute_ri(a:fullname)
- endif
-endfunction
-
-function! RCT_smart_ri()
- let tmpfile = "tmp-rcodetools" . strftime("Y-%m-%d-%H-%M-%S.rb")
- silent exec ":w " . tmpfile
-
- let line = line('.')
- let column = col('.') - 1
- let command = "rct-doc --ri-vim --line=" . line . " --column=" . column . " "
- let command = RCT_command_with_test_options(command) . tmpfile
- "let term = matchstr(system(command), "\\v[^\n]+")
- exec system(command)
- call delete(tmpfile)
- "call RCT_find_tag_or_ri(term)
-endfunction
-
-function! RCT_ruby_toggle()
- let curr_file = expand("%:p")
- let cmd = "ruby -S ruby-toggle-file " . curr_file
- if match(curr_file, '\v_test|test_') != -1
- let s:last_test_file = curr_file
- let s:last_test_lineno = line(".")
- endif
- let dest = system(cmd)
- silent exec ":w"
- exec ("edit " . dest)
- silent! normal g;
-endfunction
-
-"{{{ bindings and au
-
-if v:version >= 700
- execute "au Filetype ruby setlocal completefunc=" . s:sid . "RCT_completion"
-endif
-execute 'au Filetype ruby nmap :exec "call ' .
- \ 'RCT_find_tag_or_ri(''" . expand("") . "'')"'
-execute 'au Filetype ruby nmap ' . s:GetOption("RCT_ri_binding", "r") .
- \ ' :call ' . s:sid . 'RCT_smart_ri()'
-execute 'au Filetype ruby nmap ' . s:GetOption("RCT_toggle_binding", "t") .
- \ ' :call ' . s:sid . 'RCT_ruby_toggle()'
-let &cpo = s:save_cpo
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/setup.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/setup.rb
deleted file mode 100644
index 424a5f37c..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/setup.rb
+++ /dev/null
@@ -1,1585 +0,0 @@
-#
-# setup.rb
-#
-# Copyright (c) 2000-2005 Minero Aoki
-#
-# This program is free software.
-# You can distribute/modify this program under the terms of
-# the GNU LGPL, Lesser General Public License version 2.1.
-#
-
-unless Enumerable.method_defined?(:map) # Ruby 1.4.6
- module Enumerable
- alias map collect
- end
-end
-
-unless File.respond_to?(:read) # Ruby 1.6
- def File.read(fname)
- open(fname) {|f|
- return f.read
- }
- end
-end
-
-unless Errno.const_defined?(:ENOTEMPTY) # Windows?
- module Errno
- class ENOTEMPTY
- # We do not raise this exception, implementation is not needed.
- end
- end
-end
-
-def File.binread(fname)
- open(fname, 'rb') {|f|
- return f.read
- }
-end
-
-# for corrupted Windows' stat(2)
-def File.dir?(path)
- File.directory?((path[-1,1] == '/') ? path : path + '/')
-end
-
-
-class ConfigTable
-
- include Enumerable
-
- def initialize(rbconfig)
- @rbconfig = rbconfig
- @items = []
- @table = {}
- # options
- @install_prefix = nil
- @config_opt = nil
- @verbose = true
- @no_harm = false
- end
-
- attr_accessor :install_prefix
- attr_accessor :config_opt
-
- attr_writer :verbose
-
- def verbose?
- @verbose
- end
-
- attr_writer :no_harm
-
- def no_harm?
- @no_harm
- end
-
- def [](key)
- lookup(key).resolve(self)
- end
-
- def []=(key, val)
- lookup(key).set val
- end
-
- def names
- @items.map {|i| i.name }
- end
-
- def each(&block)
- @items.each(&block)
- end
-
- def key?(name)
- @table.key?(name)
- end
-
- def lookup(name)
- @table[name] or setup_rb_error "no such config item: #{name}"
- end
-
- def add(item)
- @items.push item
- @table[item.name] = item
- end
-
- def remove(name)
- item = lookup(name)
- @items.delete_if {|i| i.name == name }
- @table.delete_if {|name, i| i.name == name }
- item
- end
-
- def load_script(path, inst = nil)
- if File.file?(path)
- MetaConfigEnvironment.new(self, inst).instance_eval File.read(path), path
- end
- end
-
- def savefile
- '.config'
- end
-
- def load_savefile
- begin
- File.foreach(savefile()) do |line|
- k, v = *line.split(/=/, 2)
- self[k] = v.strip
- end
- rescue Errno::ENOENT
- setup_rb_error $!.message + "\n#{File.basename($0)} config first"
- end
- end
-
- def save
- @items.each {|i| i.value }
- File.open(savefile(), 'w') {|f|
- @items.each do |i|
- f.printf "%s=%s\n", i.name, i.value if i.value? and i.value
- end
- }
- end
-
- def load_standard_entries
- standard_entries(@rbconfig).each do |ent|
- add ent
- end
- end
-
- def standard_entries(rbconfig)
- c = rbconfig
-
- rubypath = File.join(c['bindir'], c['ruby_install_name'] + c['EXEEXT'])
-
- major = c['MAJOR'].to_i
- minor = c['MINOR'].to_i
- teeny = c['TEENY'].to_i
- version = "#{major}.#{minor}"
-
- # ruby ver. >= 1.4.4?
- newpath_p = ((major >= 2) or
- ((major == 1) and
- ((minor >= 5) or
- ((minor == 4) and (teeny >= 4)))))
-
- if c['rubylibdir']
- # V > 1.6.3
- libruby = "#{c['prefix']}/lib/ruby"
- librubyver = c['rubylibdir']
- librubyverarch = c['archdir']
- siteruby = c['sitedir']
- siterubyver = c['sitelibdir']
- siterubyverarch = c['sitearchdir']
- elsif newpath_p
- # 1.4.4 <= V <= 1.6.3
- libruby = "#{c['prefix']}/lib/ruby"
- librubyver = "#{c['prefix']}/lib/ruby/#{version}"
- librubyverarch = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}"
- siteruby = c['sitedir']
- siterubyver = "$siteruby/#{version}"
- siterubyverarch = "$siterubyver/#{c['arch']}"
- else
- # V < 1.4.4
- libruby = "#{c['prefix']}/lib/ruby"
- librubyver = "#{c['prefix']}/lib/ruby/#{version}"
- librubyverarch = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}"
- siteruby = "#{c['prefix']}/lib/ruby/#{version}/site_ruby"
- siterubyver = siteruby
- siterubyverarch = "$siterubyver/#{c['arch']}"
- end
- parameterize = lambda {|path|
- path.sub(/\A#{Regexp.quote(c['prefix'])}/, '$prefix')
- }
-
- if arg = c['configure_args'].split.detect {|arg| /--with-make-prog=/ =~ arg }
- makeprog = arg.sub(/'/, '').split(/=/, 2)[1]
- else
- makeprog = 'make'
- end
-
- [
- ExecItem.new('installdirs', 'std/site/home',
- 'std: install under libruby; site: install under site_ruby; home: install under $HOME')\
- {|val, table|
- case val
- when 'std'
- table['rbdir'] = '$librubyver'
- table['sodir'] = '$librubyverarch'
- when 'site'
- table['rbdir'] = '$siterubyver'
- table['sodir'] = '$siterubyverarch'
- when 'home'
- setup_rb_error '$HOME was not set' unless ENV['HOME']
- table['prefix'] = ENV['HOME']
- table['rbdir'] = '$libdir/ruby'
- table['sodir'] = '$libdir/ruby'
- end
- },
- PathItem.new('prefix', 'path', c['prefix'],
- 'path prefix of target environment'),
- PathItem.new('bindir', 'path', parameterize.call(c['bindir']),
- 'the directory for commands'),
- PathItem.new('libdir', 'path', parameterize.call(c['libdir']),
- 'the directory for libraries'),
- PathItem.new('datadir', 'path', parameterize.call(c['datadir']),
- 'the directory for shared data'),
- PathItem.new('mandir', 'path', parameterize.call(c['mandir']),
- 'the directory for man pages'),
- PathItem.new('sysconfdir', 'path', parameterize.call(c['sysconfdir']),
- 'the directory for system configuration files'),
- PathItem.new('localstatedir', 'path', parameterize.call(c['localstatedir']),
- 'the directory for local state data'),
- PathItem.new('libruby', 'path', libruby,
- 'the directory for ruby libraries'),
- PathItem.new('librubyver', 'path', librubyver,
- 'the directory for standard ruby libraries'),
- PathItem.new('librubyverarch', 'path', librubyverarch,
- 'the directory for standard ruby extensions'),
- PathItem.new('siteruby', 'path', siteruby,
- 'the directory for version-independent aux ruby libraries'),
- PathItem.new('siterubyver', 'path', siterubyver,
- 'the directory for aux ruby libraries'),
- PathItem.new('siterubyverarch', 'path', siterubyverarch,
- 'the directory for aux ruby binaries'),
- PathItem.new('rbdir', 'path', '$siterubyver',
- 'the directory for ruby scripts'),
- PathItem.new('sodir', 'path', '$siterubyverarch',
- 'the directory for ruby extentions'),
- PathItem.new('rubypath', 'path', rubypath,
- 'the path to set to #! line'),
- ProgramItem.new('rubyprog', 'name', rubypath,
- 'the ruby program using for installation'),
- ProgramItem.new('makeprog', 'name', makeprog,
- 'the make program to compile ruby extentions'),
- SelectItem.new('shebang', 'all/ruby/never', 'ruby',
- 'shebang line (#!) editing mode'),
- BoolItem.new('without-ext', 'yes/no', 'no',
- 'does not compile/install ruby extentions')
- ]
- end
- private :standard_entries
-
- def load_multipackage_entries
- multipackage_entries().each do |ent|
- add ent
- end
- end
-
- def multipackage_entries
- [
- PackageSelectionItem.new('with', 'name,name...', '', 'ALL',
- 'package names that you want to install'),
- PackageSelectionItem.new('without', 'name,name...', '', 'NONE',
- 'package names that you do not want to install')
- ]
- end
- private :multipackage_entries
-
- ALIASES = {
- 'std-ruby' => 'librubyver',
- 'stdruby' => 'librubyver',
- 'rubylibdir' => 'librubyver',
- 'archdir' => 'librubyverarch',
- 'site-ruby-common' => 'siteruby', # For backward compatibility
- 'site-ruby' => 'siterubyver', # For backward compatibility
- 'bin-dir' => 'bindir',
- 'bin-dir' => 'bindir',
- 'rb-dir' => 'rbdir',
- 'so-dir' => 'sodir',
- 'data-dir' => 'datadir',
- 'ruby-path' => 'rubypath',
- 'ruby-prog' => 'rubyprog',
- 'ruby' => 'rubyprog',
- 'make-prog' => 'makeprog',
- 'make' => 'makeprog'
- }
-
- def fixup
- ALIASES.each do |ali, name|
- @table[ali] = @table[name]
- end
- @items.freeze
- @table.freeze
- @options_re = /\A--(#{@table.keys.join('|')})(?:=(.*))?\z/
- end
-
- def parse_opt(opt)
- m = @options_re.match(opt) or setup_rb_error "config: unknown option #{opt}"
- m.to_a[1,2]
- end
-
- def dllext
- @rbconfig['DLEXT']
- end
-
- def value_config?(name)
- lookup(name).value?
- end
-
- class Item
- def initialize(name, template, default, desc)
- @name = name.freeze
- @template = template
- @value = default
- @default = default
- @description = desc
- end
-
- attr_reader :name
- attr_reader :description
-
- attr_accessor :default
- alias help_default default
-
- def help_opt
- "--#{@name}=#{@template}"
- end
-
- def value?
- true
- end
-
- def value
- @value
- end
-
- def resolve(table)
- @value.gsub(%r<\$([^/]+)>) { table[$1] }
- end
-
- def set(val)
- @value = check(val)
- end
-
- private
-
- def check(val)
- setup_rb_error "config: --#{name} requires argument" unless val
- val
- end
- end
-
- class BoolItem < Item
- def config_type
- 'bool'
- end
-
- def help_opt
- "--#{@name}"
- end
-
- private
-
- def check(val)
- return 'yes' unless val
- case val
- when /\Ay(es)?\z/i, /\At(rue)?\z/i then 'yes'
- when /\An(o)?\z/i, /\Af(alse)\z/i then 'no'
- else
- setup_rb_error "config: --#{@name} accepts only yes/no for argument"
- end
- end
- end
-
- class PathItem < Item
- def config_type
- 'path'
- end
-
- private
-
- def check(path)
- setup_rb_error "config: --#{@name} requires argument" unless path
- path[0,1] == '$' ? path : File.expand_path(path)
- end
- end
-
- class ProgramItem < Item
- def config_type
- 'program'
- end
- end
-
- class SelectItem < Item
- def initialize(name, selection, default, desc)
- super
- @ok = selection.split('/')
- end
-
- def config_type
- 'select'
- end
-
- private
-
- def check(val)
- unless @ok.include?(val.strip)
- setup_rb_error "config: use --#{@name}=#{@template} (#{val})"
- end
- val.strip
- end
- end
-
- class ExecItem < Item
- def initialize(name, selection, desc, &block)
- super name, selection, nil, desc
- @ok = selection.split('/')
- @action = block
- end
-
- def config_type
- 'exec'
- end
-
- def value?
- false
- end
-
- def resolve(table)
- setup_rb_error "$#{name()} wrongly used as option value"
- end
-
- undef set
-
- def evaluate(val, table)
- v = val.strip.downcase
- unless @ok.include?(v)
- setup_rb_error "invalid option --#{@name}=#{val} (use #{@template})"
- end
- @action.call v, table
- end
- end
-
- class PackageSelectionItem < Item
- def initialize(name, template, default, help_default, desc)
- super name, template, default, desc
- @help_default = help_default
- end
-
- attr_reader :help_default
-
- def config_type
- 'package'
- end
-
- private
-
- def check(val)
- unless File.dir?("packages/#{val}")
- setup_rb_error "config: no such package: #{val}"
- end
- val
- end
- end
-
- class MetaConfigEnvironment
- def initialize(config, installer)
- @config = config
- @installer = installer
- end
-
- def config_names
- @config.names
- end
-
- def config?(name)
- @config.key?(name)
- end
-
- def bool_config?(name)
- @config.lookup(name).config_type == 'bool'
- end
-
- def path_config?(name)
- @config.lookup(name).config_type == 'path'
- end
-
- def value_config?(name)
- @config.lookup(name).config_type != 'exec'
- end
-
- def add_config(item)
- @config.add item
- end
-
- def add_bool_config(name, default, desc)
- @config.add BoolItem.new(name, 'yes/no', default ? 'yes' : 'no', desc)
- end
-
- def add_path_config(name, default, desc)
- @config.add PathItem.new(name, 'path', default, desc)
- end
-
- def set_config_default(name, default)
- @config.lookup(name).default = default
- end
-
- def remove_config(name)
- @config.remove(name)
- end
-
- # For only multipackage
- def packages
- raise '[setup.rb fatal] multi-package metaconfig API packages() called for single-package; contact application package vendor' unless @installer
- @installer.packages
- end
-
- # For only multipackage
- def declare_packages(list)
- raise '[setup.rb fatal] multi-package metaconfig API declare_packages() called for single-package; contact application package vendor' unless @installer
- @installer.packages = list
- end
- end
-
-end # class ConfigTable
-
-
-# This module requires: #verbose?, #no_harm?
-module FileOperations
-
- def mkdir_p(dirname, prefix = nil)
- dirname = prefix + File.expand_path(dirname) if prefix
- $stderr.puts "mkdir -p #{dirname}" if verbose?
- return if no_harm?
-
- # Does not check '/', it's too abnormal.
- dirs = File.expand_path(dirname).split(%r<(?=/)>)
- if /\A[a-z]:\z/i =~ dirs[0]
- disk = dirs.shift
- dirs[0] = disk + dirs[0]
- end
- dirs.each_index do |idx|
- path = dirs[0..idx].join('')
- Dir.mkdir path unless File.dir?(path)
- end
- end
-
- def rm_f(path)
- $stderr.puts "rm -f #{path}" if verbose?
- return if no_harm?
- force_remove_file path
- end
-
- def rm_rf(path)
- $stderr.puts "rm -rf #{path}" if verbose?
- return if no_harm?
- remove_tree path
- end
-
- def remove_tree(path)
- if File.symlink?(path)
- remove_file path
- elsif File.dir?(path)
- remove_tree0 path
- else
- force_remove_file path
- end
- end
-
- def remove_tree0(path)
- Dir.foreach(path) do |ent|
- next if ent == '.'
- next if ent == '..'
- entpath = "#{path}/#{ent}"
- if File.symlink?(entpath)
- remove_file entpath
- elsif File.dir?(entpath)
- remove_tree0 entpath
- else
- force_remove_file entpath
- end
- end
- begin
- Dir.rmdir path
- rescue Errno::ENOTEMPTY
- # directory may not be empty
- end
- end
-
- def move_file(src, dest)
- force_remove_file dest
- begin
- File.rename src, dest
- rescue
- File.open(dest, 'wb') {|f|
- f.write File.binread(src)
- }
- File.chmod File.stat(src).mode, dest
- File.unlink src
- end
- end
-
- def force_remove_file(path)
- begin
- remove_file path
- rescue
- end
- end
-
- def remove_file(path)
- File.chmod 0777, path
- File.unlink path
- end
-
- def install(from, dest, mode, prefix = nil)
- $stderr.puts "install #{from} #{dest}" if verbose?
- return if no_harm?
-
- realdest = prefix ? prefix + File.expand_path(dest) : dest
- realdest = File.join(realdest, File.basename(from)) if File.dir?(realdest)
- str = File.binread(from)
- if diff?(str, realdest)
- verbose_off {
- rm_f realdest if File.exist?(realdest)
- }
- File.open(realdest, 'wb') {|f|
- f.write str
- }
- File.chmod mode, realdest
-
- File.open("#{objdir_root()}/InstalledFiles", 'a') {|f|
- if prefix
- f.puts realdest.sub(prefix, '')
- else
- f.puts realdest
- end
- }
- end
- end
-
- def diff?(new_content, path)
- return true unless File.exist?(path)
- new_content != File.binread(path)
- end
-
- def command(*args)
- $stderr.puts args.join(' ') if verbose?
- system(*args) or raise RuntimeError,
- "system(#{args.map{|a| a.inspect }.join(' ')}) failed"
- end
-
- def ruby(*args)
- command config('rubyprog'), *args
- end
-
- def make(task = nil)
- command(*[config('makeprog'), task].compact)
- end
-
- def extdir?(dir)
- File.exist?("#{dir}/MANIFEST") or File.exist?("#{dir}/extconf.rb")
- end
-
- def files_of(dir)
- Dir.open(dir) {|d|
- return d.select {|ent| File.file?("#{dir}/#{ent}") }
- }
- end
-
- DIR_REJECT = %w( . .. CVS SCCS RCS CVS.adm .svn )
-
- def directories_of(dir)
- Dir.open(dir) {|d|
- return d.select {|ent| File.dir?("#{dir}/#{ent}") } - DIR_REJECT
- }
- end
-
-end
-
-
-# This module requires: #srcdir_root, #objdir_root, #relpath
-module HookScriptAPI
-
- def get_config(key)
- @config[key]
- end
-
- alias config get_config
-
- # obsolete: use metaconfig to change configuration
- def set_config(key, val)
- @config[key] = val
- end
-
- #
- # srcdir/objdir (works only in the package directory)
- #
-
- def curr_srcdir
- "#{srcdir_root()}/#{relpath()}"
- end
-
- def curr_objdir
- "#{objdir_root()}/#{relpath()}"
- end
-
- def srcfile(path)
- "#{curr_srcdir()}/#{path}"
- end
-
- def srcexist?(path)
- File.exist?(srcfile(path))
- end
-
- def srcdirectory?(path)
- File.dir?(srcfile(path))
- end
-
- def srcfile?(path)
- File.file?(srcfile(path))
- end
-
- def srcentries(path = '.')
- Dir.open("#{curr_srcdir()}/#{path}") {|d|
- return d.to_a - %w(. ..)
- }
- end
-
- def srcfiles(path = '.')
- srcentries(path).select {|fname|
- File.file?(File.join(curr_srcdir(), path, fname))
- }
- end
-
- def srcdirectories(path = '.')
- srcentries(path).select {|fname|
- File.dir?(File.join(curr_srcdir(), path, fname))
- }
- end
-
-end
-
-
-class ToplevelInstaller
-
- Version = '3.4.1'
- Copyright = 'Copyright (c) 2000-2005 Minero Aoki'
-
- TASKS = [
- [ 'all', 'do config, setup, then install' ],
- [ 'config', 'saves your configurations' ],
- [ 'show', 'shows current configuration' ],
- [ 'setup', 'compiles ruby extentions and others' ],
- [ 'install', 'installs files' ],
- [ 'test', 'run all tests in test/' ],
- [ 'clean', "does `make clean' for each extention" ],
- [ 'distclean',"does `make distclean' for each extention" ]
- ]
-
- def ToplevelInstaller.invoke
- config = ConfigTable.new(load_rbconfig())
- config.load_standard_entries
- config.load_multipackage_entries if multipackage?
- config.fixup
- klass = (multipackage?() ? ToplevelInstallerMulti : ToplevelInstaller)
- klass.new(File.dirname($0), config).invoke
- end
-
- def ToplevelInstaller.multipackage?
- File.dir?(File.dirname($0) + '/packages')
- end
-
- def ToplevelInstaller.load_rbconfig
- if arg = ARGV.detect {|arg| /\A--rbconfig=/ =~ arg }
- ARGV.delete(arg)
- load File.expand_path(arg.split(/=/, 2)[1])
- $".push 'rbconfig.rb'
- else
- require 'rbconfig'
- end
- ::Config::CONFIG
- end
-
- def initialize(ardir_root, config)
- @ardir = File.expand_path(ardir_root)
- @config = config
- # cache
- @valid_task_re = nil
- end
-
- def config(key)
- @config[key]
- end
-
- def inspect
- "#<#{self.class} #{__id__()}>"
- end
-
- def invoke
- run_metaconfigs
- case task = parsearg_global()
- when nil, 'all'
- parsearg_config
- init_installers
- exec_config
- exec_setup
- exec_install
- else
- case task
- when 'config', 'test'
- ;
- when 'clean', 'distclean'
- @config.load_savefile if File.exist?(@config.savefile)
- else
- @config.load_savefile
- end
- __send__ "parsearg_#{task}"
- init_installers
- __send__ "exec_#{task}"
- end
- end
-
- def run_metaconfigs
- @config.load_script "#{@ardir}/metaconfig"
- end
-
- def init_installers
- @installer = Installer.new(@config, @ardir, File.expand_path('.'))
- end
-
- #
- # Hook Script API bases
- #
-
- def srcdir_root
- @ardir
- end
-
- def objdir_root
- '.'
- end
-
- def relpath
- '.'
- end
-
- #
- # Option Parsing
- #
-
- def parsearg_global
- while arg = ARGV.shift
- case arg
- when /\A\w+\z/
- setup_rb_error "invalid task: #{arg}" unless valid_task?(arg)
- return arg
- when '-q', '--quiet'
- @config.verbose = false
- when '--verbose'
- @config.verbose = true
- when '--help'
- print_usage $stdout
- exit 0
- when '--version'
- puts "#{File.basename($0)} version #{Version}"
- exit 0
- when '--copyright'
- puts Copyright
- exit 0
- else
- setup_rb_error "unknown global option '#{arg}'"
- end
- end
- nil
- end
-
- def valid_task?(t)
- valid_task_re() =~ t
- end
-
- def valid_task_re
- @valid_task_re ||= /\A(?:#{TASKS.map {|task,desc| task }.join('|')})\z/
- end
-
- def parsearg_no_options
- unless ARGV.empty?
- task = caller(0).first.slice(%r<`parsearg_(\w+)'>, 1)
- setup_rb_error "#{task}: unknown options: #{ARGV.join(' ')}"
- end
- end
-
- alias parsearg_show parsearg_no_options
- alias parsearg_setup parsearg_no_options
- alias parsearg_test parsearg_no_options
- alias parsearg_clean parsearg_no_options
- alias parsearg_distclean parsearg_no_options
-
- def parsearg_config
- evalopt = []
- set = []
- @config.config_opt = []
- while i = ARGV.shift
- if /\A--?\z/ =~ i
- @config.config_opt = ARGV.dup
- break
- end
- name, value = *@config.parse_opt(i)
- if @config.value_config?(name)
- @config[name] = value
- else
- evalopt.push [name, value]
- end
- set.push name
- end
- evalopt.each do |name, value|
- @config.lookup(name).evaluate value, @config
- end
- # Check if configuration is valid
- set.each do |n|
- @config[n] if @config.value_config?(n)
- end
- end
-
- def parsearg_install
- @config.no_harm = false
- @config.install_prefix = ''
- while a = ARGV.shift
- case a
- when '--no-harm'
- @config.no_harm = true
- when /\A--prefix=/
- path = a.split(/=/, 2)[1]
- path = File.expand_path(path) unless path[0,1] == '/'
- @config.install_prefix = path
- else
- setup_rb_error "install: unknown option #{a}"
- end
- end
- end
-
- def print_usage(out)
- out.puts 'Typical Installation Procedure:'
- out.puts " $ ruby #{File.basename $0} config"
- out.puts " $ ruby #{File.basename $0} setup"
- out.puts " # ruby #{File.basename $0} install (may require root privilege)"
- out.puts
- out.puts 'Detailed Usage:'
- out.puts " ruby #{File.basename $0} "
- out.puts " ruby #{File.basename $0} [] []"
-
- fmt = " %-24s %s\n"
- out.puts
- out.puts 'Global options:'
- out.printf fmt, '-q,--quiet', 'suppress message outputs'
- out.printf fmt, ' --verbose', 'output messages verbosely'
- out.printf fmt, ' --help', 'print this message'
- out.printf fmt, ' --version', 'print version and quit'
- out.printf fmt, ' --copyright', 'print copyright and quit'
- out.puts
- out.puts 'Tasks:'
- TASKS.each do |name, desc|
- out.printf fmt, name, desc
- end
-
- fmt = " %-24s %s [%s]\n"
- out.puts
- out.puts 'Options for CONFIG or ALL:'
- @config.each do |item|
- out.printf fmt, item.help_opt, item.description, item.help_default
- end
- out.printf fmt, '--rbconfig=path', 'rbconfig.rb to load',"running ruby's"
- out.puts
- out.puts 'Options for INSTALL:'
- out.printf fmt, '--no-harm', 'only display what to do if given', 'off'
- out.printf fmt, '--prefix=path', 'install path prefix', ''
- out.puts
- end
-
- #
- # Task Handlers
- #
-
- def exec_config
- @installer.exec_config
- @config.save # must be final
- end
-
- def exec_setup
- @installer.exec_setup
- end
-
- def exec_install
- @installer.exec_install
- end
-
- def exec_test
- @installer.exec_test
- end
-
- def exec_show
- @config.each do |i|
- printf "%-20s %s\n", i.name, i.value if i.value?
- end
- end
-
- def exec_clean
- @installer.exec_clean
- end
-
- def exec_distclean
- @installer.exec_distclean
- end
-
-end # class ToplevelInstaller
-
-
-class ToplevelInstallerMulti < ToplevelInstaller
-
- include FileOperations
-
- def initialize(ardir_root, config)
- super
- @packages = directories_of("#{@ardir}/packages")
- raise 'no package exists' if @packages.empty?
- @root_installer = Installer.new(@config, @ardir, File.expand_path('.'))
- end
-
- def run_metaconfigs
- @config.load_script "#{@ardir}/metaconfig", self
- @packages.each do |name|
- @config.load_script "#{@ardir}/packages/#{name}/metaconfig"
- end
- end
-
- attr_reader :packages
-
- def packages=(list)
- raise 'package list is empty' if list.empty?
- list.each do |name|
- raise "directory packages/#{name} does not exist"\
- unless File.dir?("#{@ardir}/packages/#{name}")
- end
- @packages = list
- end
-
- def init_installers
- @installers = {}
- @packages.each do |pack|
- @installers[pack] = Installer.new(@config,
- "#{@ardir}/packages/#{pack}",
- "packages/#{pack}")
- end
- with = extract_selection(config('with'))
- without = extract_selection(config('without'))
- @selected = @installers.keys.select {|name|
- (with.empty? or with.include?(name)) \
- and not without.include?(name)
- }
- end
-
- def extract_selection(list)
- a = list.split(/,/)
- a.each do |name|
- setup_rb_error "no such package: #{name}" unless @installers.key?(name)
- end
- a
- end
-
- def print_usage(f)
- super
- f.puts 'Inluded packages:'
- f.puts ' ' + @packages.sort.join(' ')
- f.puts
- end
-
- #
- # Task Handlers
- #
-
- def exec_config
- run_hook 'pre-config'
- each_selected_installers {|inst| inst.exec_config }
- run_hook 'post-config'
- @config.save # must be final
- end
-
- def exec_setup
- run_hook 'pre-setup'
- each_selected_installers {|inst| inst.exec_setup }
- run_hook 'post-setup'
- end
-
- def exec_install
- run_hook 'pre-install'
- each_selected_installers {|inst| inst.exec_install }
- run_hook 'post-install'
- end
-
- def exec_test
- run_hook 'pre-test'
- each_selected_installers {|inst| inst.exec_test }
- run_hook 'post-test'
- end
-
- def exec_clean
- rm_f @config.savefile
- run_hook 'pre-clean'
- each_selected_installers {|inst| inst.exec_clean }
- run_hook 'post-clean'
- end
-
- def exec_distclean
- rm_f @config.savefile
- run_hook 'pre-distclean'
- each_selected_installers {|inst| inst.exec_distclean }
- run_hook 'post-distclean'
- end
-
- #
- # lib
- #
-
- def each_selected_installers
- Dir.mkdir 'packages' unless File.dir?('packages')
- @selected.each do |pack|
- $stderr.puts "Processing the package `#{pack}' ..." if verbose?
- Dir.mkdir "packages/#{pack}" unless File.dir?("packages/#{pack}")
- Dir.chdir "packages/#{pack}"
- yield @installers[pack]
- Dir.chdir '../..'
- end
- end
-
- def run_hook(id)
- @root_installer.run_hook id
- end
-
- # module FileOperations requires this
- def verbose?
- @config.verbose?
- end
-
- # module FileOperations requires this
- def no_harm?
- @config.no_harm?
- end
-
-end # class ToplevelInstallerMulti
-
-
-class Installer
-
- FILETYPES = %w( bin lib ext data conf man )
-
- include FileOperations
- include HookScriptAPI
-
- def initialize(config, srcroot, objroot)
- @config = config
- @srcdir = File.expand_path(srcroot)
- @objdir = File.expand_path(objroot)
- @currdir = '.'
- end
-
- def inspect
- "#<#{self.class} #{File.basename(@srcdir)}>"
- end
-
- def noop(rel)
- end
-
- #
- # Hook Script API base methods
- #
-
- def srcdir_root
- @srcdir
- end
-
- def objdir_root
- @objdir
- end
-
- def relpath
- @currdir
- end
-
- #
- # Config Access
- #
-
- # module FileOperations requires this
- def verbose?
- @config.verbose?
- end
-
- # module FileOperations requires this
- def no_harm?
- @config.no_harm?
- end
-
- def verbose_off
- begin
- save, @config.verbose = @config.verbose?, false
- yield
- ensure
- @config.verbose = save
- end
- end
-
- #
- # TASK config
- #
-
- def exec_config
- exec_task_traverse 'config'
- end
-
- alias config_dir_bin noop
- alias config_dir_lib noop
-
- def config_dir_ext(rel)
- extconf if extdir?(curr_srcdir())
- end
-
- alias config_dir_data noop
- alias config_dir_conf noop
- alias config_dir_man noop
-
- def extconf
- ruby "#{curr_srcdir()}/extconf.rb", *@config.config_opt
- end
-
- #
- # TASK setup
- #
-
- def exec_setup
- exec_task_traverse 'setup'
- end
-
- def setup_dir_bin(rel)
- files_of(curr_srcdir()).each do |fname|
- update_shebang_line "#{curr_srcdir()}/#{fname}"
- end
- end
-
- alias setup_dir_lib noop
-
- def setup_dir_ext(rel)
- make if extdir?(curr_srcdir())
- end
-
- alias setup_dir_data noop
- alias setup_dir_conf noop
- alias setup_dir_man noop
-
- def update_shebang_line(path)
- return if no_harm?
- return if config('shebang') == 'never'
- old = Shebang.load(path)
- if old
- $stderr.puts "warning: #{path}: Shebang line includes too many args. It is not portable and your program may not work." if old.args.size > 1
- new = new_shebang(old)
- return if new.to_s == old.to_s
- else
- return unless config('shebang') == 'all'
- new = Shebang.new(config('rubypath'))
- end
- $stderr.puts "updating shebang: #{File.basename(path)}" if verbose?
- open_atomic_writer(path) {|output|
- File.open(path, 'rb') {|f|
- f.gets if old # discard
- output.puts new.to_s
- output.print f.read
- }
- }
- end
-
- def new_shebang(old)
- if /\Aruby/ =~ File.basename(old.cmd)
- Shebang.new(config('rubypath'), old.args)
- elsif File.basename(old.cmd) == 'env' and old.args.first == 'ruby'
- Shebang.new(config('rubypath'), old.args[1..-1])
- else
- return old unless config('shebang') == 'all'
- Shebang.new(config('rubypath'))
- end
- end
-
- def open_atomic_writer(path, &block)
- tmpfile = File.basename(path) + '.tmp'
- begin
- File.open(tmpfile, 'wb', &block)
- File.rename tmpfile, File.basename(path)
- ensure
- File.unlink tmpfile if File.exist?(tmpfile)
- end
- end
-
- class Shebang
- def Shebang.load(path)
- line = nil
- File.open(path) {|f|
- line = f.gets
- }
- return nil unless /\A#!/ =~ line
- parse(line)
- end
-
- def Shebang.parse(line)
- cmd, *args = *line.strip.sub(/\A\#!/, '').split(' ')
- new(cmd, args)
- end
-
- def initialize(cmd, args = [])
- @cmd = cmd
- @args = args
- end
-
- attr_reader :cmd
- attr_reader :args
-
- def to_s
- "#! #{@cmd}" + (@args.empty? ? '' : " #{@args.join(' ')}")
- end
- end
-
- #
- # TASK install
- #
-
- def exec_install
- rm_f 'InstalledFiles'
- exec_task_traverse 'install'
- end
-
- def install_dir_bin(rel)
- install_files targetfiles(), "#{config('bindir')}/#{rel}", 0755
- end
-
- def install_dir_lib(rel)
- install_files libfiles(), "#{config('rbdir')}/#{rel}", 0644
- end
-
- def install_dir_ext(rel)
- return unless extdir?(curr_srcdir())
- install_files rubyextentions('.'),
- "#{config('sodir')}/#{File.dirname(rel)}",
- 0555
- end
-
- def install_dir_data(rel)
- install_files targetfiles(), "#{config('datadir')}/#{rel}", 0644
- end
-
- def install_dir_conf(rel)
- # FIXME: should not remove current config files
- # (rename previous file to .old/.org)
- install_files targetfiles(), "#{config('sysconfdir')}/#{rel}", 0644
- end
-
- def install_dir_man(rel)
- install_files targetfiles(), "#{config('mandir')}/#{rel}", 0644
- end
-
- def install_files(list, dest, mode)
- mkdir_p dest, @config.install_prefix
- list.each do |fname|
- install fname, dest, mode, @config.install_prefix
- end
- end
-
- def libfiles
- glob_reject(%w(*.y *.output), targetfiles())
- end
-
- def rubyextentions(dir)
- ents = glob_select("*.#{@config.dllext}", targetfiles())
- if ents.empty?
- setup_rb_error "no ruby extention exists: 'ruby #{$0} setup' first"
- end
- ents
- end
-
- def targetfiles
- mapdir(existfiles() - hookfiles())
- end
-
- def mapdir(ents)
- ents.map {|ent|
- if File.exist?(ent)
- then ent # objdir
- else "#{curr_srcdir()}/#{ent}" # srcdir
- end
- }
- end
-
- # picked up many entries from cvs-1.11.1/src/ignore.c
- JUNK_FILES = %w(
- core RCSLOG tags TAGS .make.state
- .nse_depinfo #* .#* cvslog.* ,* .del-* *.olb
- *~ *.old *.bak *.BAK *.orig *.rej _$* *$
-
- *.org *.in .*
- )
-
- def existfiles
- glob_reject(JUNK_FILES, (files_of(curr_srcdir()) | files_of('.')))
- end
-
- def hookfiles
- %w( pre-%s post-%s pre-%s.rb post-%s.rb ).map {|fmt|
- %w( config setup install clean ).map {|t| sprintf(fmt, t) }
- }.flatten
- end
-
- def glob_select(pat, ents)
- re = globs2re([pat])
- ents.select {|ent| re =~ ent }
- end
-
- def glob_reject(pats, ents)
- re = globs2re(pats)
- ents.reject {|ent| re =~ ent }
- end
-
- GLOB2REGEX = {
- '.' => '\.',
- '$' => '\$',
- '#' => '\#',
- '*' => '.*'
- }
-
- def globs2re(pats)
- /\A(?:#{
- pats.map {|pat| pat.gsub(/[\.\$\#\*]/) {|ch| GLOB2REGEX[ch] } }.join('|')
- })\z/
- end
-
- #
- # TASK test
- #
-
- TESTDIR = 'test'
-
- def exec_test
- unless File.directory?('test')
- $stderr.puts 'no test in this package' if verbose?
- return
- end
- $stderr.puts 'Running tests...' if verbose?
- begin
- require 'test/unit'
- rescue LoadError
- setup_rb_error 'test/unit cannot loaded. You need Ruby 1.8 or later to invoke this task.'
- end
- runner = Test::Unit::AutoRunner.new(true)
- runner.to_run << TESTDIR
- runner.run
- end
-
- #
- # TASK clean
- #
-
- def exec_clean
- exec_task_traverse 'clean'
- rm_f @config.savefile
- rm_f 'InstalledFiles'
- end
-
- alias clean_dir_bin noop
- alias clean_dir_lib noop
- alias clean_dir_data noop
- alias clean_dir_conf noop
- alias clean_dir_man noop
-
- def clean_dir_ext(rel)
- return unless extdir?(curr_srcdir())
- make 'clean' if File.file?('Makefile')
- end
-
- #
- # TASK distclean
- #
-
- def exec_distclean
- exec_task_traverse 'distclean'
- rm_f @config.savefile
- rm_f 'InstalledFiles'
- end
-
- alias distclean_dir_bin noop
- alias distclean_dir_lib noop
-
- def distclean_dir_ext(rel)
- return unless extdir?(curr_srcdir())
- make 'distclean' if File.file?('Makefile')
- end
-
- alias distclean_dir_data noop
- alias distclean_dir_conf noop
- alias distclean_dir_man noop
-
- #
- # Traversing
- #
-
- def exec_task_traverse(task)
- run_hook "pre-#{task}"
- FILETYPES.each do |type|
- if type == 'ext' and config('without-ext') == 'yes'
- $stderr.puts 'skipping ext/* by user option' if verbose?
- next
- end
- traverse task, type, "#{task}_dir_#{type}"
- end
- run_hook "post-#{task}"
- end
-
- def traverse(task, rel, mid)
- dive_into(rel) {
- run_hook "pre-#{task}"
- __send__ mid, rel.sub(%r[\A.*?(?:/|\z)], '')
- directories_of(curr_srcdir()).each do |d|
- traverse task, "#{rel}/#{d}", mid
- end
- run_hook "post-#{task}"
- }
- end
-
- def dive_into(rel)
- return unless File.dir?("#{@srcdir}/#{rel}")
-
- dir = File.basename(rel)
- Dir.mkdir dir unless File.dir?(dir)
- prevdir = Dir.pwd
- Dir.chdir dir
- $stderr.puts '---> ' + rel if verbose?
- @currdir = rel
- yield
- Dir.chdir prevdir
- $stderr.puts '<--- ' + rel if verbose?
- @currdir = File.dirname(rel)
- end
-
- def run_hook(id)
- path = [ "#{curr_srcdir()}/#{id}",
- "#{curr_srcdir()}/#{id}.rb" ].detect {|cand| File.file?(cand) }
- return unless path
- begin
- instance_eval File.read(path), path, 1
- rescue
- raise if $DEBUG
- setup_rb_error "hook #{path} failed:\n" + $!.message
- end
- end
-
-end # class Installer
-
-
-class SetupError < StandardError; end
-
-def setup_rb_error(msg)
- raise SetupError, msg
-end
-
-if $0 == __FILE__
- begin
- ToplevelInstaller.invoke
- rescue SetupError
- raise if $DEBUG
- $stderr.puts $!.message
- $stderr.puts "Try 'ruby #{$0} --help' for detailed usage."
- exit 1
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/attic/test_run.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/attic/test_run.rb
deleted file mode 100644
index 37d83d5a5..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/attic/test_run.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-require 'test/unit'
-require 'rcodetools/xmpfilter'
-require 'rcodetools/xmptestunitfilter'
-require 'rcodetools/completion'
-require 'rcodetools/doc'
-require 'rcodetools/options'
-require 'stringio'
-
-class TestRun < Test::Unit::TestCase
- include Rcodetools
- DIR = File.expand_path(File.dirname(__FILE__))
-
- tests = {
- :simple_annotation => {:klass => XMPFilter},
- :unit_test => {:klass => XMPTestUnitFilter},
- :rspec => {:klass => XMPRSpecFilter, :interpreter => "spec"},
- :rspec_poetry => {:klass => XMPRSpecFilter, :interpreter => "spec", :use_parentheses => false},
- :no_warnings => {:klass => XMPFilter, :warnings => false},
- :bindings => {:klass => XMPTestUnitFilter, :use_parentheses => false},
- :unit_test_poetry => {:klass => XMPTestUnitFilter, :use_parentheses => false},
- :add_markers => {:klass => XMPAddMarkers},
-
- :completion => {:klass => XMPCompletionFilter, :lineno => 1},
- :completion_emacs => {:klass => XMPCompletionEmacsFilter, :lineno => 1},
- :completion_emacs_icicles => {:klass => XMPCompletionEmacsIciclesFilter, :lineno => 1},
- :completion_class_info => {:klass => XMPCompletionClassInfoFilter, :lineno => 1},
- :completion_class_info_no_candidates => {:klass => XMPCompletionClassInfoFilter, :lineno => 1},
-
- :doc => {:klass => XMPDocFilter, :lineno => 1},
- :refe => {:klass => XMPReFeFilter, :lineno => 1},
- :ri => {:klass => XMPRiFilter, :lineno => 1},
- :ri_emacs => {:klass => XMPRiEmacsFilter, :lineno => 1},
- :ri_vim => {:klass => XMPRiVimFilter, :lineno => 1},
-
- }
- tests.each_pair do |test, opts|
- define_method("test_#{test}") do
- inputfile = "#{DIR}/data/#{test}-input.rb"
- outputfile = "#{DIR}/data/#{test}-output.rb"
- sio = StringIO.new
- sio.puts opts[:klass].run(File.read(inputfile), DEFAULT_OPTIONS.merge(opts))
- assert_equal(File.read(outputfile), sio.string)
- end
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/add_markers-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/add_markers-input.rb
deleted file mode 100644
index 33a508e45..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/add_markers-input.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-1+1
-2+3
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/add_markers-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/add_markers-output.rb
deleted file mode 100644
index fe8fd61b4..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/add_markers-output.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-1+1 # =>
-2+3 # =>
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/bindings-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/bindings-input.rb
deleted file mode 100644
index 90e97e27a..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/bindings-input.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-
-require 'test/unit'
-
-class TestFoo < Test::Unit::TestCase
- def setup
- @o = []
- end
-
- def test_foo
- a = 1
- b = a
- b # =>
- end
-
- def test_arr
- last = 1
- @o << last
- @o.last # =>
- end
-
- def test_bar
- a = b = c = 1
- d = a
- d # =>
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/bindings-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/bindings-output.rb
deleted file mode 100644
index cbea3c07c..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/bindings-output.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-
-require 'test/unit'
-
-class TestFoo < Test::Unit::TestCase
- def setup
- @o = []
- end
-
- def test_foo
- a = 1
- b = a
- assert_equal a, b
- assert_equal 1, b
- end
-
- def test_arr
- last = 1
- @o << last
- assert_equal last, @o.last
- assert_equal 1, @o.last
- end
-
- def test_bar
- a = b = c = 1
- d = a
- assert_equal a, d
- assert_equal b, d
- assert_equal c, d
- assert_equal 1, d
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion-input.rb
deleted file mode 100644
index 2dcaa3f08..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion-input.rb
+++ /dev/null
@@ -1 +0,0 @@
-Array.new(3).uni
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion-output.rb
deleted file mode 100644
index 9546ff3ac..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion-output.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-uniq
-uniq!
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_class_info-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_class_info-input.rb
deleted file mode 100644
index 6ea236464..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_class_info-input.rb
+++ /dev/null
@@ -1 +0,0 @@
-Array.new(3).s
\ No newline at end of file
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_class_info-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_class_info-output.rb
deleted file mode 100644
index 8c604b3c0..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_class_info-output.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-select Array#select
-send Object#send
-shift Array#shift
-singleton_methods Object#singleton_methods
-size Array#size
-slice Array#slice
-slice! Array#slice!
-sort Array#sort
-sort! Array#sort!
-sort_by Enumerable#sort_by
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_class_info_no_candidates-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_class_info_no_candidates-input.rb
deleted file mode 100644
index 4666cc05c..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_class_info_no_candidates-input.rb
+++ /dev/null
@@ -1 +0,0 @@
-Array.new(3).nonexisten
\ No newline at end of file
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_class_info_no_candidates-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_class_info_no_candidates-output.rb
deleted file mode 100644
index 8b1378917..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_class_info_no_candidates-output.rb
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_detect_rbtest-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_detect_rbtest-input.rb
deleted file mode 100755
index c4d92ca63..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_detect_rbtest-input.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env ruby
-=begin test_bar
-assert_equal "BAR", bar("bar")
-=end
-def bar(s)
- s.upca
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_detect_rbtest-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_detect_rbtest-output.rb
deleted file mode 100644
index c3d421a75..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_detect_rbtest-output.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-upcase
-upcase!
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_detect_rbtest2-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_detect_rbtest2-input.rb
deleted file mode 100644
index 2dcaa3f08..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_detect_rbtest2-input.rb
+++ /dev/null
@@ -1 +0,0 @@
-Array.new(3).uni
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_detect_rbtest2-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_detect_rbtest2-output.rb
deleted file mode 100644
index 9546ff3ac..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_detect_rbtest2-output.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-uniq
-uniq!
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_emacs-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_emacs-input.rb
deleted file mode 100644
index 2dcaa3f08..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_emacs-input.rb
+++ /dev/null
@@ -1 +0,0 @@
-Array.new(3).uni
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_emacs-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_emacs-output.rb
deleted file mode 100644
index c83366a11..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_emacs-output.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-(progn
-(setq rct-method-completion-table '(("uniq") ("uniq!") ))
-(setq alist '(("uniq\t[Array#uniq]") ("uniq!\t[Array#uniq!]") ))
-(setq pattern "uni")
-(try-completion pattern rct-method-completion-table nil)
-)
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_emacs_icicles-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_emacs_icicles-input.rb
deleted file mode 100644
index aa062b7f9..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_emacs_icicles-input.rb
+++ /dev/null
@@ -1 +0,0 @@
-1.div
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_emacs_icicles-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_emacs_icicles-output.rb
deleted file mode 100644
index e4747ae36..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_emacs_icicles-output.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-(progn
-(setq rct-method-completion-table '(("div\t[Fixnum#div]") ("divmod\t[Fixnum#divmod]") ))
-(setq alist '(("div" . "Fixnum#div")("divmod" . "Fixnum#divmod")))
-(setq pattern "div")
-(setq klass "Fixnum")
-)
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_in_method-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_in_method-input.rb
deleted file mode 100644
index 164408012..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_in_method-input.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-def fooz
- [].lengt
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_in_method-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_in_method-output.rb
deleted file mode 100644
index 7f5e3b64d..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_in_method-output.rb
+++ /dev/null
@@ -1 +0,0 @@
-length
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_in_method-test.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_in_method-test.rb
deleted file mode 100644
index 1edef979e..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_in_method-test.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require 'test/unit'
-class TestFooz < Test::Unit::TestCase
- def test_fooz
- assert_equal(0, fooz)
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_rbtest-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_rbtest-input.rb
deleted file mode 100755
index c4d92ca63..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_rbtest-input.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env ruby
-=begin test_bar
-assert_equal "BAR", bar("bar")
-=end
-def bar(s)
- s.upca
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_rbtest-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_rbtest-output.rb
deleted file mode 100644
index c3d421a75..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/completion_rbtest-output.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-upcase
-upcase!
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc-input.rb
deleted file mode 100644
index 624aca755..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc-input.rb
+++ /dev/null
@@ -1 +0,0 @@
-[].length
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc-output.rb
deleted file mode 100644
index ca542dbcc..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc-output.rb
+++ /dev/null
@@ -1 +0,0 @@
-Array#length
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc_detect_rbtest-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc_detect_rbtest-input.rb
deleted file mode 100644
index 624aca755..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc_detect_rbtest-input.rb
+++ /dev/null
@@ -1 +0,0 @@
-[].length
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc_detect_rbtest-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc_detect_rbtest-output.rb
deleted file mode 100644
index ca542dbcc..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc_detect_rbtest-output.rb
+++ /dev/null
@@ -1 +0,0 @@
-Array#length
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc_detect_rbtest2-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc_detect_rbtest2-input.rb
deleted file mode 100755
index bf97ffe15..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc_detect_rbtest2-input.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env ruby
-=begin test_bar
-assert_equal "BAR", bar("bar")
-=end
-def bar(s)
- s.upcase
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc_detect_rbtest2-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc_detect_rbtest2-output.rb
deleted file mode 100644
index 579185024..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc_detect_rbtest2-output.rb
+++ /dev/null
@@ -1 +0,0 @@
-String#upcase
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc_rbtest-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc_rbtest-input.rb
deleted file mode 100755
index bf97ffe15..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc_rbtest-input.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env ruby
-=begin test_bar
-assert_equal "BAR", bar("bar")
-=end
-def bar(s)
- s.upcase
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc_rbtest-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc_rbtest-output.rb
deleted file mode 100644
index 579185024..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/doc_rbtest-output.rb
+++ /dev/null
@@ -1 +0,0 @@
-String#upcase
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/no_warnings-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/no_warnings-input.rb
deleted file mode 100644
index 514e18c0d..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/no_warnings-input.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-A = 1
-A = 1
-p (1)
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/no_warnings-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/no_warnings-output.rb
deleted file mode 100644
index 27a723858..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/no_warnings-output.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-A = 1
-A = 1
-p (1)
-# >> 1
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/refe-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/refe-input.rb
deleted file mode 100644
index 624aca755..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/refe-input.rb
+++ /dev/null
@@ -1 +0,0 @@
-[].length
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/refe-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/refe-output.rb
deleted file mode 100644
index 8653c3d4b..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/refe-output.rb
+++ /dev/null
@@ -1 +0,0 @@
-refe 'Array#length'
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/ri-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/ri-input.rb
deleted file mode 100644
index 624aca755..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/ri-input.rb
+++ /dev/null
@@ -1 +0,0 @@
-[].length
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/ri-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/ri-output.rb
deleted file mode 100644
index f1ba49e61..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/ri-output.rb
+++ /dev/null
@@ -1 +0,0 @@
-ri 'Array#length'
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/ri_emacs-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/ri_emacs-input.rb
deleted file mode 100644
index 624aca755..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/ri_emacs-input.rb
+++ /dev/null
@@ -1 +0,0 @@
-[].length
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/ri_emacs-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/ri_emacs-output.rb
deleted file mode 100644
index 5f7389fb3..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/ri_emacs-output.rb
+++ /dev/null
@@ -1 +0,0 @@
-(rct-find-tag-or-ri "Array#length")
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/ri_vim-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/ri_vim-input.rb
deleted file mode 100644
index 624aca755..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/ri_vim-input.rb
+++ /dev/null
@@ -1 +0,0 @@
-[].length
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/ri_vim-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/ri_vim-output.rb
deleted file mode 100644
index 8e71a9a5c..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/ri_vim-output.rb
+++ /dev/null
@@ -1 +0,0 @@
-call RCT_find_tag_or_ri("Array#length")
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/rspec-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/rspec-input.rb
deleted file mode 100644
index c57b23c47..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/rspec-input.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1
-end
-
-
-describe "xmpfilter's expectation expansion" do
- before do
- @o = X.new
- end
-
- it "should expand should == expectations" do
- @o.foo(true) # =>
- @o.foo(true).a # =>
- @o.foo(false) # =>
- end
-
- it "should expand should raise_error expectations" do
- @o.bar # =>
- end
-
- it "should expand should be_nil expectations" do
- @o.baz # =>
- end
-
- it "should expand correct expectations for complex values" do
- @o.babar # =>
- end
-
- it "should expand should be_close expectations" do
- @o.fubar(10) # =>
- end
-end
-
-describe "xmpfilter's automagic binding detection" do
- it "should expand should == expectations" do
- a = b = c = 1
- d = a
- d # =>
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/rspec-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/rspec-output.rb
deleted file mode 100644
index 00abb887b..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/rspec-output.rb
+++ /dev/null
@@ -1,52 +0,0 @@
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1 # !> already initialized constant A
-end
-
-
-describe "xmpfilter's expectation expansion" do
- before do
- @o = X.new
- end
-
- it "should expand should == expectations" do
- (@o.foo(true)).should be_a_kind_of(X::Y)
- (@o.foo(true).inspect).should == ("#")
- (@o.foo(true).a).should == (2)
- (@o.foo(false)).should == (2)
- end
-
- it "should expand should raise_error expectations" do
- lambda{@o.bar}.should raise_error(RuntimeError)
- end
-
- it "should expand should be_nil expectations" do
- (@o.baz).should be_nil
- end
-
- it "should expand correct expectations for complex values" do
- (@o.babar).should == ([1, 2])
- end
-
- it "should expand should be_close expectations" do
- (@o.fubar(10)).should be_close(101.0, 0.0001)
- end
-end
-
-describe "xmpfilter's automagic binding detection" do
- it "should expand should == expectations" do
- a = b = c = 1
- d = a
- (d).should == (a)
- (d).should == (b)
- (d).should == (c)
- (d).should == (1)
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/rspec_poetry-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/rspec_poetry-input.rb
deleted file mode 100644
index c57b23c47..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/rspec_poetry-input.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1
-end
-
-
-describe "xmpfilter's expectation expansion" do
- before do
- @o = X.new
- end
-
- it "should expand should == expectations" do
- @o.foo(true) # =>
- @o.foo(true).a # =>
- @o.foo(false) # =>
- end
-
- it "should expand should raise_error expectations" do
- @o.bar # =>
- end
-
- it "should expand should be_nil expectations" do
- @o.baz # =>
- end
-
- it "should expand correct expectations for complex values" do
- @o.babar # =>
- end
-
- it "should expand should be_close expectations" do
- @o.fubar(10) # =>
- end
-end
-
-describe "xmpfilter's automagic binding detection" do
- it "should expand should == expectations" do
- a = b = c = 1
- d = a
- d # =>
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/rspec_poetry-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/rspec_poetry-output.rb
deleted file mode 100644
index 907b30535..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/rspec_poetry-output.rb
+++ /dev/null
@@ -1,52 +0,0 @@
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1 # !> already initialized constant A
-end
-
-
-describe "xmpfilter's expectation expansion" do
- before do
- @o = X.new
- end
-
- it "should expand should == expectations" do
- @o.foo(true).should be_a_kind_of(X::Y)
- @o.foo(true).inspect.should == "#"
- @o.foo(true).a.should == 2
- @o.foo(false).should == 2
- end
-
- it "should expand should raise_error expectations" do
- lambda{@o.bar}.should raise_error(RuntimeError)
- end
-
- it "should expand should be_nil expectations" do
- @o.baz.should be_nil
- end
-
- it "should expand correct expectations for complex values" do
- @o.babar.should == [1, 2]
- end
-
- it "should expand should be_close expectations" do
- @o.fubar(10).should be_close(101.0, 0.0001)
- end
-end
-
-describe "xmpfilter's automagic binding detection" do
- it "should expand should == expectations" do
- a = b = c = 1
- d = a
- d.should == a
- d.should == b
- d.should == c
- d.should == 1
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/simple_annotation-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/simple_annotation-input.rb
deleted file mode 100644
index e4eb38504..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/simple_annotation-input.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-
-a = 1
-10.times do |i|
- i ** 2 # =>
- a += i
-end
-A = 1
-A = 1
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/simple_annotation-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/simple_annotation-output.rb
deleted file mode 100644
index 41cd4c0cd..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/simple_annotation-output.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-
-a = 1
-10.times do |i|
- i ** 2 # => 0, 1, 4, 9, 16, 25, 36, 49, 64, 81
- a += i
-end
-A = 1
-A = 1 # !> already initialized constant A
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test-input.rb
deleted file mode 100644
index d9d02cdcd..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test-input.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1
- def difftype() [1, "s"] end
-end
-
-
-require 'test/unit'
-class Test_X < Test::Unit::TestCase
- def setup
- @o = X.new
- end
-
- def test_foo
- @o.foo(true) # =>
- @o.foo(true).a # =>
- @o.foo(false) # =>
- end
-
- def test_bar
- @o.bar # =>
- end
-
- def test_baz
- @o.baz # =>
- end
-
- def test_babar
- @o.babar # =>
- end
-
- def test_fubar
- @o.fubar(10) # =>
- end
-
- def test_difftype
- for x in @o.difftype
- x # =>
- end
- end
-
-end
-
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test-output.rb
deleted file mode 100644
index 49f4e6314..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test-output.rb
+++ /dev/null
@@ -1,52 +0,0 @@
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1 # !> already initialized constant A
- def difftype() [1, "s"] end
-end
-
-
-require 'test/unit'
-class Test_X < Test::Unit::TestCase
- def setup
- @o = X.new
- end
-
- def test_foo
- assert_kind_of(X::Y, @o.foo(true))
- assert_equal("#", @o.foo(true).inspect)
- assert_equal(2, @o.foo(true).a)
- assert_equal(2, @o.foo(false))
- end
-
- def test_bar
- assert_raise(RuntimeError){@o.bar}
- end
-
- def test_baz
- assert_nil(@o.baz)
- end
-
- def test_babar
- assert_equal([1, 2], @o.babar)
- end
-
- def test_fubar
- assert_in_delta(101.0, @o.fubar(10), 0.0001)
- end
-
- def test_difftype
- for x in @o.difftype
- #xmpfilter: WARNING!! extra values ignored
- assert_equal(1, x)
- end
- end
-
-end
-
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_detect_rbtest-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_detect_rbtest-input.rb
deleted file mode 100644
index d9d02cdcd..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_detect_rbtest-input.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1
- def difftype() [1, "s"] end
-end
-
-
-require 'test/unit'
-class Test_X < Test::Unit::TestCase
- def setup
- @o = X.new
- end
-
- def test_foo
- @o.foo(true) # =>
- @o.foo(true).a # =>
- @o.foo(false) # =>
- end
-
- def test_bar
- @o.bar # =>
- end
-
- def test_baz
- @o.baz # =>
- end
-
- def test_babar
- @o.babar # =>
- end
-
- def test_fubar
- @o.fubar(10) # =>
- end
-
- def test_difftype
- for x in @o.difftype
- x # =>
- end
- end
-
-end
-
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_detect_rbtest-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_detect_rbtest-output.rb
deleted file mode 100644
index 49f4e6314..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_detect_rbtest-output.rb
+++ /dev/null
@@ -1,52 +0,0 @@
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1 # !> already initialized constant A
- def difftype() [1, "s"] end
-end
-
-
-require 'test/unit'
-class Test_X < Test::Unit::TestCase
- def setup
- @o = X.new
- end
-
- def test_foo
- assert_kind_of(X::Y, @o.foo(true))
- assert_equal("#", @o.foo(true).inspect)
- assert_equal(2, @o.foo(true).a)
- assert_equal(2, @o.foo(false))
- end
-
- def test_bar
- assert_raise(RuntimeError){@o.bar}
- end
-
- def test_baz
- assert_nil(@o.baz)
- end
-
- def test_babar
- assert_equal([1, 2], @o.babar)
- end
-
- def test_fubar
- assert_in_delta(101.0, @o.fubar(10), 0.0001)
- end
-
- def test_difftype
- for x in @o.difftype
- #xmpfilter: WARNING!! extra values ignored
- assert_equal(1, x)
- end
- end
-
-end
-
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_detect_rbtest2-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_detect_rbtest2-input.rb
deleted file mode 100644
index afb6ebba2..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_detect_rbtest2-input.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-=begin test_bar
-bar("bar") # =>
-=end
-def bar(s)
- s.upcase
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_detect_rbtest2-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_detect_rbtest2-output.rb
deleted file mode 100644
index 67ac1d924..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_detect_rbtest2-output.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-=begin test_bar
-assert_equal("BAR", bar("bar"))
-=end
-def bar(s)
- s.upcase
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_poetry-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_poetry-input.rb
deleted file mode 100644
index d9d02cdcd..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_poetry-input.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1
- def difftype() [1, "s"] end
-end
-
-
-require 'test/unit'
-class Test_X < Test::Unit::TestCase
- def setup
- @o = X.new
- end
-
- def test_foo
- @o.foo(true) # =>
- @o.foo(true).a # =>
- @o.foo(false) # =>
- end
-
- def test_bar
- @o.bar # =>
- end
-
- def test_baz
- @o.baz # =>
- end
-
- def test_babar
- @o.babar # =>
- end
-
- def test_fubar
- @o.fubar(10) # =>
- end
-
- def test_difftype
- for x in @o.difftype
- x # =>
- end
- end
-
-end
-
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_poetry-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_poetry-output.rb
deleted file mode 100644
index 6278c2553..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_poetry-output.rb
+++ /dev/null
@@ -1,52 +0,0 @@
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1 # !> already initialized constant A
- def difftype() [1, "s"] end
-end
-
-
-require 'test/unit'
-class Test_X < Test::Unit::TestCase
- def setup
- @o = X.new
- end
-
- def test_foo
- assert_kind_of X::Y, @o.foo(true)
- assert_equal "#", @o.foo(true).inspect
- assert_equal 2, @o.foo(true).a
- assert_equal 2, @o.foo(false)
- end
-
- def test_bar
- assert_raise(RuntimeError){@o.bar}
- end
-
- def test_baz
- assert_nil @o.baz
- end
-
- def test_babar
- assert_equal [1, 2], @o.babar
- end
-
- def test_fubar
- assert_in_delta 101.0, @o.fubar(10), 0.0001
- end
-
- def test_difftype
- for x in @o.difftype
- #xmpfilter: WARNING!! extra values ignored
- assert_equal 1, x
- end
- end
-
-end
-
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_rbtest-input.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_rbtest-input.rb
deleted file mode 100644
index afb6ebba2..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_rbtest-input.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-=begin test_bar
-bar("bar") # =>
-=end
-def bar(s)
- s.upcase
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_rbtest-output.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_rbtest-output.rb
deleted file mode 100644
index 67ac1d924..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/attic/unit_test_rbtest-output.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-=begin test_bar
-assert_equal("BAR", bar("bar"))
-=end
-def bar(s)
- s.upcase
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/method_analyzer-data.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/method_analyzer-data.rb
deleted file mode 100644
index 82fca088e..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/method_analyzer-data.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-
-class A
- def A.foo
- 1
- end
-
- def a
- 1+1
- end
-end
-class B < A
- def initialize
- end
- attr_accessor :bb
-
- def b
- "a".length
- end
-end
-tm = Time.now
-[tm.year, tm.month, tm.day] << 0
-a = A.new
-a.a
-b = B.new
-b.a
-b.b
-[b.a,b.b]
-z = b.a + b.b
-A.foo
-B.foo
-b.bb=1
-b.bb
-
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/method_args.data.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/method_args.data.rb
deleted file mode 100644
index b95fa8337..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/method_args.data.rb
+++ /dev/null
@@ -1,106 +0,0 @@
-# method_args.data.rb
-class FixedArgsMethods
- def self.singleton(a1) end
- def initialize(arg) end
- def f(a1) end
- def b(a1,&block) end
- define_method(:defmethod) {|a1|}
- attr_accessor :by_attr_accessor
- attr :by_attr_false
- attr :by_attr_true, true
- attr_reader :by_attr_reader_1, :by_attr_reader_2
- attr_writer :by_attr_writer
- def private_meth(x) end
- private :private_meth
- class << self
- attr_accessor :singleton_attr_accessor
- define_method(:singleton_defmethod){|a2|}
- end
-end
-
-module VariableArgsMethods
- def s(a1,*splat) end
- def sb(a1,*splat, &block) end
- def d(a1,default=nil) end
- def ds(a1,default=nil,*splat) end
- def dsb(a1,default=nil,*splat,&block) end
- def db(a1,default=nil,&block) end
-end
-
-class Fixnum
- def method_in_Fixnum(arg1, arg2) end
- def self.singleton_method_in_Fixnum(arg1, arg2) end
-end
-class Bignum
- def method_in_Bignum(arg1, arg2) end
-end
-class Float
- def method_in_Float(arg1, arg2) end
-end
-class Symbol
- def method_in_Symbol(arg1, arg2) end
-end
-class Binding
- def method_in_Binding(arg1, arg2) end
-end
-class UnboundMethod
- def method_in_UnboundMethod(arg1, arg2) end
-end
-class Method
- def method_in_Method(arg1, arg2) end
-end
-class Proc
- def method_in_Proc(arg1, arg2) end
-end
-class Continuation
- def method_in_Continuation(arg1, arg2) end
-end
-class Thread
- def method_in_Thread(arg1, arg2) end
-end
-# FIXME mysterious
-# class FalseClass
-# def method_in_FalseClass(arg1, arg2) end
-# end
-class TrueClass
- def method_in_TrueClass(arg1, arg2) end
-end
-class NilClass
- def method_in_NilClass(arg1, arg2) end
-end
-class Struct
- def method_in_Struct(arg1, arg2) end
-end
-
-require 'digest'
-class Digest::Base
- def method_in_Digest_Base(arg1, arg2) end
-end
-
-class AnAbstractClass
- $__method_args_off = true
- def self.allocate
- raise NotImplementedError, "#{self} is an abstract class."
- end
- $__method_args_off = false
-
- def method_in_AnAbstractClass(arg1, arg2)
- end
-
-end
-
-class AClass
- include VariableArgsMethods
- extend VariableArgsMethods
-end
-
-class ASubClass < AClass
-end
-
-StructA = Struct.new :a, :b
-class SubclassOfStructA < StructA
- attr :method_in_b
-end
-class StructSubclass < Struct.new(:c)
- attr :method_in_c
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete-TDC/completion_in_method__testmethod.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete-TDC/completion_in_method__testmethod.taf
deleted file mode 100644
index dfa125677..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete-TDC/completion_in_method__testmethod.taf
+++ /dev/null
@@ -1,17 +0,0 @@
-==========
-completion_in_method__testmethod
-==========
-rct-complete --filename %s --line 2 -t %s@test_fooz
-==========
-def fooz
- [].lengt
-end
-==========
-length
-==========
-require 'test/unit'
-class TestFooz < Test::Unit::TestCase
- def test_fooz
- assert_equal(0, fooz)
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete-TDC/completion_in_method__testscript.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete-TDC/completion_in_method__testscript.taf
deleted file mode 100644
index f2de8add1..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete-TDC/completion_in_method__testscript.taf
+++ /dev/null
@@ -1,17 +0,0 @@
-==========
-completion_in_method__testscript
-==========
-rct-complete --filename %s --line 2 -t %s
-==========
-def fooz
- [].lengt
-end
-==========
-length
-==========
-require 'test/unit'
-class TestFooz < Test::Unit::TestCase
- def test_fooz
- assert_equal(0, fooz)
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete-TDC/completion_in_method__wrong_testmethod.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete-TDC/completion_in_method__wrong_testmethod.taf
deleted file mode 100644
index 989c1f492..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete-TDC/completion_in_method__wrong_testmethod.taf
+++ /dev/null
@@ -1,17 +0,0 @@
-==========
-completion_in_method__wrong_testmethod
-==========
-rct-complete --filename %s --line 2 -t %s@test_NOT_FOUND
-==========
-def fooz
- [].lengt
-end
-==========
-
-==========
-require 'test/unit'
-class TestFooz < Test::Unit::TestCase
- def test_fooz
- assert_equal(0, fooz)
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion.taf
deleted file mode 100644
index de08a22cf..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion.taf
+++ /dev/null
@@ -1,9 +0,0 @@
-==========
-completion
-==========
-rct-complete -C --line=1
-==========
-Array.new(3).uni
-==========
-uniq
-uniq!
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_class_info.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_class_info.taf
deleted file mode 100644
index 40d82fc9f..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_class_info.taf
+++ /dev/null
@@ -1,9 +0,0 @@
-==========
-completion_class_info
-==========
-rct-complete --completion-class-info --line=1
-==========
-Array.new(3).sl
-==========
-slice Array#slice
-slice! Array#slice!
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_class_info_no_candidates.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_class_info_no_candidates.taf
deleted file mode 100644
index f4e8959bc..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_class_info_no_candidates.taf
+++ /dev/null
@@ -1,8 +0,0 @@
-==========
-completion_class_info_no_candidates
-==========
-rct-complete --completion-class-info --line=1
-==========
-Array.new(3).nonexisten
-==========
-
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_detect_rbtest.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_detect_rbtest.taf
deleted file mode 100644
index e5405568d..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_detect_rbtest.taf
+++ /dev/null
@@ -1,15 +0,0 @@
-==========
-completion_detect_rbtest
-==========
-rct-complete --detect-rbtest --line=6
-==========
-#!/usr/bin/env ruby
-=begin test_bar
-assert_equal "BAR", bar("bar")
-=end
-def bar(s)
- s.upca
-end
-==========
-upcase
-upcase!
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_detect_rbtest2.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_detect_rbtest2.taf
deleted file mode 100644
index 49eaf171c..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_detect_rbtest2.taf
+++ /dev/null
@@ -1,9 +0,0 @@
-==========
-completion_detect_rbtest2
-==========
-rct-complete --detect-rbtest --line=1
-==========
-Array.new(3).uni
-==========
-uniq
-uniq!
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_emacs.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_emacs.taf
deleted file mode 100644
index 9282ad09d..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_emacs.taf
+++ /dev/null
@@ -1,13 +0,0 @@
-==========
-completion_emacs
-==========
-rct-complete --completion-emacs --line=1
-==========
-Array.new(3).uni
-==========
-(progn
-(setq rct-method-completion-table '(("uniq") ("uniq!") ))
-(setq alist '(("uniq\t[Array#uniq]") ("uniq!\t[Array#uniq!]") ))
-(setq pattern "uni")
-(try-completion pattern rct-method-completion-table nil)
-)
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_emacs_icicles.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_emacs_icicles.taf
deleted file mode 100644
index 324a1cfa8..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_emacs_icicles.taf
+++ /dev/null
@@ -1,13 +0,0 @@
-==========
-completion_emacs_icicles
-==========
-rct-complete --completion-emacs-icicles --line=1
-==========
-1.div
-==========
-(progn
-(setq rct-method-completion-table '(("div\t[Fixnum#div]") ("divmod\t[Fixnum#divmod]") ))
-(setq alist '(("div" . "Fixnum#div")("divmod" . "Fixnum#divmod")))
-(setq pattern "div")
-(setq klass "Fixnum")
-)
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_rbtest.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_rbtest.taf
deleted file mode 100644
index e8c6cbe62..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-complete/completion_rbtest.taf
+++ /dev/null
@@ -1,15 +0,0 @@
-==========
-completion_rbtest
-==========
-rct-complete --rbtest --line=6
-==========
-#!/usr/bin/env ruby
-=begin test_bar
-assert_equal "BAR", bar("bar")
-=end
-def bar(s)
- s.upca
-end
-==========
-upcase
-upcase!
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/doc.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/doc.taf
deleted file mode 100644
index aa017f636..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/doc.taf
+++ /dev/null
@@ -1,8 +0,0 @@
-==========
-doc
-==========
-rct-doc -D --line=1
-==========
-[].length
-==========
-Array#length
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/doc_detect_rbtest.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/doc_detect_rbtest.taf
deleted file mode 100644
index 28ac60836..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/doc_detect_rbtest.taf
+++ /dev/null
@@ -1,8 +0,0 @@
-==========
-doc_detect_rbtest
-==========
-rct-doc --detect-rbtest --line=1
-==========
-[].length
-==========
-Array#length
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/doc_detect_rbtest2.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/doc_detect_rbtest2.taf
deleted file mode 100644
index 043bea94d..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/doc_detect_rbtest2.taf
+++ /dev/null
@@ -1,14 +0,0 @@
-==========
-doc_detect_rbtest2
-==========
-rct-doc --detect-rbtest --line=6
-==========
-#!/usr/bin/env ruby
-=begin test_bar
-assert_equal "BAR", bar("bar")
-=end
-def bar(s)
- s.upcase
-end
-==========
-String#upcase
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/doc_rbtest.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/doc_rbtest.taf
deleted file mode 100644
index 7da58ce76..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/doc_rbtest.taf
+++ /dev/null
@@ -1,14 +0,0 @@
-==========
-doc_rbtest
-==========
-rct-doc --rbtest --line=6
-==========
-#!/usr/bin/env ruby
-=begin test_bar
-assert_equal "BAR", bar("bar")
-=end
-def bar(s)
- s.upcase
-end
-==========
-String#upcase
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/refe.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/refe.taf
deleted file mode 100644
index 6f074037d..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/refe.taf
+++ /dev/null
@@ -1,8 +0,0 @@
-==========
-refe
-==========
-rct-doc --refe --line=1
-==========
-[].length
-==========
-refe 'Array#length'
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/ri.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/ri.taf
deleted file mode 100644
index 02f27d6a1..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/ri.taf
+++ /dev/null
@@ -1,8 +0,0 @@
-==========
-ri
-==========
-rct-doc --ri --line=1
-==========
-[].length
-==========
-ri 'Array#length'
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/ri_emacs.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/ri_emacs.taf
deleted file mode 100644
index b41c7e373..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/ri_emacs.taf
+++ /dev/null
@@ -1,8 +0,0 @@
-==========
-ri_emacs
-==========
-rct-doc --ri-emacs --line=1
-==========
-[].length
-==========
-(rct-find-tag-or-ri "Array#length")
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/ri_vim.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/ri_vim.taf
deleted file mode 100644
index 11413ce40..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/rct-doc/ri_vim.taf
+++ /dev/null
@@ -1,8 +0,0 @@
-==========
-ri_vim
-==========
-rct-doc --ri-vim --line=1
-==========
-[].length
-==========
-call RCT_find_tag_or_ri("Array#length")
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/sample_test_script.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/sample_test_script.rb
deleted file mode 100644
index b368a8ca2..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/sample_test_script.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-require 'test/unit'
-class TestSample < Test::Unit::TestCase
- def test_sample0
- assert(true)
- end
-
- def test_sample1
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/add_markers.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/add_markers.taf
deleted file mode 100644
index 88e846131..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/add_markers.taf
+++ /dev/null
@@ -1,10 +0,0 @@
-==========
-add_markers
-==========
-xmpfilter -m
-==========
-1+1
-2+3
-==========
-1+1 # =>
-2+3 # =>
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/bindings.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/bindings.taf
deleted file mode 100644
index bcd30560d..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/bindings.taf
+++ /dev/null
@@ -1,63 +0,0 @@
-==========
-bindings
-==========
-xmpfilter --poetry -u
-==========
-
-require 'test/unit'
-
-class TestFoo < Test::Unit::TestCase
- def setup
- @o = []
- end
-
- def test_foo
- a = 1
- b = a
- b # =>
- end
-
- def test_arr
- last = 1
- @o << last
- @o.last # =>
- end
-
- def test_bar
- a = b = c = 1
- d = a
- d # =>
- end
-end
-==========
-
-require 'test/unit'
-
-class TestFoo < Test::Unit::TestCase
- def setup
- @o = []
- end
-
- def test_foo
- a = 1
- b = a
- assert_equal a, b
- assert_equal 1, b
- end
-
- def test_arr
- last = 1
- @o << last
- assert_equal last, @o.last
- assert_equal 1, @o.last
- end
-
- def test_bar
- a = b = c = 1
- d = a
- assert_equal a, d
- assert_equal b, d
- assert_equal c, d
- assert_equal 1, d
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/comment_out.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/comment_out.taf
deleted file mode 100644
index 2520e79d7..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/comment_out.taf
+++ /dev/null
@@ -1,22 +0,0 @@
-==========
-comment_out
-==========
-xmpfilter
-==========
-
-# 1 # =>
-# 1 # => 2
-1 # => 12
-1
-# # =>
-# 1
-# # =>
-==========
-
-# 1 # =>
-# 1 # => 2
-1 # => 1
-1
-# # =>
-# 1
-# # =>
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/exception.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/exception.taf
deleted file mode 100644
index 3918c2e4d..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/exception.taf
+++ /dev/null
@@ -1,14 +0,0 @@
-==========
-exception
-==========
-xmpfilter
-==========
-def foo
- raise NameError, "ERR!!" rescue $@ # =>
-end
-foo
-==========
-def foo
- raise NameError, "ERR!!" rescue $@ # => ["-:2:in `foo'", "-:4"]
-end
-foo
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/expectations.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/expectations.taf
deleted file mode 100644
index ad244d7ea..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/expectations.taf
+++ /dev/null
@@ -1,54 +0,0 @@
-==========
-expectations
-==========
-xmpfilter --expectations
-==========
-
-require 'rubygems'
-require 'expectations'
-
-S = Struct.new :a
-Expectations do
- 1 + 1 # =>
- "a".length # =>
- [][1] # =>
- 1.hoge # =>
- 1.1 + 1.0 # =>
- S.new(1) # =>
-end
-==========
-
-require 'rubygems'
-require 'expectations'
-
-S = Struct.new :a
-Expectations do
- expect 2 do
- 1 + 1
- end
-
- expect 1 do
- "a".length
- end
-
- expect nil do
- [][1]
- end
-
- expect NoMethodError do
- 1.hoge
- end
-
- expect 2.0999..2.1001 do
- 1.1 + 1.0
- end
-
- expect S do
- S.new(1)
- end
-
- expect "#" do
- S.new(1).inspect
- end
-
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/last_match.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/last_match.taf
deleted file mode 100644
index 56a086384..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/last_match.taf
+++ /dev/null
@@ -1,18 +0,0 @@
-==========
-last_match
-==========
-xmpfilter
-==========
-
-md = "abc".match(/(.)(.)./)
-1
-# =>
-[$1, $2] # =>
-$1 # =>
-==========
-
-md = "abc".match(/(.)(.)./)
-1
-# => 1
-[$1, $2] # => ["a", "b"]
-$1 # => "a"
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/mult.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/mult.rb
deleted file mode 100644
index fa9025a07..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/mult.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342,
- 1332333333,6,8 ]
-1 # => 1
-a
-# => ["1111111111111111111111111111111111111111111111111111",
-# 123334324234242342,
-# 1332333333,
-# 6,
-# 8]
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_1.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_1.taf
deleted file mode 100644
index 63a0a053d..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_1.taf
+++ /dev/null
@@ -1,22 +0,0 @@
-==========
-multi_line_annotation_1
-==========
-xmpfilter
-==========
-
-1+2 # =>
-a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342,
- 1332333333 ]
-1+2 # =>
-a
-# =>
-==========
-
-1+2 # => 3
-a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342,
- 1332333333 ]
-1+2 # => 3
-a
-# => ["1111111111111111111111111111111111111111111111111111",
-# 123334324234242342,
-# 1332333333]
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_2.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_2.taf
deleted file mode 100644
index d5027dbdf..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_2.taf
+++ /dev/null
@@ -1,24 +0,0 @@
-==========
-multi_line_annotation_2
-==========
-xmpfilter
-==========
-
-1+2 # => 32
-a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342,
- 55555555 ]
-1+2 # => 300
-a
-# => ["1111111111111111111111111111111111111111111111111111",
-# 123334324234242342,
-# 1332333333]
-==========
-
-1+2 # => 3
-a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342,
- 55555555 ]
-1+2 # => 3
-a
-# => ["1111111111111111111111111111111111111111111111111111",
-# 123334324234242342,
-# 55555555]
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_3.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_3.taf
deleted file mode 100644
index 2b5efef34..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_3.taf
+++ /dev/null
@@ -1,20 +0,0 @@
-==========
-multi_line_annotation_3
-==========
-xmpfilter
-==========
-
-a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342,
- 1332333333 ]
-a
-# =>
-1 # =>
-==========
-
-a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342,
- 1332333333 ]
-a
-# => ["1111111111111111111111111111111111111111111111111111",
-# 123334324234242342,
-# 1332333333]
-1 # => 1
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_4.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_4.taf
deleted file mode 100644
index e8adac712..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_4.taf
+++ /dev/null
@@ -1,22 +0,0 @@
-==========
-multi_line_annotation_4
-==========
-xmpfilter
-==========
-
-a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342,
- 55555555 ]
-a
-# => ["1111111111111111111111111111111111111111111111111111",
-# 123334324234242342,
-# 1332333333]
-# not removed
-==========
-
-a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342,
- 55555555 ]
-a
-# => ["1111111111111111111111111111111111111111111111111111",
-# 123334324234242342,
-# 55555555]
-# not removed
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_5.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_5.taf
deleted file mode 100644
index af0cb8460..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_5.taf
+++ /dev/null
@@ -1,34 +0,0 @@
-==========
-multi_line_annotation_5
-==========
-xmpfilter
-==========
-
-def test
- a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342,
- 55555555 ]
- a
- # => ["",
- # 123334324234242342,
- # 1332333333]
- a
- # =>
- # not removed
-end
-test
-==========
-
-def test
- a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342,
- 55555555 ]
- a
- # => ["1111111111111111111111111111111111111111111111111111",
- # 123334324234242342,
- # 55555555]
- a
- # => ["1111111111111111111111111111111111111111111111111111",
- # 123334324234242342,
- # 55555555]
- # not removed
-end
-test
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_6.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_6.taf
deleted file mode 100644
index 24c48e2b0..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_6.taf
+++ /dev/null
@@ -1,12 +0,0 @@
-==========
-multi_line_annotation_6
-==========
-xmpfilter
-==========
-
-1 + 2 # !> warning
-# =>
-==========
-
-1 + 2
-# => 3
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_7.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_7.taf
deleted file mode 100644
index 21ed1daec..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_7.taf
+++ /dev/null
@@ -1,23 +0,0 @@
-==========
-multi_line_annotation_7
-==========
-xmpfilter
-==========
-
-[1,2]
-# =>
-raise
-[3,4]
-# =>
-[5,6]
-# =>
-==========
-
-[1,2]
-# => [1, 2]
-raise
-[3,4]
-# =>
-[5,6]
-# =>
-# ~> -:2: unhandled exception
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/no_warnings.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/no_warnings.taf
deleted file mode 100644
index 76cf8b021..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/no_warnings.taf
+++ /dev/null
@@ -1,13 +0,0 @@
-==========
-no_warnings
-==========
-xmpfilter --no-warnings
-==========
-A = 1
-A = 1
-p (1)
-==========
-A = 1
-A = 1
-p (1)
-# >> 1
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/nospace.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/nospace.taf
deleted file mode 100644
index bb71aeae4..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/nospace.taf
+++ /dev/null
@@ -1,16 +0,0 @@
-==========
-nospace_annotation
-==========
-xmpfilter
-==========
-
-1 #=>
-2 #=> 2
-3
-#=>
-==========
-
-1 # => 1
-2 # => 2
-3
-# => 3
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/rspec.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/rspec.taf
deleted file mode 100644
index 6c3a3d666..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/rspec.taf
+++ /dev/null
@@ -1,106 +0,0 @@
-==========
-rspec
-==========
-xmpfilter -s
-==========
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1
-end
-
-
-describe "xmpfilter's expectation expansion" do
- before do
- @o = X.new
- end
-
- it "should expand should == expectations" do
- @o.foo(true) # =>
- @o.foo(true).a # =>
- @o.foo(false) # =>
- end
-
- it "should expand should raise_error expectations" do
- @o.bar # =>
- end
-
- it "should expand should be_nil expectations" do
- @o.baz # =>
- end
-
- it "should expand correct expectations for complex values" do
- @o.babar # =>
- end
-
- it "should expand should be_close expectations" do
- @o.fubar(10) # =>
- end
-end
-
-describe "xmpfilter's automagic binding detection" do
- it "should expand should == expectations" do
- a = b = c = 1
- d = a
- d # =>
- end
-end
-==========
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1 # !> already initialized constant A
-end
-
-
-describe "xmpfilter's expectation expansion" do
- before do
- @o = X.new
- end
-
- it "should expand should == expectations" do
- (@o.foo(true)).should be_a_kind_of(X::Y)
- (@o.foo(true).inspect).should == ("#")
- (@o.foo(true).a).should == (2)
- (@o.foo(false)).should == (2)
- end
-
- it "should expand should raise_error expectations" do
- lambda{@o.bar}.should raise_error(RuntimeError)
- end
-
- it "should expand should be_nil expectations" do
- (@o.baz).should be_nil
- end
-
- it "should expand correct expectations for complex values" do
- (@o.babar).should == ([1, 2])
- end
-
- it "should expand should be_close expectations" do
- (@o.fubar(10)).should be_close(101.0, 0.0001)
- end
-end
-
-describe "xmpfilter's automagic binding detection" do
- it "should expand should == expectations" do
- a = b = c = 1
- d = a
- (d).should == (a)
- (d).should == (b)
- (d).should == (c)
- (d).should == (1)
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/rspec_poetry.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/rspec_poetry.taf
deleted file mode 100644
index 0bcd6859a..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/rspec_poetry.taf
+++ /dev/null
@@ -1,106 +0,0 @@
-==========
-rspec_poetry
-==========
-xmpfilter -s --poetry
-==========
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1
-end
-
-
-describe "xmpfilter's expectation expansion" do
- before do
- @o = X.new
- end
-
- it "should expand should == expectations" do
- @o.foo(true) # =>
- @o.foo(true).a # =>
- @o.foo(false) # =>
- end
-
- it "should expand should raise_error expectations" do
- @o.bar # =>
- end
-
- it "should expand should be_nil expectations" do
- @o.baz # =>
- end
-
- it "should expand correct expectations for complex values" do
- @o.babar # =>
- end
-
- it "should expand should be_close expectations" do
- @o.fubar(10) # =>
- end
-end
-
-describe "xmpfilter's automagic binding detection" do
- it "should expand should == expectations" do
- a = b = c = 1
- d = a
- d # =>
- end
-end
-==========
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1 # !> already initialized constant A
-end
-
-
-describe "xmpfilter's expectation expansion" do
- before do
- @o = X.new
- end
-
- it "should expand should == expectations" do
- @o.foo(true).should be_a_kind_of(X::Y)
- @o.foo(true).inspect.should == "#"
- @o.foo(true).a.should == 2
- @o.foo(false).should == 2
- end
-
- it "should expand should raise_error expectations" do
- lambda{@o.bar}.should raise_error(RuntimeError)
- end
-
- it "should expand should be_nil expectations" do
- @o.baz.should be_nil
- end
-
- it "should expand correct expectations for complex values" do
- @o.babar.should == [1, 2]
- end
-
- it "should expand should be_close expectations" do
- @o.fubar(10).should be_close(101.0, 0.0001)
- end
-end
-
-describe "xmpfilter's automagic binding detection" do
- it "should expand should == expectations" do
- a = b = c = 1
- d = a
- d.should == a
- d.should == b
- d.should == c
- d.should == 1
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/simple_annotation.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/simple_annotation.taf
deleted file mode 100644
index 9aa82d54b..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/simple_annotation.taf
+++ /dev/null
@@ -1,22 +0,0 @@
-==========
-simple_annotation
-==========
-xmpfilter
-==========
-
-a = 1
-10.times do |i|
- i ** 2 # =>
- a += i
-end
-A = 1
-A = 1
-==========
-
-a = 1
-10.times do |i|
- i ** 2 # => 0, 1, 4, 9, 16, 25, 36, 49, 64, 81
- a += i
-end
-A = 1
-A = 1 # !> already initialized constant A
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/unit_test.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/unit_test.taf
deleted file mode 100644
index 662ae861b..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/unit_test.taf
+++ /dev/null
@@ -1,108 +0,0 @@
-==========
-unit_test
-==========
-xmpfilter -u
-==========
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1
- def difftype() [1, "s"] end
-end
-
-
-require 'test/unit'
-class Test_X < Test::Unit::TestCase
- def setup
- @o = X.new
- end
-
- def test_foo
- @o.foo(true) # =>
- @o.foo(true).a # =>
- @o.foo(false) # =>
- end
-
- def test_bar
- @o.bar # =>
- end
-
- def test_baz
- @o.baz # =>
- end
-
- def test_babar
- @o.babar # =>
- end
-
- def test_fubar
- @o.fubar(10) # =>
- end
-
- def test_difftype
- for x in @o.difftype
- x # =>
- end
- end
-
-end
-
-==========
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1 # !> already initialized constant A
- def difftype() [1, "s"] end
-end
-
-
-require 'test/unit'
-class Test_X < Test::Unit::TestCase
- def setup
- @o = X.new
- end
-
- def test_foo
- assert_kind_of(X::Y, @o.foo(true))
- assert_equal("#", @o.foo(true).inspect)
- assert_equal(2, @o.foo(true).a)
- assert_equal(2, @o.foo(false))
- end
-
- def test_bar
- assert_raise(RuntimeError){@o.bar}
- end
-
- def test_baz
- assert_nil(@o.baz)
- end
-
- def test_babar
- assert_equal([1, 2], @o.babar)
- end
-
- def test_fubar
- assert_in_delta(101.0, @o.fubar(10), 0.0001)
- end
-
- def test_difftype
- for x in @o.difftype
- #xmpfilter: WARNING!! extra values ignored
- assert_equal(1, x)
- end
- end
-
-end
-
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/unit_test_detect_rbtest.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/unit_test_detect_rbtest.taf
deleted file mode 100644
index 7cc5893e7..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/unit_test_detect_rbtest.taf
+++ /dev/null
@@ -1,108 +0,0 @@
-==========
-unit_test_detect_rbtest
-==========
-xmpfilter -u --detect-rbtest
-==========
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1
- def difftype() [1, "s"] end
-end
-
-
-require 'test/unit'
-class Test_X < Test::Unit::TestCase
- def setup
- @o = X.new
- end
-
- def test_foo
- @o.foo(true) # =>
- @o.foo(true).a # =>
- @o.foo(false) # =>
- end
-
- def test_bar
- @o.bar # =>
- end
-
- def test_baz
- @o.baz # =>
- end
-
- def test_babar
- @o.babar # =>
- end
-
- def test_fubar
- @o.fubar(10) # =>
- end
-
- def test_difftype
- for x in @o.difftype
- x # =>
- end
- end
-
-end
-
-==========
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1 # !> already initialized constant A
- def difftype() [1, "s"] end
-end
-
-
-require 'test/unit'
-class Test_X < Test::Unit::TestCase
- def setup
- @o = X.new
- end
-
- def test_foo
- assert_kind_of(X::Y, @o.foo(true))
- assert_equal("#", @o.foo(true).inspect)
- assert_equal(2, @o.foo(true).a)
- assert_equal(2, @o.foo(false))
- end
-
- def test_bar
- assert_raise(RuntimeError){@o.bar}
- end
-
- def test_baz
- assert_nil(@o.baz)
- end
-
- def test_babar
- assert_equal([1, 2], @o.babar)
- end
-
- def test_fubar
- assert_in_delta(101.0, @o.fubar(10), 0.0001)
- end
-
- def test_difftype
- for x in @o.difftype
- #xmpfilter: WARNING!! extra values ignored
- assert_equal(1, x)
- end
- end
-
-end
-
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/unit_test_detect_rbtest2.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/unit_test_detect_rbtest2.taf
deleted file mode 100644
index 219b4a996..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/unit_test_detect_rbtest2.taf
+++ /dev/null
@@ -1,18 +0,0 @@
-==========
-unit_test_detect_rbtest2
-==========
-xmpfilter --detect-rbtest
-==========
-=begin test_bar
-bar("bar") # =>
-=end
-def bar(s)
- s.upcase
-end
-==========
-=begin test_bar
-assert_equal("BAR", bar("bar"))
-=end
-def bar(s)
- s.upcase
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/unit_test_poetry.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/unit_test_poetry.taf
deleted file mode 100644
index b7c24902f..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/unit_test_poetry.taf
+++ /dev/null
@@ -1,108 +0,0 @@
-==========
-unit_test_poetry
-==========
-xmpfilter -u --poetry
-==========
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1
- def difftype() [1, "s"] end
-end
-
-
-require 'test/unit'
-class Test_X < Test::Unit::TestCase
- def setup
- @o = X.new
- end
-
- def test_foo
- @o.foo(true) # =>
- @o.foo(true).a # =>
- @o.foo(false) # =>
- end
-
- def test_bar
- @o.bar # =>
- end
-
- def test_baz
- @o.baz # =>
- end
-
- def test_babar
- @o.babar # =>
- end
-
- def test_fubar
- @o.fubar(10) # =>
- end
-
- def test_difftype
- for x in @o.difftype
- x # =>
- end
- end
-
-end
-
-==========
-
-class X
- Y = Struct.new(:a)
- def foo(b); b ? Y.new(2) : 2 end
- def bar; raise "No good" end
- def baz; nil end
- def fubar(x); x ** 2.0 + 1 end
- def babar; [1,2] end
- A = 1
- A = 1 # !> already initialized constant A
- def difftype() [1, "s"] end
-end
-
-
-require 'test/unit'
-class Test_X < Test::Unit::TestCase
- def setup
- @o = X.new
- end
-
- def test_foo
- assert_kind_of X::Y, @o.foo(true)
- assert_equal "#", @o.foo(true).inspect
- assert_equal 2, @o.foo(true).a
- assert_equal 2, @o.foo(false)
- end
-
- def test_bar
- assert_raise(RuntimeError){@o.bar}
- end
-
- def test_baz
- assert_nil @o.baz
- end
-
- def test_babar
- assert_equal [1, 2], @o.babar
- end
-
- def test_fubar
- assert_in_delta 101.0, @o.fubar(10), 0.0001
- end
-
- def test_difftype
- for x in @o.difftype
- #xmpfilter: WARNING!! extra values ignored
- assert_equal 1, x
- end
- end
-
-end
-
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/unit_test_rbtest.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/unit_test_rbtest.taf
deleted file mode 100644
index 622f11828..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/unit_test_rbtest.taf
+++ /dev/null
@@ -1,18 +0,0 @@
-==========
-unit_test_rbtest
-==========
-xmpfilter -u --rbtest
-==========
-=begin test_bar
-bar("bar") # =>
-=end
-def bar(s)
- s.upcase
-end
-==========
-=begin test_bar
-assert_equal("BAR", bar("bar"))
-=end
-def bar(s)
- s.upcase
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/width.taf b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/width.taf
deleted file mode 100644
index 4fa436e02..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/data/xmpfilter/width.taf
+++ /dev/null
@@ -1,16 +0,0 @@
-==========
-width
-==========
-xmpfilter -w 15
-==========
-
-a = ["abcdefg", 12345, Object]
-a
-# =>
-==========
-
-a = ["abcdefg", 12345, Object]
-a
-# => ["abcdefg",
-# 12345,
-# Object]
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/test_completion.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/test_completion.rb
deleted file mode 100644
index fce0fef1c..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/test_completion.rb
+++ /dev/null
@@ -1,674 +0,0 @@
-$: << ".." << "../lib"
-require 'rcodetools/completion'
-require 'test/unit'
-
-class TestXMPCompletionFilter < Test::Unit::TestCase
- include Rcodetools
- def doit(code, lineno, column=nil, options={})
- xmp = XMPCompletionFilter.new options
- xmp.candidates(code, lineno, column).sort
- end
-
- def test_complete_method__simple
- assert_equal(["length"], doit('"a".lengt', 1))
- assert_equal(["length"], doit('`echo a`.lengt', 1))
- end
-
- def test_complete_method__in_arg
- assert_equal(["length"], doit('print("a".lengt)', 1, 15))
- assert_equal(["length"], doit("print('a'.lengt)", 1, 15))
- assert_equal(["length"], doit("((a, b = 1 + 'a'.lengt))", 1, 22))
- end
-
- def test_complete_method__in_method
- assert_equal(["length"], doit(<true))
- module X
- xx # normally NoMethodError
- module_funct
- end
-EOC
- end
-
- # drawback of ignore_NoMethodError
- def test_with_or_without_ignore_NoMethodError
- code = <true)
- end
- end
-
- def test__syntax_error
- assert_raise(ProcessParticularLine::NewCodeError) do
- doit(< == === =~ > >= < <= << >>
- + - * / % ** ~
- ].each do |op|
- ancestors_re = Fixnum.ancestors.map{|x|x.to_s}.join('|')
- assert_match(/^#{ancestors_re}##{Regexp.quote(op)}$/, doit("1 #{op} 2",1,2))
- end
- end
-
- def test_aref_aset__Array
- assert_equal("Array#[]", doit("[0][ 0 ]",1,4))
- assert_equal("Array#[]=", doit("[0][ 0 ]=10",1,4))
- assert_equal("Array#[]", doit("[0][0]",1,4))
- assert_equal("Array#[]=", doit("[0][0]=10",1,4))
- end
-
- def test_aref_aset__Object
- assert_equal("Array#[]", doit("Array.new(3)[ 0 ]",1,13))
- assert_equal("Array#[]=", doit("Array.new(3)[ 0 ]=10",1,13))
- assert_equal("Array#[]", doit("Array.new(3)[0]",1,13))
- assert_equal("Array#[]=", doit("Array.new(3)[0]=10",1,13))
- end
-
- def test_aref_aset__Fixnum
- assert_equal("Fixnum#[]", doit("0[ 0 ]",1,2))
- assert_equal("Fixnum#[]", doit("0[0]",1,2))
- end
-
- def test_aref_aset__String
- assert_equal("String#[]", doit("'a' + '[0]'[ 0 ]",1,12))
- assert_equal("String#[]", doit("'[0]'[ 0 ]",1,6))
- assert_equal("String#[]=", doit("'0'[ 0 ]=10",1,4))
- assert_equal("String#[]", doit("'[0]'[0]",1,6))
- assert_equal("String#[]=", doit("'0'[0]=10",1,4))
- end
-
- def test_phrase
- assert_equal("Array#uniq", doit('Array.new(3).uniq',1))
- assert_equal("Array#uniq", doit('Array.new(3).to_a.uniq',1))
- assert_equal("Array#uniq", doit('Array.new(3).map{|x| x.to_i}.uniq',1))
- assert_equal("Array#uniq", doit('[][0,(1+1)].uniq',1))
- end
-
- def test_percent__String
- assert_equal("String#length", doit('%!foo!.length',1))
- assert_equal("String#length", doit('%q!foo!.length',1))
- assert_equal("String#length", doit('%Q!foo!.length',1))
- assert_equal("String#length", doit('%x!foo!.length',1))
-
- assert_equal("String#length", doit('%{foo}.length',1))
- assert_equal("String#length", doit('%q{foo}.length',1))
- assert_equal("String#length", doit('%q!(!.length',1))
- assert_equal("String#length", doit('%Q!(!.length',1))
- assert_equal("String#length", doit('%x!(!.length',1))
- assert_equal("String#length", doit('%x{(}.length',1))
-
- assert_equal("String#length", doit('%{f(o)o}.length',1))
- assert_equal("String#length", doit('%{f{o}o}.length',1))
- assert_equal("String#length", doit('(%{f{o}o}+%!}x!).length',1))
- end
-
- def test_percent__Array
- assert_equal("Array#length", doit('%w!foo!.length',1))
- assert_equal("Array#length", doit('%W!foo!.length',1))
-
- assert_equal("Array#length", doit('%w{foo}.length',1))
- assert_equal("Array#length", doit('%W{foo}.length',1))
- assert_equal("Array#length", doit('%w!(!.length',1))
- assert_equal("Array#length", doit('%W!(!.length',1))
- assert_equal("Array#length", doit('%w{(}.length',1))
-
- assert_equal("Array#length", doit('%w{f(o)o}.length',1))
- assert_equal("Array#length", doit('%w{f{o}o}.length',1))
- assert_equal("Array#length", doit('(%W{f{o}o}+%w!}x!).length',1))
- end
-
- def test_percent__Regexp
- assert_equal("Regexp#kcode", doit('%r!foo!.kcode',1))
- assert_equal("Regexp#kcode", doit('%r{foo}.kcode',1))
- assert_equal("Regexp#kcode", doit('%r!(!.kcode',1))
- assert_equal("Regexp#kcode", doit('%r[(].kcode',1))
- assert_equal("Regexp#kcode", doit('%r.kcode',1))
- end
-
- def test_percent__Symbol
- assert_equal("Symbol#id2name", doit('%s!foo!.id2name',1))
- assert_equal("Symbol#id2name", doit('%s{foo}.id2name',1))
- assert_equal("Symbol#id2name", doit('%s!(!.id2name',1))
- assert_equal("Symbol#id2name", doit('%s{(}.id2name',1))
- assert_equal("Symbol#id2name", doit('%s(f(o)o).id2name',1))
- end
-
- def test_bare_word__with_NoMethodError
- assert_equal("Module#module_function", doit(<true))
- module X
- xx # normally NoMethodError
- module_function
- end
-EOC
- end
-
- def test__syntax_error
- assert_raise(ProcessParticularLine::NewCodeError) do
- doit(< < Struct
-method_args.data.rb:101:class SubclassOfStructA < StructA
-method_args.data.rb:102:SubclassOfStructA#method_in_b
-method_args.data.rb:104:class < Struct
-method_args.data.rb:104:class StructSubclass <
-method_args.data.rb:105:StructSubclass#method_in_c
-XXX
-
- # To avoid dependency of pwd.
- module StripDir
- def strip_dir!
- slice! %r!^.*/!
- self
- end
- end
-
- @@expected.each do |line|
- begin
- file_lineno_klass_meth, rest = line.split(/\s+/,2)
- if file_lineno_klass_meth =~ /:/
- file, lineno, klass_meth = file_lineno_klass_meth.split(/:/)
- klass_meth = rest if %w[class include extend].include? klass_meth
- else # filename/lineno is unknown
- klass_meth = file_lineno_klass_meth
- end
-
- test_method_name = "test_" + klass_meth
- define_method(test_method_name) do
- actual = @@result.grep(/#{klass_meth}/)[0].extend(StripDir).strip_dir!
- assert_equal line, actual
- end
- rescue Exception
- end
- end
-
- def test_all_tests
- assert_equal @@expected.length, @@result.length, @@result.join("\n")
- end
-
- def test_without_n_option
- first_line = "FixedArgsMethods.singleton (a1)"
- command_output = `ruby '#{SCRIPT}' '#{DATAFILE}'`
- assert_match(/\A#{Regexp.quote(first_line)}\n/, command_output)
- end
-end
-
-
-class TestTAGS < Test::Unit::TestCase
- include MethodArgsScriptConfig
-
- @@TAGS = `ruby '#{SCRIPT}' -t '#{DATAFILE}'`
- def test_filename
- # check whether full path is passed.
- assert_match %r!^\cl\n/.+method_args.data.rb,\d!, @@TAGS
- end
-
- def test_singleton_method
- # including line/byte test
- assert @@TAGS.include?(" def self.singleton(a1) end::FixedArgsMethods.singleton3,45")
- end
-
- def test_instance_method
- assert @@TAGS.include?(" def initialize(arg) end::FixedArgsMethods#initialize4,74")
- end
-
- def test_include
- assert_match(/^ include VariableArgsMethods::AClass/, @@TAGS)
- end
-
- def test_extend
- assert_match(/^ extend VariableArgsMethods::AClass/, @@TAGS)
- end
-
- def test_inheritance
- assert_match(/^class ASubClass < AClass::ASubClass/, @@TAGS)
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/test_options.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/test_options.rb
deleted file mode 100644
index 8751516f2..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/test_options.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-$: << ".." << "../lib"
-require 'rcodetools/options'
-require 'test/unit'
-require 'tmpdir'
-require 'fileutils'
-
-class TestOptionHandler < Test::Unit::TestCase
- include Rcodetools
- include OptionHandler
-
- def include_paths_check
- options = { :include_paths => [] }
- auto_include_paths options[:include_paths], Dir.pwd
- assert options[:include_paths].include?("#{@basedir}/lib")
- assert options[:include_paths].include?("#{@basedir}/bin")
- end
-
- def test_auto_include_paths
- Dir.chdir(Dir.tmpdir) do
- begin
- FileUtils.mkdir_p ["project", "project/lib/project", "project/bin", "project/share"]
- open("project/Rakefile","w"){}
- @basedir = File.expand_path "project"
- Dir.chdir("project/lib/project/") { include_paths_check }
- Dir.chdir("project/lib/") { include_paths_check }
- Dir.chdir("project/bin/") { include_paths_check }
- Dir.chdir("project/") { include_paths_check }
- ensure
- FileUtils.rm_rf "project"
- end
- end
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/test_ruby_toggle_file.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/test_ruby_toggle_file.rb
deleted file mode 100644
index e7960f9a3..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/test_ruby_toggle_file.rb
+++ /dev/null
@@ -1,174 +0,0 @@
-require 'fileutils'
-require 'test/unit'
-require 'ruby_toggle_file'
-require 'tmpdir'
-
-class TestRubyToggleFile < Test::Unit::TestCase
- WORK_DIR = "#{Dir.tmpdir}/zdsfwfwejiotest".freeze
- FileUtils.rm_rf WORK_DIR
-
- def teardown
- FileUtils.rm_rf WORK_DIR
- end
-
- def create(*files)
- for file in files.map{|f| _(f) }
- FileUtils.mkpath(File.dirname(file))
- open(file,"w"){}
- end
- end
-
- def _(path) # make full path
- WORK_DIR + "/" + path
- end
-
- ###########################################################################
- # naming convention #
- # test_METHOD__EXISTP__IMPLEMENTDIR_TESTDIR #
- ###########################################################################
- def test_test_file__exist__lib_test
- create "lib/zero.rb", "test/test_zero.rb"
- rtf = RubyToggleFile.new
- assert_equal _("test/test_zero.rb"), rtf.ruby_toggle_file(_("lib/zero.rb"))
- end
-
- def test_test_file__exist__libone_testone
- create "lib/one/one.rb", "test/one/test_one.rb"
- rtf = RubyToggleFile.new
- assert_equal _("test/one/test_one.rb"), rtf.ruby_toggle_file(_("lib/one/one.rb"))
- end
-
- def test_test_file__exist__libtwo_test
- create "lib/two/two.rb", "test/test_two.rb"
- rtf = RubyToggleFile.new
- assert_equal _("test/test_two.rb"), rtf.ruby_toggle_file(_("lib/two/two.rb"))
- end
-
- def test_test_file__exist__top_test
- create "three.rb", "test_three.rb"
- rtf = RubyToggleFile.new
- assert_equal _("test_three.rb"), rtf.ruby_toggle_file(_("three.rb"))
- end
-
- def test_test_file__not_exist__top
- create "four.rb"
- rtf = RubyToggleFile.new
- assert_equal _("test_four.rb"), rtf.ruby_toggle_file(_("four.rb"))
- end
-
- def test_test_file__not_exist__lib
- create "lib/five.rb"
- rtf = RubyToggleFile.new
- assert_equal _("test/test_five.rb"), rtf.ruby_toggle_file(_("lib/five.rb"))
- end
-
- def test_test_file__not_exist__libsixsix
- create "lib/six/six/six.rb"
- rtf = RubyToggleFile.new
- assert_equal _("test/six/six/test_six.rb"), rtf.ruby_toggle_file(_("lib/six/six/six.rb"))
- end
-
- def test_implementation_file__exist__lib_test
- create "lib/zero.rb", "test/test_zero.rb"
- rtf = RubyToggleFile.new
- assert_equal _("lib/zero.rb"), rtf.ruby_toggle_file(_("test/test_zero.rb"))
- end
-
- def test_implementation_file__exist__libone_testone
- create "lib/one/one.rb", "test/one/test_one.rb"
- rtf = RubyToggleFile.new
- assert_equal _("lib/one/one.rb"), rtf.ruby_toggle_file(_("test/one/test_one.rb"))
- end
-
- def test_implementation_file__exist__libtwo_test
- create "lib/two/two.rb", "test/test_two.rb"
- rtf = RubyToggleFile.new
- assert_equal _("lib/two/two.rb"), rtf.ruby_toggle_file(_("test/test_two.rb"))
- end
-
- def test_implementation_file__exist__top_test
- create "three.rb", "test_three.rb"
- rtf = RubyToggleFile.new
- assert_equal _("three.rb"), rtf.ruby_toggle_file(_("test_three.rb"))
- end
-
- def test_implementation_file__not_exist__none_top
- create "test_seven.rb"
- rtf = RubyToggleFile.new
- assert_equal _("seven.rb"), rtf.ruby_toggle_file(_("test_seven.rb"))
- end
-
- def test_implementation_file__not_exist__none_test
- create "test/test_eight.rb"
- rtf = RubyToggleFile.new
- assert_equal _("lib/eight.rb"), rtf.ruby_toggle_file(_("test/test_eight.rb"))
- end
-
- def test_implementation_file__not_exist__none_testninenine
- create "test/nine/nine/nine.rb"
- rtf = RubyToggleFile.new
- assert_equal _("lib/nine/nine/nine.rb"), rtf.ruby_toggle_file(_("test/nine/nine/test_nine.rb"))
- end
-
- ###########################################################################
- # Rails test #
- ###########################################################################
- def test_test_file__rails_controllers
- create "app/controllers/c.rb", "test/functional/c_test.rb"
- rtf = RubyToggleFile.new
- assert_equal _("test/functional/c_test.rb"), rtf.ruby_toggle_file(_("app/controllers/c.rb"))
- end
-
- def test_test_file__rails_models
- create "app/models/m.rb", "test/unit/m_test.rb"
- rtf = RubyToggleFile.new
- assert_equal _("test/unit/m_test.rb"), rtf.ruby_toggle_file(_("app/models/m.rb"))
- end
-
- def test_test_file__rails_lib
- create "lib/l.rb", "test/unit/test_l.rb", "app/models/m.rb"
- rtf = RubyToggleFile.new
- assert_equal _("test/unit/test_l.rb"), rtf.ruby_toggle_file(_("lib/l.rb"))
- end
-
-
- def test_implementation_file__rails_controllers
- create "app/controllers/c.rb", "test/functional/c_test.rb"
- rtf = RubyToggleFile.new
- assert_equal _("app/controllers/c.rb"), rtf.ruby_toggle_file(_("test/functional/c_test.rb"))
- end
-
- def test_implementation_file__rails_models
- create "app/models/m.rb", "test/unit/m_test.rb"
- rtf = RubyToggleFile.new
- assert_equal _("app/models/m.rb"), rtf.ruby_toggle_file(_("test/unit/m_test.rb"))
- end
-
- def test_implementation_file__rails_lib
- create "lib/l.rb", "test/unit/test_l.rb", "app/models/m.rb"
- rtf = RubyToggleFile.new
- assert_equal _("lib/l.rb"), rtf.ruby_toggle_file(_("test/unit/test_l.rb"))
- end
-end
-
-
-class TestRunHooksWithArgsUntilSuccess < Test::Unit::TestCase
- def m001(x) nil end
- private
- def m002(x) false end
- def m003(x) 100*x end
- def m004(x) 200 end
-
- public
- def test_run_hooks_with_args_until_success__m003
- assert_equal 1000, run_hooks_with_args_until_success(/^m\d+$/, 10)
- end
-
- def test_run_hooks_with_args_until_success__m001
- assert_nil run_hooks_with_args_until_success(/^m001$/, 10)
- end
-
- def test_run_hooks_with_args_until_success__m004
- assert_equal 200, run_hooks_with_args_until_success(/^m004$/, 10)
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/test_xmpfilter.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/test_xmpfilter.rb
deleted file mode 100644
index 0ed9aa6b8..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/test_xmpfilter.rb
+++ /dev/null
@@ -1,221 +0,0 @@
-
-require 'test/unit'
-$: << ".." << "../lib"
-require "rcodetools/xmpfilter"
-require 'rubygems'
-require 'mocha'
-
-class TestXMPFilter < Test::Unit::TestCase
- include Rcodetools
- def test_extract_data__results
- marker = XMPFilter::MARKER
- str = <<-EOF
-#{marker}[1] => Fixnum 42
-#{marker}[1] => Fixnum 0
-#{marker}[1] ==> var
-#{marker}[1] ==> var2
-#{marker}[4] ==> var3
-#{marker}[2] ~> some exception
-#{marker}[10] => Fixnum 42
- EOF
- xmp = XMPFilter.new
- data = xmp.extract_data(str)
- assert_equal([[1, [["Fixnum", "42"], ["Fixnum", "0"]]], [10, [["Fixnum", "42"]]]], data.results.sort)
- end
-
- def test_extract_data__exceptions
- marker = XMPFilter::MARKER
- str = <<-EOF
-#{marker}[1] => Fixnum 42
-#{marker}[1] => Fixnum 0
-#{marker}[1] ==> var
-#{marker}[1] ==> var2
-#{marker}[4] ==> var3
-#{marker}[2] ~> some exception
-#{marker}[10] => Fixnum 42
- EOF
- xmp = XMPFilter.new
- data = xmp.extract_data(str)
- assert_equal([[2, ["some exception"]]], data.exceptions.sort)
- end
-
- def test_extract_data__bindings
- marker = XMPFilter::MARKER
- str = <<-EOF
-#{marker}[1] => Fixnum 42
-#{marker}[1] => Fixnum 0
-#{marker}[1] ==> var
-#{marker}[1] ==> var2
-#{marker}[4] ==> var3
-#{marker}[2] ~> some exception
-#{marker}[10] => Fixnum 42
- EOF
- xmp = XMPFilter.new
- data = xmp.extract_data(str)
- assert_equal([[1, ["var", "var2"]], [4, ["var3"]]], data.bindings.sort)
- end
-
- def test_interpreter_command
- xmp = XMPFilter.new(:interpreter=>"ruby", :detect_rct_fork => false)
- assert_equal(%w[ruby -w], xmp.interpreter_command)
- end
-
- def test_interpreter_command_detect_rct_fork
- Fork.stubs(:run?).returns true
- xmp = XMPFilter.new(:interpreter=>"ruby", :detect_rct_fork => true)
- assert_equal(%w[ruby -S rct-fork-client], xmp.interpreter_command)
- end
-
- def test_interpreter_command_use_rbtest
- xmp = XMPFilter.new(:interpreter=>"ruby", :use_rbtest => true)
- assert_equal(%w[ruby -S rbtest], xmp.interpreter_command)
- end
-
- def test_initialize__test_script_1
- XMPFilter.any_instance.stubs(:safe_require_code).returns("require 'test/unit'")
- xmp = XMPFilter.new(:test_script=>"/path/to/test/test_ruby_toggle_file.rb",
- :test_method=>"test_implementation_file_file_exist",
- :filename=>"/path/to/lib/ruby_toggle_file.rb")
-
- evals_expected = [
- %q!$LOADED_FEATURES << "ruby_toggle_file.rb"!,
- %q!require 'test/unit'!,
- %q!load "/path/to/test/test_ruby_toggle_file.rb"!,
- %q!Test::Unit::AutoRunner.run(false, nil, ["-n", "test_implementation_file_file_exist"])!
- ]
- assert_equal evals_expected, xmp.instance_variable_get(:@evals)
- end
-
- def test_initialize__test_script_2
- XMPFilter.any_instance.stubs(:safe_require_code).returns("require 'test/unit'")
- xmp = XMPFilter.new(:test_script=>"/path/to/test_ruby_toggle_file.rb",
- :test_method=>"test_implementation_file_file_exist",
- :filename=>"/path/to/ruby_toggle_file.rb")
-
- evals_expected = [
- %q!$LOADED_FEATURES << "ruby_toggle_file.rb"!,
- %q!require 'test/unit'!,
- %q!load "/path/to/test_ruby_toggle_file.rb"!,
- %q!Test::Unit::AutoRunner.run(false, nil, ["-n", "test_implementation_file_file_exist"])!
- ]
- assert_equal evals_expected, xmp.instance_variable_get(:@evals)
- end
-
- def test_initialize__test_script_3
- test_script = File.join(File.dirname(__FILE__), "data/sample_test_script.rb")
- filename = File.join(File.dirname(__FILE__), "data/sample.rb")
- XMPFilter.any_instance.stubs(:safe_require_code).returns("require 'test/unit'")
- xmp = XMPFilter.new(:test_script=>test_script, :test_method=>"4", :filename=>filename)
-
- evals_expected = [
- %q!$LOADED_FEATURES << "sample.rb"!,
- %q!require 'test/unit'!,
- %Q!load #{test_script.dump}!,
- %q!Test::Unit::AutoRunner.run(false, nil, ["-n", "test_sample0"])!
- ]
- assert_equal evals_expected, xmp.instance_variable_get(:@evals)
- end
-
- def test_initialize__test_script__filename_eq_test_script
- test_script = File.join(File.dirname(__FILE__), "data/sample_test_script.rb")
- filename = test_script
- xmp = XMPFilter.new(:test_script=>test_script, :test_method=>"4", :filename=>filename)
-
- evals_expected = [
- %q!Test::Unit::AutoRunner.run(false, nil, ["-n", "test_sample0"])!
- ]
- assert_equal evals_expected, xmp.instance_variable_get(:@evals)
- end
-
- def test_get_test_method_from_lineno
- file = File.join(File.dirname(__FILE__), "data/sample_test_script.rb")
- xmp = XMPFilter.new
- assert_equal("test_sample0", xmp.get_test_method_from_lineno(file, 4))
- assert_equal("test_sample1", xmp.get_test_method_from_lineno(file, 7))
- assert_equal("test_sample1", xmp.get_test_method_from_lineno(file, 8))
- assert_equal(nil, xmp.get_test_method_from_lineno(file, 1))
- end
-
- # Use methods to avoid confusing syntax highlighting
- def beg() "=begin" end
- def ed() "=end" end
-
- def test_s_detect_rbtest_1
- rbtest_script_1 = < true}
- assert_equal true, XMPFilter.detect_rbtest(rbtest_script_1, opts)
- assert_equal true, opts[:use_rbtest]
- opts = {:detect_rbtest => false}
- assert_equal false, XMPFilter.detect_rbtest(rbtest_script_1, opts)
- assert_equal false, opts[:use_rbtest]
- opts = {:detect_rbtest => false, :use_rbtest => true}
- assert_equal true, XMPFilter.detect_rbtest(rbtest_script_1, opts)
- assert_equal true, opts[:use_rbtest]
- end
-
- def test_s_detect_rbtest_2
- rbtest_script_2 = < true}
- assert_equal true, XMPFilter.detect_rbtest(rbtest_script_2, opts)
- assert_equal true, opts[:use_rbtest]
- opts = {:detect_rbtest => false}
- assert_equal false, XMPFilter.detect_rbtest(rbtest_script_2, opts)
- assert_equal false, opts[:use_rbtest]
- end
-
- def test_s_detect_rbtest_3
- no_rbtest_script = < true}
- assert_equal false, XMPFilter.detect_rbtest(no_rbtest_script, opts)
- assert_equal false, opts[:use_rbtest]
- opts = {:detect_rbtest => false}
- assert_equal false, XMPFilter.detect_rbtest(no_rbtest_script, opts)
- assert_equal false, opts[:use_rbtest]
- end
-
-end
-
-class TestTempScript < Test::Unit::TestCase
- def test(script)
- Rcodetools::XMPFilter.new.__send__(:split_shbang,script)
- end
-
- def test_none
- assert_equal [[], ["1\n"]], test(<
-arr.last # \=>
-EOF
- ANNOTATION_VAR_INFERENCE_OUTPUT = <]\", arr.inspect)
-assert_equal(x, arr.last)
-assert_kind_of(X, arr.last)
-assert_equal(\"#\", arr.last.inspect)
-EOF
-
- def test_annotation_var_inference
- xmp = XMPTestUnitFilter.new
- assert_equal(ANNOTATION_VAR_INFERENCE_OUTPUT,
- xmp.annotate(ANNOTATION_VAR_INFERENCE_INPUT).join(""))
- end
-
- def test_equality_assertions
- xmp = XMPTestUnitFilter.new
- assert_equal(["a = 1\n", "assert_equal(1, a)"], xmp.annotate("a = 1\na # \=>"))
- assert_equal(["a = {1,2}\n", "assert_equal({1=>2}, a)"],
- xmp.annotate("a = {1,2}\na # \=>"))
- assert_equal(["a = [1,2]\n", "assert_equal([1, 2], a)"],
- xmp.annotate("a = [1,2]\na # \=>"))
- assert_equal(["a = 'foo'\n", "assert_equal(\"foo\", a)"],
- xmp.annotate("a = 'foo'\na # \=>"))
- assert_equal(["a = 1.0\n", "assert_in_delta(1.0, a, 0.0001)"],
- xmp.annotate("a = 1.0\na # \=>"))
- end
-
- def test_raise_assertion
- code = <
-EOF
- xmp = XMPTestUnitFilter.new
- assert_equal(["class NoGood < Exception; end\n",
- "assert_raise(NoGood){raise NoGood}\n"], xmp.annotate(code))
- end
-
- def test_assert_nil
- xmp = XMPTestUnitFilter.new
- assert_equal(["a = nil\n", "assert_nil(a)"], xmp.annotate("a = nil\na # \=>"))
- end
-
- def test_poetry_mode
- code = <
-a = 1.0
-a # \=>
-raise "foo" # \=>
-a = nil
-a # \=>
-EOF
- output = < false)
- assert_equal(output, xmp.annotate(code).join)
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/tmp_functional.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/tmp_functional.rb
deleted file mode 100644
index 339fdfc2b..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/tmp_functional.rb
+++ /dev/null
@@ -1,162 +0,0 @@
-require 'test/unit'
-
-module TestFunctional
- DIR = File.expand_path(File.dirname(__FILE__))
- LIBDIR = File.expand_path(DIR + '/../lib')
-
- module DefineFunctionalTests
- def define_functional_tests(bin, exec, tests)
- tests.each_pair do |test, opts|
- define_method("test_#{test}") do
-
- output = `ruby -I#{LIBDIR} #{exec} #{opts.join(" ")} #{DIR}/data/#{test}-input.rb`
- outputfile = "#{DIR}/data/#{test}-output.rb"
- taffile = "#{DIR}/data/#{bin}/#{test}.taf"
- open(taffile, "w") do |f|
- f.puts "=========="
- f.puts test
- f.puts "=========="
- f.puts bin + " " + opts.join(" ")
- f.puts "=========="
- f.puts File.read("#{DIR}/data/#{test}-input.rb")
- f.puts "=========="
- f.puts File.read("#{DIR}/data/#{test}-output.rb")
- end
-# assert_equal(File.read(outputfile), output)
- end
- end
- end
- end
-
- class TestXmpfilter < Test::Unit::TestCase
- extend DefineFunctionalTests
- tests = {
- :simple_annotation => [], :unit_test => ["-u"], :rspec => ["-s"],
- :no_warnings => ["--no-warnings"], :bindings => ["--poetry", "-u"],
- :add_markers => ["-m"], :unit_test_rbtest => ["-u", "--rbtest"],
- :unit_test_detect_rbtest => ["-u", "--detect-rbtest"],
- :unit_test_detect_rbtest2 => ["--detect-rbtest"],
- }
- define_functional_tests "xmpfilter", File.expand_path(DIR + '/../bin/xmpfilter'), tests
- end
-
- class TestRctComplete < Test::Unit::TestCase
- extend DefineFunctionalTests
- tests = {
- :completion_rbtest => [ "--rbtest", "--line=6" ],
- :completion_detect_rbtest => [ "--detect-rbtest", "--line=6" ],
- :completion_detect_rbtest2 => [ "--detect-rbtest", "--line=1" ],
- }
- define_functional_tests "rct-complete", File.expand_path(DIR + '/../bin/rct-complete'), tests
- end
-
- class TestRctDoc < Test::Unit::TestCase
- extend DefineFunctionalTests
- tests = {
- :doc_rbtest => [ "--rbtest", "--line=6" ],
- :doc_detect_rbtest => [ "--detect-rbtest", "--line=1" ],
- :doc_detect_rbtest2 => [ "--detect-rbtest", "--line=6" ],
- }
- define_functional_tests "rct-doc", File.expand_path(DIR + '/../bin/rct-doc'), tests
- end
-
-
- # Other tests are in test_run.rb
- class TestRctCompleteTDC < Test::Unit::TestCase
- test = :completion_in_method
- inputfile = "#{DIR}/data/#{test}-input.rb"
- outputfile = "#{DIR}/data/#{test}-output.rb"
- test_script = "#{DIR}/data/#{test}-test.rb"
- common_opts = ["--filename #{inputfile}", "--line 2"]
- right_output = File.read(outputfile)
- wrong_output = "\n"
-
- tests = {
- :completion_in_method__testscript =>
- [ common_opts + ["-t #{test_script}"], right_output ],
- :completion_in_method__testmethod =>
- [ common_opts + ["-t #{test_script}@test_fooz"], right_output ],
- :completion_in_method__wrong_testmethod =>
- [ common_opts + ["-t #{test_script}@test_NOT_FOUND"], wrong_output ],
- }
- exec = File.expand_path(DIR + '/../bin/rct-complete')
-# tests.each_pair do |test, (opts, expected)|
-# define_method("test_#{test}") do
-# output = `ruby -I#{LIBDIR} #{exec} #{opts.join(" ")} #{inputfile}`
-
-# taffile = "#{DIR}/data/#{bin}/#{test}.taf"
-# open(taffile, "w") do |f|
-# f.puts "=========="
-# f.puts test
-# f.puts "=========="
-# f.puts bin + " " + opts.join(" ")
-# f.puts "=========="
-# f.puts File.read("#{DIR}/data/#{test}-input.rb")
-# f.puts "=========="
-# f.puts File.read("#{DIR}/data/#{test}-output.rb")
-# end
-# end
-# end
-
- test=:completion_in_method__testscript
- define_method("test_#{test}") do
- taffile = "#{DIR}/data/rct-complete-TDC/completion_in_method__testscript.taf"
- open(taffile, "w") do |f|
- opts = tests[test]
- f.puts "=========="
- f.puts test
- f.puts "=========="
- f.puts "rct-complete " + opts.join(" ")
- f.puts "=========="
- test0 = :completion_in_method
- f.puts File.read("#{DIR}/data/#{test0}-input.rb")
- f.puts "=========="
- f.puts File.read("#{DIR}/data/#{test0}-output.rb")
- f.puts "=========="
- f.puts File.read("#{DIR}/data/#{test0}-test.rb")
- end
-
- end
-
- test=:completion_in_method__testmethod
- define_method("test_#{test}") do
- taffile = "#{DIR}/data/rct-complete-TDC/completion_in_method__testmethod.taf"
- open(taffile, "w") do |f|
- opts = tests[test]
- f.puts "=========="
- f.puts test
- f.puts "=========="
- f.puts "rct-complete " + opts.join(" ")
- f.puts "=========="
- test0 = :completion_in_method
- f.puts File.read("#{DIR}/data/#{test0}-input.rb")
- f.puts "=========="
- f.puts File.read("#{DIR}/data/#{test0}-output.rb")
- f.puts "=========="
- f.puts File.read("#{DIR}/data/#{test0}-test.rb")
- end
-
- end
-
- test=:completion_in_method__wrong_testmethod
- define_method("test_#{test}") do
- taffile = "#{DIR}/data/rct-complete-TDC/completion_in_method__wrong_testmethod.taf"
- open(taffile, "w") do |f|
- opts = tests[test]
- f.puts "=========="
- f.puts test
- f.puts "=========="
- f.puts "rct-complete " + opts.join(" ")
- f.puts "=========="
- test0 = :completion_in_method
- f.puts File.read("#{DIR}/data/#{test0}-input.rb")
- f.puts "=========="
- f.puts
- f.puts "=========="
- f.puts File.read("#{DIR}/data/#{test0}-test.rb")
- end
-
- end
-
- end
-end
diff --git a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/tmp_run.rb b/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/tmp_run.rb
deleted file mode 100644
index b3bed0d01..000000000
--- a/bundles/ruby.tmbundle/Support/vendor/rcodetools/test/tmp_run.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-require 'test/unit'
-require 'rcodetools/xmpfilter'
-require 'rcodetools/xmptestunitfilter'
-require 'rcodetools/completion'
-require 'rcodetools/doc'
-require 'rcodetools/options'
-require 'stringio'
-
-class TestRun < Test::Unit::TestCase
- include Rcodetools
- DIR = File.expand_path(File.dirname(__FILE__))
-
- tests = {
-# :rspec_poetry => {:klass => XMPRSpecFilter, :interpreter => "spec", :use_parentheses => false},
- :rspec_poetry => ["xmpfilter", "-s --poetry"],
-# :unit_test_poetry => {:klass => XMPTestUnitFilter, :use_parentheses => false},
- :unit_test_poetry => ["xmpfilter", "-u --poetry"],
-
-# :completion => {:klass => XMPCompletionFilter, :lineno => 1},
- :completion => ["rct-complete", "-C --line=1"],
-# :completion_emacs => {:klass => XMPCompletionEmacsFilter, :lineno => 1},
- :completion_emacs => ["rct-complete", "--completion-emacs --line=1"],
-# :completion_emacs_icicles => {:klass => XMPCompletionEmacsIciclesFilter, :lineno => 1},
- :completion_emacs_icicles => ["rct-complete","--completion-emacs-icicles --line=1"],
-# :completion_class_info => {:klass => XMPCompletionClassInfoFilter, :lineno => 1},
- :completion_class_info => ["rct-complete", "--completion-class-info --line=1"],
-# :completion_class_info_no_candidates => {:klass => XMPCompletionClassInfoFilter, :lineno => 1},
- :completion_class_info_no_candidates => ["rct-complete", "--completion-class-info --line=1"],
-
-# :doc => {:klass => XMPDocFilter, :lineno => 1},
-# :refe => {:klass => XMPReFeFilter, :lineno => 1},
-# :ri => {:klass => XMPRiFilter, :lineno => 1},
-# :ri_emacs => {:klass => XMPRiEmacsFilter, :lineno => 1},
-# :ri_vim => {:klass => XMPRiVimFilter, :lineno => 1},
- :doc => ["rct-doc", "-D --line=1"],
- :refe => ["rct-doc", "--refe --line=1"],
- :ri => ["rct-doc", "--ri --line=1"],
- :ri_emacs => ["rct-doc", "--ri-emacs --line=1"],
- :ri_vim => ["rct-doc", "--ri-vim --line=1"],
-
- }
- DIR = File.expand_path(File.dirname(__FILE__))
- LIBDIR = File.expand_path(DIR + '/../lib')
-
- tests.each_pair do |test, (bin,opts)|
- define_method("test_#{test}") do
- inputfile = "#{DIR}/data/#{test}-input.rb"
- outputfile = "#{DIR}/data/#{test}-output.rb"
-
-# exec = File.expand_path(DIR + '/../bin/xmpfilter')
-# output = `ruby -I#{LIBDIR} #{exec} #{opts} #{DIR}/data/#{test}-input.rb`
-# outputfile = "#{DIR}/data/#{test}-output.rb"
- taffile = "#{DIR}/data/#{bin}/#{test}.taf"
- open(taffile, "w") do |f|
- f.puts "=========="
- f.puts test
- f.puts "=========="
- f.puts bin + " " + opts
- f.puts "=========="
- f.puts File.read("#{DIR}/data/#{test}-input.rb")
- f.puts "=========="
- f.puts File.read("#{DIR}/data/#{test}-output.rb")
- end
- end
- end
-end
diff --git a/bundles/ruby.tmbundle/Syntaxes/Ruby.plist b/bundles/ruby.tmbundle/Syntaxes/Ruby.plist
deleted file mode 100644
index 8070bb973..000000000
--- a/bundles/ruby.tmbundle/Syntaxes/Ruby.plist
+++ /dev/null
@@ -1,2853 +0,0 @@
-
-
-
-
- comment
-
- TODO: unresolved issues
-
- text:
- "p << end
- print me!
- end"
- symptoms:
- not recognized as a heredoc
- solution:
- there is no way to distinguish perfectly between the << operator and the start
- of a heredoc. Currently, we require assignment to recognize a heredoc. More
- refinement is possible.
- • Heredocs with indented terminators (<<-) are always distinguishable, however.
- • Nested heredocs are not really supportable at present
-
- text:
- print <<-'THERE'
- This is single quoted.
- The above used #{Time.now}
- THERE
- symtoms:
- From Programming Ruby p306; should be a non-interpolated heredoc.
-
- text:
- "a\332a"
- symptoms:
- '\332' is not recognized as slash3.. which should be octal 332.
- solution:
- plain regexp.. should be easy.
-
- text:
- val?(a):p(b)
- val?'a':'b'
- symptoms:
- ':p' is recognized as a symbol.. its 2 things ':' and 'p'.
- :'b' has same problem.
- solution:
- ternary operator rule, precedence stuff, symbol rule.
- but also consider 'a.b?(:c)' ??
-
- fileTypes
-
- rb
- rbx
- rjs
- Rakefile
- rake
- cgi
- fcgi
- gemspec
- irbrc
- capfile
-
- firstLineMatch
- ^#!/.*\bruby
- foldingStartMarker
- (?x)^
- (\s*+
- (module|class|def(?!.*\bend\s*$)
- |unless|if
- |case
- |begin
- |for|while|until
- |^=begin
- |( "(\\.|[^"])*+" # eat a double quoted string
- | '(\\.|[^'])*+' # eat a single quoted string
- | [^#"'] # eat all but comments and strings
- )*
- ( \s (do|begin|case)
- | (?<!\$)[-+=&|*/~%^<>~] \s*+ (if|unless)
- )
- )\b
- (?! [^;]*+ ; .*? \bend\b )
- |( "(\\.|[^"])*+" # eat a double quoted string
- | '(\\.|[^'])*+' # eat a single quoted string
- | [^#"'] # eat all but comments and strings
- )*
- ( \{ (?! [^}]*+ \} )
- | \[ (?! [^\]]*+ \] )
- )
- ).*$
- | [#] .*? \(fold\) \s*+ $ # Sune’s special marker
-
- foldingStopMarker
- (?x)
- ( (^|;) \s*+ end \s*+ ([#].*)? $
- | (^|;) \s*+ end \. .* $
- | ^ \s*+ [}\]] ,? \s*+ ([#].*)? $
- | [#] .*? \(end\) \s*+ $ # Sune’s special marker
- | ^=end
- )
- keyEquivalent
- ^~R
- name
- Ruby
- patterns
-
-
- captures
-
- 1
-
- name
- keyword.control.class.ruby
-
- 2
-
- name
- entity.name.type.class.ruby
-
- 4
-
- name
- entity.other.inherited-class.ruby
-
- 5
-
- name
- punctuation.separator.inheritance.ruby
-
- 6
-
- name
- variable.other.object.ruby
-
- 7
-
- name
- punctuation.definition.variable.ruby
-
-
- match
- ^\s*(class)\s+(([.a-zA-Z0-9_:]+(\s*(<)\s*[.a-zA-Z0-9_:]+)?)|((<<)\s*[.a-zA-Z0-9_:]+))
- name
- meta.class.ruby
-
-
- captures
-
- 1
-
- name
- keyword.control.module.ruby
-
- 2
-
- name
- entity.name.type.module.ruby
-
- 3
-
- name
- entity.other.inherited-class.module.first.ruby
-
- 4
-
- name
- punctuation.separator.inheritance.ruby
-
- 5
-
- name
- entity.other.inherited-class.module.second.ruby
-
- 6
-
- name
- punctuation.separator.inheritance.ruby
-
- 7
-
- name
- entity.other.inherited-class.module.third.ruby
-
- 8
-
- name
- punctuation.separator.inheritance.ruby
-
-
- match
- ^\s*(module)\s+(([A-Z]\w*(::))?([A-Z]\w*(::))?([A-Z]\w*(::))*[A-Z]\w*)
- name
- meta.module.ruby
-
-
- comment
- else if is a common mistake carried over from other languages. it works if you put in a second end, but it’s never what you want.
- match
- (?<!\.)\belse(\s)+if\b
- name
- invalid.deprecated.ruby
-
-
- comment
- everything being a reserved word, not a value and needing a 'end' is a..
- match
- (?<!\.)\b(BEGIN|begin|case|class|else|elsif|END|end|ensure|for|if|in|module|rescue|then|unless|until|when|while)\b(?![?!])
- name
- keyword.control.ruby
-
-
- comment
- contextual smart pair support for block parameters
- match
- (?<!\.)\bdo\b\s*
- name
- keyword.control.start-block.ruby
-
-
- comment
- contextual smart pair support
- match
- (?<=\{)(\s+)
- name
- meta.syntax.ruby.start-block
-
-
- comment
- as above, just doesn't need a 'end' and does a logic operation
- match
- (?<!\.)\b(and|not|or)\b
- name
- keyword.operator.logical.ruby
-
-
- comment
- just as above but being not a logical operation
- match
- (?<!\.)\b(alias|alias_method|break|next|redo|retry|return|super|undef|yield)\b(?![?!])|\bdefined\?|\bblock_given\?
- name
- keyword.control.pseudo-method.ruby
-
-
- match
- \b(nil|true|false)\b(?![?!])
- name
- constant.language.ruby
-
-
- match
- \b(__(FILE|LINE)__|self)\b(?![?!])
- name
- variable.language.ruby
-
-
- comment
- everything being a method but having a special function is a..
- match
- \b(initialize|new|loop|include|extend|raise|attr_reader|attr_writer|attr_accessor|attr|catch|throw|private|module_function|public|protected)\b(?![?!])
- name
- keyword.other.special-method.ruby
-
-
- begin
- \b(require|gem)\b
- captures
-
- 1
-
- name
- keyword.other.special-method.ruby
-
-
- end
- $|(?=#)
- name
- meta.require.ruby
- patterns
-
-
- include
- $self
-
-
-
-
- captures
-
- 1
-
- name
- punctuation.definition.variable.ruby
-
-
- match
- (@)[a-zA-Z_]\w*
- name
- variable.other.readwrite.instance.ruby
-
-
- captures
-
- 1
-
- name
- punctuation.definition.variable.ruby
-
-
- match
- (@@)[a-zA-Z_]\w*
- name
- variable.other.readwrite.class.ruby
-
-
- captures
-
- 1
-
- name
- punctuation.definition.variable.ruby
-
-
- match
- (\$)[a-zA-Z_]\w*
- name
- variable.other.readwrite.global.ruby
-
-
- captures
-
- 1
-
- name
- punctuation.definition.variable.ruby
-
-
- match
- (\$)(!|@|&|`|'|\+|\d+|~|=|/|\\|,|;|\.|<|>|_|\*|\$|\?|:|"|-[0adFiIlpv])
- name
- variable.other.readwrite.global.pre-defined.ruby
-
-
- begin
- \b(ENV)\[
- beginCaptures
-
- 1
-
- name
- variable.other.constant.ruby
-
-
- end
- \]
- name
- meta.environment-variable.ruby
- patterns
-
-
- include
- $self
-
-
-
-
- match
- \b[A-Z]\w*(?=((\.|::)[A-Za-z]|\[))
- name
- support.class.ruby
-
-
- match
- \b[A-Z]\w*\b
- name
- variable.other.constant.ruby
-
-
- begin
- (?x)
- (?=def\b) # an optimization to help Oniguruma fail fast
- (?<=^|\s)(def)\s+ # the def keyword
- ( (?>[a-zA-Z_]\w*(?>\.|::))? # a method name prefix
- (?>[a-zA-Z_]\w*(?>[?!]|=(?!>))? # the method name
- |===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) # …or an operator method
- \s*(\() # the openning parenthesis for arguments
-
- beginCaptures
-
- 1
-
- name
- keyword.control.def.ruby
-
- 2
-
- name
- entity.name.function.ruby
-
- 3
-
- name
- punctuation.definition.parameters.ruby
-
-
- comment
- the method pattern comes from the symbol pattern, see there for a explaination
- contentName
- variable.parameter.function.ruby
- end
- \)
- endCaptures
-
- 0
-
- name
- punctuation.definition.parameters.ruby
-
-
- name
- meta.function.method.with-arguments.ruby
- patterns
-
-
- include
- $self
-
-
-
-
- begin
- (?x)
- (?=def\b) # an optimization to help Oniguruma fail fast
- (?<=^|\s)(def)\s+ # the def keyword
- ( (?>[a-zA-Z_]\w*(?>\.|::))? # a method name prefix
- (?>[a-zA-Z_]\w*(?>[?!]|=(?!>))? # the method name
- |===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) # …or an operator method
- [ \t] # the space separating the arguments
- (?=[ \t]*[^\s#;]) # make sure arguments and not a comment follow
-
- beginCaptures
-
- 1
-
- name
- keyword.control.def.ruby
-
- 2
-
- name
- entity.name.function.ruby
-
-
- comment
- same as the previous rule, but without parentheses around the arguments
- contentName
- variable.parameter.function.ruby
- end
- $
- name
- meta.function.method.with-arguments.ruby
- patterns
-
-
- include
- $self
-
-
-
-
- captures
-
- 1
-
- name
- keyword.control.def.ruby
-
- 3
-
- name
- entity.name.function.ruby
-
-
- comment
- the optional name is just to catch the def also without a method-name
- match
- (?x)
- (?=def\b) # an optimization to help Oniguruma fail fast
- (?<=^|\s)(def)\b # the def keyword
- ( \s+ # an optional group of whitespace followed by…
- ( (?>[a-zA-Z_]\w*(?>\.|::))? # a method name prefix
- (?>[a-zA-Z_]\w*(?>[?!]|=(?!>))? # the method name
- |===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) )? # …or an operator method
-
- name
- meta.function.method.without-arguments.ruby
-
-
- match
- \b(0[xX]\h(?>_?\h)*|\d(?>_?\d)*(\.(?![^[:space:][:digit:]])(?>_?\d)*)?([eE][-+]?\d(?>_?\d)*)?|0[bB][01]+)\b
- name
- constant.numeric.ruby
-
-
- begin
- :'
- captures
-
- 0
-
- name
- punctuation.definition.constant.ruby
-
-
- end
- '
- name
- constant.other.symbol.single-quoted.ruby
- patterns
-
-
- match
- \\['\\]
- name
- constant.character.escape.ruby
-
-
-
-
- begin
- :"
- captures
-
- 0
-
- name
- punctuation.definition.constant.ruby
-
-
- end
- "
- name
- constant.other.symbol.double-quoted.ruby
- patterns
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
-
-
- comment
- Needs higher precidence than regular expressions.
- match
- (?<!\()/=
- name
- keyword.operator.assignment.augmented.ruby
-
-
- begin
- '
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- single quoted string (does not allow interpolation)
- end
- '
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.quoted.single.ruby
- patterns
-
-
- match
- \\'|\\\\
- name
- constant.character.escape.ruby
-
-
-
-
- begin
- "
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- double quoted string (allows for interpolation)
- end
- "
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.quoted.double.ruby
- patterns
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
-
-
- begin
- `
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- execute string (allows for interpolation)
- end
- `
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.interpolated.ruby
- patterns
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
-
-
- begin
- %x\{
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- execute string (allow for interpolation)
- end
- \}
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.interpolated.ruby
- patterns
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
- include
- #nest_curly_i
-
-
-
-
- begin
- %x\[
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- execute string (allow for interpolation)
- end
- \]
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.interpolated.ruby
- patterns
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
- include
- #nest_brackets_i
-
-
-
-
- begin
- %x\<
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- execute string (allow for interpolation)
- end
- \>
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.interpolated.ruby
- patterns
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
- include
- #nest_ltgt_i
-
-
-
-
- begin
- %x\(
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- execute string (allow for interpolation)
- end
- \)
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.interpolated.ruby
- patterns
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
- include
- #nest_parens_i
-
-
-
-
- begin
- %x([^\w])
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- execute string (allow for interpolation)
- end
- \1
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.interpolated.ruby
- patterns
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
-
-
- begin
- (?x)
- (?:
- ^ # beginning of line
- | (?<= # or look-behind on:
- [=>~(?:\[,|&;]
- | [\s;]if\s # keywords
- | [\s;]elsif\s
- | [\s;]while\s
- | [\s;]unless\s
- | [\s;]when\s
- | [\s;]assert_match\s
- | [\s;]or\s # boolean opperators
- | [\s;]and\s
- | [\s;]not\s
- | [\s.]index\s # methods
- | [\s.]scan\s
- | [\s.]sub\s
- | [\s.]sub!\s
- | [\s.]gsub\s
- | [\s.]gsub!\s
- | [\s.]match\s
- )
- | (?<= # or a look-behind with line anchor:
- ^when\s # duplication necessary due to limits of regex
- | ^if\s
- | ^elsif\s
- | ^while\s
- | ^unless\s
- )
- )
- \s*((/))(?![*+{}?])
-
- captures
-
- 1
-
- name
- string.regexp.classic.ruby
-
- 2
-
- name
- punctuation.definition.string.ruby
-
-
- comment
- regular expressions (normal)
- we only start a regexp if the character before it (excluding whitespace)
- is what we think is before a regexp
-
- contentName
- string.regexp.classic.ruby
- end
- ((/[eimnosux]*))
- patterns
-
-
- include
- #regex_sub
-
-
-
-
- begin
- %r\{
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- regular expressions (literal)
- end
- \}[eimnosux]*
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.regexp.mod-r.ruby
- patterns
-
-
- include
- #regex_sub
-
-
- include
- #nest_curly_r
-
-
-
-
- begin
- %r\[
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- regular expressions (literal)
- end
- \][eimnosux]*
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.regexp.mod-r.ruby
- patterns
-
-
- include
- #regex_sub
-
-
- include
- #nest_brackets_r
-
-
-
-
- begin
- %r\(
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- regular expressions (literal)
- end
- \)[eimnosux]*
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.regexp.mod-r.ruby
- patterns
-
-
- include
- #regex_sub
-
-
- include
- #nest_parens_r
-
-
-
-
- begin
- %r\<
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- regular expressions (literal)
- end
- \>[eimnosux]*
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.regexp.mod-r.ruby
- patterns
-
-
- include
- #regex_sub
-
-
- include
- #nest_ltgt_r
-
-
-
-
- begin
- %r([^\w])
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- regular expressions (literal)
- end
- \1[eimnosux]*
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.regexp.mod-r.ruby
- patterns
-
-
- include
- #regex_sub
-
-
-
-
- begin
- %[QWSR]?\(
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- literal capable of interpolation ()
- end
- \)
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.quoted.other.literal.upper.ruby
- patterns
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
- include
- #nest_parens_i
-
-
-
-
- begin
- %[QWSR]?\[
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- literal capable of interpolation []
- end
- \]
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.quoted.other.literal.upper.ruby
- patterns
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
- include
- #nest_brackets_i
-
-
-
-
- begin
- %[QWSR]?\<
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- literal capable of interpolation <>
- end
- \>
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.quoted.other.literal.upper.ruby
- patterns
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
- include
- #nest_ltgt_i
-
-
-
-
- begin
- %[QWSR]?\{
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- literal capable of interpolation -- {}
- end
- \}
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.quoted.double.ruby.mod
- patterns
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
- include
- #nest_curly_i
-
-
-
-
- begin
- %[QWSR]([^\w])
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- literal capable of interpolation -- wildcard
- end
- \1
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.quoted.other.literal.upper.ruby
- patterns
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
-
-
- begin
- %([^\w\s=])
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- literal capable of interpolation -- wildcard
- end
- \1
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.quoted.other.literal.other.ruby
- patterns
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
-
-
- begin
- %[qws]\(
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- literal incapable of interpolation -- ()
- end
- \)
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.quoted.other.literal.lower.ruby
- patterns
-
-
- match
- \\\)|\\\\
- name
- constant.character.escape.ruby
-
-
- include
- #nest_parens
-
-
-
-
- begin
- %[qws]\<
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- literal incapable of interpolation -- <>
- end
- \>
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.quoted.other.literal.lower.ruby
- patterns
-
-
- match
- \\\>|\\\\
- name
- constant.character.escape.ruby
-
-
- include
- #nest_ltgt
-
-
-
-
- begin
- %[qws]\[
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- literal incapable of interpolation -- []
- end
- \]
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.quoted.other.literal.lower.ruby
- patterns
-
-
- match
- \\\]|\\\\
- name
- constant.character.escape.ruby
-
-
- include
- #nest_brackets
-
-
-
-
- begin
- %[qws]\{
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- literal incapable of interpolation -- {}
- end
- \}
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.quoted.other.literal.lower.ruby
- patterns
-
-
- match
- \\\}|\\\\
- name
- constant.character.escape.ruby
-
-
- include
- #nest_curly
-
-
-
-
- begin
- %[qws]([^\w])
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- literal incapable of interpolation -- wildcard
- end
- \1
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.quoted.other.literal.lower.ruby
- patterns
-
-
- comment
- Cant be named because its not neccesarily an escape.
- match
- \\.
-
-
-
-
- captures
-
- 1
-
- name
- punctuation.definition.constant.ruby
-
-
- comment
- symbols
- match
- (?<!:)(:)(?>[a-zA-Z_]\w*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<[<=]?|<=>|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?|@@?[a-zA-Z_]\w*)
- name
- constant.other.symbol.ruby
-
-
- captures
-
- 1
-
- name
- punctuation.definition.constant.ruby
-
-
- comment
- symbols
- match
- (?>[a-zA-Z_]\w*(?>[?!])?)(:)(?!:)
- name
- constant.other.symbol.ruby.19syntax
-
-
- begin
- ^=begin
- captures
-
- 0
-
- name
- punctuation.definition.comment.ruby
-
-
- comment
- multiline comments
- end
- ^=end
- name
- comment.block.documentation.ruby
-
-
- captures
-
- 1
-
- name
- punctuation.definition.comment.ruby
-
-
- match
- (?:^[ \t]+)?(#).*$\n?
- name
- comment.line.number-sign.ruby
-
-
- comment
-
- matches questionmark-letters.
-
- examples (1st alternation = hex):
- ?\x1 ?\x61
-
- examples (2nd alternation = octal):
- ?\0 ?\07 ?\017
-
- examples (3rd alternation = escaped):
- ?\n ?\b
-
- examples (4th alternation = meta-ctrl):
- ?\C-a ?\M-a ?\C-\M-\C-\M-a
-
- examples (4th alternation = normal):
- ?a ?A ?0
- ?* ?" ?(
- ?. ?#
-
-
- the negative lookbehind prevents against matching
- p(42.tainted?)
-
- match
- (?<!\w)\?(\\(x\h{1,2}(?!\h)\b|0[0-7]{0,2}(?![0-7])\b|[^x0MC])|(\\[MC]-)+\w|[^\s\\])
- name
- constant.numeric.ruby
-
-
- begin
- ^__END__\n
- captures
-
- 0
-
- name
- string.unquoted.program-block.ruby
-
-
- comment
- __END__ marker
- contentName
- text.plain
- end
- (?=not)impossible
- patterns
-
-
- begin
- (?=<?xml|<(?i:html\b)|!DOCTYPE (?i:html\b))
- end
- (?=not)impossible
- name
- text.html.embedded.ruby
- patterns
-
-
- include
- text.html.basic
-
-
-
-
-
-
- begin
- (?><<-("?)((?:[_\w]+_|)HTML)\b\1)
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- heredoc with embedded HTML and indented terminator
- contentName
- text.html.embedded.ruby
- end
- \s*\2$
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.unquoted.embedded.html.ruby
- patterns
-
-
- include
- #heredoc
-
-
- include
- text.html.basic
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
-
-
- begin
- (?><<-("?)((?:[_\w]+_|)SQL)\b\1)
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- heredoc with embedded SQL and indented terminator
- contentName
- text.sql.embedded.ruby
- end
- \s*\2$
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.unquoted.embedded.sql.ruby
- patterns
-
-
- include
- #heredoc
-
-
- include
- source.sql
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
-
-
- begin
- (?><<-("?)((?:[_\w]+_|)CSS)\b\1)
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- heredoc with embedded css and intented terminator
- contentName
- text.css.embedded.ruby
- end
- \s*\2$
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.unquoted.embedded.css.ruby
- patterns
-
-
- include
- #heredoc
-
-
- include
- source.css
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
-
-
- begin
- (?><<-("?)((?:[_\w]+_|)CPP)\b\1)
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- heredoc with embedded c++ and intented terminator
- contentName
- text.c++.embedded.ruby
- end
- \s*\2$
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.unquoted.embedded.cplusplus.ruby
- patterns
-
-
- include
- #heredoc
-
-
- include
- source.c++
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
-
-
- begin
- (?><<-("?)((?:[_\w]+_|)C)\b\1)
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- heredoc with embedded c++ and intented terminator
- contentName
- text.c.embedded.ruby
- end
- \s*\2$
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.unquoted.embedded.c.ruby
- patterns
-
-
- include
- #heredoc
-
-
- include
- source.c
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
-
-
- begin
- (?><<-("?)((?:[_\w]+_|)(?:JS|JAVASCRIPT))\b\1)
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- heredoc with embedded javascript and intented terminator
- contentName
- text.js.embedded.ruby
- end
- \s*\2$
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.unquoted.embedded.js.ruby
- patterns
-
-
- include
- #heredoc
-
-
- include
- source.js
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
-
-
- begin
- (?><<-("?)((?:[_\w]+_|)JQUERY)\b\1)
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- heredoc with embedded javascript and intented terminator
- contentName
- text.js.jquery.embedded.ruby
- end
- \s*\2$
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.unquoted.embedded.js.jquery.ruby
- patterns
-
-
- include
- #heredoc
-
-
- include
- source.js.jquery
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
-
-
- begin
- (?><<-("?)((?:[_\w]+_|)(?:SH|SHELL))\b\1)
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- heredoc with embedded shell and intented terminator
- contentName
- text.shell.embedded.ruby
- end
- \s*\2$
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.unquoted.embedded.shell.ruby
- patterns
-
-
- include
- #heredoc
-
-
- include
- source.shell
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
-
-
- begin
- (?><<-("?)((?:[_\w]+_|)RUBY)\b\1)
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- heredoc with embedded ruby and intented terminator
- contentName
- text.ruby.embedded.ruby
- end
- \s*\2$
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.unquoted.embedded.ruby.ruby
- patterns
-
-
- include
- #heredoc
-
-
- include
- source.ruby
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
-
-
- begin
- (?>\=\s*<<(\w+))
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- end
- ^\1$
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.unquoted.heredoc.ruby
- patterns
-
-
- include
- #heredoc
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
-
-
- begin
- (?><<-(\w+))
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.ruby
-
-
- comment
- heredoc with indented terminator
- end
- \s*\1$
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.ruby
-
-
- name
- string.unquoted.heredoc.ruby
- patterns
-
-
- include
- #heredoc
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
-
-
- begin
- (?<=\{|do|\{\s|do\s)(\|)
- captures
-
- 1
-
- name
- punctuation.separator.variable.ruby
-
-
- end
- (\|)
- patterns
-
-
- match
- [_a-zA-Z][_a-zA-Z0-9]*
- name
- variable.other.block.ruby
-
-
- match
- ,
- name
- punctuation.separator.variable.ruby
-
-
-
-
- match
- =>
- name
- punctuation.separator.key-value
-
-
- match
- <<=|%=|&=|\*=|\*\*=|\+=|\-=|\^=|\|{1,2}=|<<
- name
- keyword.operator.assignment.augmented.ruby
-
-
- match
- <=>|<(?!<|=)|>(?!<|=|>)|<=|>=|===|==|=~|!=|!~|(?<=[ \t])\?
- name
- keyword.operator.comparison.ruby
-
-
- match
- (?<=[ \t])!+|\bnot\b|&&|\band\b|\|\||\bor\b|\^
- name
- keyword.operator.logical.ruby
-
-
- match
- (%|&|\*\*|\*|\+|\-|/)
- name
- keyword.operator.arithmetic.ruby
-
-
- match
- =
- name
- keyword.operator.assignment.ruby
-
-
- match
- \||~|>>
- name
- keyword.operator.other.ruby
-
-
- match
- :
- name
- punctuation.separator.other.ruby
-
-
- match
- \;
- name
- punctuation.separator.statement.ruby
-
-
- match
- ,
- name
- punctuation.separator.object.ruby
-
-
- match
- \.|::
- name
- punctuation.separator.method.ruby
-
-
- match
- \{|\}
- name
- punctuation.section.scope.ruby
-
-
- match
- \[|\]
- name
- punctuation.section.array.ruby
-
-
- match
- \(|\)
- name
- punctuation.section.function.ruby
-
-
- repository
-
- escaped_char
-
- match
- \\(?:[0-7]{1,3}|x[\da-fA-F]{1,2}|.)
- name
- constant.character.escape.ruby
-
- heredoc
-
- begin
- ^<<-?\w+
- end
- $
- patterns
-
-
- include
- $self
-
-
-
- interpolated_ruby
-
- patterns
-
-
- captures
-
- 0
-
- name
- punctuation.section.embedded.ruby
-
- 1
-
- name
- source.ruby.embedded.source.empty
-
-
- match
- #\{(\})
- name
- source.ruby.embedded.source
-
-
- begin
- #\{
- captures
-
- 0
-
- name
- punctuation.section.embedded.ruby
-
-
- end
- \}
- name
- source.ruby.embedded.source
- patterns
-
-
- include
- #nest_curly_and_self
-
-
- include
- $self
-
-
-
-
- captures
-
- 1
-
- name
- punctuation.definition.variable.ruby
-
-
- match
- (#@)[a-zA-Z_]\w*
- name
- variable.other.readwrite.instance.ruby
-
-
- captures
-
- 1
-
- name
- punctuation.definition.variable.ruby
-
-
- match
- (#@@)[a-zA-Z_]\w*
- name
- variable.other.readwrite.class.ruby
-
-
- captures
-
- 1
-
- name
- punctuation.definition.variable.ruby
-
-
- match
- (#\$)[a-zA-Z_]\w*
- name
- variable.other.readwrite.global.ruby
-
-
-
- nest_brackets
-
- begin
- \[
- captures
-
- 0
-
- name
- punctuation.section.scope.ruby
-
-
- end
- \]
- patterns
-
-
- include
- #nest_brackets
-
-
-
- nest_brackets_i
-
- begin
- \[
- captures
-
- 0
-
- name
- punctuation.section.scope.ruby
-
-
- end
- \]
- patterns
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
- include
- #nest_brackets_i
-
-
-
- nest_brackets_r
-
- begin
- \[
- captures
-
- 0
-
- name
- punctuation.section.scope.ruby
-
-
- end
- \]
- patterns
-
-
- include
- #regex_sub
-
-
- include
- #nest_brackets_r
-
-
-
- nest_curly
-
- begin
- \{
- captures
-
- 0
-
- name
- punctuation.section.scope.ruby
-
-
- end
- \}
- patterns
-
-
- include
- #nest_curly
-
-
-
- nest_curly_and_self
-
- patterns
-
-
- begin
- \{
- captures
-
- 0
-
- name
- punctuation.section.scope.ruby
-
-
- end
- \}
- patterns
-
-
- include
- #nest_curly_and_self
-
-
-
-
- include
- $self
-
-
-
- nest_curly_i
-
- begin
- \{
- captures
-
- 0
-
- name
- punctuation.section.scope.ruby
-
-
- end
- \}
- patterns
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
- include
- #nest_curly_i
-
-
-
- nest_curly_r
-
- begin
- \{
- captures
-
- 0
-
- name
- punctuation.section.scope.ruby
-
-
- end
- \}
- patterns
-
-
- include
- #regex_sub
-
-
- include
- #nest_curly_r
-
-
-
- nest_ltgt
-
- begin
- \<
- captures
-
- 0
-
- name
- punctuation.section.scope.ruby
-
-
- end
- \>
- patterns
-
-
- include
- #nest_ltgt
-
-
-
- nest_ltgt_i
-
- begin
- \<
- captures
-
- 0
-
- name
- punctuation.section.scope.ruby
-
-
- end
- \>
- patterns
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
- include
- #nest_ltgt_i
-
-
-
- nest_ltgt_r
-
- begin
- \<
- captures
-
- 0
-
- name
- punctuation.section.scope.ruby
-
-
- end
- \>
- patterns
-
-
- include
- #regex_sub
-
-
- include
- #nest_ltgt_r
-
-
-
- nest_parens
-
- begin
- \(
- captures
-
- 0
-
- name
- punctuation.section.scope.ruby
-
-
- end
- \)
- patterns
-
-
- include
- #nest_parens
-
-
-
- nest_parens_i
-
- begin
- \(
- captures
-
- 0
-
- name
- punctuation.section.scope.ruby
-
-
- end
- \)
- patterns
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
- include
- #nest_parens_i
-
-
-
- nest_parens_r
-
- begin
- \(
- captures
-
- 0
-
- name
- punctuation.section.scope.ruby
-
-
- end
- \)
- patterns
-
-
- include
- #regex_sub
-
-
- include
- #nest_parens_r
-
-
-
- regex_sub
-
- patterns
-
-
- include
- #interpolated_ruby
-
-
- include
- #escaped_char
-
-
- captures
-
- 1
-
- name
- punctuation.definition.arbitrary-repitition.ruby
-
- 3
-
- name
- punctuation.definition.arbitrary-repitition.ruby
-
-
- match
- (\{)\d+(,\d+)?(\})
- name
- string.regexp.arbitrary-repitition.ruby
-
-
- begin
- \[(?:\^?\])?
- captures
-
- 0
-
- name
- punctuation.definition.character-class.ruby
-
-
- end
- \]
- name
- string.regexp.character-class.ruby
- patterns
-
-
- include
- #escaped_char
-
-
-
-
- begin
- \(
- captures
-
- 0
-
- name
- punctuation.definition.group.ruby
-
-
- end
- \)
- name
- string.regexp.group.ruby
- patterns
-
-
- include
- #regex_sub
-
-
-
-
- captures
-
- 1
-
- name
- punctuation.definition.comment.ruby
-
-
- comment
- We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.
- match
- (?<=^|\s)(#)\s[[a-zA-Z0-9,. \t?!-][^\x{00}-\x{7F}]]*$
- name
- comment.line.number-sign.ruby
-
-
-
-
- scopeName
- source.ruby
- uuid
- E00B62AC-6B1C-11D9-9B1F-000D93589AF6
-
-
diff --git a/bundles/ruby.tmbundle/Tests/division_ambiguity.rb b/bundles/ruby.tmbundle/Tests/division_ambiguity.rb
deleted file mode 100644
index a20e52a46..000000000
--- a/bundles/ruby.tmbundle/Tests/division_ambiguity.rb
+++ /dev/null
@@ -1,88 +0,0 @@
-# purpose:
-# exercise constructs with division
-#
-# division itself 84 / 2
-# regexp /pattern/
-#
-#
-#
-
-def test(*obj)
- p(*obj)
-end
-a, b = 4, 2
-
-# -------------------------------------------
-#
-# Testarea for division
-#
-# -------------------------------------------
-
-# singleline numbers
-test(84 / 2)
-
-# singleline symbols
-test(a / b)
-
-# singleline symbols
-test(a / b / 3)
-
-
-test(Float(42) / Float(5))
-
-# multiline with symbols
-=begin # invalid
-test(a
-/ b)
-=end
-
-# multiline with symbols
-test(a /
-b)
-
-
-# -------------------------------------------
-#
-# Testarea for regexp
-#
-# -------------------------------------------
-
-# singleline
-test( // )
-test( /abc/ )
-test( /a\/bc/ )
-test [/^F../]
-p 'Foobar'[/^F../]
-p '42' =~ /42/
-test(nil && /\\/ =~ '\\')
-test(nil || /\\/ =~ '\\')
-test(nil and /\\/ =~ '\\')
-test(nil or /\\/ =~ '\\')
-test(/a/x)
-test(/x/.match('abx').to_s)
-test((/x/).match('abx').to_s)
-test(/a/,/b/,/c/)
-test(/a/x,/b/x,/c/m)
-
-
-# multiline
-test( /
-pattern
-/x )
-
-
-# multiline
-test(
-/r
-eg
-e/x
-)
-
-# multiline
-test(
-/1/,/2/,/3/
-)
-
-# regexp after keyword
-res = case 'test';when /t..t/:1;else 0;end
-test(res)
\ No newline at end of file
diff --git a/bundles/ruby.tmbundle/Tests/modulo_ambiguity1.rb b/bundles/ruby.tmbundle/Tests/modulo_ambiguity1.rb
deleted file mode 100644
index 2b1b9f717..000000000
--- a/bundles/ruby.tmbundle/Tests/modulo_ambiguity1.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-# purpose:
-# exercise constructs with modulo
-#
-# modulo in math data%2
-# literals %(a b), %W[1 2]
-#
-#
-#
-
-def test(v)
- p v
-end
-
-x, y = 42, 33
-
-
-# -------------------------------------------
-#
-# Testarea for modulo
-#
-# -------------------------------------------
-
-# value % value
-test( 3%2 )
-test( 3 % 2 )
-test( 1234%(666) )
-test( (1234)%666 )
-
-# var % value
-test( x%2 )
-test( x%666 )
-test( x%(42) )
-test( x%-42-3 )
-test( x%+42+3 )
-
-# value % var
-test( 666%x )
-test( (42+4+2)%x )
-
-# var % var
-test( x % y )
-test( x%y )
-
-# -------------------------------------------
-#
-# Testarea for literals
-#
-# -------------------------------------------
-
-# literal with nothing
-test( %(a b c) )
-test( %(1 2 (3 4)) )
-test( %{TM rocks} )
-
-# literal with 'w'
-test( %W(1 2 3) )
-test( %W[1 2 3] )
-test( %W{1 2 3} )
-test( %W<1 2 3> )
-
-# literal with 'w' (multiline)
-test(%w(a
-b))
-
-# literal with 'q'
-test( %q(1 2 3) )
-test( %Q(1 2 3) )
-
-# literal with custom
-test( %q"1 2 3" )
-test( %q'1 2 3' )
-test( %q#1 2 3# )
-test( %?X.tainted? )
-test( %q/1 2 3/ )
-test( %q|1 2 3| )
-test( %q\1 2 3\ )
diff --git a/bundles/ruby.tmbundle/Tests/questionmark_ambiguity1.rb b/bundles/ruby.tmbundle/Tests/questionmark_ambiguity1.rb
deleted file mode 100644
index d571673fa..000000000
--- a/bundles/ruby.tmbundle/Tests/questionmark_ambiguity1.rb
+++ /dev/null
@@ -1,160 +0,0 @@
-# purpose:
-# exercise constructs with questionmark
-#
-# numeric letters ?x
-# ternary operator condition ? case1 : case2
-#
-#
-#
-
-def test(v)
- puts "#{v.inspect} => #{v.chr}"
-end
-def z(v)
- v
-end
-
-
-
-# -------------------------------------------
-#
-# Testarea for numeric letters
-#
-# -------------------------------------------
-
-# begin of line
-test(
-?x)
-
-# normal letters
-test( ?a )
-test( ?A )
-test( ?0 )
-
-# misc symbols
-test( ?* )
-test( ?**2 )
-test( ?: )
-test( ?) )
-test( ?( )
-test( ?' ) # im a comment, not a string
-test( ?" ) # im a comment, not a string
-test( ?/ ) # im a comment, not a regexp
-
-# symbol '.'
-test( ?..succ )
-p ?...?..succ # im a .. range
-p ?....?..succ # im a ... range
-#p ?.....?..succ # invalid
-
-# symbol '#'
-test( ?# ); p 'im not a comment'
-
-# space ' '
-#test( ? ) # invalid
-
-# tab ' '
-#test( ? ) # invalid
-
-
-# symbol '?'
-test( ?? )
-test(??)
-
-# symbol '\\'
-test( ?\\ )
-
-# escaped as hex
-#test( ?\x ) # invalid
-test( ?\x1 )
-test( ?\x61 )
-#test( ?\x612 ) # invalid
-test( ?\X ) # valid.. but is not hex
-#test( ?\X11 ) # invalid
-
-# escaped as octal
-test( ?\0 )
-test( ?\07 )
-test( ?\017 )
-#test( ?\0173 ) # invalid
-#test( ?\08 ) # invalid
-#test( ?\09 ) # invalid
-#test( ?\0a ) # invalid
-test( ?\1 )
-test( ?\7 )
-test( ?\a )
-test( ?\f )
-
-# standard escapings
-test( ?\n ) # newline
-test( ?\b ) # backspace
-
-# escaped misc letters/symbols
-test( ?\8 )
-test( ?\9 )
-test( ?\_ )
-
-# ctrl/meta escaped
-test( ?\C-a )
-test( ?\C-g )
-test( ?\C-x )
-test( ?\C-A )
-test( ?\C-G )
-test( ?\c )
-test( ?\m )
-#test( ?\c-a ) # invalid
-#test( ?\C ) # invalid
-#test( ?\M ) # invalid
-test( ?\M-a )
-test( ?\M-\C-a )
-test( ?\C-\C-\M-a )
-test( ?\C-\M-a )
-test( ?\C-\M-\M-a )
-test( ?\C-\M-\C-\M-a )
-
-# misc tests
-p 'abc'.include?(?z)
-
-
-
-# -------------------------------------------
-#
-# Testarea for ternary operator
-#
-# -------------------------------------------
-a, b, val = 42, 24, true
-p(val ? 0 : 2)
-
-p [
- val ? (a) : z(b) ,
- val ? 'a' : 'b'
-]
-
-
-
-
-# -------------------------------------------
-#
-# Testarea for ternary operator and numeric letter
-#
-# -------------------------------------------
-p [
-
-# very ugly
-true ???:?? ,
-true ???:?: ,
-true ??::?: ,
-]
-
-
-
-# -------------------------------------------
-#
-# Testarea for neiter ternary operator nor numeric letter
-#
-# -------------------------------------------
-
-# not letters.. the questionmark is part of the methodname
-p(42.tainted?, 42.frozen?)
-
-
diff --git a/bundles/ruby.tmbundle/Tests/rubylexer/COPYING b/bundles/ruby.tmbundle/Tests/rubylexer/COPYING
deleted file mode 100644
index b124cf581..000000000
--- a/bundles/ruby.tmbundle/Tests/rubylexer/COPYING
+++ /dev/null
@@ -1,510 +0,0 @@
-
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations
-below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it
-becomes a de-facto standard. To achieve this, non-free programs must
-be allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control
-compilation and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at least
- three years, to give the same user the materials specified in
- Subsection 6a, above, for a charge no more than the cost of
- performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply, and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License
-may add an explicit geographical distribution limitation excluding those
-countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms
-of the ordinary General Public License).
-
- To apply these terms, attach the following notices to the library.
-It is safest to attach them to the start of each source file to most
-effectively convey the exclusion of warranty; and each file should
-have at least the "copyright" line and a pointer to where the full
-notice is found.
-
-
-
- Copyright (C)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or
-your school, if any, to sign a "copyright disclaimer" for the library,
-if necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James
- Random Hacker.
-
- , 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/bundles/ruby.tmbundle/Tests/rubylexer/g.rb b/bundles/ruby.tmbundle/Tests/rubylexer/g.rb
deleted file mode 100644
index 16df18d19..000000000
--- a/bundles/ruby.tmbundle/Tests/rubylexer/g.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-j=9;def i(n) [n ?"d" : "e" , n] end
-
-p(i ?")
-p(j ?"d" : "e")
-
-def g(x=nil) x end
-def gg(x=nil) g x end
-p(gg :x)
-p(g :y)
-g=9
-p(gg :z)
-# g :w #error
-
-
diff --git a/bundles/ruby.tmbundle/Tests/rubylexer/newsyntax.rb b/bundles/ruby.tmbundle/Tests/rubylexer/newsyntax.rb
deleted file mode 100644
index 2d06fe082..000000000
--- a/bundles/ruby.tmbundle/Tests/rubylexer/newsyntax.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-
-x, (*), z = [:x, :y, :z]
-p x
-p z
-
-x, (*y), z = [:x, :y, :z]
-p x
-p y
-p z
-
-p($/ = ' '; Array( "i'm in your house" ))
-
-class Foou
- public
- def [] x=-100,&y=nil; p x; 100 end
-end
-p Foou.new.[]?9 #value
-p Foou.new.[] ?9 #value
diff --git a/bundles/ruby.tmbundle/Tests/rubylexer/p.rb b/bundles/ruby.tmbundle/Tests/rubylexer/p.rb
deleted file mode 100644
index 90df69671..000000000
--- a/bundles/ruby.tmbundle/Tests/rubylexer/p.rb
+++ /dev/null
@@ -1,1122 +0,0 @@
-p(String *Class)
-class String
-class Class
-end
-end
-#def String(x) x.to_s end #it's already built-in. duh!
-def String.*(right) [self,right] end
-def String.<<(right) [self,:<<,right] end
-def String./(right) [self,:/,right] end
-def String.[](right) [self,:[],right] end
-p(String::Class)
-p(String:: Class)
-p(String ::Class)
-p(String :: Class)
-p(String< p
-end
-
-q=9
-Q=99
-
-p:p8
-false ? p: p8
-p :p8
-false ? p : p8
-
-false ? q:p8
-false ? q: p8
-false ? q :p8
-false ? q : p8
-
-#false ? Q:p8 #gives ruby indigestion
-false ? Q: p8
-#false ? Q :p8 #gives ruby indigestion
-false ? Q : p8
-
-p?:p8
-false ? p?: p8
-p? :p8
-false ? p? : p8
-
-P?:p8
-false ? P?: p8
-P? :p8
-false ? P? : p8
-
-self.[]:p8
-false ? self.[]: p8
-self.[] :p8
-false ? self.[] : p8
-
-self.<=>:p8
-false ? self.<=>: p8
-self.<=> :p8
-false ? self.<=> : p8
-
-self <=>:p8
-#false ? self <=>: p8 #gives ruby indigestion
-self <=> :p8
-#false ? self <=> : p8 #gives ruby indigestion
-end
-
-p <2)
- p(p >2)
- p(p> 2)
- p(p > 2)
-
-end
-
-module M34
- p(p~6)
- p(p ~6)
- p(p~ 6)
- p(p ~ 6)
- p(p*[1])
- p(p *[1])
- p(p* [1])
- p(p * [1])
- p(p&proc{})
- p(p &proc{})
- p(p& proc{})
- p(p & proc{})
- p(p !1)
- p(p ?1)
- p(p ! 1)
- p(p ? 1 : 6)
- p(p@a)
- p(p @a)
-# p(p@ a) #wont
-# p(p @ a) #work
-
- p(p#a
-)
- p(p #a
-)
- p(p# a
-)
- p(p # a
-)
- p(p$a)
- p(p $a)
-# p(p$ a) #wont
-# p(p $ a) #work
- p(p%Q{:foo})
- p(p %Q{:foo})
- p(p% Q{:foo})
- p(p % Q{:foo})
- p(p^6)
- p(p ^6)
- p(p^ 6)
- p(p ^ 6)
- p(p&7)
- p(p &proc{7})
- p(p& 7)
- p(p & 7)
- p(p(2))
- p(p (2))
- p(p( 2))
- p(p ( 2))
- p(p(p))
- p(p())
- p(p (p))
- p(p ())
- p(p ( p))
- p(p ( ))
- p(p( p))
- p(p( ))
- p(p)
- p((p))
- p(p )
- p((p ))
- p((p p))
- p((p p,p))
- p((p p))
- p((p p,p))
- p(p-0)
- p(p -1)
- p(p- 0)
- p(p - 0)
- p(p+9)
- p(p +9)
- p(p+ 9)
- p(p + 9)
- p(p[1])
- p(p [1])
- p(p[ 1])
- p(p [ 1])
- p(p{1})
- p(p {1})
- p(p{ 1})
- p(p { 1})
- p(p/1)
- p(p /22/)
- p(p/ 1)
- p(p / 22)
- p(p._)
- p(p ._)
- p(p. _)
- p(p . _)
- p(p:f)
- p(p :f)
- p(false ? p: f)
- p(false ? p : f)
- p((p;1))
- p((p ;1))
- p((p; 1))
- p((p ; 1))
- p(p<1)
- p(p <1)
- p(p< 1)
- p(p < 1)
- p(p<<1)
- p(p <<1)
-foobar
-1
- p(p<< 1)
- p(p << 1)
- p(p'j')
- p(p 'j')
- p(p' j')
- p(p ' j')
- p(p"k")
- p(p "k")
- p(p" k")
- p(p " k")
- p(p|4)
- p(p |4)
- p(p| 4)
- p(p | 4)
- p(p>2)
- p(p >2)
- p(p> 2)
- p(p > 2)
-
-end
-
-
-def bob(x) x end
-def bill(x) x end
-p(bob %(22))
-for bob in [100] do p(bob %(22)) end
-p(bob %(22))
-def %(n) to_s+"%#{n}" end
-p(bill %(22))
-begin sdjkfsjkdfsd; rescue Object => bill; p(bill %(22)) end
-p(bill %(22))
-undef %
-
-class Object
-
-public :`
-def `(s)
- print "bq: #{s}\n"
-end
-end
-
-69.`('what a world')
-
-79::`('what a word')
-
-p :`
-
-p{}
-p {}
-a=5
-p p +5
-p a +5
-
-def nil.+(x) ~x end
-def nil.[](*x) [x] end
-p( p + 5 )
-p( p +5 )
-p( p+5 )
-p( p[] )
-p( p [] )
-p( p [ ] )
-class NilClass; undef +,[] end
-
-class Foou
- public
- def [] x=-100,&y; p x; 100 end
-end
-a0=8
-p Foou.new.[]!false #value
-p Foou.new.[] !false #value
-p Foou.new.[]~9 #value
-p Foou.new.[] ~9 #value
-p Foou.new.[]-9 #op
-p Foou.new.[]+9 #op
-p Foou.new.[] -9 #value
-p Foou.new.[] +9 #value
-p Foou.new.[]<<9 #op
-p Foou.new.[] <<9 #value
-foobar
-9
-p Foou.new.[]%9 #op
-p Foou.new.[]/9 #op
-p Foou.new.[] %(9) #value
-p Foou.new.[] /9/ #value
-p Foou.new.[]$9 #value
-p Foou.new.[]a0 #value
-p Foou.new.[] $9 #value
-p Foou.new.[] a0 #value
-p Foou.new.[]{9} #lambda (op)
-p Foou.new.[] {9} #lambda (op)
-
-if p then p end
-
-p({:foo=>:bar}) #why does this work? i'd think that ':foo=' would be 1 token
-p EMPTY = 0
-p BLACK = 1
-p WHITE = - BLACK
-
- a=b=c=0
- a ? b:c
- a ?b:c
-
- p(a ? b:c)
- p(a ?b:c)
-
-
-p~4
-p:f
-p(~4){}
-p(:f){}
-h={}
-h.default=:foo
-
-p def (h="foobar").default= v; p @v=v;v end
-p h
-
-p h.default=:b
-
-x, (*y) = [:x, :y, :z]
-p x
-p y
-
-x, *y = [:x, :y, :z]
-p x
-p y
-
-x, * = [:x, :y, :z]
-p x
-
-
-
-p Array("foo\nbar")
-
-
-
-p +(4)
-p -(4)
-
-p :'\\'
-
-class Foop
- def Foop.bar a,b
- p a,b
- end
-end
-Foop.bar 1,2
-Foop::bar 3,4
-
-
-class Foop
- def Foop::baz a,b
- p :baz,a,b
- end
-end
-Foop.baz 5,6
-Foop::baz 7,8
-
-
-
-without_creating=widgetname=nil
- if without_creating && !widgetname #foo
- fail ArgumentError,
- "if set 'without_creating' to true, need to define 'widgetname'"
- end
-
-
-
-=begin disable for now
-
-#class, module, and def should temporarily hide local variables
-def mopsdfjskdf arg; arg*2 end
-mopsdfjskdf=5
- class C
- p mopsdfjskdf %(3) #calls method
- end
-
-module M
- p mopsdfjskdf %(4) #calls method
-end
-
- def d
- p mopsdfjskdf %(5) #calls method
- end
-p d
-p mopsdfjskdf %(6) #reads variable
-p proc{mopsdfjskdf %(7)}[] #reads variable
-
-#fancy symbols not supported yet
-p %s{symbol}
-=end
-
-#multiple assignment test
-proc {
- a,b,c,d,e,f,g,h,i,j,k=1,2,3,4,5,6,7,8,9,10,11
- p(b %(c))
- p(a %(c))
- p(k %(c))
- p(p %(c))
-}.call
-
-
-=begin disable for now
-p "#{<~m)
-
-p <(foo=100)}
- p( foo %(5))
-}.call
-
-
-p "#{<"PMK:njs;d|
-
-foobar0
-
-p "#{<"PMK:njs;d|
-
-foobar1
-}"
-
-def foo(a=<>|\|\||\&\&)=|\&\&|\|\|)/)
-p(:%)
-p( { :class => class_=0})
-p cls_name = {}[:class]
-
-
-p foo
-p "#{$!.class}"
-p :p
-p(:p)
-p(:"[]")
-p :"[]"
-p("\\")
-p(/\\/)
-p(/[\\]/)
-p 0x80
-p ?p
-p 0.1
-p 0.8
-p 0.9
-p(-1)
-p %/p/
-p %Q[]
-i=99
-p %Q[#{i[0]+i[1]+(i[2])}\n]
-p(:side=>:top)
-p %w[a b c
- d e f]
-p %w[a b c\n
- d e f]
-p %w[\\]
-p %w[\]]
-p :+
-p 99 / 3
-
-a=99;b=3
-p 1+(a / b)
-p %Q[\"]
-p %Q[ some [nested] text]
-
-if false
- formatter.format_element(element) do
- amrita_expand_and_format1(element, context, formatter)
- end
-end
-if false
- ret = <<-END
- @@parts_template = #{template.to_ruby}
- def parts_template
- @@parts_template
- end
-
- #{c.const_def_src.join("\n")}
- def amrita_expand_and_format(element, context, formatter)
- if element.tagname_symbol == :span and element.attrs.size == 0
- amrita_expand_and_format1(element, context, formatter)
- else
- formatter.format_element(element) do
- amrita_expand_and_format1(element, context, formatter)
- end
- end
- end
-
- def amrita_expand_and_format1(element, context, formatter)
- #{method_src}
- end
- END
- j=55
-end
-
-p '
-'
-p '\n'
-p "
-"
-p "\n"
-p %w/
-/
-p %w/\n/
-
-p %W/
-/
-p %W/\n/
-p(/
-/)
-p(/\n/)
-p proc {
- p `
- `
- p `\n`
-}
-
-
-
-p(%r[foo]i)
-#breakpoint
-p <:b), {:a=>:b} #=> true
- assert_ene Reg(:a=>:b), {:a=>:c} #=> false
- assert_ene Reg(:a=>:b), {} #=> false
- h={}
- h.default=:b
- assert_eee Reg(:a=>:b), h #=> true
-
- assert_eee Reg(/^(a|b)$/=>33), {"a"=>33} #=> true
- assert_eee Reg(/^(a|b)$/=>33), {"b"=>33} #=> true
- assert_ene Reg(/^(a|b)$/=>33), {"a"=>133} #=> false
- assert_ene Reg(/^(a|b)$/=>33), {"b"=>133} #=> false
-
- assert_ene Reg(/^(a|b)$/=>33), {"c"=>33} #=> false
-
- assert_eee Reg(/^(a|b)$/=>33), {"a"=>33,"b"=>33} #=> true
- assert_ene Reg(/^(a|b)$/=>33), {"a"=>33,"b"=>133} #=> false
- assert_ene Reg(/^(a|b)$/=>33), {"a"=>133,"b"=>33} #=> false
- assert_ene Reg(/^(a|b)$/=>33), {"a"=>133,"b"=>133} #=> false
-
-
- assert_eee Reg("a"=>33)|{"b"=>33}, {"a"=>33,"b"=>33} #=> true
- assert_eee Reg("a"=>33)|{"b"=>33}, {"a"=>33,"b"=>133} #=> true
- assert_ene Reg("a"=>33)|{"b"=>33}, {"a"=>133,"b"=>33} #=> false
- assert_ene Reg("a"=>33)|{"b"=>33}, {"a"=>133,"b"=>133} #=> false
-
- assert_eee Reg("a"=>33)|{"b"=>33}, {"b"=>33} #=> true
-
- assert_eee Reg(:a.reg|:b => 44), {:a => 44} #=> true
- assert_eee Reg(:a.reg|:b => 44), {:b => 44} #=> true
- assert_ene Reg(:a.reg|:b => 44), {:a => 144} #=> false
- assert_ene Reg(:a.reg|:b => 44), {:b => 144} #=> false
-
- print "\n"
- end
-
- def assert_eee(left,right,message='assert_eee failed')
- assert(
- left===right,
- message+" left=#{left.inspect} right=#{right.inspect}"
- )
- print ".";$stdout.flush
- end
-
- def assert_ene(left,right,message='assert_ene failed')
- assert(
- !(left===right),
- message+" left=#{left.inspect} right=#{right.inspect}"
- )
- print ",";$stdout.flush
- end
-end
-end
- srand;seed=srand
-
- opts=GetoptLong.new(["--seed", "-s", GetoptLong::REQUIRED_ARGUMENT])
- opts.each{|opt,arg|
- opt=='--seed' or raise :impossible
- seed=arg
- }
-
- print "random seed is #{seed}\n"
- srand seed
-
-
-TC_Reg.test_reg
diff --git a/bundles/ruby.tmbundle/Tests/rubylexer/w.rb b/bundles/ruby.tmbundle/Tests/rubylexer/w.rb
deleted file mode 100644
index 56de46332..000000000
--- a/bundles/ruby.tmbundle/Tests/rubylexer/w.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-p %r{\/$}
-p %r~~m
-
-p [].push *[1,2,3]
-p /\n/
-
-$a=1
-@b=2
-@@c=3
-p(/\#$a \#@b \#@@c \#{$a+@b+@@c}/)
-
-
-class Foo
-attr :foo,true
-end
-f=Foo.new
-p f.foo
-p f.foo=9
-p f.foo =19
-p f.foo= 29
-p f.foo = 39
-p f.foo
diff --git a/bundles/ruby.tmbundle/Tests/test1.rb b/bundles/ruby.tmbundle/Tests/test1.rb
deleted file mode 100644
index 98a0965ba..000000000
--- a/bundles/ruby.tmbundle/Tests/test1.rb
+++ /dev/null
@@ -1,302 +0,0 @@
-# Ruby syntax test file for stuff we've gotten wrong in the past or are currently getting wrong
-
-#########
-#basics
-
-module samwi_78se
-
- class mysuperclassofdoom < someotherclass
-
- end
-end
-
-class gallo_way8 < kni9_ght
-
- def sl_9ay(beast)
-
- end
-
- #These shouldn't capture the leading space before it
- def my_method_of_doom(args)
- 'yay'
- rescue
- 'whatever'
- ensure
- 'something else'
- end
-
- def my_method_of_doom(args);'yay';rescue;'whatever';ensure;'something else';end
-
- #The indent here should not be broken
-
-end
-
-
-def hot?(cold)
-
-end
-
-def w00t!
-
- unless l33t
- sysbeep
- end
-
-end
-
-###########
-# method names
-
-# method names can be keywords and should not be highlighted if they appear as explicit method invocations
-br = m.end(0) + b1
-x, y = b2vxay(m.begin(0) + b1)
-stream.next
-self.class
-
-
-# keyword.operator
-
-var1 == var2
-var1 === var2
-var1 =~ var2
-var1 = var2
-var1 * var2
-var1 - var2
-var1 + var2
-var1 % var2
-var1 ^ var2
-var1 & var2
-var1 * var2
-
-# Method
-u.whatever + 'something'
-u.whatever + ('something')
-u.whatever +( 'something')
-u.whatever+ 'something'
-u.whatever+ ('something')
-u.whatever+( 'something')
-
-u.whatever = 'something'
-u.whatever = ('something')
-u.whatever =( 'something')
-u.whatever= 'something'
-u.whatever= ('something')
-u.whatever=( 'something')
-
-u.whatever = 12345
-u.whatever = (12345)
-u.whatever =( 12345)
-u.whatever= 12345
-u.whatever= (12345)
-u.whatever=( 12345)
-u.whatever =12345
-u.whatever=12345
-
-u.whatever == 'something'
-u.whatever == ('something')
-u.whatever ==( 'something')
-u.whatever== 'something'
-u.whatever== ('something')
-u.whatever==( 'something')
-
-u.whatever === 'something'
-u.whatever === ('something')
-u.whatever ===( 'something')
-u.whatever=== 'something'
-u.whatever=== ('something')
-u.whatever===( 'something')
-
-u.password = 'something'
-u.password = ('something')
-u.password =( 'something')
-u.password= 'something'
-u.password= ('something')
-u.password=( 'something')
-
-u.abort_on_exception = 'something'
-u.abort_on_exception = ('something')
-u.abort_on_exception =( 'something')
-u.abort_on_exception= 'something'
-u.abort_on_exception= ('something')
-u.abort_on_exception=( 'something')
-
-u.success ? 'something' : 'something else'
-u.success ? ('something') : ('something else')
-u.success ?( 'something') :( 'something else') #?( shouldn't be scoped as constant.numeric
-u.success? 'something' : 'something else'
-u.success? ('something') : ('something else')
-u.success?( 'something') :( 'something else')
-
-# Function
-whatever = 'something'
-whatever = ('something')
-whatever =( 'something')
-whatever= 'something'
-whatever= ('something')
-whatever=( 'something')
-
-password = 'something'
-password = ('something')
-password =( 'something')
-password= 'something'
-password= ('something')
-password=( 'something')
-
-
-# this Totally kills Ruby Experimental ATM (Mon Jan 29 10:38:00 EST 2007)
-
-fred( )fred()
-fred( ) fred()
-fred( ).fred()
-fred() .fred()
-fred.fred()
-
-# /kills
-
-# method calls no dot or round brackets
-puts "shmoo"
-foo {}
-foo bar
-
-# Regular Variables
-foo
-bar
-foo = 1
-foo = bar
-
-
-############
-# numbers
-
-data += 0.chr
-99.downto(0)
-
-0.9 # number
-0.A # method invocation (0 -> A)
-0.A() # method invocation (0 -> A)
-0xCAFEBABE022409ad802046 # hex
-23402 # integer
-4.232 # decimal
-
-
-###########
-# strings
-
-'hello #{42} wor\'knjkld' # no interpolation or escapes except for slash-single-quote
-
-# double quoted string (allows for interpolation):
-"hello #{42} world" #-> "hello 42 world"
-"hello #@ivar world" #-> "hello 42 world"
-"hello #@@cvar world" #-> "hello 42 world"
-"hello #$gvar world" #-> "hello 42 world"
-
-'hello #@ivar world'
-'hello #@@cvar world'
-'hello #$gvar world'
-
-# escapes
-"hello #$gvar \"world" #-> "hello 42 \"world"
-
-# execute string (allows for interpolation):
-%x{ls #{dir}} #-> ".\n..\nREADME\nmain.rb"
-`ls #{dir}` #-> ".\n..\nREADME\nmain.rb"
-
-%Q{dude #{hey}}
-%Q!dude#{hey}!
-%W(dude#{hey})
-%q!dude#{hey}!
-%s{dude#{hey}}
-%w{dude#{hey}}
-%{woah#{hey}}
-% woah#{hey}
-
-# mod operator should not be interpreted as a string operator
-# (space as delimiter is legal Ruby: '% string ' => "string")
-if (data.size % 2) == 1
-line << ('%3s ' % str)
-
-
-###########
-# regexp
-
-/matchmecaseinsensitive/i
-/matchme/
-/ matchme /
-%r{matchme}
-
-32/23 #division, not regexp
-
-32 / 32 #division, not regexp
-
-gsub!(/ +/, '') #regexp, not division
-
-###########
-# symbols
-
-:BIG :aBC :AbC9 :symb :_asd :_9sd :__= :f00bar :abc!
- :abc? :abc= :<< :< :>> :> :<=> :<= :>= :% :* :**
- :+ :- :& :| :~ :=~ :== :=== :` :[]= :[] :/ :-@
- :+@ :@aaa :@@bbb
-
-# else clause of ternary logic should not highlight as symbol
-val?(a):p(b)
-val?'a':'b'
-M[1]?(a+b):p(c+d)
-
-val ? (a) : p(b)
-val ? 'a' : 'b'
-M[1] ? (a+b) : p(c+d)
-
-# but we must also account for ? in method names
-thing.fred?(:someone)
-thing.fred? :someone
-thing.fred? thing2, :someone
-
-begin = {"(?=\\w)\\s*\\?:"}
-
-
-############
-#literal capable of interpolation:
-%W(a b#{42}c) #-> ["a", "b42c"]
-%W(ab c\nd \\\)ef)
-
-%(#{42}) #-> "42"
-
-
-############
-# multiline comments
-
-=begin
-stuff here
-... def must_not_highlight_keywords_in_comments end;
-stuff here too
-=end
-
-
-############
-#literal incapable of interpolation
-%w(a b#{42}c) #-> ["a", "b#{42}c"]############
-%w(ab c\nd \\\)ef) # heredoc tests
-
-append << not_heredoc
-
-heredoc = <
-
-
-
- contactEmailRot13
- wnzrf@tenlcebqhpgvbaf.arg
- contactName
- James Edward Gray II
- deleted
-
- 3988A501-119E-4C0E-A584-C5E75FC2D6C6
- 8C102BE9-6E49-11D9-A933-000D93589AF6
- EE5F1AE5-6C02-11D9-92BA-0011242E4184
- 8394EDEF-87E8-11D9-A6A3-000D93589AF6
- BE3B3E5E-733E-11D9-A833-000A95A89C98
- 66708792-62C3-11D9-B8CF-000D93589AF6
- 667089D2-62C3-11D9-B8CF-000D93589AF6
- 667080D9-62C3-11D9-B8CF-000D93589AF6
- 667081DE-62C3-11D9-B8CF-000D93589AF6
- 66708259-62C3-11D9-B8CF-000D93589AF6
- 66708052-62C3-11D9-B8CF-000D93589AF6
- 6670881E-62C3-11D9-B8CF-000D93589AF6
- 7990EE60-C850-4779-A8C0-7FD2C853B99B
-
- description
- Support for the <a href="http://www.ruby-lang.org/">Ruby</a> programming language.
- mainMenu
-
- excludedItems
-
- E5158F94-CC52-4424-A495-14EF9272653F
- EEE6D060-C5A0-400D-A2E0-0835013C5365
- 76FCF165-54CB-4213-BC55-BD60B9C6A3EC
- 6519CB08-8326-4B77-A251-54722FFBFC1F
- 835FAAC6-5431-436C-998B-241F7226B99B
- A83F68A9-F751-4BB4-AE16-56812878C16A
- 47D203ED-EB9B-4653-A07B-A897800CEB76
-
- items
-
- 35222962-C50D-4D58-A6AE-71E7AD980BE4
- 5289EE40-86B8-11D9-A8D4-000A95E13C98
- ------------------------------------
- 63F3B3B7-CBE2-426B-B551-657733F3868B
- 6EA7AE06-3EA9-497D-A6DE-732DE43DA6E9
- ------------------------------------
- 8646378E-91F5-4771-AC7C-43FC49A93576
- EE5F19BA-6C02-11D9-92BA-0011242E4184
- ------------------------------------
- EE5F1FB2-6C02-11D9-92BA-0011242E4184
- FBFC214F-B019-4967-95D2-028F374A3221
- 88BC3896-DC39-4307-A271-21D33340F15A
- ------------------------------------
- 9FB64639-F776-499B-BA6F-BB45F86F80FD
- 7F79BC8D-8A4F-4570-973B-05DFEC25747F
- B297E4B8-A8FF-49CE-B9C4-6D4911724D43
- FDFABCB9-DF58-4469-AE11-5407A4FF4D70
- ------------------------------------
- A1433C73-A475-4B9F-8B46-E182C588ED7D
- D52AE6E7-DB75-46C9-94B0-F90B186BE1B2
- B32BD8CF-903E-42D9-B1D3-44F88F262134
- F120CD22-35C0-4E41-8F12-E3C41E04DAB3
- A2A5E4B3-D9C6-4C49-B4CB-8090D615485E
- D94AD09E-ADF4-47C9-8236-C7B38B44804E
- 803A6BDF-D74A-4B69-AFF0-98B824AB478D
- 2765038A-1CFC-4BBD-B19C-6EB2B400D528
- C03F02B1-8BE3-49F5-B983-48C1BDE2657C
-
- submenus
-
- 1BE427C6-0071-4BFF-8CDA-1DC13534E7D8
-
- items
-
- 931DD73E-615E-476E-9B0D-8341023AE730
- DAA69A0C-FC1E-4509-9931-DFFB38B4D6AE
- 2DDB6FE0-6111-4C40-A149-8E67E76F8272
-
- name
- Format
-
- 2765038A-1CFC-4BBD-B19C-6EB2B400D528
-
- items
-
- 2DBEE50B-3097-4A57-AB48-3586CF392D8B
- 0BA2B2F1-E767-4A03-9791-0AC0183251F1
- B46D35B8-5DEB-4C10-A110-BA1965A2EB9C
- 97054C4D-E4A3-45B1-9C00-B82DBCB30CAD
-
- name
- Idioms
-
- 33312F8F-A75F-49E5-AC1B-B65944C1309C
-
- items
-
- 8021944C-CEA4-4983-8D1C-78D18D4004A1
- 2514FC26-468C-4D08-A788-494A444C4286
- ------------------------------------
- 66802933-B49F-479B-9DF9-1D898FF1FA90
-
- name
- Strings
-
- 42D15F0C-0A45-4580-944E-20229EB8C92E
-
- items
-
- 9E0B4D4B-2956-4B3A-800A-3D8CE54E66BF
- BA9440C9-36C3-4031-BB61-67B581D5B179
- ------------------------------------
- B0CE57EC-FB2E-4482-8CCE-448DC2588715
-
- name
- Ordering
-
- 607DFBB6-D4BD-46B1-A221-698CC657143B
-
- items
-
- DAE6A754-D906-4763-B816-CE67125CEF08
- ------------------------------------
- 263C94DC-63CF-4BA3-9692-C5582CA8F1AB
- 6021BBDC-4AAD-447B-A0C2-A4BB31721558
- 3DDB99C4-486D-4C11-A217-5680FDD8EC19
- FD010022-E0E7-44DB-827F-33F7D9310DA2
-
- name
- Arrays
-
- 6EA7AE06-3EA9-497D-A6DE-732DE43DA6E9
-
- items
-
- 1AD6A138-2E89-4D6A-AB3F-416BF9CE968D
- ------------------------------------
- 1BE427C6-0071-4BFF-8CDA-1DC13534E7D8
- ------------------------------------
- 05984208-D559-4C04-A69C-2019361A985A
- BF4CA9F1-51CD-48D4-8357-852234F59046
- ------------------------------------
- ED6368FB-A11D-4622-9F42-7879481094F1
-
- name
- RDoc
-
- 803A6BDF-D74A-4B69-AFF0-98B824AB478D
-
- items
-
- 0CB48BCA-3F6E-4AE0-85BC-08A1D2508216
- 20AAD0BC-075D-4EC0-9057-E3E5E62C4125
- ------------------------------------
- 5AE7CFB4-418E-4E00-AD76-06DB755EE876
- 5B46ECFD-23A4-4F0C-9951-F64C19C72C2B
- 46BF99AD-E172-4D49-BCF7-072F4730E1D9
- ------------------------------------
- 9460392B-C036-4A76-A5AE-1191F10E4B1B
- 3BA6762A-BB6B-489E-8006-F30F386AEF48
- 2C07D4E7-D74F-4AE4-82BE-B0BA82247AFA
- 8343ACF4-EEB7-44B5-B835-94826466D4D5
- ------------------------------------
- F6BF907E-FDF7-4D9B-9E57-BE159561349D
- B904D4AA-D15D-48A4-8EB2-563BAF489332
- CC300D44-6C3F-4F6C-A8AB-86F5A2DC57CF
-
- name
- Serialization
-
- 8D131E43-1245-410B-A7D8-E00222CE5412
-
- items
-
- 07D1F987-7CDB-4EAD-B64A-27A93051700E
- A3B9B76B-2BC5-425C-AB24-9FAAFC375798
- 5DA9E1E8-2C54-420A-9B84-B040A1AF2B9E
- 669A86AD-936F-4EDA-8E4E-6863804072DA
- 6C6B9849-9631-49FF-A9F9-F0E94A1512C5
- 1F72122A-35AD-4BA1-AA01-889A10319666
- E23FE534-8061-4828-98A5-46270B6910B0
- 197709C5-8382-4A59-B6D7-31A0CC0F23B7
- 9D9E7BA3-8C5D-4532-83EA-326358C2F5BB
- 98182B9E-7C61-4824-BE4C-9CD69C816037
- CB03D11A-7204-48D0-92C1-E109034403E7
- 52B8BF63-F09E-4789-8407-06168A8AE666
- B79B9DAB-ABEF-44F6-BF7E-635E7BA11DFD
- 4E409AA4-E7D4-46B7-A4E9-E32F992B33E9
-
- name
- Searching and Selection
-
- 9E56B46B-80D0-4397-91B1-E5BEF5FF2811
-
- items
-
- ECBA4CA0-275F-460E-85BE-E82FEA2E2B26
- 338EC03D-3FF4-4435-94E8-1CEF20CEC75D
- 7E084412-80E6-4B70-8092-C03D1ECE4CD2
- FDD73070-6D32-4301-A86A-C55B77C3D8ED
- EC73D5CC-5F05-46B9-A6F4-82037E4A38C9
- 3C04589C-5127-478E-97B3-CA7DD2EA7ECD
- 689120C9-AB40-4081-8268-9362E00FA4A0
- E54F7077-3C33-4B53-A4F7-21E16132D3AD
- 02913388-EE8E-4C55-AC94-94F3D751F47E
- 7A3CECED-452B-438E-A5C6-95B6BDC43243
- 825B721D-4367-4DF7-98C0-F005695DF9E3
- CD748479-D2A4-4AB5-95BD-4C89512BA210
- 844DBD70-BC23-4FBF-9C18-F4A610239DF2
- 1DD13CF5-39C0-4F10-B655-56DACEBC7F94
- F3C5F719-EF03-4FF7-A777-4A8402FE3B6B
- ------------------------------------
- B563E0D7-513D-49B4-9733-1B04A6F25A74
- ------------------------------------
- 5A3754FC-43A3-462B-AB42-E3E951872E6F
- BFB65D1C-62F1-485D-8A67-3E5A2E55107C
- BD4CFD7B-1AC0-4569-9BDA-FD491F41F4E6
-
- name
- Each Element
-
- A1433C73-A475-4B9F-8B46-E182C588ED7D
-
- items
-
- 0275EF39-9357-408F-AF20-79E415CA9504
- ------------------------------------
- 0F940CBC-2173-49FF-B6FD-98A62863F8F2
- 667083EE-62C3-11D9-B8CF-000D93589AF6
- 48D8E498-C9A5-4B1B-9A18-71A5860276FB
- 4E9A7A73-875C-11D9-897C-000393CBCE2E
- 6670835F-62C3-11D9-B8CF-000D93589AF6
- 667082E6-62C3-11D9-B8CF-000D93589AF6
- CD1609FA-47DA-4EE4-9C5B-5C56D953F5B1
- F53E098D-D08E-4CE2-990A-B0BD70E60614
- D121FC61-96A4-4B8F-8709-280EDA876FF3
- 488B387C-50C0-4B2D-9260-5A7E7EAF9B42
- ------------------------------------
- E7A3BCF6-3594-453A-945D-4C5D81631CBF
- B37B0E21-1B49-494A-BA56-367CF18DD0B2
- 451A0596-1F72-4AFB-AF2F-45900FABB0F7
- ------------------------------------
- A05CBDD6-845D-45EB-94FB-F8787F5456BE
- B2C3ADE8-E19E-4B87-9C6C-593D490114C7
- 97DE939B-D243-4D5C-B953-1C9090912E7C
- 33969819-62C5-4E03-B824-C2337205F364
- 34FEBB9F-73CD-4DD4-A0A3-1CF2A5E3DE78
- E16D24D2-CC7E-4786-BE0B-1725FC865D78
- 21C0D711-F32A-4665-AA0D-B136F9DD3945
- 49D69DEC-6991-49F4-8D9B-BA60BFDD3D17
-
- name
- Declarations
-
- A2A5E4B3-D9C6-4C49-B4CB-8090D615485E
-
- items
-
- 418F1817-255F-430A-B09A-222964ED66A7
- ------------------------------------
- 8F594E5E-6F46-4E98-B5FB-1C8F3BA9828F
- 50C56AC8-48F3-42A0-AF10-8164464AFAEF
- 397FA09F-A30F-4EE4-920C-318D5004EE97
- ------------------------------------
- 332AA973-AA71-48CB-AEE9-1D71E11019AC
- 8EBBB26F-980E-404E-8366-74E5772298F6
- 678BDB83-FBBD-4E8E-BE0B-E1A98AECB247
- A4E89D97-D5ED-48BB-B5FF-1BFB79211FCD
- ------------------------------------
- 8CEF9711-88D5-4202-AFB9-29EF4EFD25C1
- C3C48948-4F49-484E-A8DE-DEB44723099E
- 209D5D73-7A77-4931-A158-3FB6D5B48A88
-
- name
- Files
-
- A2F24A2E-6791-4005-8E32-5D436AB075DB
-
- items
-
- 4991BB86-736E-4758-B9B2-E4FA90B9368F
- 36853A11-0307-4AE7-B835-7CE6358717A5
- 206D54AF-E67A-4DF0-B7F4-3D42FEB81685
- 51954118-81D7-42B6-9A10-BE23D8B9FFE2
- ------------------------------------
- 567E3D18-BF2B-4379-8927-2777EC9F495E
-
- name
- Counting
-
- B32BD8CF-903E-42D9-B1D3-44F88F262134
-
- items
-
- 59E811FF-E722-46BE-8938-04713612FABB
- ------------------------------------
- 855FC4EF-7B1E-48EE-AD4E-5ECB8ED79D1C
- 4B72C5C3-6CA7-41AC-B2F9-51DEA25D469E
- ------------------------------------
- 21E75321-0CF7-45E8-A297-BCC7C0DDDD15
-
- name
- Blocks
-
- B37B0E21-1B49-494A-BA56-367CF18DD0B2
-
- items
-
- A150C2D8-25B3-4339-BC92-8A0160A70486
- 3D383096-A03F-4EF8-9060-3C727045AB34
- D7A7D3C9-1714-4C50-8CC0-D83A03883E8F
- ------------------------------------
- AAD5D511-6BE7-41DA-8F2B-1593A48FBB08
- 6C9D6B3D-D8E9-4606-9534-577C8D21FFF6
- ------------------------------------
- 58FDEA60-10AF-4C49-AA09-29B77030DB25
- 7F46C90A-595B-4B83-A4F7-058F63CE4218
- ------------------------------------
- 7C6E88FA-CA0E-4110-8C75-A94E54286A75
- 4E9D15B5-65D6-4A9A-9DEC-DE041D68C06F
- 87D5F8AD-8DA6-4AED-A0D8-B51CAC980445
- C44ED391-614F-4BA2-BB0F-87668EEA9954
- 4A6EFD6B-88E2-4822-AD48-03460EDBC796
- ------------------------------------
- 988C8AEF-FC71-4455-9C4F-9338C05685A4
- ------------------------------------
- 7BC1E159-0C90-4B0D-8808-80165C11F59C
-
- name
- Methods
-
- C03F02B1-8BE3-49F5-B983-48C1BDE2657C
-
- items
-
- 569C9822-8C41-4907-94C7-1A8A0031B66D
- ------------------------------------
- 05EE1046-5ED7-48F5-8693-1F066163B2F4
- A7BF14E6-59B1-42E5-8755-8A72BF13685E
-
- name
- Rake
-
- D52AE6E7-DB75-46C9-94B0-F90B186BE1B2
-
- items
-
- 607DFBB6-D4BD-46B1-A221-698CC657143B
- A2F24A2E-6791-4005-8E32-5D436AB075DB
- 9E56B46B-80D0-4397-91B1-E5BEF5FF2811
- 42D15F0C-0A45-4580-944E-20229EB8C92E
- 8D131E43-1245-410B-A7D8-E00222CE5412
- 33312F8F-A75F-49E5-AC1B-B65944C1309C
-
- name
- Iterators
-
- D94AD09E-ADF4-47C9-8236-C7B38B44804E
-
- items
-
- 31D1F145-33AB-4441-BA11-4D1C46928C4C
- 00F66D41-25AF-4597-B67D-E540965A5222
- 5297FD0C-98B1-4514-BBD1-1516810BECA6
- ------------------------------------
- B32C147D-44A6-478A-9D5D-189D7831E9A7
- 43A61A22-6BEE-4997-961C-1CDE739C05FE
- A243E96F-DC21-4AA0-B340-13A7674F6AFF
- 429D0EF5-580D-4166-8F79-713DE96B77F1
- 0E831E03-67E1-4357-8323-C60685C23C4F
- 671F05E2-D9CC-485E-BB1B-B13EF20FAC65
- 4C79256C-480A-459C-BDE8-BB0D972811DB
- 79FEC3CC-2A40-4611-9A85-ECDB22FE0701
- 711ED6C3-0F18-41FB-9A7D-3094BB319A85
- A072BB1E-1DD1-45D3-9346-8CA3BA21B364
- 1B925A4D-8EE4-442B-9254-293599F5717F
- 68B21F6F-5D89-41FA-A19C-F29C2F912B4E
- 82F8EEE0-2452-411E-8102-7BFDDBCA2E72
- 09A11FDA-49FC-4466-8787-8D1D5D111A89
- 29340695-E426-4F77-8CF7-C59360A549F4
- F91C25EC-EC76-498B-BFB5-FDA8F57C5875
- 7850AD5C-A90D-4E2C-A931-EADFF8D3D9A3
- 05655BD8-23C6-445F-BFD1-420BF25C3030
- 33639D7A-BD8C-4396-9C44-307B8AC87C9E
- ------------------------------------
- DB457094-1AC9-4856-AEFC-43A9576B6775
- B186BAC0-D981-41AC-B8F4-34BAD2BC4EE6
- F46A4687-E52D-40D2-9072-C215645EDBC6
- ------------------------------------
- C649F945-DAB8-4DA2-B73C-2EFF9D7D34F3
- 942F20E2-C40A-44B8-A3F2-99AAC68CB534
- 1C60D589-DD46-4109-90CA-6B34AEA2F298
-
- name
- Tests
-
- E7A3BCF6-3594-453A-945D-4C5D81631CBF
-
- items
-
- BF487539-8085-4FF4-8601-1AD20FABAEDC
- 83EED068-8C1C-4BAF-9893-902DC00616AB
- 0CCBE04E-F4E2-4E55-9506-7DE67ACF8388
- 05DFF82C-5A29-4EBD-93FE-C165FFFB5EA8
- E98FB8F9-7302-431D-8BF2-275A68A6126C
- 121B334B-2AA6-4E9A-A8B8-BF93B627982B
- AFE1D078-EA16-45F5-AD8A-FAC1B523D861
- C7AAAE45-487A-4B61-8962-D47675AAC05F
- ------------------------------------
- 2B73EC5F-06D2-460C-A14F-6FA05AFCF0CC
- 0E85EC81-2FAB-4648-B590-119CC1BB6E41
- A71A18CF-2D71-4BFF-AA0C-D9B8C59BC4EB
-
- name
- Classes and Modules
-
- F120CD22-35C0-4E41-8F12-E3C41E04DAB3
-
- items
-
- E16EE658-1CA0-4950-954B-B962E50B754F
- ------------------------------------
- 840B9C4C-7037-4C3B-9028-EB9DC75EDB3E
- B9E3A6DF-875D-11D9-897C-000393CBCE2E
- ------------------------------------
- F4EEB2B6-07D8-402F-8FC3-79B7308D2576
-
- name
- Hashes
-
-
-
- name
- Ruby
- ordering
-
- 35222962-C50D-4D58-A6AE-71E7AD980BE4
- 5289EE40-86B8-11D9-A8D4-000A95E13C98
- 63F3B3B7-CBE2-426B-B551-657733F3868B
- 1AD6A138-2E89-4D6A-AB3F-416BF9CE968D
- 931DD73E-615E-476E-9B0D-8341023AE730
- DAA69A0C-FC1E-4509-9931-DFFB38B4D6AE
- 2DDB6FE0-6111-4C40-A149-8E67E76F8272
- BF4CA9F1-51CD-48D4-8357-852234F59046
- 8646378E-91F5-4771-AC7C-43FC49A93576
- EE5F19BA-6C02-11D9-92BA-0011242E4184
- 76FCF165-54CB-4213-BC55-BD60B9C6A3EC
- EE5F1FB2-6C02-11D9-92BA-0011242E4184
- FBFC214F-B019-4967-95D2-028F374A3221
- 9FB64639-F776-499B-BA6F-BB45F86F80FD
- 7F79BC8D-8A4F-4570-973B-05DFEC25747F
- B297E4B8-A8FF-49CE-B9C4-6D4911724D43
- 835FAAC6-5431-436C-998B-241F7226B99B
- 0275EF39-9357-408F-AF20-79E415CA9504
- 59E811FF-E722-46BE-8938-04713612FABB
- F4EEB2B6-07D8-402F-8FC3-79B7308D2576
- 97054C4D-E4A3-45B1-9C00-B82DBCB30CAD
- 569C9822-8C41-4907-94C7-1A8A0031B66D
- 6519CB08-8326-4B77-A251-54722FFBFC1F
- 47D203ED-EB9B-4653-A07B-A897800CEB76
- C122CD92-DDBE-4869-9C7A-CC2B254C9411
- 121B334B-2AA6-4E9A-A8B8-BF93B627982B
- 58FDEA60-10AF-4C49-AA09-29B77030DB25
- 33969819-62C5-4E03-B824-C2337205F364
- 7E084412-80E6-4B70-8092-C03D1ECE4CD2
- EC73D5CC-5F05-46B9-A6F4-82037E4A38C9
- 825B721D-4367-4DF7-98C0-F005695DF9E3
- BFB65D1C-62F1-485D-8A67-3E5A2E55107C
- C649F945-DAB8-4DA2-B73C-2EFF9D7D34F3
- 5AE7CFB4-418E-4E00-AD76-06DB755EE876
- 9460392B-C036-4A76-A5AE-1191F10E4B1B
- 2C07D4E7-D74F-4AE4-82BE-B0BA82247AFA
- F6BF907E-FDF7-4D9B-9E57-BE159561349D
- E5158F94-CC52-4424-A495-14EF9272653F
- A83F68A9-F751-4BB4-AE16-56812878C16A
- 05984208-D559-4C04-A69C-2019361A985A
- ED6368FB-A11D-4622-9F42-7879481094F1
- 88BC3896-DC39-4307-A271-21D33340F15A
- FDFABCB9-DF58-4469-AE11-5407A4FF4D70
- 0F940CBC-2173-49FF-B6FD-98A62863F8F2
- 667083EE-62C3-11D9-B8CF-000D93589AF6
- 48D8E498-C9A5-4B1B-9A18-71A5860276FB
- 4E9A7A73-875C-11D9-897C-000393CBCE2E
- 7BC1E159-0C90-4B0D-8808-80165C11F59C
- 6670835F-62C3-11D9-B8CF-000D93589AF6
- 667082E6-62C3-11D9-B8CF-000D93589AF6
- CD1609FA-47DA-4EE4-9C5B-5C56D953F5B1
- F53E098D-D08E-4CE2-990A-B0BD70E60614
- D121FC61-96A4-4B8F-8709-280EDA876FF3
- 488B387C-50C0-4B2D-9260-5A7E7EAF9B42
- BF487539-8085-4FF4-8601-1AD20FABAEDC
- 83EED068-8C1C-4BAF-9893-902DC00616AB
- 0CCBE04E-F4E2-4E55-9506-7DE67ACF8388
- 05DFF82C-5A29-4EBD-93FE-C165FFFB5EA8
- E98FB8F9-7302-431D-8BF2-275A68A6126C
- AFE1D078-EA16-45F5-AD8A-FAC1B523D861
- C7AAAE45-487A-4B61-8962-D47675AAC05F
- 2B73EC5F-06D2-460C-A14F-6FA05AFCF0CC
- 0E85EC81-2FAB-4648-B590-119CC1BB6E41
- A71A18CF-2D71-4BFF-AA0C-D9B8C59BC4EB
- A150C2D8-25B3-4339-BC92-8A0160A70486
- 3D383096-A03F-4EF8-9060-3C727045AB34
- D7A7D3C9-1714-4C50-8CC0-D83A03883E8F
- AAD5D511-6BE7-41DA-8F2B-1593A48FBB08
- 6C9D6B3D-D8E9-4606-9534-577C8D21FFF6
- 7F46C90A-595B-4B83-A4F7-058F63CE4218
- 7C6E88FA-CA0E-4110-8C75-A94E54286A75
- 87D5F8AD-8DA6-4AED-A0D8-B51CAC980445
- 4E9D15B5-65D6-4A9A-9DEC-DE041D68C06F
- C44ED391-614F-4BA2-BB0F-87668EEA9954
- 4A6EFD6B-88E2-4822-AD48-03460EDBC796
- 988C8AEF-FC71-4455-9C4F-9338C05685A4
- 451A0596-1F72-4AFB-AF2F-45900FABB0F7
- A05CBDD6-845D-45EB-94FB-F8787F5456BE
- B2C3ADE8-E19E-4B87-9C6C-593D490114C7
- 97DE939B-D243-4D5C-B953-1C9090912E7C
- 34FEBB9F-73CD-4DD4-A0A3-1CF2A5E3DE78
- E16D24D2-CC7E-4786-BE0B-1725FC865D78
- 21C0D711-F32A-4665-AA0D-B136F9DD3945
- 49D69DEC-6991-49F4-8D9B-BA60BFDD3D17
- DAE6A754-D906-4763-B816-CE67125CEF08
- 263C94DC-63CF-4BA3-9692-C5582CA8F1AB
- 6021BBDC-4AAD-447B-A0C2-A4BB31721558
- 3DDB99C4-486D-4C11-A217-5680FDD8EC19
- FD010022-E0E7-44DB-827F-33F7D9310DA2
- 4991BB86-736E-4758-B9B2-E4FA90B9368F
- 36853A11-0307-4AE7-B835-7CE6358717A5
- 206D54AF-E67A-4DF0-B7F4-3D42FEB81685
- 51954118-81D7-42B6-9A10-BE23D8B9FFE2
- 567E3D18-BF2B-4379-8927-2777EC9F495E
- ECBA4CA0-275F-460E-85BE-E82FEA2E2B26
- 338EC03D-3FF4-4435-94E8-1CEF20CEC75D
- FDD73070-6D32-4301-A86A-C55B77C3D8ED
- 3C04589C-5127-478E-97B3-CA7DD2EA7ECD
- 689120C9-AB40-4081-8268-9362E00FA4A0
- E54F7077-3C33-4B53-A4F7-21E16132D3AD
- 02913388-EE8E-4C55-AC94-94F3D751F47E
- 7A3CECED-452B-438E-A5C6-95B6BDC43243
- CD748479-D2A4-4AB5-95BD-4C89512BA210
- 844DBD70-BC23-4FBF-9C18-F4A610239DF2
- 1DD13CF5-39C0-4F10-B655-56DACEBC7F94
- F3C5F719-EF03-4FF7-A777-4A8402FE3B6B
- B563E0D7-513D-49B4-9733-1B04A6F25A74
- 5A3754FC-43A3-462B-AB42-E3E951872E6F
- BD4CFD7B-1AC0-4569-9BDA-FD491F41F4E6
- 9E0B4D4B-2956-4B3A-800A-3D8CE54E66BF
- BA9440C9-36C3-4031-BB61-67B581D5B179
- B0CE57EC-FB2E-4482-8CCE-448DC2588715
- 07D1F987-7CDB-4EAD-B64A-27A93051700E
- A3B9B76B-2BC5-425C-AB24-9FAAFC375798
- 5DA9E1E8-2C54-420A-9B84-B040A1AF2B9E
- 669A86AD-936F-4EDA-8E4E-6863804072DA
- 6C6B9849-9631-49FF-A9F9-F0E94A1512C5
- 1F72122A-35AD-4BA1-AA01-889A10319666
- E23FE534-8061-4828-98A5-46270B6910B0
- 197709C5-8382-4A59-B6D7-31A0CC0F23B7
- 9D9E7BA3-8C5D-4532-83EA-326358C2F5BB
- 98182B9E-7C61-4824-BE4C-9CD69C816037
- CB03D11A-7204-48D0-92C1-E109034403E7
- 52B8BF63-F09E-4789-8407-06168A8AE666
- B79B9DAB-ABEF-44F6-BF7E-635E7BA11DFD
- 4E409AA4-E7D4-46B7-A4E9-E32F992B33E9
- 8021944C-CEA4-4983-8D1C-78D18D4004A1
- 2514FC26-468C-4D08-A788-494A444C4286
- 66802933-B49F-479B-9DF9-1D898FF1FA90
- 855FC4EF-7B1E-48EE-AD4E-5ECB8ED79D1C
- 4B72C5C3-6CA7-41AC-B2F9-51DEA25D469E
- 21E75321-0CF7-45E8-A297-BCC7C0DDDD15
- E16EE658-1CA0-4950-954B-B962E50B754F
- 840B9C4C-7037-4C3B-9028-EB9DC75EDB3E
- B9E3A6DF-875D-11D9-897C-000393CBCE2E
- 418F1817-255F-430A-B09A-222964ED66A7
- 8F594E5E-6F46-4E98-B5FB-1C8F3BA9828F
- 50C56AC8-48F3-42A0-AF10-8164464AFAEF
- 397FA09F-A30F-4EE4-920C-318D5004EE97
- 332AA973-AA71-48CB-AEE9-1D71E11019AC
- 8EBBB26F-980E-404E-8366-74E5772298F6
- 678BDB83-FBBD-4E8E-BE0B-E1A98AECB247
- A4E89D97-D5ED-48BB-B5FF-1BFB79211FCD
- 8CEF9711-88D5-4202-AFB9-29EF4EFD25C1
- C3C48948-4F49-484E-A8DE-DEB44723099E
- 209D5D73-7A77-4931-A158-3FB6D5B48A88
- 31D1F145-33AB-4441-BA11-4D1C46928C4C
- 00F66D41-25AF-4597-B67D-E540965A5222
- 5297FD0C-98B1-4514-BBD1-1516810BECA6
- B32C147D-44A6-478A-9D5D-189D7831E9A7
- 43A61A22-6BEE-4997-961C-1CDE739C05FE
- A243E96F-DC21-4AA0-B340-13A7674F6AFF
- 429D0EF5-580D-4166-8F79-713DE96B77F1
- 0E831E03-67E1-4357-8323-C60685C23C4F
- 671F05E2-D9CC-485E-BB1B-B13EF20FAC65
- 4C79256C-480A-459C-BDE8-BB0D972811DB
- 79FEC3CC-2A40-4611-9A85-ECDB22FE0701
- 711ED6C3-0F18-41FB-9A7D-3094BB319A85
- A072BB1E-1DD1-45D3-9346-8CA3BA21B364
- 1B925A4D-8EE4-442B-9254-293599F5717F
- 68B21F6F-5D89-41FA-A19C-F29C2F912B4E
- 82F8EEE0-2452-411E-8102-7BFDDBCA2E72
- 09A11FDA-49FC-4466-8787-8D1D5D111A89
- 29340695-E426-4F77-8CF7-C59360A549F4
- F91C25EC-EC76-498B-BFB5-FDA8F57C5875
- 7850AD5C-A90D-4E2C-A931-EADFF8D3D9A3
- 05655BD8-23C6-445F-BFD1-420BF25C3030
- 33639D7A-BD8C-4396-9C44-307B8AC87C9E
- DB457094-1AC9-4856-AEFC-43A9576B6775
- B186BAC0-D981-41AC-B8F4-34BAD2BC4EE6
- F46A4687-E52D-40D2-9072-C215645EDBC6
- 942F20E2-C40A-44B8-A3F2-99AAC68CB534
- 1C60D589-DD46-4109-90CA-6B34AEA2F298
- 0CB48BCA-3F6E-4AE0-85BC-08A1D2508216
- 20AAD0BC-075D-4EC0-9057-E3E5E62C4125
- 5B46ECFD-23A4-4F0C-9951-F64C19C72C2B
- 46BF99AD-E172-4D49-BCF7-072F4730E1D9
- 3BA6762A-BB6B-489E-8006-F30F386AEF48
- 8343ACF4-EEB7-44B5-B835-94826466D4D5
- B904D4AA-D15D-48A4-8EB2-563BAF489332
- CC300D44-6C3F-4F6C-A8AB-86F5A2DC57CF
- 2DBEE50B-3097-4A57-AB48-3586CF392D8B
- 0BA2B2F1-E767-4A03-9791-0AC0183251F1
- B46D35B8-5DEB-4C10-A110-BA1965A2EB9C
- 05EE1046-5ED7-48F5-8693-1F066163B2F4
- A7BF14E6-59B1-42E5-8755-8A72BF13685E
- EEE6D060-C5A0-400D-A2E0-0835013C5365
- E00B62AC-6B1C-11D9-9B1F-000D93589AF6
- 1D26F26C-C6F7-434F-84F8-FEE895372E8A
- 6FEAF60F-F0F3-4618-9259-DE93285F50D1
- 92E190C9-A861-4025-92D4-D6B5A24C22D4
- A5D50494-EB97-48DE-A2BE-322DF52A7A7A
- 6D75102B-6E51-4360-8F12-BE12327B6AE6
- AEDD6A5F-417F-4177-8589-B07518ACA9DE
- 1A7701FA-D866-498C-AD4C-7846538DB535
-
- uuid
- 467B298F-6227-11D9-BFB1-000D93589AF6
-
-
diff --git a/bundles/text.tmbundle/Commands/Convert to ASCII.plist b/bundles/text.tmbundle/Commands/Convert to ASCII.plist
deleted file mode 100644
index d892bbcaa..000000000
--- a/bundles/text.tmbundle/Commands/Convert to ASCII.plist
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- iconv -c -f utf-8 -t ASCII//TRANSLIT
- fallbackInput
- word
- input
- selection
- name
- Transliterate Word / Selection to ASCII
- output
- replaceSelectedText
- uuid
- 3AA8A593-6E4C-11D9-91AF-000D93589AF6
-
-
diff --git a/bundles/text.tmbundle/Commands/Convert to hex.plist b/bundles/text.tmbundle/Commands/Convert to hex.plist
deleted file mode 100644
index 50466cd70..000000000
--- a/bundles/text.tmbundle/Commands/Convert to hex.plist
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby -wKU
-print STDIN.read.unpack("U*").map { |e| sprintf('0x%02x', e) }.join(' ')
- fallbackInput
- character
- input
- selection
- keyEquivalent
- ^X
- name
- Convert Character / Selection to Hex
- output
- replaceSelectedText
- uuid
- 7C9736B2-B851-11D9-B05D-00039369B986
-
-
diff --git a/bundles/text.tmbundle/Commands/Copy Matching Lines into New Document.tmCommand b/bundles/text.tmbundle/Commands/Copy Matching Lines into New Document.tmCommand
deleted file mode 100644
index 63a8a4326..000000000
--- a/bundles/text.tmbundle/Commands/Copy Matching Lines into New Document.tmCommand
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- bundleUUID
- B7BC3FFD-6E4B-11D9-91AF-000D93589AF6
- command
- res=$(ruby -rui -e"print TextMate::UI.request_string(:title => 'Filter Matching Lines', :prompt => 'Enter a pattern:', :button1 => 'Filter', :button2 => 'Cancel').to_s")
-
-[[ -z "$res" ]] && exit_discard
-export pattern="$res"
-
-# This could be done with grep, but Python's RE is closer to oniguruma
-"${TM_PYTHON:-python}" -c '
-import sys, os, re, traceback
-try:
- pattern = re.compile(os.environ["pattern"])
-except re.error, e:
- sys.stderr.write("Invalid pattern: %s" % e)
- sys.exit(1)
-for line in sys.stdin:
- if pattern.search(line):
- sys.stdout.write(line)
-' || exit_show_tool_tip
-
- input
- selection
- name
- Copy Matching Lines into New Document
- output
- openAsNewDocument
- uuid
- 965DF29E-4EBD-457A-9A61-56D920C35F72
-
-
diff --git a/bundles/text.tmbundle/Commands/Copy Non-Matching Lines into New Document.tmCommand b/bundles/text.tmbundle/Commands/Copy Non-Matching Lines into New Document.tmCommand
deleted file mode 100644
index b97dcc881..000000000
--- a/bundles/text.tmbundle/Commands/Copy Non-Matching Lines into New Document.tmCommand
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- bundleUUID
- B7BC3FFD-6E4B-11D9-91AF-000D93589AF6
- command
- res=$(ruby -rui -e"print TextMate::UI.request_string(:title => 'Filter Non-Matching Lines', :prompt => 'Enter a pattern:', :button1 => 'Filter', :button2 => 'Cancel').to_s")
-
-[[ -z "$res" ]] && exit_discard
-export pattern="$res"
-
-# This could be done with grep, but Python's RE is closer to oniguruma
-"${TM_PYTHON:-python}" -c '
-import sys, os, re, traceback
-try:
- pattern = re.compile(os.environ["pattern"])
-except re.error, e:
- sys.stderr.write("Invalid pattern: %s" % e)
- sys.exit(1)
-for line in sys.stdin:
- if not pattern.search(line):
- sys.stdout.write(line)
-' || exit_show_tool_tip
-
- input
- selection
- name
- Copy Non-Matching Lines into New Document
- output
- openAsNewDocument
- uuid
- 8109F2C2-FF63-46F7-83F3-D2318290FC11
-
-
diff --git a/bundles/text.tmbundle/Commands/Decrypt selection.plist b/bundles/text.tmbundle/Commands/Decrypt selection.plist
deleted file mode 100644
index 1cfeace9e..000000000
--- a/bundles/text.tmbundle/Commands/Decrypt selection.plist
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- get_pw () {
- ruby -rui -e"print TextMate::UI.request_secure_string(:title => 'Decrypt AES 128 Encrypted Text', :prompt => '$1', :button1 => '$2', :button2 => 'Cancel').to_s"
-}
-
-pw=$(get_pw 'What is the password?' Decrypt)
-[[ -z "$pw" ]] && exit_discard
-
-if ! openssl enc -d -aes128 -base64 -pass "pass:$pw"; then
- exit_show_tool_tip
-fi
-
- fallbackInput
- document
- input
- selection
- keyEquivalent
- ^@E
- name
- AES Decrypt Document / Selection With Password…
- output
- replaceSelectedText
- uuid
- 4B22577B-BC8E-11D9-8946-000D93589AF6
-
-
diff --git a/bundles/text.tmbundle/Commands/Distill Document : Selection.tmCommand b/bundles/text.tmbundle/Commands/Distill Document : Selection.tmCommand
deleted file mode 100644
index 13a4b72fe..000000000
--- a/bundles/text.tmbundle/Commands/Distill Document : Selection.tmCommand
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- bundleUUID
- B7BC3FFD-6E4B-11D9-91AF-000D93589AF6
- command
- res=$(ruby -rui -e"print TextMate::UI.request_string(:title => 'Distill Text', :prompt => 'Enter a pattern:', :button1 => 'Filter', :button2 => 'Cancel').to_s")
-
-[[ -z "$res" ]] && exit_discard
-export pattern="$res"
-
-# This could be done with grep, but Python's RE is closer to oniguruma
-"${TM_PYTHON:-python}" -c '
-import sys, os, re, traceback
-try:
- pattern = re.compile(os.environ["pattern"])
-except re.error, e:
- sys.stderr.write("Invalid pattern: %s" % e)
- sys.exit(1)
-mate = "\"%s/bin/mate\" -a" % os.environ["TM_SUPPORT_PATH"]
-pb = os.popen(mate, "w")
-for line in sys.stdin:
- if pattern.search(line):
- pb.write(line)
- else:
- sys.stdout.write(line)
-pb.close()
-' || exit_show_tool_tip
-
-
- input
- selection
- name
- Distill Document / Selection
- output
- replaceSelectedText
- uuid
- DA5AD0D9-F7C0-4010-9FDC-FF01B0434F9A
-
-
diff --git a/bundles/text.tmbundle/Commands/Duplicate Line.plist b/bundles/text.tmbundle/Commands/Duplicate Line.plist
deleted file mode 100644
index dbdef7157..000000000
--- a/bundles/text.tmbundle/Commands/Duplicate Line.plist
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby -wKU
-
-# If there’s a selection, output that twice (as a snippet)
-# leaving the duplicate as the new selected text.
-# Otherwise split the current line around the caret and
-# output “right, left” to duplicate the line, leaving the
-# caret in the same place on the new line
-
-require File.join(ENV["TM_SUPPORT_PATH"], "lib/exit_codes.rb")
-require File.join(ENV["TM_SUPPORT_PATH"], "lib/escape.rb")
-
-if ENV['TM_SELECTED_TEXT'] != nil
- TextMate.exit_insert_snippet(e_sn(ENV['TM_SELECTED_TEXT']) + "${0:" + e_snp(ENV['TM_SELECTED_TEXT']) + "}")
-else
- col = ENV['TM_LINE_INDEX'].to_i
- TextMate.exit_insert_text(ENV['TM_CURRENT_LINE'][col..-1] + "\n" + ENV['TM_CURRENT_LINE'][0...col])
-end
- fallbackInput
- none
- input
- selection
- keyEquivalent
- ^D
- name
- Duplicate Line / Selection
- output
- afterSelectedText
- uuid
- C46A9DBC-0B06-49DF-838B-491B529ECF22
-
-
diff --git a/bundles/text.tmbundle/Commands/Encrypt selection.plist b/bundles/text.tmbundle/Commands/Encrypt selection.plist
deleted file mode 100644
index d44587104..000000000
--- a/bundles/text.tmbundle/Commands/Encrypt selection.plist
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- get_pw () {
- ruby -rui -e"print TextMate::UI.request_secure_string(:title => 'Encrypt Text With AES 128', :prompt => '$1', :button1 => '$2', :button2 => 'Cancel').to_s"
-}
-pw1=$(get_pw 'What password should be used?' Continue)
-[[ -z "$pw1" ]] && exit_discard
-pw2=$(get_pw 'Enter password again to verify.' Encrypt)
-
-if [[ "$pw1" == "$pw2" ]];
- then openssl enc -e -aes128 -base64 -pass "pass:$pw1"
- else exit_show_tool_tip 'Password mismatch! Please play again.'
-fi
-
- fallbackInput
- document
- input
- selection
- keyEquivalent
- ^@E
- name
- AES Encrypt Document / Selection With Password…
- output
- replaceSelectedText
- uuid
- D39DC176-BC8D-11D9-8946-000D93589AF6
-
-
diff --git a/bundles/text.tmbundle/Commands/Enumerate Lines.plist b/bundles/text.tmbundle/Commands/Enumerate Lines.plist
deleted file mode 100644
index 162a37937..000000000
--- a/bundles/text.tmbundle/Commands/Enumerate Lines.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- cat -n|expand -8
- fallbackInput
- document
- input
- selection
- keyEquivalent
-
- name
- Add Line Numbers to Document / Selection
- output
- replaceSelectedText
- uuid
- 8085013F-8DEA-11D9-B421-000D93589AF6
-
-
diff --git a/bundles/text.tmbundle/Commands/Open Current URL.plist b/bundles/text.tmbundle/Commands/Open Current URL.plist
deleted file mode 100644
index b563a0d51..000000000
--- a/bundles/text.tmbundle/Commands/Open Current URL.plist
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- open "$(cat)"
-
- fallbackInput
- scope
- input
- selection
- keyEquivalent
-
- name
- Open Current URL
- output
- discard
- scope
- markup.underline.link - markup.underline.link.relative
- uuid
- 5A08E461-05CC-4C03-9DC8-BF118594EA3E
-
-
diff --git a/bundles/text.tmbundle/Commands/Randomize Lines in Document : Selection.tmCommand b/bundles/text.tmbundle/Commands/Randomize Lines in Document : Selection.tmCommand
deleted file mode 100644
index 528aba117..000000000
--- a/bundles/text.tmbundle/Commands/Randomize Lines in Document : Selection.tmCommand
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- ruby -pe'$_ = (rand * 100000000).round.to_s + "\t" + $_'|sort|cut -f2-
- input
- selection
- name
- Randomize Lines in Document / Selection
- output
- replaceSelectedText
- uuid
- 90291A6E-34F6-4FD5-BA82-6BB6FB4DD492
-
-
diff --git a/bundles/text.tmbundle/Commands/Sort & Uniq.plist b/bundles/text.tmbundle/Commands/Sort & Uniq.plist
deleted file mode 100644
index 08e43318a..000000000
--- a/bundles/text.tmbundle/Commands/Sort & Uniq.plist
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- sort -f|uniq
- input
- selection
- keyEquivalent
-
- name
- Sort Lines & Remove Duplicates
- output
- replaceSelectedText
- uuid
- 3010E2A8-6E4F-11D9-A18D-000D93589AF6
-
-
diff --git a/bundles/text.tmbundle/Commands/Sort.plist b/bundles/text.tmbundle/Commands/Sort.plist
deleted file mode 100644
index bb6a20929..000000000
--- a/bundles/text.tmbundle/Commands/Sort.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- sort -f
- fallbackInput
- document
- input
- selection
- keyEquivalent
-
- name
- Sort Lines in Document / Selection
- output
- replaceSelectedText
- uuid
- 273853DF-6E4F-11D9-A18D-000D93589AF6
-
-
diff --git a/bundles/text.tmbundle/Commands/Speak Document : Selection.tmCommand b/bundles/text.tmbundle/Commands/Speak Document : Selection.tmCommand
deleted file mode 100644
index 297cc2f8a..000000000
--- a/bundles/text.tmbundle/Commands/Speak Document : Selection.tmCommand
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- say `echo "$TM_SELECTED_TEXT"` &
- input
- selection
- name
- Speak Document / Selection
- output
- discard
- uuid
- D26BEEE3-7439-4B7E-AD9D-9A144CDC5873
-
-
diff --git a/bundles/text.tmbundle/Commands/Strip non-printables.plist b/bundles/text.tmbundle/Commands/Strip non-printables.plist
deleted file mode 100644
index 792398628..000000000
--- a/bundles/text.tmbundle/Commands/Strip non-printables.plist
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- perl -pe 's/[^\t\n\x20-\xFF]|\x7F|\xC2[\x80-\x9F]//g'
- fallbackInput
- document
- input
- selection
- name
- Remove Unprintable Characters in Document / Selection
- output
- replaceSelectedText
- uuid
- BEC25DC3-6E4B-11D9-91AF-000D93589AF6
-
-
diff --git a/bundles/text.tmbundle/Commands/Strip trailing spaces.plist b/bundles/text.tmbundle/Commands/Strip trailing spaces.plist
deleted file mode 100644
index dda9a4559..000000000
--- a/bundles/text.tmbundle/Commands/Strip trailing spaces.plist
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- perl -pe 's/[\t ]+$//g'
- fallbackInput
- document
- input
- selection
- name
- Remove Trailing Spaces in Document / Selection
- output
- replaceSelectedText
- uuid
- 0F8C1F78-6E4C-11D9-91AF-000D93589AF6
-
-
diff --git a/bundles/text.tmbundle/Commands/Word Count.plist b/bundles/text.tmbundle/Commands/Word Count.plist
deleted file mode 100644
index 9f6af2d55..000000000
--- a/bundles/text.tmbundle/Commands/Word Count.plist
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
- beforeRunningCommand
- nop
- command
- #!/usr/bin/env ruby -wKU
-
-def pretty(number)
- number.to_s.gsub(/\d{1,3}(?=\d{3}+(?!\d))/, '\0,')
-end
-
-counts = `wc -lwc`.scan(/\d+/)
-counts[0] = counts[0].to_i + 1 # increase one to the line count
-
-%w[ line word byte ].each do |unit|
- cnt = counts.shift
- plural = cnt.to_i != 1 ? 's' : ''
- printf("%11.11s %s%s\n", pretty(cnt), unit, plural)
-end
-
- fallbackInput
- document
- input
- selection
- keyEquivalent
- ^N
- name
- Statistics for Document / Selection (Word Count)
- output
- showAsTooltip
- uuid
- AA202E76-8A0A-11D9-B85D-000D93589AF6
-
-
diff --git a/bundles/text.tmbundle/Macros/Delete Line.plist b/bundles/text.tmbundle/Macros/Delete Line.plist
deleted file mode 100644
index 52645b1c9..000000000
--- a/bundles/text.tmbundle/Macros/Delete Line.plist
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
- commands
-
-
- command
- selectHardLine:
-
-
- command
- deleteBackward:
-
-
- keyEquivalent
- ^K
- name
- Delete Line
- scopeType
- local
- uuid
- FB8960DB-AA2E-11D9-8E27-000D93589AF6
-
-
diff --git a/bundles/text.tmbundle/Macros/Delete to Beginning of Line.tmMacro b/bundles/text.tmbundle/Macros/Delete to Beginning of Line.tmMacro
deleted file mode 100644
index f2c5dc42e..000000000
--- a/bundles/text.tmbundle/Macros/Delete to Beginning of Line.tmMacro
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- commands
-
-
- command
- deleteToBeginningOfLine:
-
-
- keyEquivalent
- @
- name
- Delete to Beginning of Line
- uuid
- F22BEB71-2DE3-4183-BB10-0199CC328169
-
-
diff --git a/bundles/text.tmbundle/Macros/EOL + . + LF.plist b/bundles/text.tmbundle/Macros/EOL + . + LF.plist
deleted file mode 100644
index 696d519cd..000000000
--- a/bundles/text.tmbundle/Macros/EOL + . + LF.plist
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
- commands
-
-
- command
- moveToEndOfParagraph:
-
-
- argument
- .
- command
- insertText:
-
-
- command
- insertNewline:
-
-
- keyEquivalent
- $@
- name
- Move to EOL and Insert "." + LF
- scope
- text
- uuid
- E86C9A77-5B48-43C6-A712-A61B616269E6
-
-
diff --git a/bundles/text.tmbundle/Macros/EOL + ..plist b/bundles/text.tmbundle/Macros/EOL + ..plist
deleted file mode 100644
index 811816a32..000000000
--- a/bundles/text.tmbundle/Macros/EOL + ..plist
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
- commands
-
-
- command
- moveToEndOfParagraph:
-
-
- argument
- .
- command
- insertText:
-
-
- keyEquivalent
- ~@
- name
- Move to EOL and Insert “.”
- scope
- text
- scopeType
- local
- uuid
- 80CC504F-B13B-11D9-B41F-000D93589AF6
-
-
diff --git a/bundles/text.tmbundle/Macros/Join Lines.plist b/bundles/text.tmbundle/Macros/Join Lines.plist
deleted file mode 100644
index 3787bca54..000000000
--- a/bundles/text.tmbundle/Macros/Join Lines.plist
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
- commands
-
-
- argument
-
- action
- findNext
- findInProjectIgnoreCase
-
- findInProjectRegularExpression
-
- findString
- $\n\s*
- ignoreCase
-
- regularExpression
-
- replaceAllScope
- document
- replaceString
- key
- wrapAround
-
-
- command
- findWithOptions:
-
-
- command
- deleteForward:
-
-
- keyEquivalent
- ^J
- name
- Join Line With Next
- scopeType
- local
- uuid
- 3D7504EE-B927-4D3D-A3CC-BFB189027EE7
-
-
diff --git a/bundles/text.tmbundle/Preferences/Markup style: Bold.plist b/bundles/text.tmbundle/Preferences/Markup style: Bold.plist
deleted file mode 100644
index 5a63bd8b7..000000000
--- a/bundles/text.tmbundle/Preferences/Markup style: Bold.plist
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- name
- Style: Bold
- scope
- markup.bold
- settings
-
- bold
- 1
-
- uuid
- A088E2CA-03E7-4A8C-855C-AC954E739D6D
-
-
diff --git a/bundles/text.tmbundle/Preferences/Markup style: Italic.plist b/bundles/text.tmbundle/Preferences/Markup style: Italic.plist
deleted file mode 100644
index 9ea3216d3..000000000
--- a/bundles/text.tmbundle/Preferences/Markup style: Italic.plist
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- name
- Style: Italic
- scope
- markup.italic
- settings
-
- italic
- 1
-
- uuid
- 2EE6D01F-50BC-434B-BE45-54D29CACB3E0
-
-
diff --git a/bundles/text.tmbundle/Preferences/Markup style: Underline.plist b/bundles/text.tmbundle/Preferences/Markup style: Underline.plist
deleted file mode 100644
index 11a01ca40..000000000
--- a/bundles/text.tmbundle/Preferences/Markup style: Underline.plist
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- name
- Style: Underline
- scope
- markup.underline
- settings
-
- underline
- 1
-
- uuid
- 4CCD8369-40E4-422A-ABE7-C32F3721AFEF
-
-
diff --git a/bundles/text.tmbundle/Preferences/Miscellaneous.plist b/bundles/text.tmbundle/Preferences/Miscellaneous.plist
deleted file mode 100644
index 04ffaf9d8..000000000
--- a/bundles/text.tmbundle/Preferences/Miscellaneous.plist
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- name
- Miscellaneous
- settings
-
- highlightPairs
-
-
- (
- )
-
-
- {
- }
-
-
- [
- ]
-
-
- “
- ”
-
-
- ‘
- ’
-
-
- smartTypingPairs
-
-
- "
- "
-
-
- (
- )
-
-
- {
- }
-
-
- [
- ]
-
-
- “
- ”
-
-
- ‘
- ’
-
-
- unIndentedLinePattern
- ^\s*$
-
- uuid
- 3E8C2307-8175-4A58-BE07-785713D5837A
-
-
diff --git a/bundles/text.tmbundle/Preferences/Spell checking.plist b/bundles/text.tmbundle/Preferences/Spell checking.plist
deleted file mode 100644
index 3ef7e991a..000000000
--- a/bundles/text.tmbundle/Preferences/Spell checking.plist
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- name
- Spell Checking: Disable
- scope
- markup.underline.link, markup.raw
- settings
-
- spellChecking
- 0
-
- uuid
- 613405D5-67B6-4281-94C9-9148E54C66FB
-
-
diff --git a/bundles/text.tmbundle/Snippets/010 Copyright.plist b/bundles/text.tmbundle/Snippets/010 Copyright.plist
deleted file mode 100644
index 3d43183c1..000000000
--- a/bundles/text.tmbundle/Snippets/010 Copyright.plist
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
- content
- (c) Copyright `date +%Y` $TM_FULLNAME. All Rights Reserved.
- name
- Copyright Notice
- tabTrigger
- c)
- uuid
- BC8B89E4-5F16-11D9-B9C3-000D93589AF6
-
-
diff --git a/bundles/text.tmbundle/Snippets/Conitnue bullet.plist b/bundles/text.tmbundle/Snippets/Conitnue bullet.plist
deleted file mode 100644
index 4704f7906..000000000
--- a/bundles/text.tmbundle/Snippets/Conitnue bullet.plist
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- content
-
-•
- keyEquivalent
-
- name
- Continue Bullet
- scope
- meta.bullet-point
- uuid
- C30BA263-B10E-11D9-9975-000D93589AF6
-
-
diff --git a/bundles/text.tmbundle/Snippets/Conitnue light bullet.plist b/bundles/text.tmbundle/Snippets/Conitnue light bullet.plist
deleted file mode 100644
index 2c0cd2a80..000000000
--- a/bundles/text.tmbundle/Snippets/Conitnue light bullet.plist
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- content
-
-·
- keyEquivalent
-
- name
- Continue Light Bullet
- scope
- meta.bullet-point.light
- uuid
- EA149DAB-B10E-11D9-9975-000D93589AF6
-
-
diff --git a/bundles/text.tmbundle/Snippets/Conitnue star bullet.plist b/bundles/text.tmbundle/Snippets/Conitnue star bullet.plist
deleted file mode 100644
index 81dc40471..000000000
--- a/bundles/text.tmbundle/Snippets/Conitnue star bullet.plist
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- content
-
-*
- keyEquivalent
-
- name
- Continue Star Bullet
- scope
- meta.bullet-point.star
- uuid
- B5E22191-B151-11D9-85C9-000D93589AF6
-
-
diff --git a/bundles/text.tmbundle/Snippets/Insert ISO date.plist b/bundles/text.tmbundle/Snippets/Insert ISO date.plist
deleted file mode 100644
index c2b2f79b8..000000000
--- a/bundles/text.tmbundle/Snippets/Insert ISO date.plist
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
- content
- `date +%Y-%m-%d`
- name
- Current Date — YYYY-MM-DD
- tabTrigger
- isoD
- uuid
- C9CAF012-6E50-11D9-AA12-000D93589AF6
-
-
diff --git a/bundles/text.tmbundle/Snippets/Lorem ipsum.plist b/bundles/text.tmbundle/Snippets/Lorem ipsum.plist
deleted file mode 100644
index a30cff0d4..000000000
--- a/bundles/text.tmbundle/Snippets/Lorem ipsum.plist
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
- content
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
- name
- Lorem ipsum
- tabTrigger
- lorem
- uuid
- BA9A2B17-DA89-49A5-809B-AC7510C24625
-
-
diff --git a/bundles/text.tmbundle/Syntaxes/Plain text.plist b/bundles/text.tmbundle/Syntaxes/Plain text.plist
deleted file mode 100644
index 58f61d336..000000000
--- a/bundles/text.tmbundle/Syntaxes/Plain text.plist
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- fileTypes
-
- txt
-
- keyEquivalent
- ^~P
- name
- Plain Text
- patterns
-
-
- captures
-
- 1
-
- name
- punctuation.definition.item.text
-
-
- match
- ^\s*(•).*$\n?
- name
- meta.bullet-point.strong.text
-
-
- captures
-
- 1
-
- name
- punctuation.definition.item.text
-
-
- match
- ^\s*(·).*$\n?
- name
- meta.bullet-point.light.text
-
-
- captures
-
- 1
-
- name
- punctuation.definition.item.text
-
-
- match
- ^\s*(\*).*$\n?
- name
- meta.bullet-point.star.text
-
-
- begin
- ^([ \t]*)(?=\S)
- contentName
- meta.paragraph.text
- end
- ^(?!\1(?=\S))
- patterns
-
-
- match
- (?x)
- ( (https?|s?ftp|ftps|file|smb|afp|nfs|(x-)?man|gopher|txmt)://|mailto:)
- [-:@a-zA-Z0-9_.,~%+/?=&#]+(?<![.,?:])
-
- name
- markup.underline.link.text
-
-
-
-
- scopeName
- text.plain
- uuid
- 3130E4FA-B10E-11D9-9F75-000D93589AF6
-
-
diff --git a/bundles/text.tmbundle/Templates/Empty file/info.plist b/bundles/text.tmbundle/Templates/Empty file/info.plist
deleted file mode 100644
index 5b2b2ffb5..000000000
--- a/bundles/text.tmbundle/Templates/Empty file/info.plist
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
- command
- touch "$TM_NEW_FILE"
- isDefault
- 1
- name
- Empty File
- uuid
- 2D3AFF01-6DFB-11D9-91EB-000D93589AF6
-
-
diff --git a/bundles/text.tmbundle/Templates/From Clipboard/info.plist b/bundles/text.tmbundle/Templates/From Clipboard/info.plist
deleted file mode 100644
index 54da778e6..000000000
--- a/bundles/text.tmbundle/Templates/From Clipboard/info.plist
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- command
- if [[ ! -f "$TM_NEW_FILE" ]]; then
- __CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100 \
- pbpaste > "$TM_NEW_FILE" | tr '\r' '\n'
-fi
- extension
- txt
- name
- From Clipboard
- uuid
- 1D357AB2-687A-4C74-AADE-6AE6684E97DC
-
-
diff --git a/bundles/text.tmbundle/info.plist b/bundles/text.tmbundle/info.plist
deleted file mode 100644
index 13b08e097..000000000
--- a/bundles/text.tmbundle/info.plist
+++ /dev/null
@@ -1,139 +0,0 @@
-
-
-
-
- contactEmailRot13
- gz-ohaqyrf@znpebzngrf.pbz
- contactName
- Allan Odgaard
- deleted
-
- CF8570E4-389B-4928-8908-BF3B6A5E8422
-
- description
- The text bundle has a lot of support for plain text and is a requisite for working with text.
- mainMenu
-
- excludedItems
-
- 5A08E461-05CC-4C03-9DC8-BF118594EA3E
- C30BA263-B10E-11D9-9975-000D93589AF6
- EA149DAB-B10E-11D9-9975-000D93589AF6
- B5E22191-B151-11D9-85C9-000D93589AF6
- 80CC504F-B13B-11D9-B41F-000D93589AF6
- E86C9A77-5B48-43C6-A712-A61B616269E6
- F22BEB71-2DE3-4183-BB10-0199CC328169
-
- items
-
- 818D10A3-F827-424A-BCBF-6DC6CB62966A
- DAF7B200-5B75-4999-BBC3-D1ADD64E1FA1
- 172F6528-7561-44FC-BFAD-A06C645D5AFB
- 4D6C0A7A-263C-4E2E-B2F2-1FA912E14490
- ------------------------------------
- FB8960DB-AA2E-11D9-8E27-000D93589AF6
- C46A9DBC-0B06-49DF-838B-491B529ECF22
- 3D7504EE-B927-4D3D-A3CC-BFB189027EE7
- ------------------------------------
- 8085013F-8DEA-11D9-B421-000D93589AF6
- AA202E76-8A0A-11D9-B85D-000D93589AF6
- ------------------------------------
- BC8B89E4-5F16-11D9-B9C3-000D93589AF6
- C9CAF012-6E50-11D9-AA12-000D93589AF6
- BA9A2B17-DA89-49A5-809B-AC7510C24625
- D26BEEE3-7439-4B7E-AD9D-9A144CDC5873
-
- submenus
-
- 172F6528-7561-44FC-BFAD-A06C645D5AFB
-
- items
-
- DA5AD0D9-F7C0-4010-9FDC-FF01B0434F9A
- 965DF29E-4EBD-457A-9A61-56D920C35F72
- 8109F2C2-FF63-46F7-83F3-D2318290FC11
-
- name
- Filtering
-
- 4D6C0A7A-263C-4E2E-B2F2-1FA912E14490
-
- items
-
- 273853DF-6E4F-11D9-A18D-000D93589AF6
- 3010E2A8-6E4F-11D9-A18D-000D93589AF6
- ------------------------------------
- 90291A6E-34F6-4FD5-BA82-6BB6FB4DD492
-
- name
- Sorting
-
- 818D10A3-F827-424A-BCBF-6DC6CB62966A
-
- items
-
- 7C9736B2-B851-11D9-B05D-00039369B986
- 0F8C1F78-6E4C-11D9-91AF-000D93589AF6
- BEC25DC3-6E4B-11D9-91AF-000D93589AF6
- 3AA8A593-6E4C-11D9-91AF-000D93589AF6
-
- name
- Converting / Stripping
-
- DAF7B200-5B75-4999-BBC3-D1ADD64E1FA1
-
- items
-
- D39DC176-BC8D-11D9-8946-000D93589AF6
- 4B22577B-BC8E-11D9-8946-000D93589AF6
-
- name
- Encryption
-
-
-
- name
- Text
- ordering
-
- 8085013F-8DEA-11D9-B421-000D93589AF6
- D39DC176-BC8D-11D9-8946-000D93589AF6
- 4B22577B-BC8E-11D9-8946-000D93589AF6
- 7C9736B2-B851-11D9-B05D-00039369B986
- C46A9DBC-0B06-49DF-838B-491B529ECF22
- 5A08E461-05CC-4C03-9DC8-BF118594EA3E
- 0F8C1F78-6E4C-11D9-91AF-000D93589AF6
- BEC25DC3-6E4B-11D9-91AF-000D93589AF6
- 273853DF-6E4F-11D9-A18D-000D93589AF6
- 3010E2A8-6E4F-11D9-A18D-000D93589AF6
- 90291A6E-34F6-4FD5-BA82-6BB6FB4DD492
- AA202E76-8A0A-11D9-B85D-000D93589AF6
- 3AA8A593-6E4C-11D9-91AF-000D93589AF6
- D26BEEE3-7439-4B7E-AD9D-9A144CDC5873
- 965DF29E-4EBD-457A-9A61-56D920C35F72
- 8109F2C2-FF63-46F7-83F3-D2318290FC11
- DA5AD0D9-F7C0-4010-9FDC-FF01B0434F9A
- FB8960DB-AA2E-11D9-8E27-000D93589AF6
- 3D7504EE-B927-4D3D-A3CC-BFB189027EE7
- 80CC504F-B13B-11D9-B41F-000D93589AF6
- E86C9A77-5B48-43C6-A712-A61B616269E6
- F22BEB71-2DE3-4183-BB10-0199CC328169
- C30BA263-B10E-11D9-9975-000D93589AF6
- EA149DAB-B10E-11D9-9975-000D93589AF6
- B5E22191-B151-11D9-85C9-000D93589AF6
- BC8B89E4-5F16-11D9-B9C3-000D93589AF6
- C9CAF012-6E50-11D9-AA12-000D93589AF6
- BA9A2B17-DA89-49A5-809B-AC7510C24625
- 3130E4FA-B10E-11D9-9F75-000D93589AF6
- 3E8C2307-8175-4A58-BE07-785713D5837A
- 613405D5-67B6-4281-94C9-9148E54C66FB
- A088E2CA-03E7-4A8C-855C-AC954E739D6D
- 2EE6D01F-50BC-434B-BE45-54D29CACB3E0
- 4CCD8369-40E4-422A-ABE7-C32F3721AFEF
- 2D3AFF01-6DFB-11D9-91EB-000D93589AF6
- 1D357AB2-687A-4C74-AADE-6AE6684E97DC
-
- uuid
- B7BC3FFD-6E4B-11D9-91AF-000D93589AF6
-
-