rubybuntu-gedit 11.08.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. data/README.rdoc +20 -0
  2. data/Rakefile +28 -0
  3. data/bin/rubybuntu-gedit +88 -0
  4. data/data/language-specs/README.rdoc +73 -0
  5. data/data/language-specs/erb.lang +53 -0
  6. data/data/language-specs/html-erb.lang +48 -0
  7. data/data/language-specs/javascript-erb.lang +23 -0
  8. data/data/language-specs/ruby-bundler-gemfile-lock.lang +101 -0
  9. data/data/language-specs/ruby-erb.lang +22 -0
  10. data/data/language-specs/ruby.lang +1068 -0
  11. data/data/language-specs/ruby.lang-extras/important-constants.rb +7 -0
  12. data/data/language-specs/ruby.lang-extras/important-methods.rb +3 -0
  13. data/data/language-specs/ruby.lang-extras/known-bugs.rb +11 -0
  14. data/data/language-specs/xml-erb.lang +22 -0
  15. data/data/language-specs/yml-erb.lang +21 -0
  16. data/data/mime/README.rdoc +17 -0
  17. data/data/mime/cucumber.xml +9 -0
  18. data/data/mime/haml.xml +8 -0
  19. data/data/mime/ruby-builder.xml +9 -0
  20. data/data/mime/ruby-bundler.xml +13 -0
  21. data/data/mime/ruby-capistrano.xml +9 -0
  22. data/data/mime/ruby-erb.xml +62 -0
  23. data/data/mime/ruby-rack.xml +8 -0
  24. data/data/mime/ruby-rake.xml +10 -0
  25. data/data/mime/ruby-thor.xml +10 -0
  26. data/data/mime/ruby.xml +13 -0
  27. data/data/mime/sass.xml +14 -0
  28. data/data/mime/slim.xml +8 -0
  29. data/data/snippets/MIT-LICENSE +20 -0
  30. data/data/snippets/README.textile +108 -0
  31. data/data/snippets/TODO +6 -0
  32. data/data/snippets/cheatsheet.html +1602 -0
  33. data/data/snippets/doc/Gemfile +6 -0
  34. data/data/snippets/doc/Gemfile.lock +16 -0
  35. data/data/snippets/doc/create_documentation.rb +56 -0
  36. data/data/snippets/doc/documentation_stylesheet.sass +100 -0
  37. data/data/snippets/doc/documentation_stylesheet_print.sass +93 -0
  38. data/data/snippets/doc/documentation_template.haml +36 -0
  39. data/data/snippets/doc/gedit-snippets-logo.png +0 -0
  40. data/data/snippets/doc/gedit-snippets-logo.svg +626 -0
  41. data/data/snippets/doc/method_parser.rb +24 -0
  42. data/data/snippets/erb.xml +84 -0
  43. data/data/snippets/html-erb.xml +84 -0
  44. data/data/snippets/javascript-erb.xml +84 -0
  45. data/data/snippets/rails_activerecord_associations.xml +34 -0
  46. data/data/snippets/rails_activerecord_basic.xml +11 -0
  47. data/data/snippets/rails_activerecord_validations.xml +210 -0
  48. data/data/snippets/rails_controllers_basic.xml +19 -0
  49. data/data/snippets/rhtml_basic.xml +70 -0
  50. data/data/snippets/rhtml_forms.xml +75 -0
  51. data/data/snippets/rhtml_html.xml +98 -0
  52. data/data/snippets/ruby-erb.xml +84 -0
  53. data/data/snippets/ruby_basic.xml +142 -0
  54. data/data/snippets/ruby_collections.xml +163 -0
  55. data/data/snippets/shoulda_actioncontroller.xml +73 -0
  56. data/data/snippets/shoulda_activerecord.xml +127 -0
  57. data/data/snippets/shoulda_basic.xml +22 -0
  58. data/data/snippets/snippet_tools.xml +32 -0
  59. data/data/snippets/xml-erb.xml +84 -0
  60. data/data/snippets/yml-erb.xml +84 -0
  61. data/data/styles/README.rdoc +17 -0
  62. data/data/styles/rubybuntu1.xml +119 -0
  63. data/rubybuntu-gedit.gemspec +26 -0
  64. metadata +125 -0
@@ -0,0 +1,19 @@
1
+ <?xml version='1.0' encoding='utf-8'?>
2
+ <!--
3
+ Controller snippets for rails
4
+ -->
5
+ <snippets language="ruby">
6
+ <!--
7
+ Before filters
8
+ -->
9
+ <snippet>
10
+ <text><![CDATA[before_filter :${1:method_name}$0]]></text>
11
+ <tag>bf</tag>
12
+ <description>before_filter ...</description>
13
+ </snippet>
14
+ <snippet>
15
+ <text><![CDATA[:only => [:${1:create, }]]></text>
16
+ <tag>only</tag>
17
+ <description>:only => [...] ... before_filter condition</description>
18
+ </snippet>
19
+ </snippets>
@@ -0,0 +1,70 @@
1
+ <?xml version='1.0' encoding='utf-8'?>
2
+ <!--
3
+ Basic Rails View helper snippets
4
+ -->
5
+ <snippets language="html-erb">
6
+ <!--
7
+ Additional helpers
8
+ -->
9
+ <snippet>
10
+ <text><![CDATA[:confirm => '${1:Are you sure?}'$0]]></text>
11
+ <tag>confirm</tag>
12
+ <description>:confirm ... JavaScript confirm message</description>
13
+ </snippet>
14
+ <snippet>
15
+ <text><![CDATA[:controller => :${1:posts}, :action => :${2:show}, :id => ${3:post}]]></text>
16
+ <tag>cai</tag>
17
+ <description>:controller, :action, :id for urls</description>
18
+ </snippet>
19
+
20
+ <!--
21
+ Image tags
22
+ -->
23
+ <snippet>
24
+ <text><![CDATA[<%= image_tag '$1' %>$0]]></text>
25
+ <tag>img</tag>
26
+ <description>image_tag</description>
27
+ </snippet>
28
+ <snippet>
29
+ <text><![CDATA[<%= image_tag '$2', :title => "$1" %>$0]]></text>
30
+ <tag>imgt</tag>
31
+ <description>image_tag with title</description>
32
+ </snippet>
33
+
34
+ <!--
35
+ Javascript and stylesheet include helpers
36
+ -->
37
+ <snippet>
38
+ <text><![CDATA[<%= javascript_include_tag ${1:defaults} %>$0]]></text>
39
+ <tag>jit</tag>
40
+ <description>javascript include tag</description>
41
+ </snippet>
42
+ <snippet>
43
+ <text><![CDATA[<%= stylesheet_link_tag '${1:style}' %>$0]]></text>
44
+ <tag>slt</tag>
45
+ <description>stylesheet link tag</description>
46
+ </snippet>
47
+
48
+ <!--
49
+ Link tags
50
+ -->
51
+ <snippet>
52
+ <text><![CDATA[<%= link_to '$1', $0 %>]]></text>
53
+ <tag>lt</tag>
54
+ <description>link to</description>
55
+ </snippet>
56
+ <snippet>
57
+ <text><![CDATA[<%= link_to_remote '$1', :url => { $2 }$3 %>$0]]></text>
58
+ <tag>ltr</tag>
59
+ <description>link to remote</description>
60
+ </snippet>
61
+
62
+ <!--
63
+ Render instructions
64
+ -->
65
+ <snippet>
66
+ <text><![CDATA[<%= render :partial => '${1:item}'$0 %>]]></text>
67
+ <tag>partial</tag>
68
+ <description>render :partial ...</description>
69
+ </snippet>
70
+ </snippets>
@@ -0,0 +1,75 @@
1
+ <?xml version='1.0' encoding='utf-8'?>
2
+ <!--
3
+ RHTML form helper snippets
4
+ -->
5
+ <snippets language="html-erb">
6
+ <!-- Form tag blocks -->
7
+ <snippet>
8
+ <text><![CDATA[<% form_tag $1do %>
9
+ $0
10
+ <% end %>]]></text>
11
+ <tag>ft</tag>
12
+ <description>form tag</description>
13
+ </snippet>
14
+ <snippet>
15
+ <text><![CDATA[<% form_tag $2, :method => ${1:post} do %>
16
+ $0
17
+ <% end %>]]></text>
18
+ <tag>ftm</tag>
19
+ <description>form tag with method</description>
20
+ </snippet>
21
+ <snippet>
22
+ <text><![CDATA[<label>$0</label>]]></text>
23
+ <tag>ll</tag>
24
+ <description>html label</description>
25
+ </snippet>
26
+ <snippet>
27
+ <text><![CDATA[<label for="$1">$0</label>]]></text>
28
+ <tag>lf</tag>
29
+ <description>html label for</description>
30
+ </snippet>
31
+
32
+ <!-- ActiveRecord error display helpers -->
33
+ <snippet>
34
+ <text><![CDATA[<%= error_messages_for( :$1 ) %>$0]]></text>
35
+ <tag>emf</tag>
36
+ <description>error messages for</description>
37
+ </snippet>
38
+
39
+ <!-- Form field helpers -->
40
+ <snippet>
41
+ <text><![CDATA[<%= password_field :${1:model}, :${2:attribute} %>$0]]></text>
42
+ <tag>pf</tag>
43
+ <description>password field</description>
44
+ </snippet>
45
+
46
+ <snippet>
47
+ <text><![CDATA[<%= submit_tag '${1:save}' %>$0]]></text>
48
+ <tag>st</tag>
49
+ <description>submit tag</description>
50
+ </snippet>
51
+
52
+ <snippet>
53
+ <text><![CDATA[<%= text_field :${1:model}, :${2:attribute} %>$0]]></text>
54
+ <tag>tf</tag>
55
+ <description>text field</description>
56
+ </snippet>
57
+
58
+ <snippet>
59
+ <text><![CDATA[<%= hidden_field :${1:model}, :${2:attribute} %>$0]]></text>
60
+ <tag>hf</tag>
61
+ <description>hidden field</description>
62
+ </snippet>
63
+
64
+ <snippet>
65
+ <text><![CDATA[<%= check_box :${1:model}, :${2:attribute} %>$0]]></text>
66
+ <tag>cb</tag>
67
+ <description>checkbox</description>
68
+ </snippet>
69
+
70
+ <snippet>
71
+ <text><![CDATA[<%= select :${1:model}, :${2:attribute}, ${3:values}, {:include_blank => true} %>$0]]></text>
72
+ <tag>select</tag>
73
+ <description>select field</description>
74
+ </snippet>
75
+ </snippets>
@@ -0,0 +1,98 @@
1
+ <?xml version='1.0' encoding='utf-8'?>
2
+ <!--
3
+ RHTML Html tag snippets
4
+ -->
5
+ <snippets language="html-erb">
6
+ <!-- Generic tag helper -->
7
+ <snippet>
8
+ <text><![CDATA[<${1:div}>
9
+ $0
10
+ </${1}]]></text>
11
+ <tag>&lt;</tag>
12
+ <description>HTML: tag</description>
13
+ </snippet>
14
+
15
+ <!--
16
+ Basic html tags
17
+ -->
18
+ <snippet>
19
+ <text><![CDATA[<div class="$1">
20
+ $0
21
+ </div>]]></text>
22
+ <tag>divc</tag>
23
+ <description>HTML: div with class</description>
24
+ </snippet>
25
+ <snippet>
26
+ <text><![CDATA[<div id="$1">
27
+ $0
28
+ </div>]]></text>
29
+ <tag>divi</tag>
30
+ <description>HTML: div with id</description>
31
+ </snippet>
32
+ <snippet>
33
+ <text><![CDATA[<br/>
34
+ $0]]></text>
35
+ <tag>br</tag>
36
+ <description>HTML: line break</description>
37
+ <accelerator><![CDATA[<Control>m]]></accelerator>
38
+ </snippet>
39
+
40
+ <!--
41
+ Tables
42
+ -->
43
+ <snippet>
44
+ <text><![CDATA[<table class="$1">
45
+ <tr>
46
+ <th>$0</th>
47
+ </tr>
48
+ </table>]]></text>
49
+ <tag>table</tag>
50
+ <description>HTML: table</description>
51
+ </snippet>
52
+ <snippet>
53
+
54
+ <text><![CDATA[<td>$0</td>]]></text>
55
+ <tag>td</tag>
56
+ <description>HTML: table cell</description>
57
+ </snippet>
58
+ <snippet>
59
+
60
+ <text><![CDATA[<tr>
61
+ $0
62
+ </tr>]]></text>
63
+ <tag>tr</tag>
64
+ <description>HTML: table row</description>
65
+ </snippet>
66
+
67
+ <snippet>
68
+ <text><![CDATA[<tr class="<%= cycle( 'odd', 'even' ) %>">
69
+ $0
70
+ </tr>]]></text>
71
+ <tag>troe</tag>
72
+ <description>HTML: table row class odd-even</description>
73
+ </snippet>
74
+
75
+
76
+ <!--
77
+ Lists
78
+ -->
79
+ <snippet>
80
+ <text><![CDATA[<ul class="${1:list}">
81
+ $0
82
+ </ul>]]></text>
83
+ <tag>ulc</tag>
84
+ <description>HTML: unordered list with class</description>
85
+ </snippet>
86
+ <snippet>
87
+ <text><![CDATA[<ul>
88
+ $0
89
+ </ul>]]></text>
90
+ <tag>ul</tag>
91
+ <description>HTML: unordered list</description>
92
+ </snippet>
93
+ <snippet>
94
+ <text><![CDATA[<li>$1</li>$0]]></text>
95
+ <tag>li</tag>
96
+ <description>HTML: list item</description>
97
+ </snippet>
98
+ </snippets>
@@ -0,0 +1,84 @@
1
+ <?xml version='1.0' encoding='utf-8'?>
2
+ <!--
3
+ RHTML Ruby code snippets
4
+ -->
5
+ <snippets language="ruby-erb">
6
+ <!--
7
+ ERb Tags
8
+ -->
9
+ <snippet>
10
+ <text><![CDATA[<%= $0 %>]]></text>
11
+ <tag>=</tag>
12
+ <description>&lt;%= block result %&gt;</description>
13
+ </snippet>
14
+ <snippet>
15
+ <text><![CDATA[<% $0 -%>]]></text>
16
+ <tag>%</tag>
17
+ <description>&lt;% ruby code block %&gt;</description>
18
+ </snippet>
19
+
20
+ <!--
21
+ Blocks
22
+ -->
23
+ <snippet>
24
+ <text><![CDATA[do
25
+ $0
26
+ end]]></text>
27
+ <tag>do</tag>
28
+ <description>do .. end</description>
29
+ </snippet>
30
+ <snippet>
31
+ <text><![CDATA[do |${1:object}|
32
+ $0
33
+ end]]></text>
34
+ <tag>doo</tag>
35
+ <description>do |object| .. end</description>
36
+ </snippet>
37
+
38
+ <!--
39
+ Collection iterators
40
+ -->
41
+ <snippet>
42
+ <text><![CDATA[<% ${1:@list}.each do |${2:item}| do %>
43
+ $0
44
+ <% end %>]]></text>
45
+ <tag>eacho</tag>
46
+ <description>each do item</description>
47
+ </snippet>
48
+ <snippet>
49
+ <text><![CDATA[<%= for ${1:element} in ${2:collection}
50
+ ${1:element}.$0
51
+ end %>]]></text>
52
+ <tag>forin</tag>
53
+ <description>for .. in .. end</description>
54
+ </snippet>
55
+
56
+ <!--
57
+ Conditions
58
+ -->
59
+ <snippet>
60
+ <text><![CDATA[<% if ${1:logged_in?} %>
61
+ $0
62
+ <% end %>]]></text>
63
+ <tag>if</tag>
64
+ <description>if statement</description>
65
+ </snippet>
66
+ <snippet>
67
+ <text><![CDATA[<% if ${1:logged_in?} %>
68
+ $0
69
+ <% else %>
70
+
71
+ <% end %>]]></text>
72
+ <tag>ife</tag>
73
+ <description>if ... else ... end</description>
74
+ </snippet>
75
+
76
+ <!--
77
+ Uncategorized
78
+ -->
79
+ <snippet>
80
+ <text><![CDATA[<% end %>]]></text>
81
+ <tag>end</tag>
82
+ <description>end tag</description>
83
+ </snippet>
84
+ </snippets>
@@ -0,0 +1,142 @@
1
+ <?xml version='1.0' encoding='utf-8'?>
2
+ <!--
3
+ Ruby basic syntax snippets
4
+
5
+ NOTE: Will collide with built-in ruby snippets in gedit, please remove the file
6
+ /usr/share/gedit-2/plugins/snippets/ruby.xml!
7
+ -->
8
+ <snippets language="ruby">
9
+ <!--
10
+ Uncategorized
11
+ -->
12
+ <snippet>
13
+ <text><![CDATA[begin
14
+ $1
15
+ rescue ${2:Exception} => ${3:e}
16
+ $0
17
+ end]]></text>
18
+ <tag>begin</tag>
19
+ <description>begin .. rescue .. end</description>
20
+ </snippet>
21
+
22
+ <!--
23
+ Method and class definitions
24
+ -->
25
+ <snippet>
26
+ <text><![CDATA[class ${1:class_name}
27
+ $0
28
+ end]]></text>
29
+ <tag>class</tag>
30
+ <description>class .. end</description>
31
+ </snippet>
32
+
33
+ <snippet>
34
+ <text><![CDATA[def ${1:method_name}
35
+ $0
36
+ end]]></text>
37
+ <tag>def</tag>
38
+ <description>def .. end</description>
39
+ </snippet>
40
+
41
+ <snippet>
42
+ <text><![CDATA[#
43
+ # ${2:comment}
44
+ #
45
+ def ${1:method_name}
46
+ $0
47
+ end]]></text>
48
+ <tag>defc</tag>
49
+ <description>def .. end with comment</description>
50
+ </snippet>
51
+
52
+ <snippet>
53
+ <text><![CDATA[def self.${1:method_name}
54
+ $0
55
+ end]]></text>
56
+ <tag>defs</tag>
57
+ <description>def self.method_name .. end</description>
58
+ </snippet>
59
+
60
+ <snippet>
61
+ <text><![CDATA[def ${1:method_name}
62
+ $0
63
+ rescue ${2:ErrorClass }=> err
64
+
65
+ end]]></text>
66
+ <tag>defr</tag>
67
+ <description>def .. rescue .. end</description>
68
+ </snippet>
69
+
70
+ <!--
71
+ Blocks
72
+ -->
73
+ <snippet>
74
+ <text><![CDATA[do
75
+ $0
76
+ end]]></text>
77
+ <tag>do</tag>
78
+ <description>do .. end</description>
79
+ </snippet>
80
+ <snippet>
81
+ <text><![CDATA[do |${1:object}|
82
+ $0
83
+ end]]></text>
84
+ <tag>doo</tag>
85
+ <description>do |object| .. end</description>
86
+ </snippet>
87
+
88
+ <!--
89
+ Basic conditions
90
+ -->
91
+ <snippet>
92
+ <text><![CDATA[if ${1:condition}
93
+ $2
94
+ else
95
+ $3
96
+ end]]></text>
97
+ <tag>ife</tag>
98
+ <description>if .. else .. end</description>
99
+ </snippet>
100
+ <snippet>
101
+ <text><![CDATA[if ${1:condition}
102
+ $0
103
+ end]]></text>
104
+ <tag>if</tag>
105
+ <description>if .. end</description>
106
+ </snippet>
107
+ <snippet>
108
+ <text><![CDATA[elsif ${1:condition}
109
+ $0]]></text>
110
+ <tag>elsif</tag>
111
+ <description>elsif ..</description>
112
+ </snippet>
113
+ <snippet>
114
+ <text><![CDATA[unless ${1:condition}
115
+ $0
116
+ end]]></text>
117
+ <tag>unless</tag>
118
+ <description>unless</description>
119
+ </snippet>
120
+
121
+ <!-- Case and additional conditions -->
122
+ <snippet>
123
+ <text><![CDATA[case ${1:object}
124
+ when ${2:condition}
125
+ $0
126
+ end]]></text>
127
+ <tag>case</tag>
128
+ <description>case .. end</description>
129
+ </snippet>
130
+ <snippet>
131
+ <text><![CDATA[when ${1:condition}
132
+ $0]]></text>
133
+ <tag>when</tag>
134
+ <description>when</description>
135
+ </snippet>
136
+ <snippet>
137
+ <text><![CDATA[else
138
+ $0]]></text>
139
+ <tag>else</tag>
140
+ <description>else ...</description>
141
+ </snippet>
142
+ </snippets>