From afedbbf9313c5f009a9e2b8d9c6f21ab365d64e6 Mon Sep 17 00:00:00 2001 From: j10io Date: Thu, 18 Jul 2013 22:22:25 +1000 Subject: [PATCH 01/13] Update README.md with ST3 OSX install Resolves #1 --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7f9c75f..56d1511 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,9 @@ I started this project as I had over 500 ruby/rails/rspec snippets installed - e ### Windows cd Users//AppData/Roaming/Sublime\ Text\ 2/Packages/ git clone git@github.com:j10io/sublime-railsdev.git - +### Sublime Text 3 - Mac OSX + cd ~/Library/Application Support/Sublime Text 3/Packages/User + git clone git@github.com:j10io/railsdev-sublime-snippets.git ## Dependencies * [ApplySyntax](https://github.com/facelessuser/ApplySyntax) a sublime text plugin for syntax detection (rspec etc...) From 39d022e02e08d78c578cd86e017672b6bfaa30e2 Mon Sep 17 00:00:00 2001 From: j10io Date: Sat, 10 Aug 2013 16:37:59 +1000 Subject: [PATCH 02/13] Update ctrlr.rails-restful-controller.sublime-snippet --- Rails/ctrlr.rails-restful-controller.sublime-snippet | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Rails/ctrlr.rails-restful-controller.sublime-snippet b/Rails/ctrlr.rails-restful-controller.sublime-snippet index 0c9c979..a3949e8 100644 --- a/Rails/ctrlr.rails-restful-controller.sublime-snippet +++ b/Rails/ctrlr.rails-restful-controller.sublime-snippet @@ -17,7 +17,7 @@ end def create - @${2:user} = User.new(params[:${2:user}]) + @${2:user} = ${1:User}.new(params[:${2:user}]) if @${2:user}.save flash[:success] = "${1:User} successfully created" redirect_to @${2:user} @@ -40,10 +40,10 @@ def destroy if @${2:user}.destroy flash[:success] = "${1:User} was successfully deleted" - redirect_to @${2:user}s_url + redirect_to @${2:user}s_path else flash[:error] = "Something went wrong" - redirect_to @${2:user}s_url + redirect_to @${2:user}s_path end end From 05e70d28b22e01a339bddfa3323781f266525d21 Mon Sep 17 00:00:00 2001 From: andi3731 Date: Fri, 20 Sep 2013 18:48:39 +0300 Subject: [PATCH 03/13] Create params.sublime-snippet --- Rails/params.sublime-snippet | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Rails/params.sublime-snippet diff --git a/Rails/params.sublime-snippet b/Rails/params.sublime-snippet new file mode 100644 index 0000000..275f688 --- /dev/null +++ b/Rails/params.sublime-snippet @@ -0,0 +1,8 @@ + + + pa + source.ruby.rails + Rails Params Hash + From 70b6c1463c011934c656f200ad6e129af6bfd415 Mon Sep 17 00:00:00 2001 From: Arnel Bucio Date: Fri, 4 Oct 2013 16:14:24 +0800 Subject: [PATCH 04/13] Fix snippets --- RSpec/shb.rspec-it-should-have_button.sublime-snippet | 4 ++-- RSpec/shf.rspec-it-should-have_field.sublime-snippet | 4 ++-- RSpec/shl.rspec-it-should-have_link.sublime-snippet | 4 ++-- RSpec/shs.rspec-it-should-have_selector.sublime-snippet | 4 ++-- RSpec/srt.rspec-it-should-respond_to.sublime-snippet | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/RSpec/shb.rspec-it-should-have_button.sublime-snippet b/RSpec/shb.rspec-it-should-have_button.sublime-snippet index 8e64dd5..9a45ae3 100644 --- a/RSpec/shb.rspec-it-should-have_button.sublime-snippet +++ b/RSpec/shb.rspec-it-should-have_button.sublime-snippet @@ -1,6 +1,6 @@ - > + shb source.ruby.rspec RSpec Should Have Button - \ No newline at end of file + diff --git a/RSpec/shf.rspec-it-should-have_field.sublime-snippet b/RSpec/shf.rspec-it-should-have_field.sublime-snippet index 44f9bbb..ee13bba 100644 --- a/RSpec/shf.rspec-it-should-have_field.sublime-snippet +++ b/RSpec/shf.rspec-it-should-have_field.sublime-snippet @@ -1,6 +1,6 @@ - > + shf source.ruby.rspec RSpec Should Have Field - \ No newline at end of file + diff --git a/RSpec/shl.rspec-it-should-have_link.sublime-snippet b/RSpec/shl.rspec-it-should-have_link.sublime-snippet index 5e14c7b..1a92f5c 100644 --- a/RSpec/shl.rspec-it-should-have_link.sublime-snippet +++ b/RSpec/shl.rspec-it-should-have_link.sublime-snippet @@ -1,6 +1,6 @@ - > + shl source.ruby.rspec RSpec Should Have Link - \ No newline at end of file + diff --git a/RSpec/shs.rspec-it-should-have_selector.sublime-snippet b/RSpec/shs.rspec-it-should-have_selector.sublime-snippet index 518e8ad..6c2855b 100644 --- a/RSpec/shs.rspec-it-should-have_selector.sublime-snippet +++ b/RSpec/shs.rspec-it-should-have_selector.sublime-snippet @@ -1,6 +1,6 @@ - > + shs source.ruby.rspec RSpec Should Have Selector - \ No newline at end of file + diff --git a/RSpec/srt.rspec-it-should-respond_to.sublime-snippet b/RSpec/srt.rspec-it-should-respond_to.sublime-snippet index 242344f..ca0c1d2 100644 --- a/RSpec/srt.rspec-it-should-respond_to.sublime-snippet +++ b/RSpec/srt.rspec-it-should-respond_to.sublime-snippet @@ -1,6 +1,6 @@ - > + srt source.ruby.rspec RSpec Should Respond To - \ No newline at end of file + From 29872e9d96dc9773a63d8b16b9ddf915ad3e89c5 Mon Sep 17 00:00:00 2001 From: Arnel Bucio Date: Fri, 4 Oct 2013 16:18:10 +0800 Subject: [PATCH 05/13] Fix SSH clone URL --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 56d1511..3e30b86 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,13 @@ I started this project as I had over 500 ruby/rails/rspec snippets installed - e Search for "Rails Developer Snippets" via Package Control otherwise... ### Mac OSX cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages - git clone git@github.com:j10io/sublime-railsdev.git + git clone git@github.com:j10io/railsdev-sublime-snippets.git ### Linux cd ~/.config/sublime-text-2/Packages - git clone git@github.com:j10io/sublime-railsdev.git + git clone git@github.com:j10io/railsdev-sublime-snippets.git ### Windows cd Users//AppData/Roaming/Sublime\ Text\ 2/Packages/ - git clone git@github.com:j10io/sublime-railsdev.git + git clone git@github.com:j10io/railsdev-sublime-snippets.git ### Sublime Text 3 - Mac OSX cd ~/Library/Application Support/Sublime Text 3/Packages/User git clone git@github.com:j10io/railsdev-sublime-snippets.git @@ -25,10 +25,10 @@ I started this project as I had over 500 ruby/rails/rspec snippets installed - e ## Some support for * [capybara](https://github.com/jnicklas/capybara) Acceptance test framework for web applications * [shoulda](https://github.com/thoughtbot/shoulda) a validations gem by thoughtbot - + ## My Setup (I'm on OSX... your mileage may vary) - 1. Install the dependencies above. + 1. Install the dependencies above. 2. It's worth noting, whilst I wanted to keep **some** of the functionality that Sublime Text provides for Ruby/Rails by default, as well as **some** functionality that the RSpec plugin provides, to avoid **snippet collisions**, I deleted all other Ruby/Rails/RSpec .sublime-snippet files from: * ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Ruby From d964e448e11c3b034b2bd74b2e7623572bdd0101 Mon Sep 17 00:00:00 2001 From: Stefano Schiavi Date: Fri, 31 Jan 2014 19:04:41 +0100 Subject: [PATCH 06/13] updated deprecated before_filter --- Rails/ctrlr.rails-restful-controller.sublime-snippet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rails/ctrlr.rails-restful-controller.sublime-snippet b/Rails/ctrlr.rails-restful-controller.sublime-snippet index a3949e8..9f69d33 100644 --- a/Rails/ctrlr.rails-restful-controller.sublime-snippet +++ b/Rails/ctrlr.rails-restful-controller.sublime-snippet @@ -1,6 +1,6 @@ Date: Sun, 9 Feb 2014 14:19:36 +0100 Subject: [PATCH 07/13] RSpec expect snippet --- RSpec/exp.rspec-exp.sublime-snippet | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 RSpec/exp.rspec-exp.sublime-snippet diff --git a/RSpec/exp.rspec-exp.sublime-snippet b/RSpec/exp.rspec-exp.sublime-snippet new file mode 100644 index 0000000..32646b8 --- /dev/null +++ b/RSpec/exp.rspec-exp.sublime-snippet @@ -0,0 +1,6 @@ + + + exp + source.ruby.rspec + RSpec Expect + \ No newline at end of file From 0076bd105f271916cc11ab6349fa5f3cb6fd7e4e Mon Sep 17 00:00:00 2001 From: Stefano Schiavi Date: Sun, 9 Feb 2014 14:41:35 +0100 Subject: [PATCH 08/13] removed accidental typo --- RSpec/exp.rspec-exp.sublime-snippet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RSpec/exp.rspec-exp.sublime-snippet b/RSpec/exp.rspec-exp.sublime-snippet index 32646b8..8386f52 100644 --- a/RSpec/exp.rspec-exp.sublime-snippet +++ b/RSpec/exp.rspec-exp.sublime-snippet @@ -1,5 +1,5 @@ - + exp source.ruby.rspec RSpec Expect From 6499d615dcfb83a263c55efc8cad9b7b4f870665 Mon Sep 17 00:00:00 2001 From: Constant Meiring Date: Wed, 19 Feb 2014 11:08:09 +0200 Subject: [PATCH 09/13] Added missing colon after except: on line 3 --- Rails/ctrlr.rails-restful-controller.sublime-snippet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rails/ctrlr.rails-restful-controller.sublime-snippet b/Rails/ctrlr.rails-restful-controller.sublime-snippet index 9f69d33..c9c02ae 100644 --- a/Rails/ctrlr.rails-restful-controller.sublime-snippet +++ b/Rails/ctrlr.rails-restful-controller.sublime-snippet @@ -1,6 +1,6 @@ Date: Sat, 1 Mar 2014 19:50:28 +0400 Subject: [PATCH 10/13] RSpec snippet for inline it with expect --- RSpec/ie.rspec-it-expect-inline.sublime-snippet | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 RSpec/ie.rspec-it-expect-inline.sublime-snippet diff --git a/RSpec/ie.rspec-it-expect-inline.sublime-snippet b/RSpec/ie.rspec-it-expect-inline.sublime-snippet new file mode 100644 index 0000000..47a6352 --- /dev/null +++ b/RSpec/ie.rspec-it-expect-inline.sublime-snippet @@ -0,0 +1,6 @@ + + + ie + source.ruby.rspec + RSpec It Expect Inline + \ No newline at end of file From 4204920c253c0e61ebf5c10947a12db536c422b3 Mon Sep 17 00:00:00 2001 From: Andrew Korzhuev Date: Sat, 1 Mar 2014 19:50:48 +0400 Subject: [PATCH 11/13] RSpec snippet for inline it with expect of change --- RSpec/iec.rspec-it-expect-change-inline.sublime-snippet | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 RSpec/iec.rspec-it-expect-change-inline.sublime-snippet diff --git a/RSpec/iec.rspec-it-expect-change-inline.sublime-snippet b/RSpec/iec.rspec-it-expect-change-inline.sublime-snippet new file mode 100644 index 0000000..e7903b7 --- /dev/null +++ b/RSpec/iec.rspec-it-expect-change-inline.sublime-snippet @@ -0,0 +1,6 @@ + + + iec + source.ruby.rspec + RSpec It Expect Change Inline + \ No newline at end of file From 5300bd98b1f9725dc220360fc1ebff5e5f54167a Mon Sep 17 00:00:00 2001 From: Arnel Bucio Date: Sun, 9 Mar 2014 21:30:48 +0800 Subject: [PATCH 12/13] Fix --- ERB/lt.link_to-ERB.sublime-snippet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ERB/lt.link_to-ERB.sublime-snippet b/ERB/lt.link_to-ERB.sublime-snippet index fbabe47..04bad77 100644 --- a/ERB/lt.link_to-ERB.sublime-snippet +++ b/ERB/lt.link_to-ERB.sublime-snippet @@ -1,6 +1,6 @@ - ]]> + ]]> lt text.html.ruby ERB link_to - \ No newline at end of file + From fa42a8c9f0a270c87a45d9aa17969fc8518fa5b9 Mon Sep 17 00:00:00 2001 From: Jeremy Tennant Date: Fri, 22 May 2015 10:40:21 +0700 Subject: [PATCH 13/13] add new snippet for describe, context, it block combination --- ....rspec-describe-context-it-block.sublime-snippet | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 RSpec/dci.rspec-describe-context-it-block.sublime-snippet diff --git a/RSpec/dci.rspec-describe-context-it-block.sublime-snippet b/RSpec/dci.rspec-describe-context-it-block.sublime-snippet new file mode 100644 index 0000000..84f0fe1 --- /dev/null +++ b/RSpec/dci.rspec-describe-context-it-block.sublime-snippet @@ -0,0 +1,13 @@ + + + dci + source.ruby.rspec + RSpec Describe + Context + It Block + \ No newline at end of file