Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixing merge conflicts from remote rafaelfranca

  • Loading branch information...
commit dbf41ff08666c9460fb15c5e78d57793f1edfe16 2 parents 3c659e9 + 63cd060
@akitaonrails authored
Showing with 389 additions and 181 deletions.
  1. +54 −0 Rakefile
  2. +3 −0  _/fold.snippet
  3. +4 −1 _/lorem.snippet
  4. +0 −29 ant/skel/basic.snippet
  5. +1 −0  css/!.snippet
  6. +1 −0  css/url.snippet
  7. +1 −0  cucumber/a.snippet
  8. +2 −0  cucumber/b.snippet
  9. +2 −0  cucumber/e.snippet
  10. +2 −0  cucumber/f.snippet
  11. +5 −0 cucumber/feat.snippet
  12. +5 −0 cucumber/feature.snippet
  13. +1 −0  cucumber/g.snippet
  14. +1 −0  cucumber/s.snippet
  15. +3 −0  cucumber/scen/scenario_with_js.snippet
  16. +3 −0  cucumber/scen/scenario_without_js.snippet
  17. +1 −0  cucumber/so.snippet
  18. +25 −0 cucumber/steps
  19. +1 −0  cucumber/t.snippet
  20. +1 −0  cucumber/w.snippet
  21. +3 −3 eruby-rails/conf.snippet
  22. +1 −1  eruby-rails/cs.snippet
  23. +1 −1  eruby-rails/ct.snippet
  24. +0 −1  eruby-rails/end.snippet
  25. +3 −3 eruby-rails/ff.snippet
  26. +4 −5 eruby-rails/ffe.snippet
  27. +3 −3 eruby-rails/fields.snippet
  28. +3 −3 eruby-rails/for.snippet
  29. +3 −3 eruby-rails/ft.snippet
  30. +1 −1  eruby-rails/jit.snippet
  31. +1 −1  eruby-rails/liai.snippet
  32. +1 −1  eruby-rails/licai.snippet
  33. +1 −1  eruby-rails/lim.snippet
  34. +1 −1  eruby-rails/linp.snippet
  35. +1 −1  eruby-rails/linpp.snippet
  36. +1 −1  eruby-rails/lip.snippet
  37. +1 −1  eruby-rails/lipp.snippet
  38. +1 −0  eruby-rails/ltr.snippet
  39. +1 −1  eruby-rails/ofcfs.snippet
  40. +1 −0  eruby-rails/sbtr.snippet
  41. +1 −1  eruby-rails/slt.snippet
  42. +1 −1  eruby-rails/st.snippet
  43. +1 −0  eruby/e.snippet
  44. +1 −0  eruby/else.snippet
  45. +1 −0  eruby/end.snippet
  46. +1 −0  eruby/er.snippet
  47. +1 −1  eruby/if.snippet
  48. +1 −1  eruby/ife.snippet
  49. +1 −1  eruby/unless.snippet
  50. +0 −4 eruby/unlesse.snippet
  51. +2 −2 haml/conf.snippet
  52. +1 −1  haml/cs.snippet
  53. +1 −1  haml/ff.snippet
  54. +1 −1  haml/ffcb.snippet
  55. +3 −4 haml/ffe.snippet
  56. +1 −1  haml/ffff.snippet
  57. +1 −1  haml/ffhf.snippet
  58. +1 −1  haml/ffl.snippet
  59. +1 −1  haml/ffpf.snippet
  60. +1 −1  haml/ffrb.snippet
  61. +1 −1  haml/ffs.snippet
  62. +1 −1  haml/ffta.snippet
  63. +1 −1  haml/fftf.snippet
  64. +1 −1  haml/fields.snippet
  65. +2 −6 haml/for.snippet
  66. +2 −2 haml/ft.snippet
  67. +1 −1  haml/if.snippet
  68. +2 −3 haml/ife.snippet
  69. +1 −1  haml/it.snippet
  70. +1 −1  haml/jit.snippet
  71. +1 −1  haml/jsit.snippet
  72. +1 −1  haml/lia.snippet
  73. +1 −1  haml/liai.snippet
  74. +1 −1  haml/lic.snippet
  75. +1 −1  haml/lica.snippet
  76. +1 −1  haml/licai.snippet
  77. +1 −1  haml/lim.snippet
  78. +1 −1  haml/linp.snippet
  79. +1 −1  haml/linpp.snippet
  80. +1 −1  haml/lip.snippet
  81. +1 −1  haml/lipp.snippet
  82. +1 −1  haml/lt.snippet
  83. +1 −1  haml/ofcfs.snippet
  84. +1 −1  haml/rf.snippet
  85. +1 −1  haml/rp.snippet
  86. +1 −1  haml/rt.snippet
  87. +1 −1  haml/slt.snippet
  88. +1 −1  haml/sslt.snippet
  89. +1 −1  haml/st.snippet
  90. +1 −1  haml/unless.snippet
  91. +0 −4 haml/unlesse.snippet
  92. +3 −0  html/<.snippet
  93. +1 −0  html/ah.snippet
  94. +1 −0  html/css.snippet
  95. +0 −1  html/doctype.snippet
  96. +2 −0  html/doctype/HTML 4.01 Strict.snippet
  97. +2 −0  html/doctype/HTML 4.01 Transitional.snippet
  98. +2 −0  html/doctype/HTML 5.snippet
  99. +2 −0  html/doctype/XHTML 1.0 Frameset.snippet
  100. +2 −0  html/doctype/XHTML 1.0 Strict.snippet
  101. +2 −0  html/doctype/XHTML 1.0 Transitional.snippet
  102. +2 −0  html/doctype/XHTML 1.1.snippet
  103. +1 −0  html/h2.snippet
  104. +1 −0  html/h3.snippet
  105. +0 −1  html/href.snippet
  106. +1 −0  html/li.snippet
  107. +3 −0  html/p.snippet
  108. +1 −1  html/script/inline_script.snippet
  109. +28 −0 html/skel/html5.snippet
  110. +1 −0  html/span.snippet
  111. +2 −2 html/t.snippet
  112. +2 −2 html/table/hardcore.snippet
  113. +1 −0  html/ti.snippet
  114. +1 −0  html/tt.snippet
  115. +3 −0  html/ul.snippet
  116. +1 −0  javascript-jquery/jj.snippet
  117. +2 −2 javascript-jquery/ready.snippet
  118. +1 −0  javascript/a.snippet
  119. +3 −1 javascript/anon.snippet
  120. +1 −0  javascript/as.snippet
  121. +3 −0  javascript/ea.snippet
  122. +2 −2 javascript/fun.snippet
  123. +3 −1 javascript/if.snippet
  124. +1 −0  javascript/l.snippet
  125. +3 −0  javascript/pe.snippet
  126. +3 −0  javascript/pf.snippet
  127. +1 −0  javascript/t.snippet
  128. +0 −1  php/t.snippet
  129. +1 −0  php/ta.snippet
  130. +1 −0  php/tm.snippet
  131. +1 −0  ruby-factorygirl/facc.snippet
  132. +2 −3 ruby-factorygirl/facd.snippet
  133. +3 −0  ruby-machinist/bluep.snippet
  134. +1 −0  ruby-machinist/mmn.snippet
  135. +1 −0  ruby-machinist/mp.snippet
  136. +1 −0  ruby-machinist/mpn.snippet
  137. +3 −0  ruby-machinist/sham.snippet
  138. +1 −0  ruby-rails/anaf.snippet
  139. +5 −5 ruby-rails/defindex.snippet
  140. +1 −1  ruby-rails/fina.snippet
  141. +1 −1  ruby-rails/finf.snippet
  142. +1 −1  ruby-rails/fini.snippet
  143. +1 −1  ruby-rails/finl.snippet
  144. +1 −1  ruby-rails/hmt.snippet
  145. +0 −1  ruby-rails/mp.snippet
  146. +1 −1  ruby-rails/mrc.snippet
  147. +1 −1  ruby-rails/tcd.snippet
  148. +3 −0  ruby-rails/test.snippet
  149. +1 −0  ruby-rails/vp.snippet
  150. +2 −0  ruby-remarkable/sabaf.snippet
  151. +1 −0  {ruby-shoulda → ruby-remarkable}/samao.snippet
  152. +1 −0  {ruby-shoulda → ruby-remarkable}/savf.snippet
  153. +2 −0  ruby-remarkable/sbt.snippet
  154. +2 −0  ruby-remarkable/shabtm.snippet
  155. +2 −0  ruby-remarkable/shc.snippet
  156. +2 −0  ruby-remarkable/shds.snippet
  157. +2 −0  ruby-remarkable/shi.snippet
  158. +2 −0  ruby-remarkable/shm.snippet
  159. +2 −0  ruby-remarkable/shmt.snippets
  160. +2 −0  ruby-remarkable/shns.snippet
  161. +2 −0  ruby-remarkable/sho.snippet
  162. +3 −0  ruby-rspec/Given.snippet
  163. +3 −0  ruby-rspec/Then.snippet
  164. +3 −0  ruby-rspec/When.snippet
  165. +1 −0  ruby-rspec/cap.snippet
  166. +3 −0  ruby-rspec/cont.snippet
  167. +1 −1  ruby-rspec/des.snippet
  168. +1 −1  ruby-rspec/desc.snippet
  169. +1 −1  ruby-rspec/it.snippet
  170. +8 −0 ruby-rspec/it.snippet.orig
  171. +1 −0  ruby-rspec/itb.snippet
  172. +1 −1  ruby-rspec/its.snippet
  173. +0 −3  ruby-rspec/shc.snippet
  174. +0 −2  ruby-rspec/shns.snippet
  175. +1 −0  ruby-rspec/st.snippet
  176. +0 −1  ruby-shoulda/sbt.snippet
  177. +0 −1  ruby-shoulda/shabtm.snippet
  178. +0 −1  ruby-shoulda/shi.snippet
  179. +0 −1  ruby-shoulda/shm.snippet
  180. +0 −1  ruby-shoulda/sho.snippet
  181. +3 −1 ruby/each.snippet
  182. +1 −1  ruby/fileeach.snippet
  183. +1 −0  ruby/h.snippet
  184. +1 −1  ruby/inject.snippet
  185. +12 −7 ruby/module.snippet
View
54 Rakefile
@@ -1,7 +1,55 @@
#require 'fileutils'
#include FileUtils
+require 'rake'
+
+# The install task was stolen from RyanB
+# http://github.com/ryanb/dotfiles
+
+desc "install the snippets into user's vim directory @home"
+task :install => ["snippets_dir:find"] do
+ replace_all = false
+ Dir['*'].each do |file|
+ next if %w[Rakefile].include? file
+
+ if File.exist?(File.join(@snippets_dir, "#{file}"))
+ if replace_all
+ replace_file(file)
+ else
+ print "overwrite #{File.join(@snippets_dir, file)}? [ynaq] "
+ case $stdin.gets.chomp
+ when 'a'
+ replace_all = true
+ replace_file(file)
+ when 'y'
+ replace_file(file)
+ when 'q'
+ exit
+ else
+ puts File.join(@snippets_dir, "#{file}")
+ end
+ end
+ else
+ link_file(file)
+ end
+ end
+end
+
+def replace_file(file)
+ link_file(file)
+end
+
+def link_file(file)
+ puts "linking #{path_to(file)}"
+ ln_s File.join(FileUtils.pwd,file), path_to(file), :force => true
+end
+
+def path_to(file)
+ File.join(@snippets_dir, "#{file}")
+end
+
namespace :snippets_dir do
+ desc "Sets @snippets_dir dependent on which OS You run"
task :find do
@snippets_dir = File.join(ENV['VIMFILES'] || ENV['HOME'] || ENV['USERPROFILE'], RUBY_PLATFORM =~ /mswin32/ ? "vimfiles" : ".vim", "snippets")
end
@@ -20,3 +68,9 @@ task :deploy_local => ["snippets_dir:purge"] do
end
cp "support_functions.vim", @snippets_dir, :verbose => true
end
+
+desc "Alias for purge"
+task :purge => ["snippets_dir:purge"]
+
+desc "Alias for default task run easy 'rake'"
+task :default => :install
View
3  _/fold.snippet
@@ -0,0 +1,3 @@
+# {{{ ${1:description}
+${2}
+# }}}
View
5 _/lorem.snippet
@@ -1 +1,4 @@
-Lorem ipsum dolor sit amet, consectetur magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum<++>\<c-o>:normal! gqq\<CR>
+Lorem ipsum dolor sit amet, consectetur magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
+ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
+velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
+culpa qui officia deserunt mollit anim id est laborum${1}
View
29 ant/skel/basic.snippet
@@ -1,29 +0,0 @@
-<project name="PROJECT NAME" default="dist" basedir=".">
- <description>
- </description>
-
- <!-- set global properties for this build -->
- <property name="src" location="src"/>
- <property name="build" location="build"/>
- <property name="dist" location="dist"/>
-
- <target name="init">
- <tstamp/>
- <mkdir dir="${build}"/>
- </target>
-
- <target name="compile" depends="init" description="compile the source " >
- <javac srcdir="${src}" destdir="${build}"/>
- </target>
-
- <target name="dist" depends="compile" description="generate the distribution" >
- <mkdir dir="${dist}/lib"/>
- <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/>
- </target>
-
- <target name="clean"
- description="clean up" >
- <delete dir="${build}"/>
- <delete dir="${dist}"/>
- </target>
-</project>
View
1  css/!.snippet
@@ -0,0 +1 @@
+!important
View
1  css/url.snippet
@@ -0,0 +1 @@
+url('${1:../images/}${2}')${3}
View
1  cucumber/a.snippet
@@ -0,0 +1 @@
+And
View
2  cucumber/b.snippet
@@ -0,0 +1,2 @@
+Background:
+ ${1}
View
2  cucumber/e.snippet
@@ -0,0 +1,2 @@
+Examples:
+
View
2  cucumber/f.snippet
@@ -0,0 +1,2 @@
+Feature: ${1:name}
+ ${2}
View
5 cucumber/feat.snippet
@@ -0,0 +1,5 @@
+Feature: ${1:[feature name eg. "Manage some thing ..."]}
+ In order to ${2:[goal]}
+ As a ${3:[stakeholder]}
+ I want ${4:[behavior]}
+
View
5 cucumber/feature.snippet
@@ -0,0 +1,5 @@
+Feature: ${1:[feature name eg. "Manage some thing ..."]}
+ In order to ${2:[goal]}
+ As a ${3:[stakeholder]}
+ I want ${4:[behavior]}
+
View
1  cucumber/g.snippet
@@ -0,0 +1 @@
+Given
View
1  cucumber/s.snippet
@@ -0,0 +1 @@
+Scenario:
View
3  cucumber/scen/scenario_with_js.snippet
@@ -0,0 +1,3 @@
+@culerity
+Scenario: ${1:Delete customers}
+ ${2:Given the following customers:}
View
3  cucumber/scen/scenario_without_js.snippet
@@ -0,0 +1,3 @@
+Scenario: ${1:Register new customers}
+ ${2:Given I am on the new customers page
+ And I press "Create"}
View
1  cucumber/so.snippet
@@ -0,0 +1 @@
+Scenario Outline:
View
25 cucumber/steps
@@ -0,0 +1,25 @@
+ Given I am on [page_name]
+
+ When I go to [page_name]
+ When I press "[button]"
+ When I follow "[link]"
+ When I fill in "[field]" with "[value]"
+ When I select "[value]" from "[field]"
+ When I select "[time]" as the date and time
+ When I select "[datetime]" as the "[datetime_label]" date and time
+ When I select "[time]" as the time
+ When I select "[time]" as the "[time_label]" time
+ When I select "[date]" as the date
+ When I select "[date]" as the "[date_label]" date
+ When I check "[field]"
+ When I uncheck "[field]"
+ When I choose "[field]"
+ When I attach the file at "[path]" to "[field]"
+
+ Then I should see "[text]"
+ Then I should not see "[text]"
+ Then the "[field]" field should contain "[value]"
+ Then the "[field]" field should not contain "[value]"
+ Then the "[label]" checkbox should be checked
+ Then I should be on [page_name]
+
View
1  cucumber/t.snippet
@@ -0,0 +1 @@
+Then
View
1  cucumber/w.snippet
@@ -0,0 +1 @@
+When
View
6 eruby-rails/conf.snippet
@@ -1,3 +1,3 @@
-<% content_for :${1:yield_label_in_layout} do -%>
- ${2}
-<% end -%>
+<% content_for :${1:yield_label_in_layout} do %>
+ ${2}
+<% end %>
View
2  eruby-rails/cs.snippet
@@ -1 +1 @@
-<%= collection_select <+object+>, <+method+>, <+collection+>, <+value_method+>, <+text_method+><+, <+[options]+>, <+[html_options]+>+> %>
+<%= collection_select ${1:object}, ${2:method}, ${3:collection}, ${4:value_method}, ${5:text_method}${6:, options} %>${7}
View
2  eruby-rails/ct.snippet
@@ -1 +1 @@
-<%= content_tag '${1:DIV}', ${2:content}${3:,options} -%>
+<%= content_tag '${1:DIV}', ${2:content}${3:, options} %>
View
1  eruby-rails/end.snippet
@@ -1 +0,0 @@
-<% end -%>
View
6 eruby-rails/ff.snippet
@@ -1,3 +1,3 @@
-<% form_for @${1:model} do |f| -%>
- ${2}
-<% end -%>
+<%= form_for @${1:model} do |f| %>
+ ${2}
+<% end %>
View
9 eruby-rails/ffe.snippet
@@ -1,5 +1,4 @@
-<% error_messages_for :${1:model} -%>
-
-<% form_for @${2:model} do |f| -%>
- ${3}
-<% end -%>
+<%= form_for @${2:model} do |f| %>
+ <%= f.error_messages %>
+ ${3}
+<% end %>
View
6 eruby-rails/fields.snippet
@@ -1,3 +1,3 @@
-<% fields_for :${1:model}, @$1 do |${2:f}| -%>
- ${3}
-<% end -%>
+<% fields_for :${1:model}, @$1 do |${2:f}| %>
+ ${3}
+<% end %>
View
6 eruby-rails/for.snippet
@@ -1,3 +1,3 @@
-<% for ${2:item} in ${1:list} -%>
- ${3}
-<% end -%>
+<% for ${2:item} in ${1:list} %>
+ ${3}
+<% end %>
View
6 eruby-rails/ft.snippet
@@ -1,3 +1,3 @@
-<% form_tag(<+:action => "<+update+>"+><+, {:<+class+> => "<+form+>"}+>) do -%>
- <++>
-<% end -%>
+<%= form_tag(${1:'url'}) do %>
+ ${2}
+<% end %>
View
2  eruby-rails/jit.snippet
@@ -1 +1 @@
-<%= javascript_include_tag <+:all+><+, :cache => <+true+>+> %>
+<%= javascript_include_tag ${1::all}, :cache => ${2:true} %>
View
2  eruby-rails/liai.snippet
@@ -1 +1 @@
-<%= link_to "<+link text+>", :action => "<+edit+>", :id => <+@<+item+>+> %>
+<%= link_to "${1:link text}", :action => "${2:edit}", :id => @${3:item} %>
View
2  eruby-rails/licai.snippet
@@ -1 +1 @@
-<%= link_to "<+link text+>", :controller => "<+items+>", :action => "<+edit+>", :id => <+@<+item+>+> %>
+<%= link_to "${1:link text}", :controller => "${2:items}", :action => "${3:edit}", :id => @${4:item} %>
View
2  eruby-rails/lim.snippet
@@ -1 +1 @@
-<%= link_to <+model+>.<+name+>, <+<+model+>_path(<+model+>)+> %>
+<%= link_to ${1:model}.${2:name}, ${3:$1_path($1)} %>
View
2  eruby-rails/linp.snippet
@@ -1 +1 @@
-<%= link_to <+"<+link text+>"+>, <+<+parent+>_<+child+>_path(<+@+><+parent+>, <+@+><+child+>)+> %>
+<%= link_to "${1:link text}", ${2:parent}_${3:child}_path(@$2, @$3) %>
View
2  eruby-rails/linpp.snippet
@@ -1 +1 @@
-<%= link_to <+"<+link text+>"+>, <+<+parent+>_<+child+>_path(<+@+><+parent+>)+> %>
+<%= link_to "${1:link text}", ${2:parent}_${3:child}_path(@$2) %>
View
2  eruby-rails/lip.snippet
@@ -1 +1 @@
-<%= link_to <+"<+link text+>"+>, <+<+model+>_path(<+@+><+instance+>)+> %>
+<%= link_to "${1:link text}", ${2:model}_path(@${3:instance}) %>
View
2  eruby-rails/lipp.snippet
@@ -1 +1 @@
-<%= link_to <+"<+link text+>"+>, <+<+model+>s_path+> %>
+<%= link_to "${1:link text}", ${2:model}s_path %>
View
1  eruby-rails/ltr.snippet
@@ -0,0 +1 @@
+<%= link_to_remote "${1:name}", ${2:options} %>
View
2  eruby-rails/ofcfs.snippet
@@ -1 +1 @@
-<%= options_from_collection_for_select <+collection+>, <+value_method+>, <+text_method+><+, <+[selected_value]+>+> %>
+<%= options_from_collection_for_select ${1:collection}, ${2:value_method}, ${3:text_method}, ${4:selected_value} %>
View
1  eruby-rails/sbtr.snippet
@@ -0,0 +1 @@
+<%= submit_to_remote ${1:name}, ${2:value} %>
View
2  eruby-rails/slt.snippet
@@ -1 +1 @@
-<%= stylesheet_link_tag <+:all+><+, :cache => <+true+>+> %>
+<%= stylesheet_link_tag ${1::all}, :cache => ${2:true} %>
View
2  eruby-rails/st.snippet
@@ -1 +1 @@
-<%= submit_tag "<+Save changes+>"<+, :id => "<+submit+>"+><+, :name => "<+submit+>"+><+, :class => "<+form_name+>"+><+, :disabled => <+false+>+><+, :disable_with => "<+Please wait+>"+> %>
+<%= submit_tag "${1:Save changes}" %>
View
1  eruby/e.snippet
@@ -0,0 +1 @@
+<%= ${1} %>
View
1  eruby/else.snippet
@@ -0,0 +1 @@
+<% else %>
View
1  eruby/end.snippet
@@ -0,0 +1 @@
+<% end %>
View
1  eruby/er.snippet
@@ -0,0 +1 @@
+<% ${1} %>
View
2  eruby/if.snippet
@@ -1,3 +1,3 @@
<% if ${1:condition} %>
- ${2}
+ ${2}
<% end %>
View
2  eruby/ife.snippet
@@ -1,4 +1,4 @@
<% if ${1} %>
- ${2}
+ ${2}
<% else %>
<% end %>
View
2  eruby/unless.snippet
@@ -1,3 +1,3 @@
<% unless ${1} %>
- ${2}
+ ${2}
<% end %>
View
4 eruby/unlesse.snippet
@@ -1,4 +0,0 @@
-<% if ${1} %>
- ${2}
-<% else %>
-<% end %>
View
4 haml/conf.snippet
@@ -1,3 +1,3 @@
--content_for :${1:yield_label_in_layout} do
+- content_for :${1:yield_label_in_layout} do
${2}
-
+
View
2  haml/cs.snippet
@@ -1 +1 @@
-=collection_select :${1:object}, :${2:method}, :${3:collection}, :${4:value_method}, :${5:text_method} ${6:, [options]} ${7:, [html_options]}
+= collection_select :${1:object}, :${2:method}, :${3:collection}, :${4:value_method}, :${5:text_method} ${6:, [options]} ${7:, [html_options]}
View
2  haml/ff.snippet
@@ -1,2 +1,2 @@
--form_for @${1:model} do |f|
+= form_for @${1:model} do |f|
${2}
View
2  haml/ffcb.snippet
@@ -1 +1 @@
-=f.check_box :${1:attribute}
+= ${1:f}.check_box :${2:attribute}
View
7 haml/ffe.snippet
@@ -1,4 +1,3 @@
-=error_messages_for :${1:model}
-
--form_for @${2:model} do |f|
- ${3}
+= form_for @${1:model} do |f|
+ = f.error_messages
+ ${2}
View
2  haml/ffff.snippet
@@ -1 +1 @@
-=f.file_field :${1:attribute}
+= ${1:f}.file_field :${2:attribute}
View
2  haml/ffhf.snippet
@@ -1 +1 @@
-=f.hidden_field :${1:attribute}
+= ${1:f}.hidden_field :${2:attribute}
View
2  haml/ffl.snippet
@@ -1 +1 @@
-=f.label :${1:attribute}
+= ${1:f}.label :${2:attribute}
View
2  haml/ffpf.snippet
@@ -1 +1 @@
-=f.password_field :${1:attribute}
+= ${1:f}.password_field :${2:attribute}
View
2  haml/ffrb.snippet
@@ -1 +1 @@
-=f.radio_button :${1:attribute}, :${2:tag_value}
+= ${1:f}.radio_button :${2:attribute}, :${3:tag_value}
View
2  haml/ffs.snippet
@@ -1 +1 @@
-=f.submit "<+Submit+>"<+, :disable_with => '<+Submitting+>'+>
+= ${1:f}.submit "${2:Submit}"
View
2  haml/ffta.snippet
@@ -1 +1 @@
-=f.text_area :${1:attribute}
+= ${1:f}.text_area :${2:attribute}
View
2  haml/fftf.snippet
@@ -1 +1 @@
-=f.text_field :${1:attribute}
+= ${1:f}.text_field :${2:attribute}
View
2  haml/fields.snippet
@@ -1,2 +1,2 @@
--fields_for :${1:model}, @$1 do |${2:f}|
+- fields_for :${1:model}, @$1 do |${2:f}|
${3}
View
8 haml/for.snippet
@@ -1,6 +1,2 @@
--if !${1:list}.blank?
- -for ${2:item} in $1
- ${3}
--else
- ${4}
-
+- for ${1:item} in ${2:items}
+ ${3}
View
4 haml/ft.snippet
@@ -1,2 +1,2 @@
--form_tag(<+:action => "<+update+>"+><+, {:<+class+> => "<+form+>"}+>) do
- <++>
+= form_tag(:action => "${1:update}") do
+ ${2}
View
2  haml/if.snippet
@@ -1,2 +1,2 @@
--if ${1}
+- if ${1}
${2}
View
5 haml/ife.snippet
@@ -1,4 +1,3 @@
--if ${1}
+- if ${1}
${2}
--else
-
+- else
View
2  haml/it.snippet
@@ -1 +1 @@
-=image_tag "${1}"
+= image_tag "${1}"
View
2  haml/jit.snippet
@@ -1 +1 @@
-=javascript_include_tag <+:all+><+, :cache => <+true+>+>
+= javascript_include_tag ${1::all}, :cache => ${2:true}
View
2  haml/jsit.snippet
@@ -1 +1 @@
-=javascript_include_tag "${1}"
+= javascript_include_tag "${1}"
View
2  haml/lia.snippet
@@ -1 +1 @@
-=link_to "${1:link text}", :action => "${2:index}"
+= link_to "${1:link text}", :action => "${2:index}"
View
2  haml/liai.snippet
@@ -1 +1 @@
-=link_to "<+link text+>", :action => "<+edit+>", :id => <+@<+item+>+>
+= link_to "${1:link_text}", :action => "${2:edit}", :id => ${3:@item}
View
2  haml/lic.snippet
@@ -1 +1 @@
-=link_to "${1:link text}", :controller => "${2:items}"
+= link_to "${1:link text}", :controller => "${2:items}"
View
2  haml/lica.snippet
@@ -1 +1 @@
-=link_to "${1:link text}", :controller => "${2:items}", :action => "${3:index}"
+= link_to "${1:link text}", :controller => "${2:items}", :action => "${3:index}"
View
2  haml/licai.snippet
@@ -1 +1 @@
-=link_to "<+link text+>", :controller => "<+items+>", :action => "<+edit+>", :id => <+@<+item+>+>
+= link_to "${1:link text}", :controller => "${2:items}", :action => "${3:edit}", :id => ${4:@item}
View
2  haml/lim.snippet
@@ -1 +1 @@
-=link_to <+model+>.<+name+>, <+<+model+>_path(<+model+>)+>
+= link_to ${1:model}.${2:name}, $1_path($1)
View
2  haml/linp.snippet
@@ -1 +1 @@
-=link_to <+"<+link text+>"+>, <+<+parent+>_<+child+>_path(<+@+><+parent+>, <+@+><+child+>)+>
+= link_to "${1:link text}", ${2:parent}_${3:child}_path(@$2, @$3)
View
2  haml/linpp.snippet
@@ -1 +1 @@
-=link_to <+"<+link text+>"+>, <+<+parent+>_<+child+>_path(<+@+><+parent+>)+>
+= link_to "${1:link text}", ${2:parent}_${3:child}_path(@$2)
View
2  haml/lip.snippet
@@ -1 +1 @@
-=link_to <+"<+link text+>"+>, <+<+model+>_path(<+@+><+instance+>)+>
+= link_to "${1:link text}", ${2:model}_path(${3:@instance})
View
2  haml/lipp.snippet
@@ -1 +1 @@
-=link_to <+"<+link text+>"+>, <+<+model+>s_path+>
+= link_to "${1:link text}", ${2:model}s_path
View
2  haml/lt.snippet
@@ -1 +1 @@
-=link_to "${1}", ${2:dest}
+= link_to "${1}", ${2:dest}
View
2  haml/ofcfs.snippet
@@ -1 +1 @@
-=options_from_collection_for_select <+collection+>, <+value_method+>, <+text_method+><+, <+[selected_value]+>+>
+= options_from_collection_for_select ${1:collection}, ${2:value_method}, ${3:text_method}, ${4:[selected_value]}
View
2  haml/rf.snippet
@@ -1 +1 @@
-=render :file => "${1:file}"${2}
+= render :file => "${1:file}"${2}
View
2  haml/rp.snippet
@@ -1 +1 @@
-=render :partial => "${1:file}"${2}
+= render :partial => "${1:file}"${2}
View
2  haml/rt.snippet
@@ -1 +1 @@
-=render :template => "${1:file}"${2}
+= render :template => "${1:file}"${2}
View
2  haml/slt.snippet
@@ -1 +1 @@
-=stylesheet_link_tag <+:all+><+, :cache => <+true+>+>
+= stylesheet_link_tag ${1::all}, :cache => ${2:true}
View
2  haml/sslt.snippet
@@ -1 +1 @@
-=stylesheet_link_tag "${1}"
+= stylesheet_link_tag "${1}"
View
2  haml/st.snippet
@@ -1 +1 @@
-=submit_tag "<+Save changes+>"<+, :id => "<+submit+>"+><+, :name => "<+submit+>"+><+, :class => "<+form_name+>"+><+, :disabled => <+false+>+><+, :disable_with => "<+Please wait+>"+>
+= submit_tag "${1:Save changes}"
View
2  haml/unless.snippet
@@ -1,3 +1,3 @@
--unless ${1}
+- unless ${1}
${2}
View
4 haml/unlesse.snippet
@@ -1,4 +0,0 @@
--if ${1}
- ${2}
--else
-
View
3  html/<.snippet
@@ -0,0 +1,3 @@
+<${1:div}${2}>
+ ${3}
+</$1>
View
1  html/ah.snippet
@@ -0,0 +1 @@
+<a href="${1:#}">${2}</a>${3}
View
1  html/css.snippet
@@ -0,0 +1 @@
+<link rel="${1:stylesheet}" href="${2:/css/master.css}" type="text/css" media="${3:screen}" charset="utf-8">${4}
View
1  html/doctype.snippet
@@ -1 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">${1}
View
2  html/doctype/HTML 4.01 Strict.snippet
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""
+"http://www.w3.org/TR/html4/strict.dtd">
View
2  html/doctype/HTML 4.01 Transitional.snippet
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""
+"http://www.w3.org/TR/html4/loose.dtd">
View
2  html/doctype/HTML 5.snippet
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML>
+
View
2  html/doctype/XHTML 1.0 Frameset.snippet
@@ -0,0 +1,2 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
View
2  html/doctype/XHTML 1.0 Strict.snippet
@@ -0,0 +1,2 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
View
2  html/doctype/XHTML 1.0 Transitional.snippet
@@ -0,0 +1,2 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
View
2  html/doctype/XHTML 1.1.snippet
@@ -0,0 +1,2 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
View
1  html/h2.snippet
@@ -0,0 +1 @@
+<h2 id="${1:heading}">${2:$1}</h2>
View
1  html/h3.snippet
@@ -0,0 +1 @@
+<h3 id="${1:heading}">${2:$1}</h3>
View
1  html/href.snippet
@@ -1 +0,0 @@
-<a href="${1}">${2}</a>
View
1  html/li.snippet
@@ -0,0 +1 @@
+<li>${1}</li>
View
3  html/p.snippet
@@ -0,0 +1,3 @@
+<p>
+ ${1}
+</p>
View
2  html/script/inline_script.snippet
@@ -2,4 +2,4 @@
//<![CDATA[
${1}
//]]>
-</script>
+</script>${2}
View
28 html/skel/html5.snippet
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html lang="pt-BR">
+ <head>
+ <title>${1:Page Title}</title>
+
+ <meta charset="utf-8">
+ <meta name="keywords" content=""/>
+ <meta name="description" content=""/>
+
+ <link rel="stylesheet" href="css/style.css" media="screen" charset="utf-8">
+ <link rel="shortcut icon" href="favicon.ico">
+
+ <!--[if IE]>
+ <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ </head>
+
+ <body>
+ <header>
+ </header>
+
+ <section id="main">
+ </section>
+
+ <footer>
+ </footer>
+ </body>
+</html>
View
1  html/span.snippet
@@ -0,0 +1 @@
+<span class="${1:name}">${2}</span>
View
4 html/t.snippet
@@ -1,3 +1,3 @@
<${1:div}${2}>
- ${3}
-</$1>${4}
+ ${3}
+</$1>
View
4 html/table/hardcore.snippet
@@ -1,6 +1,6 @@
-<table<+ width="<+100%+>" border="<+0+>" cellspacing="<+0+>" cellpadding="<+5+>"<++>+>>
+<table>
<tr>
- <th><++></th>
+ <th>${1}</th>
</tr>
<tr>
View
1  html/ti.snippet
@@ -0,0 +1 @@
+<${1:span}${2}>${3}</$1>
View
1  html/tt.snippet
@@ -0,0 +1 @@
+<tt>${1}</tt>${2}
View
3  html/ul.snippet
@@ -0,0 +1,3 @@
+<ul>
+ ${1}
+</ul>
View
1  javascript-jquery/jj.snippet
@@ -0,0 +1 @@
+$('${1:selector}')${2}
View
4 javascript-jquery/ready.snippet
@@ -1,3 +1,3 @@
-$(document).ready(function() {
- ${1:// Stuff to do as soon as the DOM is ready;}
+$(function() {
+ ${1}
});
View
1  javascript/a.snippet
@@ -0,0 +1 @@
+alert(${1:this.element});
View
4 javascript/anon.snippet
@@ -1 +1,3 @@
-function(${1}) { ${2} };
+function(${1}) {
+ ${2}
+};
View
1  javascript/as.snippet
@@ -0,0 +1 @@
+alert("${1}");
View
3  javascript/ea.snippet
@@ -0,0 +1,3 @@
+each(function() {
+
+});
View
4 javascript/fun.snippet
@@ -1,3 +1,3 @@
-function ${1:function_name} (${2:argument}) {
- ${3:// body}
+function ${1}(${2}) {
+ ${3}
}
View
4 javascript/if.snippet
@@ -1 +1,3 @@
-if (${1:true}) { ${2} };
+if (${1:true}) {
+ ${2}
+};
View
1  javascript/l.snippet
@@ -0,0 +1 @@
+console.log(${1});
View
3  javascript/pe.snippet
@@ -0,0 +1,3 @@
+${1:property}: function(event) {
+ ${2:body}
+}
View
3  javascript/pf.snippet
@@ -0,0 +1,3 @@
+${1:property}: function() {
+ ${2:body}
+}
View
1  javascript/t.snippet
@@ -0,0 +1 @@
+I18n.t('${1:type.key}', { defaultValue: '${2}' })${3}
View
1  php/t.snippet
@@ -1 +0,0 @@
-$${1:retVal} = (${2:condition}) ? ${3:a} : ${4:b};${5}
View
1  php/ta.snippet
@@ -0,0 +1 @@
+$this->${1:attr}${2};
View
1  php/tm.snippet
@@ -0,0 +1 @@
+$this->${1:method}(${2:args})${3};
View
1  ruby-factorygirl/facc.snippet
@@ -0,0 +1 @@
+Factory.create(:${1})${2}
View
5 ruby-factorygirl/facd.snippet
@@ -1,4 +1,3 @@
-Factory.define(:${1:model}) do |${2:f}|
- ${3}
+Factory.define(:${1:model}) do |f|
+ ${2}
end
-${4}
View
3  ruby-machinist/bluep.snippet
@@ -0,0 +1,3 @@
+${1:Model}.blueprint do
+ ${2}
+end
View
1  ruby-machinist/mmn.snippet
@@ -0,0 +1 @@
+${1:Model}.make(${2::symbol})
View
1  ruby-machinist/mp.snippet
@@ -0,0 +1 @@
+${1:Model}.plan
View
1  ruby-machinist/mpn.snippet
@@ -0,0 +1 @@
+${1:Model}.plan(${2::symbol})
View
3  ruby-machinist/sham.snippet
@@ -0,0 +1,3 @@
+Sham.define do
+ ${1}
+end
View
1  ruby-rails/anaf.snippet
@@ -0,0 +1 @@
+accepts_nested_attributes_for :${1:object}
View
10 ruby-rails/defindex.snippet
@@ -1,8 +1,8 @@
def index
- @${1:model_class_name} = ${2:ModelClassName}.all
+ @${1:model_class_name}s = ${2:ModelClassName}.all
- respond_to do |wants|
- wants.html # index.html.erb
- wants.xml { render :xml => @$1s }
- end
+ respond_to do |wants|
+ wants.html # index.html.erb
+ wants.xml { render :xml => @$1s }
+ end
end${3}
View
2  ruby-rails/fina.snippet
@@ -1 +1 @@
-find(:all${1:, :conditions => ['${2:${3:field} = ?}', ${5:true}]})
+find(:all, :conditions => ['${1:field} = ?', ${2:true}])${3}
View
2  ruby-rails/finf.snippet
@@ -1 +1 @@
-find(:first${1:, :conditions => ['${2:${3:field} = ?}', ${5:true}]})
+find(:first, :conditions => ['${1:field} = ?', ${2:true}])${3}
View
2  ruby-rails/fini.snippet
@@ -1 +1 @@
-find(${1:id})
+find(${1:id})${2}
View
2  ruby-rails/finl.snippet
@@ -1 +1 @@
-find(:last${1:, :conditions => ['${2:${3:field} = ?}', ${5:true}]})
+find(:last, :conditions => ['${1:field} = ?', ${2:true}])${3}
View
2  ruby-rails/hmt.snippet
@@ -1 +1 @@
-has_many :${1:objects}, :through => :${2:join_association}${3:, :source => :${4:${2}_table_foreign_key_to_${1}_table}}
+has_many :${1:object}, :through => :${2:object}
View
1  ruby-rails/mp.snippet
@@ -1 +0,0 @@
-map(&:${1:id})
View
2  ruby-rails/mrc.snippet
@@ -1 +1 @@
-remove_column :${1:column}
+remove_column :${1:table}, :${2:column}
View
2  ruby-rails/tcd.snippet
@@ -1,2 +1,2 @@
-t.decimal :<+title+><+<+, :precision => <+10+>+><+, :scale => <+2+>+>+>
+t.decimal :${1:title}<+<+, :precision => <+10+>+><+, :scale => <+2+>+>+>
<++>
View
3  ruby-rails/test.snippet
@@ -0,0 +1,3 @@
+test "${1:case_name}" do
+ ${2}
+end
View
1  ruby-rails/vp.snippet
@@ -0,0 +1 @@
+validates_presence_of :${1:attr}
View
2  ruby-remarkable/sabaf.snippet
@@ -0,0 +1,2 @@
+should_accept_nested_attibutes_for :${1:models}${2:, :allow_destroy => true}
+${2}
View
1  ruby-shoulda/samao.snippet → ruby-remarkable/samao.snippet
@@ -1 +1,2 @@
should_allow_mass_assignment_of :${1:field}
+${2}
View
1  ruby-shoulda/savf.snippet → ruby-remarkable/savf.snippet
@@ -1 +1,2 @@
should_allow_values_for :${1:field}, "${2:value}"
+${3}
View
2  ruby-remarkable/sbt.snippet
@@ -0,0 +1,2 @@
+should_belong_to :${1:field}${2:, :polymorphic => true}
+${3}
View
2  ruby-remarkable/shabtm.snippet
@@ -0,0 +1,2 @@
+should_have_and_belong_to_many :${1:models}
+${3}
View
2  ruby-remarkable/shc.snippet
@@ -0,0 +1,2 @@
+should_have_column :${1:name}, :type => :${2:string}
+${3}
View
2  ruby-remarkable/shds.snippet
@@ -0,0 +1,2 @@
+should_have_default_scope :conditions => { ${1} }
+${2}
View
2  ruby-remarkable/shi.snippet
@@ -0,0 +1,2 @@
+should_have_index :${1:column}${2:, :unique => true}
+${3}
View
2  ruby-remarkable/shm.snippet
@@ -0,0 +1,2 @@
+should_have_many :${1:models}${2:, :dependent => :destroy}
+${3}
View
2  ruby-remarkable/shmt.snippets
@@ -0,0 +1,2 @@
+should_have_many :${1:models}, :through => :${2:model}${3:, :dependent => :destroy}
+${4}
View
2  ruby-remarkable/shns.snippet
@@ -0,0 +1,2 @@
+should_have_named_scope :${1:name}, :conditions => { ${2} }
+${3}
View
2  ruby-remarkable/sho.snippet
@@ -0,0 +1,2 @@
+should_have_one :${1:model}
+${2}
View
3  ruby-rspec/Given.snippet
@@ -0,0 +1,3 @@
+Given /^${1:something} ${2:"([^\"]*)"}$/ do |${3:arg1}|
+ ${4:pending}
+end
View
3  ruby-rspec/Then.snippet
@@ -0,0 +1,3 @@
+Then /^${1:something} ${2:"([^\"]*)"}$/ do |${3:arg1}|
+ ${4:pending}
+end
View
3  ruby-rspec/When.snippet
@@ -0,0 +1,3 @@
+When /^${1:something} ${2:"([^\"]*)"}$/ do |${3:arg1}|
+ ${4:pending}
+end
View
1  ruby-rspec/cap.snippet
@@ -0,0 +1 @@
+"([^\"]*)"
View
3  ruby-rspec/cont.snippet
@@ -0,0 +1,3 @@
+context "${1}" do
+ ${2}
+end
View
2  ruby-rspec/des.snippet
@@ -1,3 +1,3 @@
-describe "${1:subject}" do
+describe ${1:subject} do
${2}
end
View
2  ruby-rspec/desc.snippet
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require File.expand_path('spec/spec_helper')
describe ${1:controller} do
${2}
View
2  ruby-rspec/it.snippet
@@ -1,3 +1,3 @@
-it '${1}' do
+it "${1}" do
${2}
end
View
8 ruby-rspec/it.snippet.orig
@@ -0,0 +1,8 @@
+<<<<<<< HEAD:ruby-rspec/it.snippet
+it '${1}' do
+ ${2}
+=======
+it "${1}" do
+ ${2}
+>>>>>>> 7e58374... Ruby rspec snippets improvements:ruby-rspec/it.snippet
+end
View
1  ruby-rspec/itb.snippet
@@ -0,0 +1 @@
+it { ${1} }
View
2  ruby-rspec/its.snippet
@@ -1 +1 @@
-it "should ${1:do something}" do${2}
+it "should ${1:work correctly}" do${2}
View
3  ruby-rspec/shc.snippet
@@ -1,3 +0,0 @@
-lambda do
- ${1}
-end.should change(${2:target}, :${3:method}).from(${4:old_value}).to(${5:new_value}).by(${6:change})
View
2  ruby-rspec/shns.snippet
@@ -1,2 +0,0 @@
-${1:target}.should_not satisfy { |${2:obj}| ${3} }
-${4}
View
1  ruby-rspec/st.snippet
@@ -0,0 +1 @@
+stub!(:${1}).and_return(${2})
View
1  ruby-shoulda/sbt.snippet
@@ -1 +0,0 @@
-should_belong_to :${1:association}
View
1  ruby-shoulda/shabtm.snippet
@@ -1 +0,0 @@
-should_have_and_belong_to_many :${1:association}
View
1  ruby-shoulda/shi.snippet
@@ -1 +0,0 @@
-should_have_indices :${1:field}
View
1  ruby-shoulda/shm.snippet
@@ -1 +0,0 @@
-should_have_many :${1:association}
View
1  ruby-shoulda/sho.snippet
@@ -1 +0,0 @@
-should_have_one :${1:association}
View
4 ruby/each.snippet
@@ -1 +1,3 @@
-each { |${1:element}| ${2:body} }
+each do |${1:element}|
+ ${2:body}
+end
View
2  ruby/fileeach.snippet
@@ -1 +1 @@
-File.foreach(${1:"<+path}"+>) { |${2:line}| ${3} }
+File.foreach(${1:path}) { |${2:line}| ${3} }
View
1  ruby/h.snippet
@@ -0,0 +1 @@
+:${1:key} => ${2:value}
View
2  ruby/inject.snippet
@@ -1 +1 @@
-inject { |${1:total},${2:next}| ${3:body} }
+inject(${1:[]}) { |${2:mem},${3:item}| ${4:body} }
View
19 ruby/module.snippet
@@ -1,14 +1,19 @@
module ${1:`Snippet_RubyClassNameFromFilename()`}
+
+ def self.included(base)
+ base.extend ClassMethods
+ base.class_eval do
+ ${2}
+ end
+ base.send :include, InstanceMethods
+ end # self.included
+
module ClassMethods
- ${2}
- end
+
+ end # ClassMethods
module InstanceMethods
- end
+ end # InstanceMethods
- def self.included(receiver)
- receiver.extend ClassMethods
- receiver.send :include, InstanceMethods
- end
end
Please sign in to comment.
Something went wrong with that request. Please try again.