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
    
  
  
    
  | stats = Sidekiq::Stats.new | |
| stats.queues | |
| stats.enqueued | |
| stats.processed | |
| stats.failed | 
  
    
      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
    
  
  
    
  | SELECT | |
| idstat.relname AS TABLE_NAME, -- имя таблицы | |
| indexrelname AS index_name, -- индекс | |
| idstat.idx_scan AS index_scans_count, -- число сканирований по этому индексу | |
| pg_size_pretty(pg_relation_size(indexrelid)) AS index_size, -- размер индекса | |
| tabstat.idx_scan AS table_reads_index_count, -- индексных чтений по таблице | |
| tabstat.seq_scan AS table_reads_seq_count, -- последовательных чтений по таблице | |
| tabstat.seq_scan + tabstat.idx_scan AS table_reads_count, -- чтений по таблице | |
| n_tup_upd + n_tup_ins + n_tup_del AS table_writes_count, -- операций записи | |
| pg_size_pretty(pg_relation_size(idstat.relid)) AS table_size -- размер таблицы | 
  
    
      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
    
  
  
    
  | # Docker-in-Docker Gitlab runners setup taken from: | |
| # https://medium.com/@tonywooster/docker-in-docker-in-gitlab-runners-220caeb708ca | |
| dind: | |
| restart: always | |
| privileged: true | |
| volumes: | |
| - /var/lib/docker | |
| image: docker:17.09.0-ce-dind | |
| command: | |
| - --storage-driver=overlay2 | 
  
    
      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
    
  
  
    
  | require 'spec_helper' | |
| # Bustle is a pubsub system used for activity streams: | |
| # https://github.com/fredwu/bustle | |
| # | |
| # Here when a person follows another (or a discussion, for instance), the observer wires | |
| # up pubsub between them for future activity notifications. The Follow model knows nothing | |
| # about the implementation choices for the pubsub system. | |
| describe FollowObserver do | |
| subject { FollowObserver.instance } | 
  
    
      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
    
  
  
    
  | =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') | 
  
    
      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
    
  
  
    
  | # lib/tasks/db.rake | |
| namespace :db do | |
| desc "Dumps the database to db/APP_NAME.dump" | |
| task :dump => :environment do | |
| cmd = nil | |
| with_config do |app, host, db, user| | |
| cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump" | |
| end | |
| puts cmd |