This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function find_attr(obj, name) { | |
| var k | |
| for(k in obj) { | |
| if(k == name) { | |
| return k | |
| } else if(typeof(obj[k]) == 'object') { | |
| path = find_attr(obj[k], name) | |
| if(path) { | |
| console.log(k + '/' + path) | |
| return (k + '/' + path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/zsh --login | |
| cd ~/path/to/project_dir/ | |
| bundle install | |
| bundle exec rake db:test:prepare | |
| line=$(bundle exec rspec path/to/spec/feature_name_spec.rb | grep 1\ failure) | |
| if [ ${line:-null} = null ]; then | |
| exit 0 | |
| else | |
| exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| gem 'ruby-progressbar' | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Error: | |
| An error occurred while installing pg (0.17.1), and Bundler cannot continue. | |
| Make sure that `gem install pg -v '0.17.1'` succeeds before bundling. | |
| Decision: | |
| gem install pg -v '0.17.1' -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config | |
| Decision 2(better): | |
| This problem can happen due to lack of dependencies. To fix it u can try smth like for rvm: | |
| rvm requirements |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| home Finished in 4 minutes 17.7 seconds | |
| work Finished in 2 minutes 2.9 seconds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # было | |
| context 'add medication' do | |
| before do | |
| create :consult_medication | |
| visit admin_consult_medications_path | |
| within('#sidebar') { click_link 'Add' } | |
| fill_in 'consult_medication[name]', :with => form.name | |
| click_button 'Create' | |
| end |