guard

Questions about setting up a working Guard-RSpec example project

你说的曾经没有我的故事 提交于 2019-12-12 05:32:12
问题 I'm trying to set up a working ruby project with guard-rspec . I've mixed together the general method of a tutsplus tutorial with some new syntax as described in the RSpec videos and another post. The project can be found in the stack-overflow-question branch on github. I'm also trying to practice namespacing as described in Programming Ruby 1.9. So eventually I'd like to have example.rb in my lib/example/ directory. There's 4 questions I have about my project: What do I need to put in my

Why is my guard-rspec test failing?

百般思念 提交于 2019-12-12 02:35:29
问题 I set up my guard-rspec environment using the techniques described in this tutorial. I'm also practicing namespacing as described in Programing Ruby starting on page 240. My current project directory is on github in the stack-overflow-post branch. I'm using: ❯ ruby -v ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin15.0] ❯ rbenv -v rbenv 1.0.0 ❯ rbenv versions system * 2.1.1 (set by /Users/max/Google Drive/devbootcamp/phase-0-ruby-bulletin-board/.ruby-version) 2.1.5 2.2.3 2.3.1 ❯

ERROR - Could not load 'guard/rails-assets' or' ' find class Guard::RailsAssets (Rails 4/ zeus/guard)

依然范特西╮ 提交于 2019-12-12 01:54:24
问题 I had a running app with no problem and just did bundle update and bundle install and now. I had not bundle updated for the past 4 months I think. and now when I run $ guard, I have this error: ERROR - Could not load 'guard/rails-assets' or' ' find class Guard::RailsAssets I don't understand where this bug comes from: I assume it is the bundle update that caused the issue as 10 minutes before I had no problem but i am not 100% sure. mathieu-To-be-filled-by-O-E-M:~/rails_projects/mathieu_app$

Guard + Zeus + Rspec-Rails: undefined method 'configure' for Rspec:Module

房东的猫 提交于 2019-12-11 13:36:43
问题 I'm using the following: Rails 4.1.1 guard-zeus 2.0.0 rspec-rails 3.0.1 Out of box default rails g rspec:install and guard init When I run guard and save a spec file, I get the error: undefined method `configure` for RSpec:Module (NoMethodError) I can run specs with rspec spec and rake just fine. In spec_helper , if I require 'rspec/rails before the configure block, guard works fine, but then rspec spec fails with the error: uninitialized constant ActiveSupport::Autoload (NameError) I'm

Angular2: Nested Observables in Guard

不问归期 提交于 2019-12-11 08:54:57
问题 I have a Guard protecting a certain route. In the canActive method I need to make two http requests, at which the second one is triggered based on the response of the first one. However, the second request is never made and I assume it is about the nested construct of returning Observables. 1 canActivate(route: ActivatedRouteSnapshot, 2 state: RouterStateSnapshot) : Observable<boolean>|boolean { 3 return this.provider.getA().map( 4 dataA => { 5 return this.provider.getB().map( 6 dataB => { 7

Guard-RSpec and Spring: command `cmd: spring rspec` doesn't run the specs within Guard

南楼画角 提交于 2019-12-11 08:24:41
问题 Guard-RSpec mentions in the README that one could run specs using spring by specifying a cusom cmd : guard :rspec, cmd: 'spring rspec' do # ... end This used to work fine, until I did a spring binstub --all which changed my bin/spring from... #!/usr/bin/env ruby # # This file was generated by Bundler. # # The application 'spring' is installed as part of a gem, and # this file is here to facilitate running it. # require 'pathname' ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",

Lesscss Mixins with guards. Syntax Error

时光总嘲笑我的痴心妄想 提交于 2019-12-11 06:38:07
问题 I write my CSS with Lesscss using it on client side (with compiler less.js). There are good examples for guards usage in documentation, but it don't work for me. I can't understand, why... Code example goes here: @import "common-functions.less"; // variables @minHeaderWidth: auto; @maxHeaderWidth: 1200px; @minButtonsWidth: 50px; @maxButtonsWidth: 75px; // Mixins with guards .applyHeaderStyles(@headerWidth, @buttonsWidth) when (ispixel(@headerWidth)) { .my-headerElement { width: @headerWidth;

tmux status bar highlights the session name in red if a window fails

扶醉桌前 提交于 2019-12-11 00:34:54
问题 I'm using tmux 2.0, installed on OSX with Homebrew. My terminal uses the solarized colour scheme. If I move my tmux.conf (to ensure I'm using default settings) then my status line looks like this: If I then run a process which fails, the session name gets highlighted in red: No matter what I do, this stays highlighted in red. I've tried all the settings I can find to try and change this behaviour but I haven't found any that change it at all. The failing process is the ruby command line tool

Guard Rspec :cli option is deprecated, change to :cmd option

青春壹個敷衍的年華 提交于 2019-12-10 20:54:51
问题 Working Guardfile in my rails app guard 'rspec', all_after_pass: false, cli: '--drb' do Not working Guardfile guard 'rspec', all_after_pass: false, cmd: '--drb' do I've opened guard with bundle exec guard many times, but I found even though I receive this message Guard::RSpec DEPRECATION WARNING: The :cli option is deprecated. Please customize the new :cmd option to fit your need. and I make the proper changes, :cli is the only one working with rspec. terminal output for :cli 01:49:14 - WARN

include ActionDispatch::TestProcess prevents guard from reloading properly

本小妞迷上赌 提交于 2019-12-10 13:28:30
问题 I'm using fixture_file_upload to test some file uploads in my rspecs If I just put it in the spec I get an error for method not found. To get it working I put include ActionDispatch::TestProcess in my spec but I have found since I did that, that guard is not correctly reloading spec files when I make changes, it keeps running the tests against the old version of the files. I can work around this by stopping and restarting guard, but it kind of defeats the purpose. How do I prevent this from