├── Support ├── test │ └── fixtures │ │ ├── .tm_properties │ │ ├── bin │ │ ├── sample-executable │ │ └── rspec │ │ ├── fake_rbenv │ │ ├── shims │ │ │ └── rbenv_installed_shim │ │ └── rbenv │ │ ├── sample_project_with_gemfile │ │ ├── Gemfile │ │ ├── bin │ │ │ └── rspec │ │ ├── other │ │ │ └── rspec │ │ └── Gemfile.lock │ │ ├── sample_project │ │ ├── bin │ │ │ └── rspec │ │ └── other │ │ │ └── rspec │ │ └── fake_rvm_home │ │ └── .rvm │ │ └── bin │ │ └── rvm ├── vendor │ ├── rcodetools │ │ ├── test │ │ │ ├── data │ │ │ │ ├── attic │ │ │ │ │ ├── doc-input.rb │ │ │ │ │ ├── ri-input.rb │ │ │ │ │ ├── doc-output.rb │ │ │ │ │ ├── refe-input.rb │ │ │ │ │ ├── ri_emacs-input.rb │ │ │ │ │ ├── ri_vim-input.rb │ │ │ │ │ ├── add_markers-input.rb │ │ │ │ │ ├── ri-output.rb │ │ │ │ │ ├── completion-input.rb │ │ │ │ │ ├── completion-output.rb │ │ │ │ │ ├── completion_in_method-output.rb │ │ │ │ │ ├── doc_detect_rbtest-input.rb │ │ │ │ │ ├── doc_rbtest-output.rb │ │ │ │ │ ├── refe-output.rb │ │ │ │ │ ├── completion_class_info-input.rb │ │ │ │ │ ├── completion_emacs-input.rb │ │ │ │ │ ├── completion_emacs_icicles-input.rb │ │ │ │ │ ├── doc_detect_rbtest-output.rb │ │ │ │ │ ├── doc_detect_rbtest2-output.rb │ │ │ │ │ ├── completion_class_info_no_candidates-output.rb │ │ │ │ │ ├── completion_rbtest-output.rb │ │ │ │ │ ├── no_warnings-input.rb │ │ │ │ │ ├── completion_detect_rbtest2-input.rb │ │ │ │ │ ├── completion_detect_rbtest2-output.rb │ │ │ │ │ ├── completion_detect_rbtest-output.rb │ │ │ │ │ ├── ri_emacs-output.rb │ │ │ │ │ ├── ri_vim-output.rb │ │ │ │ │ ├── completion_in_method-input.rb │ │ │ │ │ ├── no_warnings-output.rb │ │ │ │ │ ├── completion_class_info_no_candidates-input.rb │ │ │ │ │ ├── unit_test_rbtest-input.rb │ │ │ │ │ ├── unit_test_detect_rbtest2-input.rb │ │ │ │ │ ├── unit_test_rbtest-output.rb │ │ │ │ │ ├── add_markers-output.rb │ │ │ │ │ ├── unit_test_detect_rbtest2-output.rb │ │ │ │ │ ├── doc_rbtest-input.rb │ │ │ │ │ ├── completion_rbtest-input.rb │ │ │ │ │ ├── doc_detect_rbtest2-input.rb │ │ │ │ │ ├── completion_detect_rbtest-input.rb │ │ │ │ │ ├── completion_in_method-test.rb │ │ │ │ │ ├── simple_annotation-input.rb │ │ │ │ │ ├── simple_annotation-output.rb │ │ │ │ │ ├── completion_emacs-output.rb │ │ │ │ │ ├── completion_emacs_icicles-output.rb │ │ │ │ │ ├── completion_class_info-output.rb │ │ │ │ │ ├── bindings-input.rb │ │ │ │ │ ├── bindings-output.rb │ │ │ │ │ ├── unit_test-input.rb │ │ │ │ │ ├── unit_test_poetry-input.rb │ │ │ │ │ ├── unit_test_detect_rbtest-input.rb │ │ │ │ │ ├── unit_test-output.rb │ │ │ │ │ ├── unit_test_poetry-output.rb │ │ │ │ │ ├── rspec-input.rb │ │ │ │ │ ├── rspec_poetry-input.rb │ │ │ │ │ ├── unit_test_detect_rbtest-output.rb │ │ │ │ │ ├── rspec_poetry-output.rb │ │ │ │ │ └── rspec-output.rb │ │ │ │ ├── rct-doc │ │ │ │ │ ├── doc.taf │ │ │ │ │ ├── ri.taf │ │ │ │ │ ├── refe.taf │ │ │ │ │ ├── ri_vim.taf │ │ │ │ │ ├── doc_detect_rbtest.taf │ │ │ │ │ ├── ri_emacs.taf │ │ │ │ │ ├── doc_rbtest.taf │ │ │ │ │ └── doc_detect_rbtest2.taf │ │ │ │ ├── rct-complete │ │ │ │ │ ├── completion.taf │ │ │ │ │ ├── completion_detect_rbtest2.taf │ │ │ │ │ ├── completion_class_info_no_candidates.taf │ │ │ │ │ ├── completion_class_info.taf │ │ │ │ │ ├── completion_rbtest.taf │ │ │ │ │ ├── completion_detect_rbtest.taf │ │ │ │ │ ├── completion_emacs.taf │ │ │ │ │ └── completion_emacs_icicles.taf │ │ │ │ ├── sample_test_script.rb │ │ │ │ ├── xmpfilter │ │ │ │ │ ├── multi_line_annotation_6.taf │ │ │ │ │ ├── no_warnings.taf │ │ │ │ │ ├── nospace.taf │ │ │ │ │ ├── add_markers.taf │ │ │ │ │ ├── width.taf │ │ │ │ │ ├── exception.taf │ │ │ │ │ ├── comment_out.taf │ │ │ │ │ ├── mult.rb │ │ │ │ │ ├── multi_line_annotation_7.taf │ │ │ │ │ ├── unit_test_rbtest.taf │ │ │ │ │ ├── unit_test_detect_rbtest2.taf │ │ │ │ │ ├── last_match.taf │ │ │ │ │ ├── simple_annotation.taf │ │ │ │ │ ├── multi_line_annotation_3.taf │ │ │ │ │ ├── multi_line_annotation_4.taf │ │ │ │ │ ├── multi_line_annotation_1.taf │ │ │ │ │ ├── multi_line_annotation_2.taf │ │ │ │ │ ├── multi_line_annotation_5.taf │ │ │ │ │ ├── expectations.taf │ │ │ │ │ └── bindings.taf │ │ │ │ ├── rct-complete-TDC │ │ │ │ │ ├── completion_in_method__testscript.taf │ │ │ │ │ ├── completion_in_method__testmethod.taf │ │ │ │ │ └── completion_in_method__wrong_testmethod.taf │ │ │ │ └── method_analyzer-data.rb │ │ │ └── test_options.rb │ │ ├── README.ja │ │ ├── rcodetools.gif │ │ ├── bin │ │ │ ├── rct-fork │ │ │ ├── rct-fork-client │ │ │ └── ruby-toggle-file │ │ ├── lib │ │ │ └── rcodetools │ │ │ │ ├── compat.rb │ │ │ │ └── fork_config.rb │ │ ├── license.txt │ │ ├── THANKS │ │ ├── README.method_analysis │ │ └── Rakefile.method_analysis │ └── README ├── bin │ ├── rvm_wrapper │ ├── ri_lookup │ ├── snippet_paren.rb │ ├── make_destructive.rb │ └── execute_line.rb ├── RubyMate │ ├── test.rb │ └── todo.txt ├── lib │ └── ruby_requires.rb ├── RakeMate │ └── run_rake_task.rb └── help │ └── help.markdown ├── Tests ├── rubylexer │ ├── g.rb │ ├── newsyntax.rb │ └── w.rb └── modulo_ambiguity1.rb ├── Snippets ├── #inspect.tmSnippet ├── __END__.tmSnippet ├── hash pointer.plist ├── directory().tmSnippet ├── loop { __ }.tmSnippet ├── when.plist ├── Dir["__"].tmSnippet ├── randomize (ran).plist ├── require '..' (req).plist ├── require_gem "__".tmSnippet ├── Add '# =>' Marker.tmSnippet ├── 070 ruby if.plist ├── def end.plist ├── each { |e| .. } (ea).plist ├── elsif ___.tmSnippet ├── map { |e| .. } (map).plist ├── # encoding: UTF-8.tmSnippet ├── all? { |e| .. } (all).plist ├── any? { |e| .. } (any).plist ├── attr_reader .. (r).plist ├── attr_writer .. (w).plist ├── find { |e| .. } (fin).plist ├── max { |a, b| .. } (max).plist ├── min { |a, b| .. } (min).plist ├── refine.tmSnippet ├── :yields: RDoc comment.tmSnippet ├── File_read("__").tmSnippet ├── detect { |e| .. } (det).plist ├── extend Forwardable (Forw).plist ├── reject { |e| .. } (rej).plist ├── select { |e| .. } (sel).plist ├── sort { |a, b| .. } (sor).plist ├── attr_accessor .. (rw).plist ├── classify { |e| .. } (clas).plist ├── collect { |e| .. } (col).plist ├── singleton_class().tmSnippet ├── sort_by { |e| .. } (sorb).plist ├── unless (unless).plist ├── until ___ end.tmSnippet ├── while ___ end.tmSnippet ├── delete_if { |e| .. } (deli).plist ├── each_index { |i| .. } (eai).plist ├── each_key { |key| .. } (eak).plist ├── find_all { |e| .. } (fina).plist ├── partition { |e| .. } (par).plist ├── PStore_new( __ ).tmSnippet ├── alias_method .. (am).plist ├── deep_copy(..) (dee).plist ├── def test_ .. end (t).plist ├── each_char { |chr| .. } (eac-).plist ├── 060 ruby if else.plist ├── 080 ruby case.plist ├── each_byte { |byte| .. } (eab).plist ├── each_line { |line| .. } (eal).plist ├── each_value { |val| .. } (eav).plist ├── hash pair (:).plist ├── reverse_each { |e| .. } (rea).plist ├── xmlread(__).tmSnippet ├── def self .. end (defs).plist ├── unix_filter .. (uni).plist ├── zip(enums) { |row| .. } (zip).plist ├── application_code .. (app).plist ├── assert_nothing_thrown { .. } (asnt).plist ├── assert_raises(..) { .. } (asr).plist ├── assert_throws(..) { .. } (ast).plist ├── class << self __ end.tmSnippet ├── def_delegators .. (defds).plist ├── # frozen_string_literal: true.tmSnippet ├── def initialize __ end.tmSnippet ├── def_delegator .. (defd).plist ├── each_slice { |group| .. } (eas).plist ├── flatten_once (fla).plist ├── namespace :__ do __ end.tmSnippet ├── scan(;..;) { |match| .. } (sca).plist ├── #!;usr;local;bin;ruby -w.plist ├── each_cons(..) { |group| .. } (eac-).plist ├── each_pair { |name, val| .. } (eap).plist ├── path_from_here( __ ).tmSnippet ├── results_report(__) { __ }.tmSnippet ├── xpath(__) { __ }.tmSnippet ├── class_from_name() (clafn).plist ├── each_with_index { |e, i| .. } (eawi).plist ├── module .. end.plist ├── usage_if() (usai).plist ├── YAML.load(file) (Yl-).plist ├── class .. end (cla).plist ├── grep(;pattern;) { |match| .. } (gre).plist ├── map_with_index { |e, i| .. } (mapwi).plist ├── Dir.glob("..") do |file| .. end (Dir).plist ├── Marshal.load(obj) (Ml).plist ├── assert_nothing_raised(..) { .. } (asnr).plist ├── def method_missing .. end (mm).plist ├── include Comparable .. (Comp).plist ├── include Enumerable .. (Enum).plist ├── usage_unless() (usau).plist ├── define_method ___ end.tmSnippet ├── pass(__).tmSnippet ├── skip(__).tmSnippet ├── Benchmark_bmbm(__) do __ end.tmSnippet ├── inject(init) { |mem, var| .. } (inj).plist ├── File.foreach ("..") do |line| .. end (File).plist ├── flunk(..) (fl).plist ├── Marshal.dump(obj, file) (Md).plist ├── YAML.dump(.., file) (Yd-).plist ├── transaction( __ ) do __ end.tmSnippet ├── Hash.new { |hash, key| hash[key] = .. } (Has).plist ├── Insert ERb's <% __ %> or <%= __ %>.tmSnippet ├── assert_nil(..) (asn).plist ├── require "tc_.." .. (ts).plist ├── assert(..) (as).plist ├── assert_equal.tmSnippet ├── RDoc documentation block.tmSnippet ├── assert_not_nil(..) (asnn).plist ├── assert_same(..) (ass).plist ├── File_open("__") { |file| __ }.tmSnippet ├── module .. module_function .. end.plist ├── assert_not_same(..) (asns).plist ├── assert_send(..) (ass).plist ├── untitled.plist ├── assert_match(..) (asm).plist ├── assert_not_equal(..) (asne).plist ├── assert_respond_to(..) (asrt).plist ├── assert_kind_of(..) (asko).plist ├── assert_operator(..) (aso).plist ├── assert_no_match(..) (asnm).plist ├── open("path;or;url", "w") do |doc| .. end (ope).plist ├── assert_in_delta(..) (asid).plist ├── assert_instance_of(..) (asio).plist ├── task :task_name => [:dependent, :tasks] do __ end.tmSnippet ├── embed string variable.plist ├── class .. < Struct .. initialize .. end.plist ├── class .. initialize .. end.plist ├── times { |n| .. } (tim).plist ├── do |obj| .. end (doo).plist ├── lambda { |args| .. } (lam).plist ├── step(2) { |e| .. } (ste).plist ├── downto(0) { |n| .. } (dow).plist ├── fill(range) { |i| .. } (fil).plist ├── open yield block ({).plist ├── fetch(name) { |key| .. } (fet).plist ├── upto(1.0;0.0) { |n| .. } (upt).plist ├── Array.new(10) { |i| .. } (Arr).plist ├── sub(;..;) { |match| .. } (sub).plist ├── gsub(;..;) { |match| .. } (gsu).plist ├── class .. < Test;;Unit;;TestCase .. end (tc).plist ├── class .. < ParentClass .. initialize .. end.plist ├── class .. < DelegateClass .. initialize .. end (class).plist ├── module .. ClassMethods .. end.plist ├── Wrap in Begin … Rescue … End.plist ├── class .. instance_methods .. undef .. initialize .. end (class).plist └── option_parse { .. } (optp).plist ├── Proxies └── Documentation for Word : Selection.tmProxy ├── Preferences ├── ERb: Disable Indent Corrections.tmPreferences ├── Symbol List: Class.tmPreferences ├── Symbol List: No Function Call.tmPreferences ├── Symbo List: Method.plist ├── Completion: ENV[…] variables.tmPreferences ├── Completion: require strings.tmPreferences ├── Folding - ERB.tmPreferences ├── Comments.plist └── Block typing pairs.plist ├── Macros ├── Overwrite } in #{ .. }.plist └── Delete forward:backward.tmMacro ├── Commands ├── Omit from RDoc.tmCommand ├── Make Destructive Call.plist ├── Execute and Insert Results.tmCommand ├── Enclose in * (RDoc comments).tmCommand ├── Enclose in _ (RDoc comments).tmCommand ├── Enclose in + (RDoc comments).tmCommand ├── Help.tmCommand ├── word_wrap() (worw).plist ├── Run Rake Task.tmCommand ├── Convert Ruby hash to 1_9 syntax.tmCommand ├── Lookup in Documentation (Modern).tmCommand ├── Execute Line with Ruby.plist ├── Run.tmCommand ├── Show RDoc for this file.plist ├── Check Ruby Syntax.plist ├── Lookup in Documentation.plist ├── Run focused unit test.plist └── Toggle String:Symbol.tmCommand ├── README.mdown ├── DragCommands └── Require Ruby File.tmDragCommand └── Syntaxes └── Gemfile.tmLanguage /Support/test/fixtures/.tm_properties: -------------------------------------------------------------------------------- 1 | include = "{$include,.rvm}" 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/doc-input.rb: -------------------------------------------------------------------------------- 1 | [].length 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/ri-input.rb: -------------------------------------------------------------------------------- 1 | [].length 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/doc-output.rb: -------------------------------------------------------------------------------- 1 | Array#length 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/refe-input.rb: -------------------------------------------------------------------------------- 1 | [].length 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/ri_emacs-input.rb: -------------------------------------------------------------------------------- 1 | [].length 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/ri_vim-input.rb: -------------------------------------------------------------------------------- 1 | [].length 2 | -------------------------------------------------------------------------------- /Support/test/fixtures/bin/sample-executable: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # noop -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/add_markers-input.rb: -------------------------------------------------------------------------------- 1 | 1+1 2 | 2+3 3 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/ri-output.rb: -------------------------------------------------------------------------------- 1 | ri 'Array#length' 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/completion-input.rb: -------------------------------------------------------------------------------- 1 | Array.new(3).uni 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/completion-output.rb: -------------------------------------------------------------------------------- 1 | uniq 2 | uniq! 3 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/completion_in_method-output.rb: -------------------------------------------------------------------------------- 1 | length 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/doc_detect_rbtest-input.rb: -------------------------------------------------------------------------------- 1 | [].length 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/doc_rbtest-output.rb: -------------------------------------------------------------------------------- 1 | String#upcase 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/refe-output.rb: -------------------------------------------------------------------------------- 1 | refe 'Array#length' 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/completion_class_info-input.rb: -------------------------------------------------------------------------------- 1 | Array.new(3).s -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/completion_emacs-input.rb: -------------------------------------------------------------------------------- 1 | Array.new(3).uni 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/completion_emacs_icicles-input.rb: -------------------------------------------------------------------------------- 1 | 1.div 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/doc_detect_rbtest-output.rb: -------------------------------------------------------------------------------- 1 | Array#length 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/doc_detect_rbtest2-output.rb: -------------------------------------------------------------------------------- 1 | String#upcase 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/completion_class_info_no_candidates-output.rb: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/completion_rbtest-output.rb: -------------------------------------------------------------------------------- 1 | upcase 2 | upcase! 3 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/no_warnings-input.rb: -------------------------------------------------------------------------------- 1 | A = 1 2 | A = 1 3 | p (1) 4 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/completion_detect_rbtest2-input.rb: -------------------------------------------------------------------------------- 1 | Array.new(3).uni 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/completion_detect_rbtest2-output.rb: -------------------------------------------------------------------------------- 1 | uniq 2 | uniq! 3 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/completion_detect_rbtest-output.rb: -------------------------------------------------------------------------------- 1 | upcase 2 | upcase! 3 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/ri_emacs-output.rb: -------------------------------------------------------------------------------- 1 | (rct-find-tag-or-ri "Array#length") 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/ri_vim-output.rb: -------------------------------------------------------------------------------- 1 | call RCT_find_tag_or_ri("Array#length") 2 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/completion_in_method-input.rb: -------------------------------------------------------------------------------- 1 | def fooz 2 | [].lengt 3 | end 4 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/no_warnings-output.rb: -------------------------------------------------------------------------------- 1 | A = 1 2 | A = 1 3 | p (1) 4 | # >> 1 5 | -------------------------------------------------------------------------------- /Support/test/fixtures/fake_rbenv/shims/rbenv_installed_shim: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # do nothing ... 4 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/completion_class_info_no_candidates-input.rb: -------------------------------------------------------------------------------- 1 | Array.new(3).nonexisten -------------------------------------------------------------------------------- /Support/vendor/rcodetools/README.ja: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/ruby.tmbundle/HEAD/Support/vendor/rcodetools/README.ja -------------------------------------------------------------------------------- /Support/test/fixtures/sample_project_with_gemfile/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rubocop' 4 | gem 'rspec-core' 5 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/rcodetools.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/ruby.tmbundle/HEAD/Support/vendor/rcodetools/rcodetools.gif -------------------------------------------------------------------------------- /Support/vendor/rcodetools/bin/rct-fork: -------------------------------------------------------------------------------- 1 | #! /usr/local/bin/ruby18 2 | 3 | require 'rcodetools/fork' 4 | 5 | Rcodetools::Fork.start_server ARGV 6 | 7 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/bin/rct-fork-client: -------------------------------------------------------------------------------- 1 | #! /usr/local/bin/ruby18 2 | 3 | require 'rcodetools/fork' 4 | 5 | Rcodetools::Fork.start_client ARGV 6 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/unit_test_rbtest-input.rb: -------------------------------------------------------------------------------- 1 | =begin test_bar 2 | bar("bar") # => 3 | =end 4 | def bar(s) 5 | s.upcase 6 | end 7 | -------------------------------------------------------------------------------- /Support/test/fixtures/fake_rbenv/rbenv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [[ $1 == "which" ]]; then 4 | echo "rbenv: $2: command not found" 5 | exit 127 6 | fi 7 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/unit_test_detect_rbtest2-input.rb: -------------------------------------------------------------------------------- 1 | =begin test_bar 2 | bar("bar") # => 3 | =end 4 | def bar(s) 5 | s.upcase 6 | end 7 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/unit_test_rbtest-output.rb: -------------------------------------------------------------------------------- 1 | =begin test_bar 2 | assert_equal("BAR", bar("bar")) 3 | =end 4 | def bar(s) 5 | s.upcase 6 | end 7 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/rct-doc/doc.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | doc 3 | ========== 4 | rct-doc -D --line=1 5 | ========== 6 | [].length 7 | ========== 8 | Array#length 9 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/add_markers-output.rb: -------------------------------------------------------------------------------- 1 | 1+1 # => 2 | 2+3 # => 3 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/unit_test_detect_rbtest2-output.rb: -------------------------------------------------------------------------------- 1 | =begin test_bar 2 | assert_equal("BAR", bar("bar")) 3 | =end 4 | def bar(s) 5 | s.upcase 6 | end 7 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/rct-doc/ri.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | ri 3 | ========== 4 | rct-doc --ri --line=1 5 | ========== 6 | [].length 7 | ========== 8 | ri 'Array#length' 9 | -------------------------------------------------------------------------------- /Support/bin/rvm_wrapper: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" 4 | 5 | cd . # Activate rvm for the current directory 6 | "$@" -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/rct-doc/refe.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | refe 3 | ========== 4 | rct-doc --refe --line=1 5 | ========== 6 | [].length 7 | ========== 8 | refe 'Array#length' 9 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/doc_rbtest-input.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby18 2 | =begin test_bar 3 | assert_equal "BAR", bar("bar") 4 | =end 5 | def bar(s) 6 | s.upcase 7 | end 8 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/completion_rbtest-input.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby18 2 | =begin test_bar 3 | assert_equal "BAR", bar("bar") 4 | =end 5 | def bar(s) 6 | s.upca 7 | end 8 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/doc_detect_rbtest2-input.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby18 2 | =begin test_bar 3 | assert_equal "BAR", bar("bar") 4 | =end 5 | def bar(s) 6 | s.upcase 7 | end 8 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/completion_detect_rbtest-input.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby18 2 | =begin test_bar 3 | assert_equal "BAR", bar("bar") 4 | =end 5 | def bar(s) 6 | s.upca 7 | end 8 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/completion_in_method-test.rb: -------------------------------------------------------------------------------- 1 | require 'test/unit' 2 | class TestFooz < Test::Unit::TestCase 3 | def test_fooz 4 | assert_equal(0, fooz) 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/simple_annotation-input.rb: -------------------------------------------------------------------------------- 1 | 2 | a = 1 3 | 10.times do |i| 4 | i ** 2 # => 5 | a += i 6 | end 7 | A = 1 8 | A = 1 9 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/rct-doc/ri_vim.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | ri_vim 3 | ========== 4 | rct-doc --ri-vim --line=1 5 | ========== 6 | [].length 7 | ========== 8 | call RCT_find_tag_or_ri("Array#length") 9 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/rct-complete/completion.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | completion 3 | ========== 4 | rct-complete -C --line=1 5 | ========== 6 | Array.new(3).uni 7 | ========== 8 | uniq 9 | uniq! 10 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/rct-doc/doc_detect_rbtest.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | doc_detect_rbtest 3 | ========== 4 | rct-doc --detect-rbtest --line=1 5 | ========== 6 | [].length 7 | ========== 8 | Array#length 9 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/rct-doc/ri_emacs.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | ri_emacs 3 | ========== 4 | rct-doc --ri-emacs --line=1 5 | ========== 6 | [].length 7 | ========== 8 | (rct-find-tag-or-ri "Array#length") 9 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/sample_test_script.rb: -------------------------------------------------------------------------------- 1 | require 'test/unit' 2 | class TestSample < Test::Unit::TestCase 3 | def test_sample0 4 | assert(true) 5 | end 6 | 7 | def test_sample1 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /Tests/rubylexer/g.rb: -------------------------------------------------------------------------------- 1 | j=9;def i(n) [n ?"d" : "e" , n] end 2 | 3 | p(i ?") 4 | p(j ?"d" : "e") 5 | 6 | def g(x=nil) x end 7 | def gg(x=nil) g x end 8 | p(gg :x) 9 | p(g :y) 10 | g=9 11 | p(gg :z) 12 | # g :w #error 13 | 14 | 15 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_6.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | multi_line_annotation_6 3 | ========== 4 | xmpfilter 5 | ========== 6 | 7 | 1 + 2 # !> warning 8 | # => 9 | ========== 10 | 11 | 1 + 2 12 | # => 3 13 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/no_warnings.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | no_warnings 3 | ========== 4 | xmpfilter --no-warnings 5 | ========== 6 | A = 1 7 | A = 1 8 | p (1) 9 | ========== 10 | A = 1 11 | A = 1 12 | p (1) 13 | # >> 1 14 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/rct-complete/completion_detect_rbtest2.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | completion_detect_rbtest2 3 | ========== 4 | rct-complete --detect-rbtest --line=1 5 | ========== 6 | Array.new(3).uni 7 | ========== 8 | uniq 9 | uniq! 10 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/nospace.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | nospace_annotation 3 | ========== 4 | xmpfilter 5 | ========== 6 | 7 | 1 #=> 8 | 2 #=> 2 9 | 3 10 | #=> 11 | ========== 12 | 13 | 1 # => 1 14 | 2 # => 2 15 | 3 16 | # => 3 17 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/rct-complete/completion_class_info_no_candidates.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | completion_class_info_no_candidates 3 | ========== 4 | rct-complete --completion-class-info --line=1 5 | ========== 6 | Array.new(3).nonexisten 7 | ========== 8 | 9 | -------------------------------------------------------------------------------- /Support/bin/ri_lookup: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PHRASE=$1 4 | 5 | DST=$(mktemp "${TMPDIR:-/tmp}/tm_ruby_ri_XXXXXX").html 6 | "$TM_BUNDLE_SUPPORT/bin/ri_to_html" &>"$DST" "$PHRASE" 7 | echo -n "$DST" 8 | 9 | { sleep 300; rm "$DST"; rm "${DST%.html}"; } &>/dev/null & 10 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/simple_annotation-output.rb: -------------------------------------------------------------------------------- 1 | 2 | a = 1 3 | 10.times do |i| 4 | i ** 2 # => 0, 1, 4, 9, 16, 25, 36, 49, 64, 81 5 | a += i 6 | end 7 | A = 1 8 | A = 1 # !> already initialized constant A 9 | -------------------------------------------------------------------------------- /Support/vendor/README: -------------------------------------------------------------------------------- 1 | Please remember that anything in this directory has a license of its own. 2 | 3 | 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. 4 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/rct-complete/completion_class_info.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | completion_class_info 3 | ========== 4 | rct-complete --completion-class-info --line=1 5 | ========== 6 | Array.new(3).sl 7 | ========== 8 | slice Array#slice 9 | slice! Array#slice! 10 | -------------------------------------------------------------------------------- /Support/bin/snippet_paren.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby18 -wKU 2 | 3 | minimize = ENV["TM_MINIMIZE_PARENS"].to_s =~ /\byes\b/i 4 | 5 | case ARGV.shift.to_s =~ /\bend\b/i ? :end : :start 6 | when :start 7 | print(minimize ? " " : "(") 8 | when :end 9 | print ")" unless minimize 10 | end 11 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/completion_emacs-output.rb: -------------------------------------------------------------------------------- 1 | (progn 2 | (setq rct-method-completion-table '(("uniq") ("uniq!") )) 3 | (setq alist '(("uniq\t[Array#uniq]") ("uniq!\t[Array#uniq!]") )) 4 | (setq pattern "uni") 5 | (try-completion pattern rct-method-completion-table nil) 6 | ) 7 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/add_markers.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | add_markers 3 | ========== 4 | xmpfilter -m 5 | ========== 6 | 1+1 7 | 2+3 8 | ========== 9 | 1+1 # => 10 | 2+3 # => 11 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/completion_emacs_icicles-output.rb: -------------------------------------------------------------------------------- 1 | (progn 2 | (setq rct-method-completion-table '(("div\t[Fixnum#div]") ("divmod\t[Fixnum#divmod]") )) 3 | (setq alist '(("div" . "Fixnum#div")("divmod" . "Fixnum#divmod"))) 4 | (setq pattern "div") 5 | (setq klass "Fixnum") 6 | ) 7 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/rct-doc/doc_rbtest.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | doc_rbtest 3 | ========== 4 | rct-doc --rbtest --line=6 5 | ========== 6 | #!/usr/bin/env ruby 7 | =begin test_bar 8 | assert_equal "BAR", bar("bar") 9 | =end 10 | def bar(s) 11 | s.upcase 12 | end 13 | ========== 14 | String#upcase 15 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/width.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | width 3 | ========== 4 | xmpfilter -w 15 5 | ========== 6 | 7 | a = ["abcdefg", 12345, Object] 8 | a 9 | # => 10 | ========== 11 | 12 | a = ["abcdefg", 12345, Object] 13 | a 14 | # => ["abcdefg", 15 | # 12345, 16 | # Object] 17 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/lib/rcodetools/compat.rb: -------------------------------------------------------------------------------- 1 | if RUBY_VERSION >= "1.9" 2 | class String 3 | alias :each :each_line 4 | include Enumerable 5 | end 6 | 7 | module Enumerable 8 | alias :enum_with_index :each_with_index 9 | end 10 | 11 | class Array 12 | alias :to_s :join 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/completion_class_info-output.rb: -------------------------------------------------------------------------------- 1 | select Array#select 2 | send Object#send 3 | shift Array#shift 4 | singleton_methods Object#singleton_methods 5 | size Array#size 6 | slice Array#slice 7 | slice! Array#slice! 8 | sort Array#sort 9 | sort! Array#sort! 10 | sort_by Enumerable#sort_by 11 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/exception.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | exception 3 | ========== 4 | xmpfilter 5 | ========== 6 | def foo 7 | raise NameError, "ERR!!" rescue $@ # => 8 | end 9 | foo 10 | ========== 11 | def foo 12 | raise NameError, "ERR!!" rescue $@ # => ["-:2:in `foo'", "-:4"] 13 | end 14 | foo 15 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/rct-doc/doc_detect_rbtest2.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | doc_detect_rbtest2 3 | ========== 4 | rct-doc --detect-rbtest --line=6 5 | ========== 6 | #!/usr/bin/env ruby 7 | =begin test_bar 8 | assert_equal "BAR", bar("bar") 9 | =end 10 | def bar(s) 11 | s.upcase 12 | end 13 | ========== 14 | String#upcase 15 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/rct-complete/completion_rbtest.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | completion_rbtest 3 | ========== 4 | rct-complete --rbtest --line=6 5 | ========== 6 | #!/usr/bin/env ruby 7 | =begin test_bar 8 | assert_equal "BAR", bar("bar") 9 | =end 10 | def bar(s) 11 | s.upca 12 | end 13 | ========== 14 | upcase 15 | upcase! 16 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/comment_out.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | comment_out 3 | ========== 4 | xmpfilter 5 | ========== 6 | 7 | # 1 # => 8 | # 1 # => 2 9 | 1 # => 12 10 | 1 11 | # # => 12 | # 1 13 | # # => 14 | ========== 15 | 16 | # 1 # => 17 | # 1 # => 2 18 | 1 # => 1 19 | 1 20 | # # => 21 | # 1 22 | # # => 23 | -------------------------------------------------------------------------------- /Tests/rubylexer/newsyntax.rb: -------------------------------------------------------------------------------- 1 | 2 | x, (*), z = [:x, :y, :z] 3 | p x 4 | p z 5 | 6 | x, (*y), z = [:x, :y, :z] 7 | p x 8 | p y 9 | p z 10 | 11 | p($/ = ' '; Array( "i'm in your house" )) 12 | 13 | class Foou 14 | public 15 | def [] x=-100,&y=nil; p x; 100 end 16 | end 17 | p Foou.new.[]?9 #value 18 | p Foou.new.[] ?9 #value 19 | -------------------------------------------------------------------------------- /Tests/rubylexer/w.rb: -------------------------------------------------------------------------------- 1 | p %r{\/$} 2 | p %r~~m 3 | 4 | p [].push *[1,2,3] 5 | p /\n/ 6 | 7 | $a=1 8 | @b=2 9 | @@c=3 10 | p(/\#$a \#@b \#@@c \#{$a+@b+@@c}/) 11 | 12 | 13 | class Foo 14 | attr :foo,true 15 | end 16 | f=Foo.new 17 | p f.foo 18 | p f.foo=9 19 | p f.foo =19 20 | p f.foo= 29 21 | p f.foo = 39 22 | p f.foo 23 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/mult.rb: -------------------------------------------------------------------------------- 1 | a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342, 2 | 1332333333,6,8 ] 3 | 1 # => 1 4 | a 5 | # => ["1111111111111111111111111111111111111111111111111111", 6 | # 123334324234242342, 7 | # 1332333333, 8 | # 6, 9 | # 8] 10 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/rct-complete/completion_detect_rbtest.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | completion_detect_rbtest 3 | ========== 4 | rct-complete --detect-rbtest --line=6 5 | ========== 6 | #!/usr/bin/env ruby 7 | =begin test_bar 8 | assert_equal "BAR", bar("bar") 9 | =end 10 | def bar(s) 11 | s.upca 12 | end 13 | ========== 14 | upcase 15 | upcase! 16 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_7.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | multi_line_annotation_7 3 | ========== 4 | xmpfilter 5 | ========== 6 | 7 | [1,2] 8 | # => 9 | raise 10 | [3,4] 11 | # => 12 | [5,6] 13 | # => 14 | ========== 15 | 16 | [1,2] 17 | # => [1, 2] 18 | raise 19 | [3,4] 20 | # => 21 | [5,6] 22 | # => 23 | # ~> -:2: unhandled exception 24 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/unit_test_rbtest.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | unit_test_rbtest 3 | ========== 4 | xmpfilter -u --rbtest 5 | ========== 6 | =begin test_bar 7 | bar("bar") # => 8 | =end 9 | def bar(s) 10 | s.upcase 11 | end 12 | ========== 13 | =begin test_bar 14 | assert_equal("BAR", bar("bar")) 15 | =end 16 | def bar(s) 17 | s.upcase 18 | end 19 | -------------------------------------------------------------------------------- /Support/RubyMate/test.rb: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | 3 | # p __FILE__, $PROGRAM_NAME 4 | 5 | at_exit { puts "I am the exit!" } 6 | puts "that’s nice" 7 | STDERR.write "this is my important stuff\n" 8 | 9 | system("echo 'bad!' 1>&2") 10 | 11 | require "erb" 12 | foo = "bar" 13 | p ERB.new("<%= foo %>").result 14 | 15 | def charlie 16 | sheen 17 | end 18 | 19 | charlie 20 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/unit_test_detect_rbtest2.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | unit_test_detect_rbtest2 3 | ========== 4 | xmpfilter --detect-rbtest 5 | ========== 6 | =begin test_bar 7 | bar("bar") # => 8 | =end 9 | def bar(s) 10 | s.upcase 11 | end 12 | ========== 13 | =begin test_bar 14 | assert_equal("BAR", bar("bar")) 15 | =end 16 | def bar(s) 17 | s.upcase 18 | end 19 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/license.txt: -------------------------------------------------------------------------------- 1 | 2 | rcodetools http://eigenclass.org/hiki.rb?rcodetools 3 | Copyright (c) 2005-2007 Mauricio Fernandez http://eigenclass.org 4 | Copyright (c) 2006-2008 rubikitch http://www.rubyist.net/~rubikitch/ 5 | Use and distribution subject to the terms of the Ruby license. 6 | 7 | = License 8 | rcodetools is licensed under the same terms as Ruby. 9 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/rct-complete-TDC/completion_in_method__testscript.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | completion_in_method__testscript 3 | ========== 4 | rct-complete --filename %s --line 2 -t %s 5 | ========== 6 | def fooz 7 | [].lengt 8 | end 9 | ========== 10 | length 11 | ========== 12 | require 'test/unit' 13 | class TestFooz < Test::Unit::TestCase 14 | def test_fooz 15 | assert_equal(0, fooz) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/rct-complete-TDC/completion_in_method__testmethod.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | completion_in_method__testmethod 3 | ========== 4 | rct-complete --filename %s --line 2 -t %s@test_fooz 5 | ========== 6 | def fooz 7 | [].lengt 8 | end 9 | ========== 10 | length 11 | ========== 12 | require 'test/unit' 13 | class TestFooz < Test::Unit::TestCase 14 | def test_fooz 15 | assert_equal(0, fooz) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/last_match.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | last_match 3 | ========== 4 | xmpfilter 5 | ========== 6 | 7 | md = "abc".match(/(.)(.)./) 8 | 1 9 | # => 10 | [$1, $2] # => 11 | $1 # => 12 | ========== 13 | 14 | md = "abc".match(/(.)(.)./) 15 | 1 16 | # => 1 17 | [$1, $2] # => ["a", "b"] 18 | $1 # => "a" 19 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/rct-complete-TDC/completion_in_method__wrong_testmethod.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | completion_in_method__wrong_testmethod 3 | ========== 4 | rct-complete --filename %s --line 2 -t %s@test_NOT_FOUND 5 | ========== 6 | def fooz 7 | [].lengt 8 | end 9 | ========== 10 | 11 | ========== 12 | require 'test/unit' 13 | class TestFooz < Test::Unit::TestCase 14 | def test_fooz 15 | assert_equal(0, fooz) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/rct-complete/completion_emacs.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | completion_emacs 3 | ========== 4 | rct-complete --completion-emacs --line=1 5 | ========== 6 | Array.new(3).uni 7 | ========== 8 | (progn 9 | (setq rct-method-completion-table '(("uniq") ("uniq!") )) 10 | (setq alist '(("uniq\t[Array#uniq]") ("uniq!\t[Array#uniq!]") )) 11 | (setq pattern "uni") 12 | (try-completion pattern rct-method-completion-table nil) 13 | ) 14 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/rct-complete/completion_emacs_icicles.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | completion_emacs_icicles 3 | ========== 4 | rct-complete --completion-emacs-icicles --line=1 5 | ========== 6 | 1.div 7 | ========== 8 | (progn 9 | (setq rct-method-completion-table '(("div\t[Fixnum#div]") ("divmod\t[Fixnum#divmod]") )) 10 | (setq alist '(("div" . "Fixnum#div")("divmod" . "Fixnum#divmod"))) 11 | (setq pattern "div") 12 | (setq klass "Fixnum") 13 | ) 14 | -------------------------------------------------------------------------------- /Support/RubyMate/todo.txt: -------------------------------------------------------------------------------- 1 | Syntax Errors 2 | ============= 3 | Syntax errors will be written to stderr. We should catch these and turn them into clickable links. 4 | 5 | 6 | Exit Status 7 | =========== 8 | 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. 9 | 10 | 11 | Errors From Included Files 12 | ========================== 13 | These could be shown differently to make them distinguishable. 14 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/method_analyzer-data.rb: -------------------------------------------------------------------------------- 1 | 2 | class A 3 | def A.foo 4 | 1 5 | end 6 | 7 | def a 8 | 1+1 9 | end 10 | end 11 | class B < A 12 | def initialize 13 | end 14 | attr_accessor :bb 15 | 16 | def b 17 | "a".length 18 | end 19 | end 20 | tm = Time.now 21 | [tm.year, tm.month, tm.day] << 0 22 | a = A.new 23 | a.a 24 | b = B.new 25 | b.a 26 | b.b 27 | [b.a,b.b] 28 | z = b.a + b.b 29 | A.foo 30 | B.foo 31 | b.bb=1 32 | b.bb 33 | 34 | -------------------------------------------------------------------------------- /Support/test/fixtures/bin/rspec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'rspec' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("rspec-core", "rspec") 18 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/simple_annotation.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | simple_annotation 3 | ========== 4 | xmpfilter 5 | ========== 6 | 7 | a = 1 8 | 10.times do |i| 9 | i ** 2 # => 10 | a += i 11 | end 12 | A = 1 13 | A = 1 14 | ========== 15 | 16 | a = 1 17 | 10.times do |i| 18 | i ** 2 # => 0, 1, 4, 9, 16, 25, 36, 49, 64, 81 19 | a += i 20 | end 21 | A = 1 22 | A = 1 # !> already initialized constant A 23 | -------------------------------------------------------------------------------- /Support/test/fixtures/sample_project/bin/rspec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'rspec' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("rspec-core", "rspec") 18 | -------------------------------------------------------------------------------- /Support/test/fixtures/sample_project/other/rspec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'rspec' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("rspec-core", "rspec") 18 | -------------------------------------------------------------------------------- /Support/bin/make_destructive.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby18 2 | 3 | require "escape" 4 | 5 | CURSOR = [0xFFFC].pack("U").freeze 6 | line = STDIN.read 7 | begin 8 | line[ENV["TM_LINE_INDEX"].to_i, 0] = CURSOR 9 | rescue 10 | exit 11 | end 12 | 13 | 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!") 14 | 15 | line = e_sn(line) 16 | line.sub!(CURSOR, "$0") 17 | 18 | print line 19 | -------------------------------------------------------------------------------- /Support/test/fixtures/sample_project_with_gemfile/bin/rspec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'rspec' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("rspec-core", "rspec") 18 | -------------------------------------------------------------------------------- /Snippets/#inspect.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | inspect 7 | name 8 | #inspect 9 | scope 10 | source.ruby 11 | tabTrigger 12 | i 13 | uuid 14 | 2BB6D28F-914E-4132-BC53-E43CF5060BFA 15 | 16 | 17 | -------------------------------------------------------------------------------- /Support/test/fixtures/sample_project_with_gemfile/other/rspec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'rspec' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("rspec-core", "rspec") 18 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/THANKS: -------------------------------------------------------------------------------- 1 | Some names forgotten, tell me if you care :) -- mfp 2 | 3 | rubikitch 4 | * expanded xmp3.rb (a previous version of xmpfilter.rb) to support RSpec expectations 5 | * wrote the elisp magic to use xmpfilter.rb with emacs 6 | * made the 100% accurate, editor-independent completion system 7 | [rubikitch took xmpfilter and turned it into the much more powerful 8 | rcodetools, so there are way too many things to list them here :)] 9 | 10 | Adagios 11 | * found & fixed problem with rcodetools.vim plugin on win32 12 | -------------------------------------------------------------------------------- /Snippets/__END__.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | __END__ 7 | 8 | name 9 | __END__ 10 | scope 11 | source.ruby 12 | tabTrigger 13 | end 14 | uuid 15 | 451A0596-1F72-4AFB-AF2F-45900FABB0F7 16 | 17 | 18 | -------------------------------------------------------------------------------- /Snippets/hash pointer.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | => 7 | keyEquivalent 8 | ^. 9 | name 10 | Hash Pointer — => 11 | scope 12 | source.ruby 13 | uuid 14 | B9E3A6DF-875D-11D9-897C-000393CBCE2E 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/directory().tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | File.dirname(__FILE__) 7 | name 8 | directory() 9 | scope 10 | source.ruby 11 | tabTrigger 12 | dir 13 | uuid 14 | 678BDB83-FBBD-4E8E-BE0B-E1A98AECB247 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/loop { __ }.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | loop { $0 } 7 | name 8 | loop { .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | loo 13 | uuid 14 | 567E3D18-BF2B-4379-8927-2777EC9F495E 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/when.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | when ${1:condition} 7 | $0 8 | name 9 | when … 10 | scope 11 | source.ruby 12 | tabTrigger 13 | when 14 | uuid 15 | 48D8E498-C9A5-4B1B-9A18-71A5860276FB 16 | 17 | 18 | -------------------------------------------------------------------------------- /Snippets/Dir["__"].tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | Dir[${1:"${2:glob/**/*.rb}"}] 7 | name 8 | Dir[".."] 9 | scope 10 | source.ruby 11 | tabTrigger 12 | Dir 13 | uuid 14 | 8EBBB26F-980E-404E-8366-74E5772298F6 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/randomize (ran).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | sort_by { rand } 7 | name 8 | randomize() 9 | scope 10 | source.ruby 11 | tabTrigger 12 | ran 13 | uuid 14 | B0CE57EC-FB2E-4482-8CCE-448DC2588715 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/require '..' (req).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | require '$0' 7 | name 8 | require '..' 9 | scope 10 | source.ruby 11 | tabTrigger 12 | req 13 | uuid 14 | 97DE939B-D243-4D5C-B953-1C9090912E7C 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/require_gem "__".tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | require "$0" 7 | name 8 | require_gem ".." 9 | scope 10 | source.ruby 11 | tabTrigger 12 | reqg- 13 | uuid 14 | 34FEBB9F-73CD-4DD4-A0A3-1CF2A5E3DE78 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/Add '# =>' Marker.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | # => 7 | name 8 | Add ‘# =>’ Marker 9 | scope 10 | source.ruby 11 | tabTrigger 12 | # 13 | uuid 14 | 88BC3896-DC39-4307-A271-21D33340F15A 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/070 ruby if.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | if ${1:condition} 7 | $0 8 | end 9 | name 10 | if … end 11 | scope 12 | source.ruby 13 | tabTrigger 14 | if 15 | uuid 16 | 6670835F-62C3-11D9-B8CF-000D93589AF6 17 | 18 | 19 | -------------------------------------------------------------------------------- /Snippets/def end.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | def ${1:method_name} 7 | $0 8 | end 9 | name 10 | def … end 11 | scope 12 | source.ruby 13 | tabTrigger 14 | def 15 | uuid 16 | 4E9A7A73-875C-11D9-897C-000393CBCE2E 17 | 18 | 19 | -------------------------------------------------------------------------------- /Snippets/each { |e| .. } (ea).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | each { |${1:e}| $0 } 7 | name 8 | each { |e| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | ea 13 | uuid 14 | ECBA4CA0-275F-460E-85BE-E82FEA2E2B26 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/elsif ___.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | elsif ${1:condition} 7 | $0 8 | name 9 | elsif ... 10 | scope 11 | source.ruby 12 | tabTrigger 13 | elsif 14 | uuid 15 | CD1609FA-47DA-4EE4-9C5B-5C56D953F5B1 16 | 17 | 18 | -------------------------------------------------------------------------------- /Snippets/map { |e| .. } (map).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | map { |${1:e}| $0 } 7 | name 8 | map { |e| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | map 13 | uuid 14 | 5A3754FC-43A3-462B-AB42-E3E951872E6F 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/# encoding: UTF-8.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | # encoding: ${1:UTF-8} 7 | 8 | name 9 | # encoding: UTF-8 10 | scope 11 | source.ruby 12 | tabTrigger 13 | utf8 14 | uuid 15 | B2C3ADE8-E19E-4B87-9C6C-593D490114C7 16 | 17 | 18 | -------------------------------------------------------------------------------- /Snippets/all? { |e| .. } (all).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | all? { |${1:e}| $0 } 7 | name 8 | all? { |e| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | all 13 | uuid 14 | 07D1F987-7CDB-4EAD-B64A-27A93051700E 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/any? { |e| .. } (any).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | any? { |${1:e}| $0 } 7 | name 8 | any? { |e| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | any 13 | uuid 14 | A3B9B76B-2BC5-425C-AB24-9FAAFC375798 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/attr_reader .. (r).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | attr_reader :${0:attr_names} 7 | name 8 | attr_reader .. 9 | scope 10 | source.ruby 11 | tabTrigger 12 | r 13 | uuid 14 | A150C2D8-25B3-4339-BC92-8A0160A70486 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/attr_writer .. (w).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | attr_writer :${0:attr_names} 7 | name 8 | attr_writer .. 9 | scope 10 | source.ruby 11 | tabTrigger 12 | w 13 | uuid 14 | 3D383096-A03F-4EF8-9060-3C727045AB34 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/find { |e| .. } (fin).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | find { |${1:e}| $0 } 7 | name 8 | find { |e| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | fin 13 | uuid 14 | E23FE534-8061-4828-98A5-46270B6910B0 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/max { |a, b| .. } (max).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | max { |a, b| $0 } 7 | name 8 | max { |a, b| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | max 13 | uuid 14 | 98182B9E-7C61-4824-BE4C-9CD69C816037 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/min { |a, b| .. } (min).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | min { |a, b| $0 } 7 | name 8 | min { |a, b| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | min 13 | uuid 14 | CB03D11A-7204-48D0-92C1-E109034403E7 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/refine.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | refine ${1:ClassName} do 7 | $2 8 | end 9 | name 10 | refine … end 11 | scope 12 | source.ruby 13 | tabTrigger 14 | refine 15 | uuid 16 | 5CB8BCD2-20A5-45E5-A40B-7708C7B8763A 17 | 18 | 19 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/bindings-input.rb: -------------------------------------------------------------------------------- 1 | 2 | require 'test/unit' 3 | 4 | class TestFoo < Test::Unit::TestCase 5 | def setup 6 | @o = [] 7 | end 8 | 9 | def test_foo 10 | a = 1 11 | b = a 12 | b # => 13 | end 14 | 15 | def test_arr 16 | last = 1 17 | @o << last 18 | @o.last # => 19 | end 20 | 21 | def test_bar 22 | a = b = c = 1 23 | d = a 24 | d # => 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /Snippets/:yields: RDoc comment.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | :yields: ${0:arguments} 7 | name 8 | :yields: 9 | scope 10 | source.ruby comment 11 | tabTrigger 12 | y 13 | uuid 14 | ED6368FB-A11D-4622-9F42-7879481094F1 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/File_read("__").tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | File.read(${1:"${2:path/to/file}"}) 7 | name 8 | File.read("..") 9 | scope 10 | source.ruby 11 | tabTrigger 12 | File 13 | uuid 14 | 50C56AC8-48F3-42A0-AF10-8164464AFAEF 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/detect { |e| .. } (det).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | detect { |${1:e}| $0 } 7 | name 8 | detect { |e| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | det 13 | uuid 14 | 6C6B9849-9631-49FF-A9F9-F0E94A1512C5 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/extend Forwardable (Forw).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | extend Forwardable 7 | name 8 | extend Forwardable 9 | scope 10 | source.ruby 11 | tabTrigger 12 | Forw- 13 | uuid 14 | 7F46C90A-595B-4B83-A4F7-058F63CE4218 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/reject { |e| .. } (rej).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | reject { |${1:e}| $0 } 7 | name 8 | reject { |e| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | rej 13 | uuid 14 | B79B9DAB-ABEF-44F6-BF7E-635E7BA11DFD 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/select { |e| .. } (sel).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | select { |${1:e}| $0 } 7 | name 8 | select { |e| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | sel 13 | uuid 14 | 4E409AA4-E7D4-46B7-A4E9-E32F992B33E9 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/sort { |a, b| .. } (sor).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | sort { |a, b| $0 } 7 | name 8 | sort { |a, b| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | sor 13 | uuid 14 | 9E0B4D4B-2956-4B3A-800A-3D8CE54E66BF 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/attr_accessor .. (rw).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | attr_accessor :${0:attr_names} 7 | name 8 | attr_accessor .. 9 | scope 10 | source.ruby 11 | tabTrigger 12 | rw 13 | uuid 14 | D7A7D3C9-1714-4C50-8CC0-D83A03883E8F 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/classify { |e| .. } (clas).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | classify { |${1:e}| $0 } 7 | name 8 | classify { |e| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | cl 13 | uuid 14 | 5DA9E1E8-2C54-420A-9B84-B040A1AF2B9E 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/collect { |e| .. } (col).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | collect { |${1:e}| $0 } 7 | name 8 | collect { |e| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | col 13 | uuid 14 | 669A86AD-936F-4EDA-8E4E-6863804072DA 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/singleton_class().tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | class << self; self end 7 | name 8 | singleton_class() 9 | scope 10 | source.ruby 11 | tabTrigger 12 | sinc 13 | uuid 14 | B46D35B8-5DEB-4C10-A110-BA1965A2EB9C 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/sort_by { |e| .. } (sorb).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | sort_by { |${1:e}| $0 } 7 | name 8 | sort_by { |e| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | sorb 13 | uuid 14 | BA9440C9-36C3-4031-BB61-67B581D5B179 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/unless (unless).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | unless ${1:condition} 7 | $0 8 | end 9 | name 10 | unless … end 11 | scope 12 | source.ruby 13 | tabTrigger 14 | unless 15 | uuid 16 | F53E098D-D08E-4CE2-990A-B0BD70E60614 17 | 18 | 19 | -------------------------------------------------------------------------------- /Snippets/until ___ end.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | until ${1:condition} 7 | $0 8 | end 9 | name 10 | until ... end 11 | scope 12 | source.ruby 13 | tabTrigger 14 | until 15 | uuid 16 | 488B387C-50C0-4B2D-9260-5A7E7EAF9B42 17 | 18 | 19 | -------------------------------------------------------------------------------- /Snippets/while ___ end.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | while ${1:condition} 7 | $0 8 | end 9 | name 10 | while ... end 11 | scope 12 | source.ruby 13 | tabTrigger 14 | while 15 | uuid 16 | D121FC61-96A4-4B8F-8709-280EDA876FF3 17 | 18 | 19 | -------------------------------------------------------------------------------- /Snippets/delete_if { |e| .. } (deli).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | delete_if { |${1:e}| $0 } 7 | name 8 | delete_if { |e| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | deli 13 | uuid 14 | 263C94DC-63CF-4BA3-9692-C5582CA8F1AB 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/each_index { |i| .. } (eai).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | each_index { |${1:i}| $0 } 7 | name 8 | each_index { |i| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | eai 13 | uuid 14 | 689120C9-AB40-4081-8268-9362E00FA4A0 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/each_key { |key| .. } (eak).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | each_key { |${1:key}| $0 } 7 | name 8 | each_key { |key| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | eak 13 | uuid 14 | E54F7077-3C33-4B53-A4F7-21E16132D3AD 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/find_all { |e| .. } (fina).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | find_all { |${1:e}| $0 } 7 | name 8 | find_all { |e| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | fina 13 | uuid 14 | 197709C5-8382-4A59-B6D7-31A0CC0F23B7 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/partition { |e| .. } (par).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | partition { |${1:e}| $0 } 7 | name 8 | partition { |e| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | par 13 | uuid 14 | 52B8BF63-F09E-4789-8407-06168A8AE666 15 | 16 | 17 | -------------------------------------------------------------------------------- /Proxies/Documentation for Word : Selection.tmProxy: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | lookup.define.ruby 7 | keyEquivalent 8 | ^h 9 | name 10 | Documentation for Word / Selection 11 | scope 12 | source.ruby 13 | uuid 14 | D5660BB2-C554-4694-9E0F-F20CDB6B9EA0 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/PStore_new( __ ).tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | PStore.new(${1:"${2:file_name.pstore}"}) 7 | name 8 | PStore.new( .. ) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | Pn- 13 | uuid 14 | 5B46ECFD-23A4-4F0C-9951-F64C19C72C2B 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/alias_method .. (am).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | alias_method :${1:new_name}, :${0:old_name} 7 | name 8 | alias_method .. 9 | scope 10 | source.ruby 11 | tabTrigger 12 | am 13 | uuid 14 | 988C8AEF-FC71-4455-9C4F-9338C05685A4 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/deep_copy(..) (dee).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | Marshal.load(Marshal.dump(${0:obj_to_copy})) 7 | name 8 | deep_copy(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | deec 13 | uuid 14 | 0BA2B2F1-E767-4A03-9791-0AC0183251F1 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/def test_ .. end (t).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | def test_${1:case_name} 7 | $0 8 | end 9 | name 10 | def test_ .. end 11 | scope 12 | source.ruby 13 | tabTrigger 14 | deft 15 | uuid 16 | 00F66D41-25AF-4597-B67D-E540965A5222 17 | 18 | 19 | -------------------------------------------------------------------------------- /Snippets/each_char { |chr| .. } (eac-).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | each_char { |${1:chr}| $0 } 7 | name 8 | each_char { |chr| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | eac- 13 | uuid 14 | FDD73070-6D32-4301-A86A-C55B77C3D8ED 15 | 16 | 17 | -------------------------------------------------------------------------------- /Preferences/ERb: Disable Indent Corrections.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | ERb: Disable Indent Corrections 7 | scope 8 | meta.embedded.line.erb 9 | settings 10 | 11 | disableIndentCorrections 12 | 13 | 14 | uuid 15 | DF7E649B-5464-424C-A480-F7A130E0E075 16 | 17 | 18 | -------------------------------------------------------------------------------- /Snippets/060 ruby if else.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | if ${1:condition} 7 | $2 8 | else 9 | $3 10 | end 11 | name 12 | if … else … end 13 | scope 14 | source.ruby 15 | tabTrigger 16 | ife 17 | uuid 18 | 667082E6-62C3-11D9-B8CF-000D93589AF6 19 | 20 | 21 | -------------------------------------------------------------------------------- /Snippets/080 ruby case.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | case ${1:object} 7 | when ${2:condition} 8 | $0 9 | end 10 | name 11 | case … end 12 | scope 13 | source.ruby 14 | tabTrigger 15 | case 16 | uuid 17 | 667083EE-62C3-11D9-B8CF-000D93589AF6 18 | 19 | 20 | -------------------------------------------------------------------------------- /Snippets/each_byte { |byte| .. } (eab).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | each_byte { |${1:byte}| $0 } 7 | name 8 | each_byte { |byte| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | eab 13 | uuid 14 | 338EC03D-3FF4-4435-94E8-1CEF20CEC75D 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/each_line { |line| .. } (eal).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | each_line$1 { |${2:line}| $0 } 7 | name 8 | each_line { |line| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | eal 13 | uuid 14 | 02913388-EE8E-4C55-AC94-94F3D751F47E 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/each_value { |val| .. } (eav).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | each_value { |${1:val}| $0 } 7 | name 8 | each_value { |val| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | eav 13 | uuid 14 | 844DBD70-BC23-4FBF-9C18-F4A610239DF2 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/hash pair (:).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | :${1:key} => ${2:"${3:value}"}${4:, } 7 | name 8 | Hash Pair — :key => "value" 9 | scope 10 | source.ruby 11 | tabTrigger 12 | : 13 | uuid 14 | 840B9C4C-7037-4C3B-9028-EB9DC75EDB3E 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/reverse_each { |e| .. } (rea).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | reverse_each { |${1:e}| $0 } 7 | name 8 | reverse_each { |e| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | reve 13 | uuid 14 | F3C5F719-EF03-4FF7-A777-4A8402FE3B6B 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/xmlread(__).tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | REXML::Document.new(File.read(${1:"${2:path/to/file}"})) 7 | name 8 | xmlread(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | xml- 13 | uuid 14 | B904D4AA-D15D-48A4-8EB2-563BAF489332 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/def self .. end (defs).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | def self.${1:class_method_name} 7 | $0 8 | end 9 | name 10 | def self .. end 11 | scope 12 | source.ruby 13 | tabTrigger 14 | defs 15 | uuid 16 | 7C6E88FA-CA0E-4110-8C75-A94E54286A75 17 | 18 | 19 | -------------------------------------------------------------------------------- /Snippets/unix_filter .. (uni).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | ARGF.each_line$1 do |${2:line}| 7 | $0 8 | end 9 | name 10 | unix_filter { .. } 11 | scope 12 | source.ruby 13 | tabTrigger 14 | unif 15 | uuid 16 | 8CEF9711-88D5-4202-AFB9-29EF4EFD25C1 17 | 18 | 19 | -------------------------------------------------------------------------------- /Snippets/zip(enums) { |row| .. } (zip).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | zip(${1:enums}) { |${2:row}| $0 } 7 | name 8 | zip(enums) { |row| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | zip 13 | uuid 14 | FD010022-E0E7-44DB-827F-33F7D9310DA2 15 | 16 | 17 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/lib/rcodetools/fork_config.rb: -------------------------------------------------------------------------------- 1 | 2 | module Rcodetools 3 | 4 | module Fork 5 | PORT = 9085 6 | # Contains $PWD of rct-fork server. Exists only while running. 7 | PWD_FILE = File.expand_path "~/.rct-fork.pwd" 8 | 9 | def self.chdir_fork_directory 10 | if run? 11 | Dir.chdir File.read(PWD_FILE) 12 | else 13 | raise "rct-fork is not running." 14 | end 15 | end 16 | 17 | def self.write_pwd 18 | open(PWD_FILE, "w"){|f| f.print Dir.pwd } 19 | end 20 | 21 | def self.run? 22 | File.file? PWD_FILE 23 | end 24 | end 25 | 26 | end 27 | -------------------------------------------------------------------------------- /Snippets/application_code .. (app).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | if __FILE__ == \$PROGRAM_NAME 7 | $0 8 | end 9 | name 10 | application { .. } 11 | scope 12 | source.ruby 13 | tabTrigger 14 | app 15 | uuid 16 | E16D24D2-CC7E-4786-BE0B-1725FC865D78 17 | 18 | 19 | -------------------------------------------------------------------------------- /Snippets/assert_nothing_thrown { .. } (asnt).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | assert_nothing_thrown { $0 } 7 | name 8 | assert_nothing_thrown { .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | asnt 13 | uuid 14 | 33639D7A-BD8C-4396-9C44-307B8AC87C9E 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/assert_raises(..) { .. } (asr).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | assert_raises(${1:Exception}) { $0 } 7 | name 8 | assert_raises(..) { .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | asr 13 | uuid 14 | 68B21F6F-5D89-41FA-A19C-F29C2F912B4E 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/assert_throws(..) { .. } (ast).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | assert_throws(:${1:expected}) { $0 } 7 | name 8 | assert_throws(..) { .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | ast 13 | uuid 14 | 05655BD8-23C6-445F-BFD1-420BF25C3030 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/class << self __ end.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | class << ${1:self} 7 | $0 8 | end 9 | name 10 | class << self .. end 11 | scope 12 | source.ruby 13 | tabTrigger 14 | cla 15 | uuid 16 | C7AAAE45-487A-4B61-8962-D47675AAC05F 17 | 18 | 19 | -------------------------------------------------------------------------------- /Snippets/def_delegators .. (defds).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | def_delegators :${1:@del_obj}, :${0:del_methods} 7 | name 8 | def_delegators .. 9 | scope 10 | source.ruby 11 | tabTrigger 12 | defds 13 | uuid 14 | 4A6EFD6B-88E2-4822-AD48-03460EDBC796 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/# frozen_string_literal: true.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | # frozen_string_literal: ${1:true} 7 | 8 | name 9 | # frozen_string_literal: true 10 | scope 11 | source.ruby 12 | tabTrigger 13 | frozen 14 | uuid 15 | F8D36847-D339-4563-AB28-E22C71B9CBF7 16 | 17 | 18 | -------------------------------------------------------------------------------- /Snippets/def initialize __ end.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | def initialize${1/.+/(/}${1:args}${1/.+/)/} 7 | $0 8 | end 9 | name 10 | def initialize .. end 11 | scope 12 | source.ruby 13 | tabTrigger 14 | defi 15 | uuid 16 | 4E9D15B5-65D6-4A9A-9DEC-DE041D68C06F 17 | 18 | 19 | -------------------------------------------------------------------------------- /Snippets/def_delegator .. (defd).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | def_delegator :${1:@del_obj}, :${2:del_meth}, :${3:new_name} 7 | name 8 | def_delegator .. 9 | scope 10 | source.ruby 11 | tabTrigger 12 | defd 13 | uuid 14 | C44ED391-614F-4BA2-BB0F-87668EEA9954 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/each_slice { |group| .. } (eas).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | each_slice(${1:2}) { |${2:group}| $0 } 7 | name 8 | each_slice(..) { |group| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | eas- 13 | uuid 14 | CD748479-D2A4-4AB5-95BD-4C89512BA210 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/flatten_once (fla).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | inject(Array.new) { |${1:arr}, ${2:a}| ${1:arr}.push(*${2:a}) } 7 | name 8 | flatten_once() 9 | scope 10 | source.ruby 11 | tabTrigger 12 | flao 13 | uuid 14 | 3DDB99C4-486D-4C11-A217-5680FDD8EC19 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/namespace :__ do __ end.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | namespace :${1:${TM_FILENAME/\.\w+//}} do 7 | $0 8 | end 9 | name 10 | namespace :.. do .. end 11 | scope 12 | source.ruby 13 | tabTrigger 14 | nam 15 | uuid 16 | 05EE1046-5ED7-48F5-8693-1F066163B2F4 17 | 18 | 19 | -------------------------------------------------------------------------------- /Snippets/scan(;..;) { |match| .. } (sca).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | scan(/${1:pattern}/) { |${2:match}| $0 } 7 | name 8 | scan(/../) { |match| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | sca 13 | uuid 14 | 66802933-B49F-479B-9DF9-1D898FF1FA90 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/#!;usr;local;bin;ruby -w.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | #!/usr/bin/env ruby${TM_RUBY_SWITCHES} 7 | 8 | name 9 | #!/usr/bin/env ruby 10 | scope 11 | source.ruby, L:dyn.caret.begin.document 12 | tabTrigger 13 | rb 14 | uuid 15 | A05CBDD6-845D-45EB-94FB-F8787F5456BE 16 | 17 | 18 | -------------------------------------------------------------------------------- /Snippets/each_cons(..) { |group| .. } (eac-).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | each_cons(${1:2}) { |${2:group}| $0 } 7 | name 8 | each_cons(..) { |group| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | eac- 13 | uuid 14 | 3C04589C-5127-478E-97B3-CA7DD2EA7ECD 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/each_pair { |name, val| .. } (eap).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | each_pair { |${1:name}, ${2:val}| $0 } 7 | name 8 | each_pair { |name, val| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | eap 13 | uuid 14 | 7A3CECED-452B-438E-A5C6-95B6BDC43243 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/path_from_here( __ ).tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | File.join(File.dirname(__FILE__), *%w[${1:rel path here}]) 7 | name 8 | path_from_here( .. ) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | patfh 13 | uuid 14 | A4E89D97-D5ED-48BB-B5FF-1BFB79211FCD 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/results_report(__) { __ }.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | results.report("${1:name}:") { TESTS.times { $0 } } 7 | name 8 | results.report(..) { .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | rep 13 | uuid 14 | 1C60D589-DD46-4109-90CA-6B34AEA2F298 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/xpath(__) { __ }.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | elements.each(${1:"${2://XPath}"}) do |${3:node}| 7 | $0 8 | end 9 | name 10 | xpath(..) { .. } 11 | scope 12 | source.ruby 13 | tabTrigger 14 | xpa 15 | uuid 16 | CC300D44-6C3F-4F6C-A8AB-86F5A2DC57CF 17 | 18 | 19 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_3.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | multi_line_annotation_3 3 | ========== 4 | xmpfilter 5 | ========== 6 | 7 | a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342, 8 | 1332333333 ] 9 | a 10 | # => 11 | 1 # => 12 | ========== 13 | 14 | a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342, 15 | 1332333333 ] 16 | a 17 | # => ["1111111111111111111111111111111111111111111111111111", 18 | # 123334324234242342, 19 | # 1332333333] 20 | 1 # => 1 21 | -------------------------------------------------------------------------------- /Snippets/class_from_name() (clafn).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | split("::").inject(Object) { |par, const| par.const_get(const) } 7 | name 8 | class_from_name() 9 | scope 10 | source.ruby 11 | tabTrigger 12 | clafn 13 | uuid 14 | 2DBEE50B-3097-4A57-AB48-3586CF392D8B 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/each_with_index { |e, i| .. } (eawi).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | each_with_index { |${1:e}, ${2:i}| $0 } 7 | name 8 | each_with_index { |e, i| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | eawi 13 | uuid 14 | 1DD13CF5-39C0-4F10-B655-56DACEBC7F94 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/module .. end.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | module ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}} 7 | $0 8 | end 9 | name 10 | module .. end 11 | scope 12 | source.ruby 13 | tabTrigger 14 | mod 15 | uuid 16 | 2B73EC5F-06D2-460C-A14F-6FA05AFCF0CC 17 | 18 | 19 | -------------------------------------------------------------------------------- /Snippets/usage_if() (usai).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | if ARGV.$1 7 | abort "Usage: #{\$PROGRAM_NAME} ${2:ARGS_GO_HERE}" 8 | end 9 | name 10 | usage_if() 11 | scope 12 | source.ruby 13 | tabTrigger 14 | usai 15 | uuid 16 | 21C0D711-F32A-4665-AA0D-B136F9DD3945 17 | 18 | 19 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/bindings-output.rb: -------------------------------------------------------------------------------- 1 | 2 | require 'test/unit' 3 | 4 | class TestFoo < Test::Unit::TestCase 5 | def setup 6 | @o = [] 7 | end 8 | 9 | def test_foo 10 | a = 1 11 | b = a 12 | assert_equal a, b 13 | assert_equal 1, b 14 | end 15 | 16 | def test_arr 17 | last = 1 18 | @o << last 19 | assert_equal last, @o.last 20 | assert_equal 1, @o.last 21 | end 22 | 23 | def test_bar 24 | a = b = c = 1 25 | d = a 26 | assert_equal a, d 27 | assert_equal b, d 28 | assert_equal c, d 29 | assert_equal 1, d 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /Snippets/YAML.load(file) (Yl-).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | File.open(${1:"${2:path/to/file}.yaml"}) { |${3:file}| YAML.load(${3:file}) } 7 | name 8 | YAML.load(file) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | Yl- 13 | uuid 14 | 8343ACF4-EEB7-44B5-B835-94826466D4D5 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/class .. end (cla).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | class ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.[a-z]+)*/(?2::\u$1)/g}} 7 | $0 8 | end 9 | name 10 | class .. end 11 | scope 12 | source.ruby 13 | tabTrigger 14 | cla 15 | uuid 16 | BF487539-8085-4FF4-8601-1AD20FABAEDC 17 | 18 | 19 | -------------------------------------------------------------------------------- /Snippets/grep(;pattern;) { |match| .. } (gre).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | grep(${1:/${2:pattern}/}) { |${3:match}| $0 } 7 | name 8 | grep(/pattern/) { |match| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | gre 13 | uuid 14 | 9D9E7BA3-8C5D-4532-83EA-326358C2F5BB 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/map_with_index { |e, i| .. } (mapwi).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | enum_with_index.map { |${1:e}, ${2:i}| $0 } 7 | name 8 | map_with_index { |e, i| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | mapwi- 13 | uuid 14 | BD4CFD7B-1AC0-4569-9BDA-FD491F41F4E6 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/Dir.glob("..") do |file| .. end (Dir).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | Dir.glob(${1:"${2:dir/glob/*}"}) { |${3:file}| $0 } 7 | name 8 | Dir.glob("..") { |file| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | Dir 13 | uuid 14 | 332AA973-AA71-48CB-AEE9-1D71E11019AC 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/Marshal.load(obj) (Ml).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | File.open(${1:"${2:path/to/file}.dump"}, "rb") { |${3:file}| Marshal.load(${3:file}) } 7 | name 8 | Marshal.load(obj) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | Ml 13 | uuid 14 | 20AAD0BC-075D-4EC0-9057-E3E5E62C4125 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/assert_nothing_raised(..) { .. } (asnr).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | assert_nothing_raised(${1:Exception}) { $0 } 7 | name 8 | assert_nothing_raised(..) { .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | asnr 13 | uuid 14 | 82F8EEE0-2452-411E-8102-7BFDDBCA2E72 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/def method_missing .. end (mm).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | def method_missing(meth, *args, &blk) 7 | $0 8 | end 9 | name 10 | def method_missing .. end 11 | scope 12 | source.ruby 13 | tabTrigger 14 | defmm 15 | uuid 16 | 87D5F8AD-8DA6-4AED-A0D8-B51CAC980445 17 | 18 | 19 | -------------------------------------------------------------------------------- /Snippets/include Comparable .. (Comp).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | include Comparable 7 | 8 | def <=>(other) 9 | $0 10 | end 11 | name 12 | include Comparable .. 13 | scope 14 | source.ruby 15 | tabTrigger 16 | Comp 17 | uuid 18 | 6C9D6B3D-D8E9-4606-9534-577C8D21FFF6 19 | 20 | 21 | -------------------------------------------------------------------------------- /Snippets/include Enumerable .. (Enum).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | include Enumerable 7 | 8 | def each(&block) 9 | $0 10 | end 11 | name 12 | include Enumerable .. 13 | scope 14 | source.ruby 15 | tabTrigger 16 | Enum 17 | uuid 18 | AAD5D511-6BE7-41DA-8F2B-1593A48FBB08 19 | 20 | 21 | -------------------------------------------------------------------------------- /Snippets/usage_unless() (usau).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | unless ARGV.$1 7 | abort "Usage: #{\$PROGRAM_NAME} ${2:ARGS_GO_HERE}" 8 | end 9 | name 10 | usage_unless() 11 | scope 12 | source.ruby 13 | tabTrigger 14 | usau 15 | uuid 16 | 49D69DEC-6991-49F4-8D9B-BA60BFDD3D17 17 | 18 | 19 | -------------------------------------------------------------------------------- /Preferences/Symbol List: Class.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Symbol List: Class 7 | scope 8 | meta.class.ruby 9 | settings 10 | 11 | showInSymbolList 12 | 13 | symbolTransformation 14 | s/^\s*class\s+// 15 | 16 | uuid 17 | 64AFA1C0-BDC7-42DE-B3B5-C597538975E9 18 | 19 | 20 | -------------------------------------------------------------------------------- /Preferences/Symbol List: No Function Call.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Symbol List: No Function Call 7 | scope 8 | source.ruby meta.function-call entity.name.function 9 | settings 10 | 11 | showInSymbolList 12 | 0 13 | 14 | uuid 15 | A5D50494-EB97-48DE-A2BE-322DF52A7A7A 16 | 17 | 18 | -------------------------------------------------------------------------------- /Snippets/define_method ___ end.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | define_method :${1:method_name} do${2/.+/ |/}${2:args}${2/.+/|/} 7 | $0 8 | end 9 | name 10 | define_method ... end 11 | scope 12 | source.ruby 13 | tabTrigger 14 | defm 15 | uuid 16 | 7BC1E159-0C90-4B0D-8808-80165C11F59C 17 | 18 | 19 | -------------------------------------------------------------------------------- /Snippets/pass(__).tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | pass`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb"`"${1:Message.}"`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb" end`$0 7 | name 8 | pass(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | pas 13 | uuid 14 | F46A4687-E52D-40D2-9072-C215645EDBC6 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/skip(__).tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | skip`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb"`"${1:Message.}"`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb" end`$0 7 | name 8 | skip(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | ski 13 | uuid 14 | B186BAC0-D981-41AC-B8F4-34BAD2BC4EE6 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/Benchmark_bmbm(__) do __ end.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | TESTS = ${1:10_000} 7 | Benchmark.bmbm do |results| 8 | $0 9 | end 10 | name 11 | Benchmark.bmbm do .. end 12 | scope 13 | source.ruby 14 | tabTrigger 15 | bm- 16 | uuid 17 | 942F20E2-C40A-44B8-A3F2-99AAC68CB534 18 | 19 | 20 | -------------------------------------------------------------------------------- /Snippets/inject(init) { |mem, var| .. } (inj).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | inject${1/.+/(/}${1:init}${1/.+/)/} { |${2:mem}, ${3:var}| $0 } 7 | name 8 | inject(init) { |mem, var| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | inj 13 | uuid 14 | B563E0D7-513D-49B4-9733-1B04A6F25A74 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/File.foreach ("..") do |line| .. end (File).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | File.foreach(${1:"${2:path/to/file}"}) { |${3:line}| $0 } 7 | name 8 | File.foreach ("..") { |line| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | File 13 | uuid 14 | 8F594E5E-6F46-4E98-B5FB-1C8F3BA9828F 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/flunk(..) (fl).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | flunk`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb"`"${1:Failure message.}"`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb" end`$0 7 | name 8 | flunk(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | flu 13 | uuid 14 | DB457094-1AC9-4856-AEFC-43A9576B6775 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/Marshal.dump(obj, file) (Md).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | File.open(${1:"${2:path/to/file}.dump"}, "wb") { |${3:file}| Marshal.dump(${4:obj}, ${3:file}) } 7 | name 8 | Marshal.dump(.., file) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | Md 13 | uuid 14 | 0CB48BCA-3F6E-4AE0-85BC-08A1D2508216 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/YAML.dump(.., file) (Yd-).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | File.open(${1:"${2:path/to/file}.yaml"}, "w") { |${3:file}| YAML.dump(${4:obj}, ${3:file}) } 7 | name 8 | YAML.dump(.., file) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | Yd- 13 | uuid 14 | 3BA6762A-BB6B-489E-8006-F30F386AEF48 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/transaction( __ ) do __ end.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | transaction${1/(^.*?\S.*)|.*/(?1:\()/}${1:true}${1/(^.*?\S.*)|.*/(?1:\))/} { $0 } 7 | name 8 | transaction( .. ) { .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | tra 13 | uuid 14 | 46BF99AD-E172-4D49-BCF7-072F4730E1D9 15 | 16 | 17 | -------------------------------------------------------------------------------- /Preferences/Symbo List: Method.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Symbol List: Method 7 | scope 8 | source.ruby meta.function 9 | settings 10 | 11 | showInSymbolList 12 | 1 13 | symbolTransformation 14 | s/^\s*def\s+/ / 15 | 16 | uuid 17 | 92E190C9-A861-4025-92D4-D6B5A24C22D4 18 | 19 | 20 | -------------------------------------------------------------------------------- /Snippets/Hash.new { |hash, key| hash[key] = .. } (Has).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | Hash.new { |${1:hash}, ${2:key}| ${1:hash}[${2:key}] = $0 } 7 | name 8 | Hash.new { |hash, key| hash[key] = .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | Hash 13 | uuid 14 | E16EE658-1CA0-4950-954B-B962E50B754F 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/Insert ERb's <% __ %> or <%= __ %>.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | <%= ${0:$TM_SELECTED_TEXT} %> 7 | keyEquivalent 8 | ^> 9 | name 10 | Insert ERb’s <% .. %> or <%= .. %> 11 | scope 12 | text.html.erb, source.yaml, source.js.erb 13 | uuid 14 | FDFABCB9-DF58-4469-AE11-5407A4FF4D70 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/assert_nil(..) (asn).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | assert_nil`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb"`${0:instance}`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb" end` 7 | name 8 | assert_nil(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | asn 13 | uuid 14 | 4C79256C-480A-459C-BDE8-BB0D972811DB 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/require "tc_.." .. (ts).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | require "test/unit" 7 | 8 | require "tc_${1:test_case_file}" 9 | require "tc_${2:test_case_file}" 10 | 11 | name 12 | require "tc_.." .. 13 | scope 14 | source.ruby 15 | tabTrigger 16 | ts 17 | uuid 18 | 5297FD0C-98B1-4514-BBD1-1516810BECA6 19 | 20 | 21 | -------------------------------------------------------------------------------- /Preferences/Completion: ENV[…] variables.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Completion: ENV[…] variables 7 | scope 8 | meta.environment-variable.ruby string.quoted 9 | settings 10 | 11 | completionCommand 12 | env|grep "^$TM_CURRENT_WORD"|sort|cut -d= -f1 13 | 14 | uuid 15 | 1A7701FA-D866-498C-AD4C-7846538DB535 16 | 17 | 18 | -------------------------------------------------------------------------------- /Snippets/assert(..) (as).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | assert`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb"`${1:test}, "${0:Failure message.}"`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb" end` 7 | name 8 | assert(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | as 13 | uuid 14 | B32C147D-44A6-478A-9D5D-189D7831E9A7 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/assert_equal.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | assert_equal`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb"`${1:expected}, ${0:actual}`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb" end` 7 | name 8 | assert_equal(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | ase 13 | uuid 14 | 43A61A22-6BEE-4997-961C-1CDE739C05FE 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/RDoc documentation block.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | `[[ $TM_LINE_INDEX != 0 ]] && echo; echo`=begin rdoc 7 | $0 8 | =end 9 | name 10 | New Block 11 | scope 12 | source.ruby 13 | tabTrigger 14 | =b 15 | uuid 16 | 05984208-D559-4C04-A69C-2019361A985A 17 | disableAutoIndent 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Snippets/assert_not_nil(..) (asnn).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | assert_not_nil`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb"`${0:instance}`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb" end` 7 | name 8 | assert_not_nil(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | asnn 13 | uuid 14 | 79FEC3CC-2A40-4611-9A85-ECDB22FE0701 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/assert_same(..) (ass).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | assert_same`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb"`${1:expected}, ${0:actual}`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb" end` 7 | name 8 | assert_same(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | ass 13 | uuid 14 | 29340695-E426-4F77-8CF7-C59360A549F4 15 | 16 | 17 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_4.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | multi_line_annotation_4 3 | ========== 4 | xmpfilter 5 | ========== 6 | 7 | a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342, 8 | 55555555 ] 9 | a 10 | # => ["1111111111111111111111111111111111111111111111111111", 11 | # 123334324234242342, 12 | # 1332333333] 13 | # not removed 14 | ========== 15 | 16 | a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342, 17 | 55555555 ] 18 | a 19 | # => ["1111111111111111111111111111111111111111111111111111", 20 | # 123334324234242342, 21 | # 55555555] 22 | # not removed 23 | -------------------------------------------------------------------------------- /Snippets/File_open("__") { |file| __ }.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | File.open(${1:"${2:path/to/file}"}${3/(^[rwab+]+$)|.*/(?1:, ")/}${3:w}${3/(^[rwab+]+$)|.*/(?1:")/}) { |${4:file}| $0 } 7 | name 8 | File.open("..") { |file| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | File 13 | uuid 14 | 397FA09F-A30F-4EE4-920C-318D5004EE97 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/module .. module_function .. end.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | module ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}} 7 | module_function 8 | 9 | $0 10 | end 11 | name 12 | module .. module_function .. end 13 | scope 14 | source.ruby 15 | tabTrigger 16 | mod 17 | uuid 18 | 0E85EC81-2FAB-4648-B590-119CC1BB6E41 19 | 20 | 21 | -------------------------------------------------------------------------------- /Snippets/assert_not_same(..) (asns).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | assert_not_same`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb"`${1:unexpected}, ${0:actual}`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb" end` 7 | name 8 | assert_not_same(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | asns 13 | uuid 14 | F91C25EC-EC76-498B-BFB5-FDA8F57C5875 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/assert_send(..) (ass).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | assert_send`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb"`[${1:object}, :${2:message}, ${0:args}]`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb" end` 7 | name 8 | assert_send(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | ass 13 | uuid 14 | 7850AD5C-A90D-4E2C-A931-EADFF8D3D9A3 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/untitled.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | opts.on( "-${1:o}", "--${2:long-option-name}"${3/^\s*$|(.*\S.*)/(?1:, )/}${3:String}, 7 | "${4:Option description.}" ) do |${6:opt}| 8 | $0 9 | end 10 | name 11 | option(..) 12 | scope 13 | source.ruby 14 | tabTrigger 15 | opt 16 | uuid 17 | 209D5D73-7A77-4931-A158-3FB6D5B48A88 18 | 19 | 20 | -------------------------------------------------------------------------------- /Snippets/assert_match(..) (asm).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | assert_match`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb"`/${1:expected_pattern}/, ${0:actual_string}`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb" end` 7 | name 8 | assert_match(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | asm 13 | uuid 14 | 711ED6C3-0F18-41FB-9A7D-3094BB319A85 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/assert_not_equal(..) (asne).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | assert_not_equal`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb"`${1:unexpected}, ${0:actual}`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb" end` 7 | name 8 | assert_not_equal(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | asne 13 | uuid 14 | A243E96F-DC21-4AA0-B340-13A7674F6AFF 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/assert_respond_to(..) (asrt).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | assert_respond_to`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb"`${1:object}, :${0:method}`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb" end` 7 | name 8 | assert_respond_to(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | asrt 13 | uuid 14 | 09A11FDA-49FC-4466-8787-8D1D5D111A89 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/assert_kind_of(..) (asko).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | assert_kind_of`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb"`${1:ExpectedKind}, ${0:actual_instance}`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb" end` 7 | name 8 | assert_kind_of(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | asko 13 | uuid 14 | 671F05E2-D9CC-485E-BB1B-B13EF20FAC65 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/assert_operator(..) (aso).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | assert_operator`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb"`${1:left}, :${2:operator}, ${0:right}`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb" end` 7 | name 8 | assert_operator(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | aso 13 | uuid 14 | 1B925A4D-8EE4-442B-9254-293599F5717F 15 | 16 | 17 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_1.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | multi_line_annotation_1 3 | ========== 4 | xmpfilter 5 | ========== 6 | 7 | 1+2 # => 8 | a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342, 9 | 1332333333 ] 10 | 1+2 # => 11 | a 12 | # => 13 | ========== 14 | 15 | 1+2 # => 3 16 | a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342, 17 | 1332333333 ] 18 | 1+2 # => 3 19 | a 20 | # => ["1111111111111111111111111111111111111111111111111111", 21 | # 123334324234242342, 22 | # 1332333333] 23 | -------------------------------------------------------------------------------- /Macros/Overwrite } in #{ .. }.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | commands 6 | 7 | 8 | command 9 | moveRight: 10 | 11 | 12 | keyEquivalent 13 | } 14 | name 15 | Overwrite '}' in #{ .. } 16 | scope 17 | source.ruby string meta.embedded.line.ruby punctuation.section.embedded.end 18 | uuid 19 | E5158F94-CC52-4424-A495-14EF9272653F 20 | 21 | 22 | -------------------------------------------------------------------------------- /Snippets/assert_no_match(..) (asnm).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | assert_no_match`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb"`/${1:unexpected_pattern}/, ${0:actual_string}`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb" end` 7 | name 8 | assert_no_match(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | asnm 13 | uuid 14 | A072BB1E-1DD1-45D3-9346-8CA3BA21B364 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/open("path;or;url", "w") do |doc| .. end (ope).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | open(${1:"${2:path/or/url/or/pipe}"}${3/(^[rwab+]+$)|.*/(?1:, ")/}${3:w}${3/(^[rwab+]+$)|.*/(?1:")/}) { |${4:io}| $0 } 7 | name 8 | open("path/or/url", "w") { |io| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | ope 13 | uuid 14 | 418F1817-255F-430A-B09A-222964ED66A7 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/assert_in_delta(..) (asid).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | assert_in_delta`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb"`${1:expected_float}, ${2:actual_float}, ${0:2 ** -20}`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb" end` 7 | name 8 | assert_in_delta(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | asid 13 | uuid 14 | 429D0EF5-580D-4166-8F79-713DE96B77F1 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/assert_instance_of(..) (asio).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | assert_instance_of`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb"`${1:ExpectedClass}, ${0:actual_instance}`"$TM_BUNDLE_SUPPORT/bin/snippet_paren.rb" end` 7 | name 8 | assert_instance_of(..) 9 | scope 10 | source.ruby 11 | tabTrigger 12 | asio 13 | uuid 14 | 0E831E03-67E1-4357-8323-C60685C23C4F 15 | 16 | 17 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/README.method_analysis: -------------------------------------------------------------------------------- 1 | 2 | method_analyzer.rb can be used to gather precise information about the exact 3 | methods called in your code, allowing you to explore it better with rct-doc 4 | (see README.emacs and README.vim for more information). This requires high 5 | code coverage, since it can only record such data when the code is executed. 6 | 7 | rct-meth-args can be used to generate fairly complete TAGS files. It operates 8 | by loading the specified files and tracking method definitions; therefore, it 9 | is meta-programming aware, unlike other implementations. 10 | 11 | You can use them conveniently by adding the code shown in 12 | Rakefile.method_analysis to your Rakefile. 13 | 14 | -------------------------------------------------------------------------------- /Snippets/task :task_name => [:dependent, :tasks] do __ end.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | desc "${1:Task description}" 7 | task :${2:${3:task_name} => ${4:[:${5:dependent, :tasks}]}} do 8 | $0 9 | end 10 | name 11 | task :task_name => [:dependent, :tasks] do .. end 12 | scope 13 | source.ruby 14 | tabTrigger 15 | tas 16 | uuid 17 | A7BF14E6-59B1-42E5-8755-8A72BF13685E 18 | 19 | 20 | -------------------------------------------------------------------------------- /Snippets/embed string variable.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | #{${1:$TM_SELECTED_TEXT}} 7 | keyEquivalent 8 | # 9 | name 10 | Embedded Code — #{…} 11 | scope 12 | source.ruby & B:(string.quoted.double|string.interpolated|meta.array.symbol.interpolated|string.quoted.other.interpolated|meta.array.string.interpolated) - string source 13 | uuid 14 | EEE6D060-C5A0-400D-A2E0-0835013C5365 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/class .. < Struct .. initialize .. end.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}} = Struct.new(:${2:attr_names}) do 7 | def ${3:method_name} 8 | $0 9 | end 10 | 11 | 12 | end 13 | name 14 | ClassName = Struct .. do .. end 15 | scope 16 | source.ruby 17 | tabTrigger 18 | cla 19 | uuid 20 | 05DFF82C-5A29-4EBD-93FE-C165FFFB5EA8 21 | 22 | 23 | -------------------------------------------------------------------------------- /Snippets/class .. initialize .. end.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | class ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}} 7 | def initialize${2/(^.*?\S.*)|.*/(?1:\()/}${2:args}${2/(^.*?\S.*)|.*/(?1:\))/} 8 | $0 9 | end 10 | 11 | 12 | end 13 | name 14 | class .. initialize .. end 15 | scope 16 | source.ruby 17 | tabTrigger 18 | cla 19 | uuid 20 | 83EED068-8C1C-4BAF-9893-902DC00616AB 21 | 22 | 23 | -------------------------------------------------------------------------------- /Snippets/times { |n| .. } (tim).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | 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 } 7 | name 8 | times { |n| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | tim 13 | uuid 14 | 206D54AF-E67A-4DF0-B7F4-3D42FEB81685 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/do |obj| .. end (doo).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | 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:|)/} 7 | $0 8 | end 9 | name 10 | Insert do |variable| … end 11 | scope 12 | source.ruby 13 | tabTrigger 14 | do 15 | uuid 16 | 4B72C5C3-6CA7-41AC-B2F9-51DEA25D469E 17 | 18 | 19 | -------------------------------------------------------------------------------- /Snippets/lambda { |args| .. } (lam).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | 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 } 7 | name 8 | lambda { |args| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | lam 13 | uuid 14 | 21E75321-0CF7-45E8-A297-BCC7C0DDDD15 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/step(2) { |e| .. } (ste).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | 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 } 7 | name 8 | step(2) { |e| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | ste 13 | uuid 14 | 36853A11-0307-4AE7-B835-7CE6358717A5 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/downto(0) { |n| .. } (dow).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | 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 } 7 | name 8 | downto(0) { |n| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | dow 13 | uuid 14 | 4991BB86-736E-4758-B9B2-E4FA90B9368F 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/fill(range) { |i| .. } (fil).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | 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 } 7 | name 8 | fill(range) { |i| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | fil 13 | uuid 14 | 6021BBDC-4AAD-447B-A0C2-A4BB31721558 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/open yield block ({).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | { ${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} 7 | name 8 | Insert { |variable| … } 9 | scope 10 | source.ruby - string - comment 11 | tabTrigger 12 | { 13 | uuid 14 | 855FC4EF-7B1E-48EE-AD4E-5ECB8ED79D1C 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/fetch(name) { |key| .. } (fet).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | 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 } 7 | name 8 | fetch(name) { |key| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | fet 13 | uuid 14 | 1F72122A-35AD-4BA1-AA01-889A10319666 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/upto(1.0;0.0) { |n| .. } (upt).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | 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 } 7 | name 8 | upto(1.0/0.0) { |n| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | upt 13 | uuid 14 | 51954118-81D7-42B6-9A10-BE23D8B9FFE2 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/Array.new(10) { |i| .. } (Arr).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | 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 } 7 | name 8 | Array.new(10) { |i| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | Array 13 | uuid 14 | DAE6A754-D906-4763-B816-CE67125CEF08 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/sub(;..;) { |match| .. } (sub).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | 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 } 7 | name 8 | sub(/../) { |match| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | sub 13 | uuid 14 | 8021944C-CEA4-4983-8D1C-78D18D4004A1 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/gsub(;..;) { |match| .. } (gsu).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | 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 } 7 | name 8 | gsub(/../) { |match| .. } 9 | scope 10 | source.ruby 11 | tabTrigger 12 | gsu 13 | uuid 14 | 2514FC26-468C-4D08-A788-494A444C4286 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/class .. < Test;;Unit;;TestCase .. end (tc).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | require "test/unit" 7 | 8 | require "${1:library_file_name}" 9 | 10 | class Test${2:${1/([\w&&[^_]]+)|./\u$1/g}} < Test::Unit::TestCase 11 | def test_${3:case_name} 12 | $0 13 | end 14 | end 15 | name 16 | class .. < Test::Unit::TestCase .. end 17 | scope 18 | source.ruby 19 | tabTrigger 20 | tc 21 | uuid 22 | 31D1F145-33AB-4441-BA11-4D1C46928C4C 23 | 24 | 25 | -------------------------------------------------------------------------------- /Snippets/class .. < ParentClass .. initialize .. end.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | class ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}} < ${2:ParentClass} 7 | def initialize${3/(^.*?\S.*)|.*/(?1:\()/}${3:args}${3/(^.*?\S.*)|.*/(?1:\))/} 8 | $0 9 | end 10 | 11 | 12 | end 13 | name 14 | class .. < ParentClass .. initialize .. end 15 | scope 16 | source.ruby 17 | tabTrigger 18 | cla 19 | uuid 20 | 0CCBE04E-F4E2-4E55-9506-7DE67ACF8388 21 | 22 | 23 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_2.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | multi_line_annotation_2 3 | ========== 4 | xmpfilter 5 | ========== 6 | 7 | 1+2 # => 32 8 | a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342, 9 | 55555555 ] 10 | 1+2 # => 300 11 | a 12 | # => ["1111111111111111111111111111111111111111111111111111", 13 | # 123334324234242342, 14 | # 1332333333] 15 | ========== 16 | 17 | 1+2 # => 3 18 | a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342, 19 | 55555555 ] 20 | 1+2 # => 3 21 | a 22 | # => ["1111111111111111111111111111111111111111111111111111", 23 | # 123334324234242342, 24 | # 55555555] 25 | -------------------------------------------------------------------------------- /Support/lib/ruby_requires.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby18 2 | 3 | $: << "#{ENV['TM_SUPPORT_PATH']}/lib" if ENV.has_key?('TM_SUPPORT_PATH') 4 | require "escape" 5 | 6 | module RubyRequires 7 | module_function 8 | 9 | def build_requires( code, libs ) 10 | libs.reject { |lib| code =~ /require\s*(['"])#{lib}\1/ }. 11 | map { |lib| "require \"#{lib}\"\n" }.join 12 | end 13 | 14 | def place_requires( code, new_reqs ) 15 | return code unless new_reqs =~ /\S/ 16 | 17 | code.dup.sub!(/(?:^[ \t]*require\s*(['"]).+?\1.*\n)+/, "\\&#{new_reqs}") || 18 | code.sub(/\A(?:\s*(?:#.*)?\n)*/, "\\&#{new_reqs}\n") 19 | end 20 | 21 | def add_requires( code, reqs ) 22 | new_reqs = build_requires(code, reqs) 23 | code = place_requires(code, new_reqs) 24 | e_sn(code) 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /Support/test/fixtures/fake_rvm_home/.rvm/bin/rvm: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Fake RVM stub to be used in tests. Serves a single purpose: 4 | # 5 | # * If invoked as `rvm . do which [-s] …` it pretends that an executable 6 | # named `sample_executable_from_rvm` is available in the search path. 7 | # (Optional `-s` behaves just like in the original `which` command on BSD / 8 | # MacOS.) 9 | 10 | if [[ "$1 $2 $3" == ". do which" ]]; then 11 | if [[ $4 == "-s" && $5 == "sample_executable_from_rvm" ]]; then 12 | exit 0 13 | elif [[ $4 == "sample_executable_from_rvm" ]]; then 14 | echo "/some/fake/path/to/sample_executable_from_rvm" 15 | else 16 | exit 1 17 | fi 18 | 19 | else 20 | >&2 echo "You tried to make this fake RVM stub do something it does not understand!: $*" 21 | exit 99 22 | 23 | fi -------------------------------------------------------------------------------- /Macros/Delete forward:backward.tmMacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | commands 6 | 7 | 8 | command 9 | deleteBackward: 10 | 11 | 12 | command 13 | deleteForward: 14 | 15 | 16 | keyEquivalent 17 |  18 | name 19 | Delete forward/backward 20 | scope 21 | meta.embedded.line.ruby & (L:punctuation.section.embedded.begin.ruby & R:punctuation.section.embedded.end.ruby) 22 | uuid 23 | A83F68A9-F751-4BB4-AE16-56812878C16A 24 | 25 | 26 | -------------------------------------------------------------------------------- /Preferences/Completion: require strings.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Completion: require strings 7 | scope 8 | meta.require.ruby string.quoted 9 | settings 10 | 11 | completionCommand 12 | #!/usr/bin/env ruby18 13 | ptrn = /^#{Regexp.escape ENV["TM_CURRENT_WORD"].to_s}[^.]+\..+/ 14 | puts( $LOAD_PATH.inject([]) do |res, path| 15 | res << Dir.new(path).grep(ptrn) { |file| file[/^[^.]+/] } if File.exists?(path) 16 | res 17 | end.sort.uniq ) 18 | 19 | uuid 20 | AEDD6A5F-417F-4177-8589-B07518ACA9DE 21 | 22 | 23 | -------------------------------------------------------------------------------- /Support/test/fixtures/sample_project_with_gemfile/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | ast (2.4.0) 5 | jaro_winkler (1.5.1) 6 | parallel (1.12.1) 7 | parser (2.5.1.2) 8 | ast (~> 2.4.0) 9 | powerpack (0.1.2) 10 | rainbow (3.0.0) 11 | rspec-core (3.7.1) 12 | rspec-support (~> 3.7.0) 13 | rspec-support (3.7.1) 14 | rubocop (0.58.2) 15 | jaro_winkler (~> 1.5.1) 16 | parallel (~> 1.10) 17 | parser (>= 2.5, != 2.5.1.1) 18 | powerpack (~> 0.1) 19 | rainbow (>= 2.2.2, < 4.0) 20 | ruby-progressbar (~> 1.7) 21 | unicode-display_width (~> 1.0, >= 1.0.1) 22 | ruby-progressbar (1.9.0) 23 | unicode-display_width (1.4.0) 24 | 25 | PLATFORMS 26 | ruby 27 | 28 | DEPENDENCIES 29 | rspec-core 30 | rubocop 31 | 32 | BUNDLED WITH 33 | 1.16.2 34 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/multi_line_annotation_5.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | multi_line_annotation_5 3 | ========== 4 | xmpfilter 5 | ========== 6 | 7 | def test 8 | a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342, 9 | 55555555 ] 10 | a 11 | # => ["", 12 | # 123334324234242342, 13 | # 1332333333] 14 | a 15 | # => 16 | # not removed 17 | end 18 | test 19 | ========== 20 | 21 | def test 22 | a = ["1111111111111111111111111111111111111111111111111111", 123334324234242342, 23 | 55555555 ] 24 | a 25 | # => ["1111111111111111111111111111111111111111111111111111", 26 | # 123334324234242342, 27 | # 55555555] 28 | a 29 | # => ["1111111111111111111111111111111111111111111111111111", 30 | # 123334324234242342, 31 | # 55555555] 32 | # not removed 33 | end 34 | test 35 | -------------------------------------------------------------------------------- /Snippets/class .. < DelegateClass .. initialize .. end (class).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | class ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}} < DelegateClass(${2:ParentClass}) 7 | def initialize${3/(^.*?\S.*)|.*/(?1:\()/}${3:args}${3/(^.*?\S.*)|.*/(?1:\))/} 8 | super(${4:del_obj}) 9 | 10 | $0 11 | end 12 | 13 | 14 | end 15 | name 16 | class .. < DelegateClass .. initialize .. end 17 | scope 18 | source.ruby 19 | tabTrigger 20 | cla- 21 | uuid 22 | AFE1D078-EA16-45F5-AD8A-FAC1B523D861 23 | 24 | 25 | -------------------------------------------------------------------------------- /Snippets/module .. ClassMethods .. end.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | module ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}} 7 | module ClassMethods 8 | $0 9 | end 10 | 11 | module InstanceMethods 12 | 13 | end 14 | 15 | def self.included(receiver) 16 | receiver.extend ClassMethods 17 | receiver.send :include, InstanceMethods 18 | end 19 | end 20 | name 21 | module .. ClassMethods .. end 22 | scope 23 | source.ruby 24 | tabTrigger 25 | mod 26 | uuid 27 | A71A18CF-2D71-4BFF-AA0C-D9B8C59BC4EB 28 | 29 | 30 | -------------------------------------------------------------------------------- /Support/bin/execute_line.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby18 2 | # encoding: utf-8 3 | 4 | # be smart, dont print something if we already have.. 5 | $write_count = 0 6 | def STDOUT.write(what) 7 | $write_count += 1 8 | super(what) 9 | end 10 | 11 | # execure the code 12 | begin 13 | # insert a space if input was a selection, if it was a line insert \n 14 | print(ENV['TM_SELECTED_TEXT'] ? " " : "\n") 15 | r = eval(STDIN.read) 16 | rescue Object 17 | r = $!.class.to_s 18 | end 19 | 20 | # try to_s, if it doesnt work use inspect 21 | # Array and Hash are shown via inspect because they look better with formating 22 | # do this just if the script did not print anything itself 23 | if $write_count == 1 24 | print( (r.class != Hash and r.class != Array and not r.nil? and r.respond_to? :to_s) ? r.to_s : r.inspect ) 25 | print( "\n" ) unless ENV.has_key?('TM_SELECTED_TEXT') 26 | end 27 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/bin/ruby-toggle-file: -------------------------------------------------------------------------------- 1 | #! /usr/local/bin/ruby18 2 | require 'ruby_toggle_file' 3 | require 'optparse' 4 | 5 | USAGE = < 2 | 3 | 4 | 5 | content 6 | ${TM_SELECTED_TEXT/([\t ]*).*/$1/m}begin 7 | ${3:${TM_SELECTED_TEXT/(\A.*)|(.+)|\n\z/(?1:$0:(?2:\t$0))/g}} 8 | ${TM_SELECTED_TEXT/([\t ]*).*/$1/m}rescue ${1:Exception}${2/.+/ => /}${2:e} 9 | ${TM_SELECTED_TEXT/([\t ]*).*/$1/m} $0 10 | ${TM_SELECTED_TEXT/([\t ]*).*/$1/m}end 11 | 12 | keyEquivalent 13 | ^W 14 | name 15 | begin … rescue … end 16 | scope 17 | source.ruby - comment 18 | tabTrigger 19 | begin 20 | uuid 21 | 0F940CBC-2173-49FF-B6FD-98A62863F8F2 22 | 23 | 24 | -------------------------------------------------------------------------------- /Commands/Omit from RDoc.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby18 9 | s = STDIN.read 10 | puts "\#--" 11 | if s== "" 12 | puts "\# $0","\#++" 13 | else 14 | puts s, "\#++", "$0" 15 | end 16 | fallbackInput 17 | line 18 | input 19 | selection 20 | keyEquivalent 21 | ^@O 22 | name 23 | Omit 24 | output 25 | insertAsSnippet 26 | scope 27 | source.ruby 28 | uuid 29 | BF4CA9F1-51CD-48D4-8357-852234F59046 30 | 31 | 32 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/expectations.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | expectations 3 | ========== 4 | xmpfilter --expectations 5 | ========== 6 | 7 | require 'rubygems' 8 | require 'expectations' 9 | 10 | S = Struct.new :a 11 | Expectations do 12 | 1 + 1 # => 13 | "a".length # => 14 | [][1] # => 15 | 1.hoge # => 16 | 1.1 + 1.0 # => 17 | S.new(1) # => 18 | end 19 | ========== 20 | 21 | require 'rubygems' 22 | require 'expectations' 23 | 24 | S = Struct.new :a 25 | Expectations do 26 | expect 2 do 27 | 1 + 1 28 | end 29 | 30 | expect 1 do 31 | "a".length 32 | end 33 | 34 | expect nil do 35 | [][1] 36 | end 37 | 38 | expect NoMethodError do 39 | 1.hoge 40 | end 41 | 42 | expect 2.0999..2.1001 do 43 | 1.1 + 1.0 44 | end 45 | 46 | expect S do 47 | S.new(1) 48 | end 49 | 50 | expect "#" do 51 | S.new(1).inspect 52 | end 53 | 54 | end 55 | -------------------------------------------------------------------------------- /Preferences/Folding - ERB.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Folding (ERB) 7 | scope 8 | text.html.erb 9 | settings 10 | 11 | foldingStartMarker 12 | (?x) 13 | (<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\b.*?> 14 | |<!--(?!.*-->) 15 | |\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/))) 16 | ) 17 | foldingStopMarker 18 | (?x) 19 | (</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)> 20 | |^\s*--> 21 | |(^|\s)\} 22 | ) 23 | 24 | uuid 25 | EA050E4E-1658-4AA6-BE90-9D4638823A10 26 | 27 | 28 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/Rakefile.method_analysis: -------------------------------------------------------------------------------- 1 | 2 | # Rake tasks to generate TAGS and gather method analysis information. 3 | # See README.method_analysis for more information. 4 | 5 | ## my standard Rakefile 6 | task :tags => "TAGS" 7 | 8 | desc "Generate method_analysis by ruby -rmethod_analyzer." 9 | task :analyze => [:_prepare_method_analyze, :tags] do 10 | at_exit { sh "ls -l method_analysis" } 11 | end 12 | 13 | task :_prepare_method_analyze do 14 | ENV['METHOD_ANALYZER_FORMAT']="marshal" 15 | sh "rm -f method_analysis" 16 | puts "generating method_analysis" 17 | end 18 | 19 | ## application-specific Rakefile (RTtool) 20 | task :analyze do 21 | sh "ruby -Ilib -rmethod_analyzer test/test.rb" 22 | sh "ruby -Ilib -rmethod_analyzer test/test-rt2html-lib.rb" 23 | sh "ruby -Ilib -rmethod_analyzer test/test-rtparser.rb" 24 | end 25 | 26 | file "TAGS" => FileList["lib/rt/*.rb"] do 27 | sh "rct-meth-args -t lib/rt/*.rb > TAGS" 28 | end 29 | 30 | 31 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/unit_test-input.rb: -------------------------------------------------------------------------------- 1 | 2 | class X 3 | Y = Struct.new(:a) 4 | def foo(b); b ? Y.new(2) : 2 end 5 | def bar; raise "No good" end 6 | def baz; nil end 7 | def fubar(x); x ** 2.0 + 1 end 8 | def babar; [1,2] end 9 | A = 1 10 | A = 1 11 | def difftype() [1, "s"] end 12 | end 13 | 14 | 15 | require 'test/unit' 16 | class Test_X < Test::Unit::TestCase 17 | def setup 18 | @o = X.new 19 | end 20 | 21 | def test_foo 22 | @o.foo(true) # => 23 | @o.foo(true).a # => 24 | @o.foo(false) # => 25 | end 26 | 27 | def test_bar 28 | @o.bar # => 29 | end 30 | 31 | def test_baz 32 | @o.baz # => 33 | end 34 | 35 | def test_babar 36 | @o.babar # => 37 | end 38 | 39 | def test_fubar 40 | @o.fubar(10) # => 41 | end 42 | 43 | def test_difftype 44 | for x in @o.difftype 45 | x # => 46 | end 47 | end 48 | 49 | end 50 | 51 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/unit_test_poetry-input.rb: -------------------------------------------------------------------------------- 1 | 2 | class X 3 | Y = Struct.new(:a) 4 | def foo(b); b ? Y.new(2) : 2 end 5 | def bar; raise "No good" end 6 | def baz; nil end 7 | def fubar(x); x ** 2.0 + 1 end 8 | def babar; [1,2] end 9 | A = 1 10 | A = 1 11 | def difftype() [1, "s"] end 12 | end 13 | 14 | 15 | require 'test/unit' 16 | class Test_X < Test::Unit::TestCase 17 | def setup 18 | @o = X.new 19 | end 20 | 21 | def test_foo 22 | @o.foo(true) # => 23 | @o.foo(true).a # => 24 | @o.foo(false) # => 25 | end 26 | 27 | def test_bar 28 | @o.bar # => 29 | end 30 | 31 | def test_baz 32 | @o.baz # => 33 | end 34 | 35 | def test_babar 36 | @o.babar # => 37 | end 38 | 39 | def test_fubar 40 | @o.fubar(10) # => 41 | end 42 | 43 | def test_difftype 44 | for x in @o.difftype 45 | x # => 46 | end 47 | end 48 | 49 | end 50 | 51 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/unit_test_detect_rbtest-input.rb: -------------------------------------------------------------------------------- 1 | 2 | class X 3 | Y = Struct.new(:a) 4 | def foo(b); b ? Y.new(2) : 2 end 5 | def bar; raise "No good" end 6 | def baz; nil end 7 | def fubar(x); x ** 2.0 + 1 end 8 | def babar; [1,2] end 9 | A = 1 10 | A = 1 11 | def difftype() [1, "s"] end 12 | end 13 | 14 | 15 | require 'test/unit' 16 | class Test_X < Test::Unit::TestCase 17 | def setup 18 | @o = X.new 19 | end 20 | 21 | def test_foo 22 | @o.foo(true) # => 23 | @o.foo(true).a # => 24 | @o.foo(false) # => 25 | end 26 | 27 | def test_bar 28 | @o.bar # => 29 | end 30 | 31 | def test_baz 32 | @o.baz # => 33 | end 34 | 35 | def test_babar 36 | @o.babar # => 37 | end 38 | 39 | def test_fubar 40 | @o.fubar(10) # => 41 | end 42 | 43 | def test_difftype 44 | for x in @o.difftype 45 | x # => 46 | end 47 | end 48 | 49 | end 50 | 51 | -------------------------------------------------------------------------------- /Commands/Make Destructive Call.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | res=$(ruby18 "$TM_BUNDLE_SUPPORT/bin/make_destructive.rb") 9 | 10 | if [ "$res" = "" ] 11 | then exit_show_tool_tip "Retry this command without a selection." 12 | else echo -n "$res" 13 | fi 14 | fallbackInput 15 | line 16 | input 17 | selection 18 | keyEquivalent 19 | ^! 20 | name 21 | Add ! to Method in Line / Selection 22 | output 23 | insertAsSnippet 24 | scope 25 | source.ruby 26 | uuid 27 | 7F79BC8D-8A4F-4570-973B-05DFEC25747F 28 | 29 | 30 | -------------------------------------------------------------------------------- /Snippets/class .. instance_methods .. undef .. initialize .. end (class).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | class ${1:BlankSlate} 7 | instance_methods.each { |meth| undef_method(meth) unless meth =~ /\A__/ } 8 | 9 | def initialize${2/(^.*?\S.*)|.*/(?1:\()/}${2:args}${2/(^.*?\S.*)|.*/(?1:\))/} 10 | @${3:delegate} = ${4:delegate_object} 11 | 12 | $0 13 | end 14 | 15 | def method_missing(meth, *args, &block) 16 | @${3:delegate}.send(meth, *args, &block) 17 | end 18 | 19 | 20 | end 21 | name 22 | class BlankSlate .. initialize .. end 23 | scope 24 | source.ruby 25 | tabTrigger 26 | cla 27 | uuid 28 | E98FB8F9-7302-431D-8BF2-275A68A6126C 29 | 30 | 31 | -------------------------------------------------------------------------------- /Commands/Execute and Insert Results.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/bin/sh 9 | export RUBYLIB="$TM_BUNDLE_SUPPORT/vendor/rcodetools/lib${RUBYLIB:+:$RUBYLIB}" 10 | exec ruby18 "$TM_BUNDLE_SUPPORT/vendor/rcodetools/bin/xmpfilter" --interpreter "${TM_RUBY:-ruby}" 11 | 12 | fallbackInput 13 | document 14 | input 15 | selection 16 | keyEquivalent 17 | ^@E 18 | name 19 | Execute and Update ‘# =>’ Markers 20 | output 21 | replaceSelectedText 22 | scope 23 | source.ruby 24 | uuid 25 | FBFC214F-B019-4967-95D2-028F374A3221 26 | 27 | 28 | -------------------------------------------------------------------------------- /Preferences/Comments.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Comments 7 | scope 8 | source.ruby 9 | settings 10 | 11 | shellVariables 12 | 13 | 14 | name 15 | TM_COMMENT_START 16 | value 17 | # 18 | 19 | 20 | name 21 | TM_COMMENT_START_2 22 | value 23 | =begin 24 | 25 | 26 | 27 | name 28 | TM_COMMENT_END_2 29 | value 30 | =end 31 | 32 | 33 | 34 | 35 | uuid 36 | 1D26F26C-C6F7-434F-84F8-FEE895372E8A 37 | 38 | 39 | -------------------------------------------------------------------------------- /Commands/Enclose in * (RDoc comments).tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby18 9 | s = STDIN.read 10 | case s 11 | when /^\w+$/ 12 | print "*#{s}*$0" 13 | when "" 14 | print "*$1*$0" 15 | else 16 | print "<b>#{s}</b>" 17 | end 18 | fallbackInput 19 | word 20 | input 21 | selection 22 | keyEquivalent 23 | @b 24 | name 25 | Bold 26 | output 27 | insertAsSnippet 28 | scope 29 | source.ruby comment 30 | semanticClass 31 | style.strong.rdoc.ruby 32 | uuid 33 | 931DD73E-615E-476E-9B0D-8341023AE730 34 | 35 | 36 | -------------------------------------------------------------------------------- /Commands/Enclose in _ (RDoc comments).tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby18 9 | s = STDIN.read 10 | case s 11 | when /^\w+$/ 12 | print "_#{s}_$0" 13 | when "" 14 | print "_$1_$0" 15 | else 16 | print "<em>#{s}</em>" 17 | end 18 | fallbackInput 19 | word 20 | input 21 | selection 22 | keyEquivalent 23 | @i 24 | name 25 | Italic 26 | output 27 | insertAsSnippet 28 | scope 29 | source.ruby comment 30 | semanticClass 31 | style.emphasis.rdoc.ruby 32 | uuid 33 | DAA69A0C-FC1E-4509-9931-DFFB38B4D6AE 34 | 35 | 36 | -------------------------------------------------------------------------------- /Commands/Enclose in + (RDoc comments).tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby18 9 | s = STDIN.read 10 | case s 11 | when /^\w+$/ 12 | print "+#{s}+$0" 13 | when "" 14 | print "+$1+$0" 15 | else 16 | print "<tt>#{s}</tt>" 17 | end 18 | fallbackInput 19 | word 20 | input 21 | selection 22 | keyEquivalent 23 | @k 24 | name 25 | Typewriter 26 | output 27 | insertAsSnippet 28 | scope 29 | source.ruby comment 30 | semanticClass 31 | style.alternate.typewriter.rdoc.ruby 32 | uuid 33 | 2DDB6FE0-6111-4C40-A149-8E67E76F8272 34 | 35 | 36 | -------------------------------------------------------------------------------- /Commands/Help.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/bin/bash 9 | 10 | . "$TM_SUPPORT_PATH/lib/webpreview.sh" 11 | 12 | html_header "Ruby Bundle Help" "Ruby" 13 | "$TM_SUPPORT_PATH/lib/markdown_to_help.rb" \ 14 | "$TM_BUNDLE_SUPPORT/help/help.markdown" 15 | html_footer 16 | input 17 | none 18 | inputFormat 19 | text 20 | name 21 | Help 22 | outputCaret 23 | afterOutput 24 | outputFormat 25 | html 26 | outputLocation 27 | newWindow 28 | scope 29 | source.ruby 30 | uuid 31 | 535AF150-5613-44DB-AB41-EBB934A5865F 32 | version 33 | 2 34 | 35 | -------------------------------------------------------------------------------- /Commands/word_wrap() (worw).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby18 9 | $: << ENV['TM_SUPPORT_PATH'] + '/lib' 10 | require "ui" 11 | TextMate::UI.request_string(:title => "Wrap Size", 12 | :prompt => "Enter a character width:", 13 | :button1 => "Build Snippet") do |col| 14 | col = col.to_i 15 | print %Q{gsub!(/(.{1,#{col}}|\\S{#{col + 1},})(?: +|$\\n?)/, "\\\\1\\n")} 16 | end 17 | 18 | input 19 | none 20 | name 21 | word_wrap() 22 | output 23 | afterSelectedText 24 | scope 25 | source.ruby 26 | tabTrigger 27 | worw 28 | uuid 29 | 97054C4D-E4A3-45B1-9C00-B82DBCB30CAD 30 | 31 | 32 | -------------------------------------------------------------------------------- /Snippets/option_parse { .. } (optp).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | require "optparse" 7 | 8 | options = {${1::default => "args"}} 9 | 10 | ARGV.options do |opts| 11 | opts.banner = "Usage: #{File.basename(\$PROGRAM_NAME)} [OPTIONS]${2/^\s*$|(.*\S.*)/(?1: )/}${2:OTHER_ARGS}" 12 | 13 | opts.separator "" 14 | opts.separator "Specific Options:" 15 | 16 | $0 17 | 18 | opts.separator "Common Options:" 19 | 20 | opts.on( "-h", "--help", 21 | "Show this message." ) do 22 | puts opts 23 | exit 24 | end 25 | 26 | begin 27 | opts.parse! 28 | rescue 29 | puts opts 30 | exit 31 | end 32 | end 33 | 34 | name 35 | option_parse { .. } 36 | scope 37 | source.ruby 38 | tabTrigger 39 | optp 40 | uuid 41 | C3C48948-4F49-484E-A8DE-DEB44723099E 42 | 43 | 44 | -------------------------------------------------------------------------------- /Preferences/Block typing pairs.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Typing Pairs: Block Opening 7 | scope 8 | keyword.control.start-block.ruby, meta.syntax.ruby.start-block 9 | settings 10 | 11 | smartTypingPairs 12 | 13 | 14 | " 15 | " 16 | 17 | 18 | ( 19 | ) 20 | 21 | 22 | { 23 | } 24 | 25 | 26 | [ 27 | ] 28 | 29 | 30 | 31 | 32 | 33 | 34 | | 35 | | 36 | 37 | 38 | 39 | uuid 40 | 6D75102B-6E51-4360-8F12-BE12327B6AE6 41 | 42 | 43 | -------------------------------------------------------------------------------- /Commands/Run Rake Task.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env bash 9 | 10 | export RUBYLIB="$TM_BUNDLE_SUPPORT/RakeMate${RUBYLIB:+:$RUBYLIB}" 11 | export TM_RAKE=$(which "${TM_RAKE:-rake}") 12 | 13 | "ruby18" -- "$TM_BUNDLE_SUPPORT/RakeMate/rake_mate.rb" 14 | 15 | input 16 | none 17 | inputFormat 18 | text 19 | keyEquivalent 20 | ^R 21 | name 22 | Run Rake Task 23 | outputCaret 24 | afterOutput 25 | outputFormat 26 | html 27 | outputLocation 28 | newWindow 29 | scope 30 | source.ruby 31 | uuid 32 | 569C9822-8C41-4907-94C7-1A8A0031B66D 33 | version 34 | 2 35 | 36 | 37 | -------------------------------------------------------------------------------- /Commands/Convert Ruby hash to 1_9 syntax.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby18 9 | 10 | def toggle_ruby_hash_syntax(str) 11 | case str 12 | when /\=>/ 13 | str.gsub!(/:(\w+)\s*=>\s*/, '\1: ') 14 | when /(\w+):/ 15 | str.gsub!(/(\w+):(\s*(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|\w+\([^)]*\)|[^,]+))/, ":\\1 =>\\2") 16 | else 17 | str 18 | end 19 | end 20 | 21 | while str = $stdin.gets 22 | print toggle_ruby_hash_syntax(str) 23 | end 24 | 25 | fallbackInput 26 | line 27 | input 28 | selection 29 | keyEquivalent 30 | ^= 31 | name 32 | Toggle Ruby Hash 1.8/1.9 Syntax 33 | output 34 | replaceSelectedText 35 | uuid 36 | F4EEB2B6-07D8-402F-8FC3-79B7308D2576 37 | 38 | 39 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/test_options.rb: -------------------------------------------------------------------------------- 1 | $: << ".." << "../lib" 2 | require 'rcodetools/options' 3 | require 'test/unit' 4 | require 'tmpdir' 5 | require 'fileutils' 6 | 7 | class TestOptionHandler < Test::Unit::TestCase 8 | include Rcodetools 9 | include OptionHandler 10 | 11 | def include_paths_check 12 | options = { :include_paths => [] } 13 | auto_include_paths options[:include_paths], Dir.pwd 14 | assert options[:include_paths].include?("#{@basedir}/lib") 15 | assert options[:include_paths].include?("#{@basedir}/bin") 16 | end 17 | 18 | def test_auto_include_paths 19 | Dir.chdir(Dir.tmpdir) do 20 | begin 21 | FileUtils.mkdir_p ["project", "project/lib/project", "project/bin", "project/share"] 22 | open("project/Rakefile","w"){} 23 | @basedir = File.expand_path "project" 24 | Dir.chdir("project/lib/project/") { include_paths_check } 25 | Dir.chdir("project/lib/") { include_paths_check } 26 | Dir.chdir("project/bin/") { include_paths_check } 27 | Dir.chdir("project/") { include_paths_check } 28 | ensure 29 | FileUtils.rm_rf "project" 30 | end 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /Commands/Lookup in Documentation (Modern).tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/bin/bash 9 | echo "<meta content='0;URL=file://$("${TM_BUNDLE_SUPPORT}/bin/ri_lookup" "${TM_SELECTED_TEXT:-$TM_CURRENT_WORD}")' http-equiv='Refresh'>" 10 | 11 | hideFromUser 12 | 13 | input 14 | none 15 | inputFormat 16 | text 17 | name 18 | Documentation for Word / Selection 19 | outputCaret 20 | afterOutput 21 | outputFormat 22 | html 23 | outputLocation 24 | newWindow 25 | scope 26 | source.ruby 27 | semanticClass 28 | lookup.define.ruby 29 | uuid 30 | FE882491-07FA-4497-B675-97FCF2FC3BF5 31 | version 32 | 2 33 | 34 | 35 | -------------------------------------------------------------------------------- /README.mdown: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | You can install this bundle in TextMate by opening the preferences and going to the bundles tab. After installation it will be automatically updated for you. 4 | 5 | # General 6 | 7 | * [Bundle Styleguide](http://kb.textmate.org/bundle_styleguide) — _before you make changes_ 8 | * [Commit Styleguide](http://kb.textmate.org/commit_styleguide) — _before you send a pull request_ 9 | * [Writing Bug Reports](http://kb.textmate.org/writing_bug_reports) — _before you report an issue_ 10 | 11 | # License 12 | 13 | If not otherwise specified (see below), files in this repository fall under the following license: 14 | 15 | Permission to copy, use, modify, sell and distribute this 16 | software is granted. This software is provided "as is" without 17 | express or implied warranty, and with no claim as to its 18 | suitability for any purpose. 19 | 20 | An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/unit_test-output.rb: -------------------------------------------------------------------------------- 1 | 2 | class X 3 | Y = Struct.new(:a) 4 | def foo(b); b ? Y.new(2) : 2 end 5 | def bar; raise "No good" end 6 | def baz; nil end 7 | def fubar(x); x ** 2.0 + 1 end 8 | def babar; [1,2] end 9 | A = 1 10 | A = 1 # !> already initialized constant A 11 | def difftype() [1, "s"] end 12 | end 13 | 14 | 15 | require 'test/unit' 16 | class Test_X < Test::Unit::TestCase 17 | def setup 18 | @o = X.new 19 | end 20 | 21 | def test_foo 22 | assert_kind_of(X::Y, @o.foo(true)) 23 | assert_equal("#", @o.foo(true).inspect) 24 | assert_equal(2, @o.foo(true).a) 25 | assert_equal(2, @o.foo(false)) 26 | end 27 | 28 | def test_bar 29 | assert_raise(RuntimeError){@o.bar} 30 | end 31 | 32 | def test_baz 33 | assert_nil(@o.baz) 34 | end 35 | 36 | def test_babar 37 | assert_equal([1, 2], @o.babar) 38 | end 39 | 40 | def test_fubar 41 | assert_in_delta(101.0, @o.fubar(10), 0.0001) 42 | end 43 | 44 | def test_difftype 45 | for x in @o.difftype 46 | #xmpfilter: WARNING!! extra values ignored 47 | assert_equal(1, x) 48 | end 49 | end 50 | 51 | end 52 | 53 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/unit_test_poetry-output.rb: -------------------------------------------------------------------------------- 1 | 2 | class X 3 | Y = Struct.new(:a) 4 | def foo(b); b ? Y.new(2) : 2 end 5 | def bar; raise "No good" end 6 | def baz; nil end 7 | def fubar(x); x ** 2.0 + 1 end 8 | def babar; [1,2] end 9 | A = 1 10 | A = 1 # !> already initialized constant A 11 | def difftype() [1, "s"] end 12 | end 13 | 14 | 15 | require 'test/unit' 16 | class Test_X < Test::Unit::TestCase 17 | def setup 18 | @o = X.new 19 | end 20 | 21 | def test_foo 22 | assert_kind_of X::Y, @o.foo(true) 23 | assert_equal "#", @o.foo(true).inspect 24 | assert_equal 2, @o.foo(true).a 25 | assert_equal 2, @o.foo(false) 26 | end 27 | 28 | def test_bar 29 | assert_raise(RuntimeError){@o.bar} 30 | end 31 | 32 | def test_baz 33 | assert_nil @o.baz 34 | end 35 | 36 | def test_babar 37 | assert_equal [1, 2], @o.babar 38 | end 39 | 40 | def test_fubar 41 | assert_in_delta 101.0, @o.fubar(10), 0.0001 42 | end 43 | 44 | def test_difftype 45 | for x in @o.difftype 46 | #xmpfilter: WARNING!! extra values ignored 47 | assert_equal 1, x 48 | end 49 | end 50 | 51 | end 52 | 53 | -------------------------------------------------------------------------------- /Commands/Execute Line with Ruby.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env bash 9 | [[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh" 10 | 11 | export TM_RUBY=$(which "${TM_RUBY:-ruby}") 12 | 13 | "${TM_RUBY}" "$TM_BUNDLE_SUPPORT/bin/execute_line.rb" 14 | 15 | fallbackInput 16 | line 17 | input 18 | selection 19 | inputFormat 20 | text 21 | keyEquivalent 22 | ^E 23 | name 24 | Execute Line / Selection as Ruby 25 | outputCaret 26 | afterOutput 27 | outputFormat 28 | text 29 | outputLocation 30 | afterInput 31 | uuid 32 | EE5F1FB2-6C02-11D9-92BA-0011242E4184 33 | version 34 | 2 35 | 36 | 37 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/rspec-input.rb: -------------------------------------------------------------------------------- 1 | 2 | class X 3 | Y = Struct.new(:a) 4 | def foo(b); b ? Y.new(2) : 2 end 5 | def bar; raise "No good" end 6 | def baz; nil end 7 | def fubar(x); x ** 2.0 + 1 end 8 | def babar; [1,2] end 9 | A = 1 10 | A = 1 11 | end 12 | 13 | 14 | describe "xmpfilter's expectation expansion" do 15 | before do 16 | @o = X.new 17 | end 18 | 19 | it "should expand should == expectations" do 20 | @o.foo(true) # => 21 | @o.foo(true).a # => 22 | @o.foo(false) # => 23 | end 24 | 25 | it "should expand should raise_error expectations" do 26 | @o.bar # => 27 | end 28 | 29 | it "should expand should be_nil expectations" do 30 | @o.baz # => 31 | end 32 | 33 | it "should expand correct expectations for complex values" do 34 | @o.babar # => 35 | end 36 | 37 | it "should expand should be_close expectations" do 38 | @o.fubar(10) # => 39 | end 40 | end 41 | 42 | describe "xmpfilter's automagic binding detection" do 43 | it "should expand should == expectations" do 44 | a = b = c = 1 45 | d = a 46 | d # => 47 | end 48 | end 49 | -------------------------------------------------------------------------------- /Commands/Run.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | autoScrollOutput 6 | 7 | beforeRunningCommand 8 | saveModifiedFiles 9 | command 10 | #!/usr/bin/env ruby18 -KU 11 | ENV['RUBYLIB'] = "#{ENV['TM_BUNDLE_SUPPORT']}/RubyMate" 12 | require "#{ENV['TM_BUNDLE_SUPPORT']}/RubyMate/run_script.rb" 13 | 14 | input 15 | document 16 | inputFormat 17 | text 18 | keyEquivalent 19 | @r 20 | name 21 | Run 22 | outputCaret 23 | afterOutput 24 | outputFormat 25 | html 26 | outputLocation 27 | newWindow 28 | scope 29 | source.ruby 30 | semanticClass 31 | process.run.script.ruby 32 | uuid 33 | 35222962-C50D-4D58-A6AE-71E7AD980BE4 34 | version 35 | 2 36 | 37 | 38 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/rspec_poetry-input.rb: -------------------------------------------------------------------------------- 1 | 2 | class X 3 | Y = Struct.new(:a) 4 | def foo(b); b ? Y.new(2) : 2 end 5 | def bar; raise "No good" end 6 | def baz; nil end 7 | def fubar(x); x ** 2.0 + 1 end 8 | def babar; [1,2] end 9 | A = 1 10 | A = 1 11 | end 12 | 13 | 14 | describe "xmpfilter's expectation expansion" do 15 | before do 16 | @o = X.new 17 | end 18 | 19 | it "should expand should == expectations" do 20 | @o.foo(true) # => 21 | @o.foo(true).a # => 22 | @o.foo(false) # => 23 | end 24 | 25 | it "should expand should raise_error expectations" do 26 | @o.bar # => 27 | end 28 | 29 | it "should expand should be_nil expectations" do 30 | @o.baz # => 31 | end 32 | 33 | it "should expand correct expectations for complex values" do 34 | @o.babar # => 35 | end 36 | 37 | it "should expand should be_close expectations" do 38 | @o.fubar(10) # => 39 | end 40 | end 41 | 42 | describe "xmpfilter's automagic binding detection" do 43 | it "should expand should == expectations" do 44 | a = b = c = 1 45 | d = a 46 | d # => 47 | end 48 | end 49 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/unit_test_detect_rbtest-output.rb: -------------------------------------------------------------------------------- 1 | 2 | class X 3 | Y = Struct.new(:a) 4 | def foo(b); b ? Y.new(2) : 2 end 5 | def bar; raise "No good" end 6 | def baz; nil end 7 | def fubar(x); x ** 2.0 + 1 end 8 | def babar; [1,2] end 9 | A = 1 10 | A = 1 # !> already initialized constant A 11 | def difftype() [1, "s"] end 12 | end 13 | 14 | 15 | require 'test/unit' 16 | class Test_X < Test::Unit::TestCase 17 | def setup 18 | @o = X.new 19 | end 20 | 21 | def test_foo 22 | assert_kind_of(X::Y, @o.foo(true)) 23 | assert_equal("#", @o.foo(true).inspect) 24 | assert_equal(2, @o.foo(true).a) 25 | assert_equal(2, @o.foo(false)) 26 | end 27 | 28 | def test_bar 29 | assert_raise(RuntimeError){@o.bar} 30 | end 31 | 32 | def test_baz 33 | assert_nil(@o.baz) 34 | end 35 | 36 | def test_babar 37 | assert_equal([1, 2], @o.babar) 38 | end 39 | 40 | def test_fubar 41 | assert_in_delta(101.0, @o.fubar(10), 0.0001) 42 | end 43 | 44 | def test_difftype 45 | for x in @o.difftype 46 | #xmpfilter: WARNING!! extra values ignored 47 | assert_equal(1, x) 48 | end 49 | end 50 | 51 | end 52 | 53 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/xmpfilter/bindings.taf: -------------------------------------------------------------------------------- 1 | ========== 2 | bindings 3 | ========== 4 | xmpfilter --poetry -u 5 | ========== 6 | 7 | require 'test/unit' 8 | 9 | class TestFoo < Test::Unit::TestCase 10 | def setup 11 | @o = [] 12 | end 13 | 14 | def test_foo 15 | a = 1 16 | b = a 17 | b # => 18 | end 19 | 20 | def test_arr 21 | last = 1 22 | @o << last 23 | @o.last # => 24 | end 25 | 26 | def test_bar 27 | a = b = c = 1 28 | d = a 29 | d # => 30 | end 31 | end 32 | ========== 33 | 34 | require 'test/unit' 35 | 36 | class TestFoo < Test::Unit::TestCase 37 | def setup 38 | @o = [] 39 | end 40 | 41 | def test_foo 42 | a = 1 43 | b = a 44 | assert_equal a, b 45 | assert_equal 1, b 46 | end 47 | 48 | def test_arr 49 | last = 1 50 | @o << last 51 | assert_equal last, @o.last 52 | assert_equal 1, @o.last 53 | end 54 | 55 | def test_bar 56 | a = b = c = 1 57 | d = a 58 | assert_equal a, d 59 | assert_equal b, d 60 | assert_equal c, d 61 | assert_equal 1, d 62 | end 63 | end 64 | -------------------------------------------------------------------------------- /DragCommands/Require Ruby File.tmDragCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby18 -wKU 9 | 10 | require 'pathname' 11 | 12 | require "#{ENV['TM_SUPPORT_PATH']}/lib/escape.rb" 13 | 14 | from_path = Pathname.new(ENV['TM_FILEPATH'] || '.').dirname.realpath 15 | to_path = Pathname.new(ENV['TM_DROPPED_FILE']).realpath 16 | begin 17 | path = to_path.relative_path_from(from_path) 18 | rescue ArgumentError 19 | path = to_path 20 | end 21 | lib = path.to_s.sub(/\.rb\z/i, '') 22 | puts %Q{require "#{e_sn(lib).gsub('"', '\"')}"} 23 | 24 | draggedFileExtensions 25 | 26 | rb 27 | 28 | input 29 | selection 30 | name 31 | Require Ruby File 32 | output 33 | insertAsSnippet 34 | scope 35 | source.ruby 36 | uuid 37 | C122CD92-DDBE-4869-9C7A-CC2B254C9411 38 | 39 | 40 | -------------------------------------------------------------------------------- /Commands/Show RDoc for this file.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | saveActiveFile 7 | command 8 | if (( ${#TM_PROJECT_DIRECTORY} != 0 )); then 9 | cd "$TM_PROJECT_DIRECTORY" 10 | output="`basename "$TM_PROJECT_DIRECTORY"`" 11 | input="." 12 | else 13 | cd "$TM_DIRECTORY" 14 | output="$TM_FILENAME" 15 | input="$TM_FILENAME" 16 | fi 17 | 18 | output_dir="/tmp/rdoc_${output}" 19 | 20 | rm -rf "${output_dir}" 21 | 22 | rdoc -S -N -q -f html --op "${output_dir}" "$input" &>/dev/null 23 | 24 | echo "<html><head><meta http-equiv=\"refresh\" content=\"0;URL=file://${output_dir}/index.html\"></head></html>" 25 | 26 | input 27 | none 28 | name 29 | Show for Current File / Project 30 | output 31 | showAsHTML 32 | scope 33 | source.ruby 34 | uuid 35 | 1AD6A138-2E89-4D6A-AB3F-416BF9CE968D 36 | 37 | 38 | -------------------------------------------------------------------------------- /Commands/Check Ruby Syntax.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby18 9 | require "shellwords" 10 | require ENV['TM_SUPPORT_PATH'] + '/lib/textmate' 11 | 12 | puts `"${TM_RUBY:=ruby}" -e'puts "Using ruby-" + RUBY_VERSION.to_s'` 13 | puts result = `"${TM_RUBY:=ruby}" -wc 2>&1` 14 | 15 | if result =~ /-:(\d+):(.*)/ 16 | TextMate.go_to :line => $1 17 | `"$TM_MATE" -c warning` 18 | result.each_line do |line| 19 | if line =~ /-:(\d+):(.*)/ 20 | `"$TM_MATE" --set-mark warning:#{Shellwords.escape($2)} --line #{$1}` 21 | end 22 | end 23 | else 24 | `"$TM_MATE" -c warning` 25 | end 26 | 27 | input 28 | document 29 | keyEquivalent 30 | ^V 31 | name 32 | Validate Syntax 33 | output 34 | showAsTooltip 35 | scope 36 | source.ruby 37 | uuid 38 | EE5F19BA-6C02-11D9-92BA-0011242E4184 39 | 40 | 41 | -------------------------------------------------------------------------------- /Syntaxes/Gemfile.tmLanguage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | fileTypes 6 | 7 | Gemfile 8 | 9 | hideFromUser 10 | 11 | name 12 | Gemfile 13 | patterns 14 | 15 | 16 | include 17 | source.ruby 18 | 19 | 20 | begin 21 | \b(?<!\.|::)(gem|git|group|platforms|ruby|source)\b(?![?!]) 22 | captures 23 | 24 | 1 25 | 26 | name 27 | keyword.other.special-method.ruby.gemfile 28 | 29 | 30 | end 31 | $|(?=#|}) 32 | name 33 | meta.declaration.ruby.gemfile 34 | patterns 35 | 36 | 37 | include 38 | $self 39 | 40 | 41 | 42 | 43 | scopeName 44 | source.ruby.gemfile 45 | uuid 46 | 410F8BB5-7543-4081-A38D-3B69CA92ACE9 47 | 48 | 49 | -------------------------------------------------------------------------------- /Commands/Lookup in Documentation.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env bash 9 | [[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh" 10 | 11 | "${TM_BUNDLE_SUPPORT}/bin/linked_ri.rb" 12 | fallbackInput 13 | word 14 | hideFromUser 15 | 16 | input 17 | selection 18 | inputFormat 19 | text 20 | name 21 | Documentation for Word / Selection 22 | outputCaret 23 | afterOutput 24 | outputFormat 25 | text 26 | outputLocation 27 | toolTip 28 | scope 29 | source.ruby & attr.os-version.10.6, source.ruby & attr.os-version.10.7, source.ruby & attr.os-version.10.8 30 | semanticClass 31 | lookup.define.ruby 32 | uuid 33 | 63F3B3B7-CBE2-426B-B551-657733F3868B 34 | version 35 | 2 36 | 37 | 38 | -------------------------------------------------------------------------------- /Support/RakeMate/run_rake_task.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby18 -w 2 | 3 | require "#{ENV["TM_SUPPORT_PATH"]}/lib/escape" 4 | 5 | class RakeTaskRunner 6 | def initialize 7 | @mode = :line_by_line 8 | end 9 | 10 | def run(task = nil, *options, &block) 11 | build_rake_command(task, *options) 12 | 13 | open(@command) do |rake_task| 14 | if block.nil? 15 | rake_task.read 16 | else 17 | loop do 18 | break if rake_task.eof? 19 | new_content = @mode == :char_by_char ? rake_task.getc.chr : 20 | rake_task.gets 21 | @mode = block.arity == 2 ? block[new_content, @mode] : 22 | block[new_content] 23 | end 24 | end 25 | end 26 | end 27 | 28 | private 29 | 30 | def build_rake_command(task, *options) 31 | @command = "|" 32 | @command << ENV["TM_RAKE"] || "rake" 33 | @command << " " << e_sh(task) unless task.nil? 34 | unless options.empty? 35 | @command << " " << options.map { |arg| e_sh(arg) }.join(" ") 36 | end 37 | @command << " 2>&1" 38 | end 39 | end 40 | 41 | def run_rake_task(*args, &block) 42 | RakeTaskRunner.new.run(*args, &block) 43 | end 44 | 45 | def fetch_rake_tasks(*args, &block) 46 | RakeTaskRunner.new.run("--tasks", *args, &block) 47 | end 48 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/rspec_poetry-output.rb: -------------------------------------------------------------------------------- 1 | 2 | class X 3 | Y = Struct.new(:a) 4 | def foo(b); b ? Y.new(2) : 2 end 5 | def bar; raise "No good" end 6 | def baz; nil end 7 | def fubar(x); x ** 2.0 + 1 end 8 | def babar; [1,2] end 9 | A = 1 10 | A = 1 # !> already initialized constant A 11 | end 12 | 13 | 14 | describe "xmpfilter's expectation expansion" do 15 | before do 16 | @o = X.new 17 | end 18 | 19 | it "should expand should == expectations" do 20 | @o.foo(true).should be_a_kind_of(X::Y) 21 | @o.foo(true).inspect.should == "#" 22 | @o.foo(true).a.should == 2 23 | @o.foo(false).should == 2 24 | end 25 | 26 | it "should expand should raise_error expectations" do 27 | lambda{@o.bar}.should raise_error(RuntimeError) 28 | end 29 | 30 | it "should expand should be_nil expectations" do 31 | @o.baz.should be_nil 32 | end 33 | 34 | it "should expand correct expectations for complex values" do 35 | @o.babar.should == [1, 2] 36 | end 37 | 38 | it "should expand should be_close expectations" do 39 | @o.fubar(10).should be_close(101.0, 0.0001) 40 | end 41 | end 42 | 43 | describe "xmpfilter's automagic binding detection" do 44 | it "should expand should == expectations" do 45 | a = b = c = 1 46 | d = a 47 | d.should == a 48 | d.should == b 49 | d.should == c 50 | d.should == 1 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /Commands/Run focused unit test.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | captureFormatString 8 | $0 9 | capturePattern 10 | (/[^:]+):(\d+) 11 | command 12 | #!/bin/sh 13 | 14 | export RUBYLIB="$TM_BUNDLE_SUPPORT/RubyMate${RUBYLIB:+:$RUBYLIB}" 15 | 16 | ruby18 -KU -- "$TM_BUNDLE_SUPPORT/RubyMate/run_script.rb" --name= 17 | 18 | fileCaptureRegister 19 | 1 20 | input 21 | document 22 | inputFormat 23 | text 24 | keyEquivalent 25 | @R 26 | lineCaptureRegister 27 | 2 28 | name 29 | Run Focused Unit Test 30 | outputCaret 31 | afterOutput 32 | outputFormat 33 | html 34 | outputLocation 35 | newWindow 36 | scope 37 | source.ruby 38 | semanticClass 39 | process.test.ruby 40 | uuid 41 | 5289EE40-86B8-11D9-A8D4-000A95E13C98 42 | version 43 | 2 44 | 45 | 46 | -------------------------------------------------------------------------------- /Tests/modulo_ambiguity1.rb: -------------------------------------------------------------------------------- 1 | # purpose: 2 | # exercise constructs with modulo 3 | # 4 | # modulo in math data%2 5 | # literals %(a b), %W[1 2] 6 | # 7 | # 8 | # 9 | 10 | def test(v) 11 | p v 12 | end 13 | 14 | x, y = 42, 33 15 | 16 | 17 | # ------------------------------------------- 18 | # 19 | # Testarea for modulo 20 | # 21 | # ------------------------------------------- 22 | 23 | # value % value 24 | test( 3%2 ) 25 | test( 3 % 2 ) 26 | test( 1234%(666) ) 27 | test( (1234)%666 ) 28 | 29 | # var % value 30 | test( x%2 ) 31 | test( x%666 ) 32 | test( x%(42) ) 33 | test( x%-42-3 ) 34 | test( x%+42+3 ) 35 | 36 | # value % var 37 | test( 666%x ) 38 | test( (42+4+2)%x ) 39 | 40 | # var % var 41 | test( x % y ) 42 | test( x%y ) 43 | 44 | # ------------------------------------------- 45 | # 46 | # Testarea for literals 47 | # 48 | # ------------------------------------------- 49 | 50 | # literal with nothing 51 | test( %(a b c) ) 52 | test( %(1 2 (3 4)) ) 53 | test( %{TM rocks} ) 54 | 55 | # literal with 'w' 56 | test( %W(1 2 3) ) 57 | test( %W[1 2 3] ) 58 | test( %W{1 2 3} ) 59 | test( %W<1 2 3> ) 60 | 61 | # literal with 'w' (multiline) 62 | test(%w(a 63 | b)) 64 | 65 | # literal with 'q' 66 | test( %q(1 2 3) ) 67 | test( %Q(1 2 3) ) 68 | 69 | # literal with custom 70 | test( %q"1 2 3" ) 71 | test( %q'1 2 3' ) 72 | test( %q#1 2 3# ) 73 | test( %?X.tainted? ) 74 | test( %q/1 2 3/ ) 75 | test( %q|1 2 3| ) 76 | test( %q\1 2 3\ ) 77 | -------------------------------------------------------------------------------- /Commands/Toggle String:Symbol.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | bundleUUID 8 | 467B298F-6227-11D9-BFB1-000D93589AF6 9 | command 10 | #!/usr/bin/env ruby18 11 | 12 | require ENV['TM_SUPPORT_PATH'] + '/lib/exit_codes' 13 | 14 | def toggle_string_symbol(str) 15 | case str 16 | # "string" => :symbol 17 | when /("|')(\w+)\1/ 18 | str.gsub!(/("|')(\w+)\1/, ':\2') 19 | # :symbol => "string" 20 | when /:(\w+)/ 21 | str.gsub!(/:(\w+)/, '"\1"') 22 | # initial case (no changes) 23 | else 24 | str 25 | end 26 | end 27 | 28 | while str = $stdin.gets 29 | print toggle_string_symbol(str) 30 | end 31 | 32 | fallbackInput 33 | scope 34 | input 35 | selection 36 | keyEquivalent 37 | ^: 38 | name 39 | Toggle String / Symbol 40 | output 41 | replaceSelectedText 42 | scope 43 | source.ruby string.quoted, source.ruby constant.other.symbol, source.ruby constant.other.symbol.hashkey.ruby 44 | uuid 45 | B297E4B8-A8FF-49CE-B9C4-6D4911724D43 46 | 47 | 48 | -------------------------------------------------------------------------------- /Support/vendor/rcodetools/test/data/attic/rspec-output.rb: -------------------------------------------------------------------------------- 1 | 2 | class X 3 | Y = Struct.new(:a) 4 | def foo(b); b ? Y.new(2) : 2 end 5 | def bar; raise "No good" end 6 | def baz; nil end 7 | def fubar(x); x ** 2.0 + 1 end 8 | def babar; [1,2] end 9 | A = 1 10 | A = 1 # !> already initialized constant A 11 | end 12 | 13 | 14 | describe "xmpfilter's expectation expansion" do 15 | before do 16 | @o = X.new 17 | end 18 | 19 | it "should expand should == expectations" do 20 | (@o.foo(true)).should be_a_kind_of(X::Y) 21 | (@o.foo(true).inspect).should == ("#") 22 | (@o.foo(true).a).should == (2) 23 | (@o.foo(false)).should == (2) 24 | end 25 | 26 | it "should expand should raise_error expectations" do 27 | lambda{@o.bar}.should raise_error(RuntimeError) 28 | end 29 | 30 | it "should expand should be_nil expectations" do 31 | (@o.baz).should be_nil 32 | end 33 | 34 | it "should expand correct expectations for complex values" do 35 | (@o.babar).should == ([1, 2]) 36 | end 37 | 38 | it "should expand should be_close expectations" do 39 | (@o.fubar(10)).should be_close(101.0, 0.0001) 40 | end 41 | end 42 | 43 | describe "xmpfilter's automagic binding detection" do 44 | it "should expand should == expectations" do 45 | a = b = c = 1 46 | d = a 47 | (d).should == (a) 48 | (d).should == (b) 49 | (d).should == (c) 50 | (d).should == (1) 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /Support/help/help.markdown: -------------------------------------------------------------------------------- 1 | # Reformat Document 2 | 3 | The command “Reformat Document” – accessible via ^ + + H – formats the current document using the `--auto-correct` option of [RuboCop][]. It also shows information about the formatting status in a floating tooltip. The command displays the information about the formatting status either as black text only, or as colorful text if [aha][] is accessible via `PATH`. 4 | 5 | [aha]: https://github.com/theZiz/aha 6 | [RuboCop]: https://github.com/bbatsov/rubocop 7 | 8 | ## Additional Options 9 | 10 | You can specify additional RuboCop options by setting the environment variable `TM_RUBOCOP_OPTIONS`. For example, if RuboCop should only autocorrect layout specific issues set the variable to the value `--only Layout`. 11 | 12 | ## RuboCop Version 13 | 14 | Which version of [RuboCop][] “Reformat Document” uses depends on your environment. The command will try the options below in the given order. 15 | 16 | 1. The value of the command specified via `TM_RUBOCOP`. 17 | 2. An executable version of RuboCop accessible via `bin/rubocop`. 18 | 3. The version of `rubocop` installed via [Bundler][]. 19 | 4. Any other version of `rubocop` accessible via, 20 | - `/usr/local/bin/rubocop`, 21 | - `$HOME/.rbenv/shims/rubocop` 22 | - or the locations in your `PATH`. 23 | 24 | “Reformat Document” prefers [RVM][] install locations of `rubocop` for all of the applicable options above. 25 | 26 | [Bundler]: https://bundler.io 27 | [RVM]: https://rvm.io --------------------------------------------------------------------------------