Module: GuardHelpers::BasicHelper
- Includes:
- BaseHelper
- Defined in:
- lib/guard_helpers/basic_helper.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Methods included from BaseHelper
#handle_all_paths, #handle_each_path, included, #paths
Instance Method Details
#run_on_modifications(paths) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/guard_helpers/basic_helper.rb', line 50 def run_on_modifications(paths) super if defined? super handle_each_path(%r{Guardfile}) do guard_reset end handle_each_path(%r{^lib/guard_helpers/(.+)\.rb}) do guard_reset end end |
#start ⇒ Object
10 11 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 40 41 42 43 44 45 46 47 48 |
# File 'lib/guard_helpers/basic_helper.rb', line 10 def start super if defined? super commands = Pry::CommandSet.new do pry_cmd "rspec", "rake rspec" do |*args| guard_bash "bundle exec rake spec" end pry_cmd "install", "install gem" do |*args| bash_build end pry_cmd "nimabi", "try command" do |*args| end pry_cmd "ex", "generate a ex" do |*args| ::RoCommands::Generate.new.ex end pry_cmd "spec", "generate a lib" do |name| ::RoCommands::Generate.new.spec_file(name) end pry_cmd "rbm", "rubymine file" do |path| bash "rubymine #{path}" end pry_cmd "libspec", "" do |*args| ::RoCommands::Shortcuts.new.lib_spec end pry_cmd "reset", "reset guard" do |*args| system "bundle exec guard " end end Pry::Commands.import commands end |