rspec-web 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +45 -0
- data/VERSION +1 -0
- data/bin/rspec-web +5 -0
- data/lib/rspec_web/formatter.rb +136 -0
- data/lib/rspec_web/web_application/public/css/bootstrap.bottombar.css +48 -0
- data/lib/rspec_web/web_application/public/css/bootstrap.css +610 -0
- data/lib/rspec_web/web_application/public/css/bootstrap.responsive.css +3 -0
- data/lib/rspec_web/web_application/public/img/bootstrap.png +0 -0
- data/lib/rspec_web/web_application/public/img/glyphicons-halflings-white.png +0 -0
- data/lib/rspec_web/web_application/public/img/glyphicons-halflings.png +0 -0
- data/lib/rspec_web/web_application/public/img/rails.png +0 -0
- data/lib/rspec_web/web_application/public/img/traffic.png +0 -0
- data/lib/rspec_web/web_application/public/js/bootstrap.js +1 -0
- data/lib/rspec_web/web_application/public/js/date.js +104 -0
- data/lib/rspec_web/web_application/public/js/jquery.cookie.js +47 -0
- data/lib/rspec_web/web_application/public/js/jquery.gracefulWebSocket.js +165 -0
- data/lib/rspec_web/web_application/public/js/jquery.js +4 -0
- data/lib/rspec_web/web_application/public/js/jquery.json.js +22 -0
- data/lib/rspec_web/web_application/public/js/script.js +258 -0
- data/lib/rspec_web/web_application/public/js/tmpl.js +35 -0
- data/lib/rspec_web/web_application/views/index.haml +161 -0
- data/lib/rspec_web/web_application/views/style.scss +155 -0
- data/lib/rspec_web/web_application.rb +24 -0
- data/lib/rspec_web/web_socket_server.rb +53 -0
- data/lib/rspec_web.rb +17 -0
- metadata +137 -0
| @@ -0,0 +1,161 @@ | |
| 1 | 
            +
            !!! 5
         | 
| 2 | 
            +
            %html(lang="en")
         | 
| 3 | 
            +
              %head
         | 
| 4 | 
            +
                %meta(charset="utf-8")
         | 
| 5 | 
            +
                %meta(name="apple-mobile-web-app-capable" content="yes")
         | 
| 6 | 
            +
                %meta(name="viewport" content="width=device-width, initial-scale=1.0")
         | 
| 7 | 
            +
                %title Rspec Web Frontend
         | 
| 8 | 
            +
                
         | 
| 9 | 
            +
                /[if lt IE 9]
         | 
| 10 | 
            +
                  %script(type="text/javascript" src="http://html5shim.googlecode.com/svn/trunk/html5.js")
         | 
| 11 | 
            +
                
         | 
| 12 | 
            +
                %link(href="/css/bootstrap.responsive.css" media="screen" rel="stylesheet" type="text/css")
         | 
| 13 | 
            +
                %link(href="/css/bootstrap.css" media="screen" rel="stylesheet" type="text/css")
         | 
| 14 | 
            +
                %link(href="/css/bootstrap.bottombar.css" media="screen" rel="stylesheet" type="text/css")
         | 
| 15 | 
            +
                %link(href="/css/style.css" media="screen" rel="stylesheet" type="text/css")
         | 
| 16 | 
            +
                
         | 
| 17 | 
            +
                :css
         | 
| 18 | 
            +
                  body {
         | 
| 19 | 
            +
                    padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
         | 
| 20 | 
            +
                  }
         | 
| 21 | 
            +
                
         | 
| 22 | 
            +
                / %link(href="images/favicon.ico" rel="shortcut icon")
         | 
| 23 | 
            +
                / %link(href="images/apple-touch-icon.png" rel="apple-touch-icon")
         | 
| 24 | 
            +
                / %link(href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon" sizes="72x72")
         | 
| 25 | 
            +
                / %link(href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon" sizes="114x114")
         | 
| 26 | 
            +
                
         | 
| 27 | 
            +
                %script#iterationListEntry(type="text/html")
         | 
| 28 | 
            +
                  :plain
         | 
| 29 | 
            +
                    <li>
         | 
| 30 | 
            +
                      <a href="#iteration-<%= timestamp %>" data-toggle="tab">
         | 
| 31 | 
            +
                        <i class="icon-info-sign" id="iteration-<%= timestamp %>-list-entry-icon"></i>
         | 
| 32 | 
            +
                        <%= formattedTimestamp %>
         | 
| 33 | 
            +
                      </a>
         | 
| 34 | 
            +
                    </li>
         | 
| 35 | 
            +
                %script#iterationEntry(type="text/html")
         | 
| 36 | 
            +
                  :plain
         | 
| 37 | 
            +
                    <div class="tab-pane iteration" id="iteration-<%= timestamp %>">
         | 
| 38 | 
            +
                      
         | 
| 39 | 
            +
                      <div class="row-fluid progress-container" id="iteration-<%= timestamp %>-progress-row">
         | 
| 40 | 
            +
                        <div class="span12" style="padding-right: 10px;">
         | 
| 41 | 
            +
                          <div class="progress progress-striped progress-passing active" id="iteration-<%= timestamp %>-progress-container">
         | 
| 42 | 
            +
                            <div class="bar" id="iteration-<%= timestamp %>-progress-bar" style="width: 0%;"></div>
         | 
| 43 | 
            +
                          </div>
         | 
| 44 | 
            +
                        </div>
         | 
| 45 | 
            +
                      </div>
         | 
| 46 | 
            +
                      
         | 
| 47 | 
            +
                      <div class="row-fluid">
         | 
| 48 | 
            +
                        <div class="span12">
         | 
| 49 | 
            +
                          <h6><%= exampleCount %> Example<%= exampleCount > 1 ? "s" : "" %></h6>
         | 
| 50 | 
            +
                        </div>
         | 
| 51 | 
            +
                      </div>
         | 
| 52 | 
            +
                      
         | 
| 53 | 
            +
                      <div class="tabbable">
         | 
| 54 | 
            +
                        <ul class="nav nav-tabs">
         | 
| 55 | 
            +
                          <li class="active">
         | 
| 56 | 
            +
                            <a href="#iteration-<%= timestamp %>-tab-content-passing" id="iteration-<%= timestamp %>-tab-passing" class="tab-passing" data-toggle="tab">
         | 
| 57 | 
            +
                              Passing
         | 
| 58 | 
            +
                              <span class="label label-passing" id="iteration-<%= timestamp %>-tab-passing-count">0</span>
         | 
| 59 | 
            +
                            </a>
         | 
| 60 | 
            +
                          </li>
         | 
| 61 | 
            +
                          <li>
         | 
| 62 | 
            +
                            <a href="#iteration-<%= timestamp %>-tab-content-pending" id="iteration-<%= timestamp %>-tab-pending" class="tab-pending" data-toggle="tab">
         | 
| 63 | 
            +
                              Pending
         | 
| 64 | 
            +
                              <span class="label label-pending" id="iteration-<%= timestamp %>-tab-pending-count">0</span>
         | 
| 65 | 
            +
                            </a>
         | 
| 66 | 
            +
                          </li>
         | 
| 67 | 
            +
                          <li>
         | 
| 68 | 
            +
                            <a href="#iteration-<%= timestamp %>-tab-content-failing" id="iteration-<%= timestamp %>-tab-failing" class="tab-failing" data-toggle="tab">
         | 
| 69 | 
            +
                              Failing
         | 
| 70 | 
            +
                              <span class="label label-failing" id="iteration-<%= timestamp %>-tab-failing-count">0</span>
         | 
| 71 | 
            +
                            </a>
         | 
| 72 | 
            +
                          </li>
         | 
| 73 | 
            +
                        </ul>
         | 
| 74 | 
            +
                        
         | 
| 75 | 
            +
                        <div class="tab-content">
         | 
| 76 | 
            +
                          <div class="tab-pane active" id="iteration-<%= timestamp %>-tab-content-passing"></div>
         | 
| 77 | 
            +
                          <div class="tab-pane" id="iteration-<%= timestamp %>-tab-content-pending"></div>
         | 
| 78 | 
            +
                          <div class="tab-pane" id="iteration-<%= timestamp %>-tab-content-failing"></div>
         | 
| 79 | 
            +
                        </div>
         | 
| 80 | 
            +
                      </div>
         | 
| 81 | 
            +
                    </div>
         | 
| 82 | 
            +
                %script#exampleEntry(type="text/html")
         | 
| 83 | 
            +
                  :plain
         | 
| 84 | 
            +
                    <div class="accordion" id="iteration-<%= timestamp %>-accordion">
         | 
| 85 | 
            +
                      <div class="accordion-group">
         | 
| 86 | 
            +
                        <div class="accordion-heading">
         | 
| 87 | 
            +
                          <a class="accordion-toggle" data-toggle="collapse" data-parent="#iteration-<%= timestamp %>-accordion" href="#iteration-<%= timestamp %>-example-<%= exampleIndex %>">
         | 
| 88 | 
            +
                            <%= description %>
         | 
| 89 | 
            +
                          </a>
         | 
| 90 | 
            +
                        </div>
         | 
| 91 | 
            +
                        <div class="accordion-body collapse" id="iteration-<%= timestamp %>-example-<%= exampleIndex %>" style="height: 0px;">
         | 
| 92 | 
            +
                          <p>Started: <%= started_at %></p>
         | 
| 93 | 
            +
                          <p>Finished: <%= finished_at %></p>
         | 
| 94 | 
            +
                          <p>Run time: <%= run_time %></p>
         | 
| 95 | 
            +
                          <p>Location: <%= file_path %>:<%= line_number %></p>
         | 
| 96 | 
            +
                        </div>
         | 
| 97 | 
            +
                      </div>
         | 
| 98 | 
            +
                    </div>
         | 
| 99 | 
            +
              %body
         | 
| 100 | 
            +
                .navbar.navbar-fixed-top
         | 
| 101 | 
            +
                  .navbar-inner
         | 
| 102 | 
            +
                    .container-fluid
         | 
| 103 | 
            +
                      %a.brand(href="#") Rspec Web
         | 
| 104 | 
            +
                      %ul.nav.pull-right
         | 
| 105 | 
            +
                        %li
         | 
| 106 | 
            +
                          .btn-group
         | 
| 107 | 
            +
                            %a.btn#btn-settings(href="#")
         | 
| 108 | 
            +
                              %i.icon-cog
         | 
| 109 | 
            +
                        %li.divider-vertical
         | 
| 110 | 
            +
                        %li
         | 
| 111 | 
            +
                          .btn-group
         | 
| 112 | 
            +
                            %a.btn#btn-run-specs(href="#")
         | 
| 113 | 
            +
                              %i.icon-play
         | 
| 114 | 
            +
                .container-fluid#settings
         | 
| 115 | 
            +
                  .row-fluid
         | 
| 116 | 
            +
                    .well
         | 
| 117 | 
            +
                      .row-fluid
         | 
| 118 | 
            +
                        .input-prepend
         | 
| 119 | 
            +
                          %span.add-on Rspec Command
         | 
| 120 | 
            +
                          %input.span8#settingsRspecCommand(type="text" placeholder="Rspec run command (default: 'rspec ./spec')")
         | 
| 121 | 
            +
                      .row-fluid
         | 
| 122 | 
            +
                        .span12
         | 
| 123 | 
            +
                          %a.btn.btn-small.btn-primary.pull-right#btn-settings-save(href="#") Save
         | 
| 124 | 
            +
                          %a.btn.btn-small.btn.pull-right#btn-settings-cancel(href="#" style="margin-right: 10px;") Cancel
         | 
| 125 | 
            +
                .container-fluid#alerts
         | 
| 126 | 
            +
                  .alert.alert-block#alertSettingsNotSaved
         | 
| 127 | 
            +
                    %strong Warning!
         | 
| 128 | 
            +
                    Settings were not saved.
         | 
| 129 | 
            +
                  .alert.alert-success#alertSettingsSaved
         | 
| 130 | 
            +
                    %strong Success!
         | 
| 131 | 
            +
                    Settings were saved.
         | 
| 132 | 
            +
                .container-fluid#views
         | 
| 133 | 
            +
                  .row-fluid#noIterationsErrorView
         | 
| 134 | 
            +
                    .well
         | 
| 135 | 
            +
                      %h1 No iterations yet.
         | 
| 136 | 
            +
                      %h6 Hurry up and run some specs!
         | 
| 137 | 
            +
                  .row-fluid#iterationsView
         | 
| 138 | 
            +
                    .span4#iterationsListContainer
         | 
| 139 | 
            +
                      .tabbable.well(style="padding: 8px 0;")
         | 
| 140 | 
            +
                        %ul.nav.nav-list#iterationsList
         | 
| 141 | 
            +
                          %li.nav-header Iterations
         | 
| 142 | 
            +
                    .span8#iterationsContainer
         | 
| 143 | 
            +
                      .tab-content#iterations
         | 
| 144 | 
            +
                .container-fluid#footer
         | 
| 145 | 
            +
                  .row-fluid
         | 
| 146 | 
            +
                    %hr(style="margin-top: 0;")
         | 
| 147 | 
            +
                    %p.pull-left © Lewis Software 2012
         | 
| 148 | 
            +
                    .pull-right 
         | 
| 149 | 
            +
                      %img(src="/img/rails.png" width="20" height="25")
         | 
| 150 | 
            +
                    .pull-right(style="margin-right: 10px;")
         | 
| 151 | 
            +
                      %img(src="/img/bootstrap.png" width="25" height="25")
         | 
| 152 | 
            +
                    .pull-right(style="margin-right: 10px;")
         | 
| 153 | 
            +
                      %a(href="javascript:location.reload(true)") Refresh
         | 
| 154 | 
            +
                %script(type="text/javascript" src="/js/jquery.js")
         | 
| 155 | 
            +
                %script(type="text/javascript" src="/js/jquery.cookie.js")
         | 
| 156 | 
            +
                %script(type="text/javascript" src="/js/jquery.gracefulWebSocket.js")
         | 
| 157 | 
            +
                %script(type="text/javascript" src="/js/jquery.json.js")
         | 
| 158 | 
            +
                %script(type="text/javascript" src="/js/tmpl.js")
         | 
| 159 | 
            +
                %script(type="text/javascript" src="/js/date.js")
         | 
| 160 | 
            +
                %script(type="text/javascript" src="/js/bootstrap.js")
         | 
| 161 | 
            +
                %script(type="text/javascript" src="/js/script.js")
         | 
| @@ -0,0 +1,155 @@ | |
| 1 | 
            +
            /* Keep divider shown at all times */
         | 
| 2 | 
            +
            .navbar .nav > .divider-vertical {
         | 
| 3 | 
            +
              display: block;
         | 
| 4 | 
            +
            }
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            #views > .row-fluid {
         | 
| 7 | 
            +
              display: none;
         | 
| 8 | 
            +
            }
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            #views {
         | 
| 11 | 
            +
              padding-bottom: 110px;
         | 
| 12 | 
            +
            }
         | 
| 13 | 
            +
             | 
| 14 | 
            +
            #footer {
         | 
| 15 | 
            +
              background-color: white;
         | 
| 16 | 
            +
            /*  height: 80px;*/
         | 
| 17 | 
            +
              position: fixed;
         | 
| 18 | 
            +
              bottom: 0;
         | 
| 19 | 
            +
              left: 0;
         | 
| 20 | 
            +
              right: 0;
         | 
| 21 | 
            +
            }
         | 
| 22 | 
            +
             | 
| 23 | 
            +
            #settings {
         | 
| 24 | 
            +
              display: none;
         | 
| 25 | 
            +
              position: absolute;
         | 
| 26 | 
            +
              top: 35px;
         | 
| 27 | 
            +
            }
         | 
| 28 | 
            +
             | 
| 29 | 
            +
            #settings .well {
         | 
| 30 | 
            +
              -webkit-box-shadow: 0px 0px 10px 1px #000000;
         | 
| 31 | 
            +
              -moz-box-shadow: 0px 0px 10px 1px #000000;
         | 
| 32 | 
            +
              box-shadow: 0px 0px 10px 1px #000000;
         | 
| 33 | 
            +
            }
         | 
| 34 | 
            +
             | 
| 35 | 
            +
            .alert {
         | 
| 36 | 
            +
              display: none;
         | 
| 37 | 
            +
              position: absolute;
         | 
| 38 | 
            +
              top: 35px;
         | 
| 39 | 
            +
              -webkit-box-shadow: 0px 0px 10px 1px #000000;
         | 
| 40 | 
            +
              -moz-box-shadow: 0px 0px 10px 1px #000000;
         | 
| 41 | 
            +
              box-shadow: 0px 0px 10px 1px #000000;
         | 
| 42 | 
            +
            }
         | 
| 43 | 
            +
             | 
| 44 | 
            +
            .example-count {
         | 
| 45 | 
            +
              color: white;
         | 
| 46 | 
            +
              font-weight: bold;
         | 
| 47 | 
            +
              width: 6px;
         | 
| 48 | 
            +
              height: 6px;
         | 
| 49 | 
            +
              padding: 3px;
         | 
| 50 | 
            +
              text-decoration: none;
         | 
| 51 | 
            +
              -webkit-border-radius: 10px;
         | 
| 52 | 
            +
              -moz-border-radius: 10px;
         | 
| 53 | 
            +
              border-radius: 10px;
         | 
| 54 | 
            +
            }
         | 
| 55 | 
            +
             | 
| 56 | 
            +
            .passing-count {
         | 
| 57 | 
            +
              @extend .example-count;
         | 
| 58 | 
            +
              background-color: #62C462;
         | 
| 59 | 
            +
            }
         | 
| 60 | 
            +
             | 
| 61 | 
            +
            .pending-count {
         | 
| 62 | 
            +
              @extend .example-count;
         | 
| 63 | 
            +
              background-color: #F0E181;
         | 
| 64 | 
            +
            }
         | 
| 65 | 
            +
             | 
| 66 | 
            +
            .failing-count {
         | 
| 67 | 
            +
              @extend .example-count;
         | 
| 68 | 
            +
              background-color: #EE5F5B;
         | 
| 69 | 
            +
            }
         | 
| 70 | 
            +
             | 
| 71 | 
            +
            .progress-passing .bar {
         | 
| 72 | 
            +
              background-color: #62C462;
         | 
| 73 | 
            +
              background-image: none;
         | 
| 74 | 
            +
            }
         | 
| 75 | 
            +
            .progress-passing.active .bar {
         | 
| 76 | 
            +
              background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
         | 
| 77 | 
            +
              background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
         | 
| 78 | 
            +
              background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
         | 
| 79 | 
            +
              background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
         | 
| 80 | 
            +
              background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
         | 
| 81 | 
            +
              background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
         | 
| 82 | 
            +
            }
         | 
| 83 | 
            +
             | 
| 84 | 
            +
            .progress-pending .bar {
         | 
| 85 | 
            +
              background-color: #F0E181;
         | 
| 86 | 
            +
              background-image: none;
         | 
| 87 | 
            +
            }
         | 
| 88 | 
            +
             | 
| 89 | 
            +
            .progress-pending.active .bar {
         | 
| 90 | 
            +
              background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.25)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.25)), color-stop(0.75, rgba(255, 255, 255, 0.25)), color-stop(0.75, transparent), to(transparent));
         | 
| 91 | 
            +
              background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.25) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0.25) 75%, transparent 75%, transparent);
         | 
| 92 | 
            +
              background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.25) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0.25) 75%, transparent 75%, transparent);
         | 
| 93 | 
            +
              background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.25) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0.25) 75%, transparent 75%, transparent);
         | 
| 94 | 
            +
              background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.25) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0.25) 75%, transparent 75%, transparent);
         | 
| 95 | 
            +
              background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.25) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0.25) 75%, transparent 75%, transparent);
         | 
| 96 | 
            +
            }
         | 
| 97 | 
            +
             | 
| 98 | 
            +
            .progress-failing .bar {
         | 
| 99 | 
            +
              background-color: #EE5F5B;
         | 
| 100 | 
            +
              background-image: none;
         | 
| 101 | 
            +
            }
         | 
| 102 | 
            +
             | 
| 103 | 
            +
            .progress-failing.active .bar {
         | 
| 104 | 
            +
              background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
         | 
| 105 | 
            +
              background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
         | 
| 106 | 
            +
              background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
         | 
| 107 | 
            +
              background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
         | 
| 108 | 
            +
              background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
         | 
| 109 | 
            +
              background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
         | 
| 110 | 
            +
            }
         | 
| 111 | 
            +
             | 
| 112 | 
            +
            .tab-passing.active {
         | 
| 113 | 
            +
              background: -moz-linear-gradient(top,  rgba(89,204,40,0.25) 0%, rgba(125,185,232,0) 100%); /* FF3.6+ */
         | 
| 114 | 
            +
              background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(89,204,40,0.25)), color-stop(100%,rgba(125,185,232,0))); /* Chrome,Safari4+ */
         | 
| 115 | 
            +
              background: -webkit-linear-gradient(top,  rgba(89,204,40,0.25) 0%,rgba(125,185,232,0) 100%); /* Chrome10+,Safari5.1+ */
         | 
| 116 | 
            +
              background: -o-linear-gradient(top,  rgba(89,204,40,0.25) 0%,rgba(125,185,232,0) 100%); /* Opera 11.10+ */
         | 
| 117 | 
            +
              background: -ms-linear-gradient(top,  rgba(89,204,40,0.25) 0%,rgba(125,185,232,0) 100%); /* IE10+ */
         | 
| 118 | 
            +
              background: linear-gradient(top,  rgba(89,204,40,0.25) 0%,rgba(125,185,232,0) 100%); /* W3C */
         | 
| 119 | 
            +
              filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4059cc28', endColorstr='#007db9e8',GradientType=0 ); /* IE6-9 */
         | 
| 120 | 
            +
            }
         | 
| 121 | 
            +
             | 
| 122 | 
            +
            .tab-pending.active {
         | 
| 123 | 
            +
              background: -moz-linear-gradient(top,  rgba(208,211,42,0.25) 0%, rgba(125,185,232,0) 100%); /* FF3.6+ */
         | 
| 124 | 
            +
              background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(208,211,42,0.25)), color-stop(100%,rgba(125,185,232,0))); /* Chrome,Safari4+ */
         | 
| 125 | 
            +
              background: -webkit-linear-gradient(top,  rgba(208,211,42,0.25) 0%,rgba(125,185,232,0) 100%); /* Chrome10+,Safari5.1+ */
         | 
| 126 | 
            +
              background: -o-linear-gradient(top,  rgba(208,211,42,0.25) 0%,rgba(125,185,232,0) 100%); /* Opera 11.10+ */
         | 
| 127 | 
            +
              background: -ms-linear-gradient(top,  rgba(208,211,42,0.25) 0%,rgba(125,185,232,0) 100%); /* IE10+ */
         | 
| 128 | 
            +
              background: linear-gradient(top,  rgba(208,211,42,0.25) 0%,rgba(125,185,232,0) 100%); /* W3C */
         | 
| 129 | 
            +
              filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#40d0d32a', endColorstr='#007db9e8',GradientType=0 ); /* IE6-9 */
         | 
| 130 | 
            +
            }
         | 
| 131 | 
            +
             | 
| 132 | 
            +
            .tab-failing.active {
         | 
| 133 | 
            +
              background: -moz-linear-gradient(top,  rgba(204,40,40,0.25) 0%, rgba(125,185,232,0) 100%); /* FF3.6+ */
         | 
| 134 | 
            +
              background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(204,40,40,0.25)), color-stop(100%,rgba(125,185,232,0))); /* Chrome,Safari4+ */
         | 
| 135 | 
            +
              background: -webkit-linear-gradient(top,  rgba(204,40,40,0.25) 0%,rgba(125,185,232,0) 100%); /* Chrome10+,Safari5.1+ */
         | 
| 136 | 
            +
              background: -o-linear-gradient(top,  rgba(204,40,40,0.25) 0%,rgba(125,185,232,0) 100%); /* Opera 11.10+ */
         | 
| 137 | 
            +
              background: -ms-linear-gradient(top,  rgba(204,40,40,0.25) 0%,rgba(125,185,232,0) 100%); /* IE10+ */
         | 
| 138 | 
            +
              background: linear-gradient(top,  rgba(204,40,40,0.25) 0%,rgba(125,185,232,0) 100%); /* W3C */
         | 
| 139 | 
            +
              filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#40cc2828', endColorstr='#007db9e8',GradientType=0 ); /* IE6-9 */
         | 
| 140 | 
            +
            }
         | 
| 141 | 
            +
             | 
| 142 | 
            +
            .label-passing {
         | 
| 143 | 
            +
              @extend .label;
         | 
| 144 | 
            +
              background-color: #62C462;
         | 
| 145 | 
            +
            }
         | 
| 146 | 
            +
             | 
| 147 | 
            +
            .label-pending {
         | 
| 148 | 
            +
              @extend .label;
         | 
| 149 | 
            +
              background-color: #F0E181;
         | 
| 150 | 
            +
            }
         | 
| 151 | 
            +
             | 
| 152 | 
            +
            .label-failing {
         | 
| 153 | 
            +
              @extend .label;
         | 
| 154 | 
            +
              background-color: #CC2828;
         | 
| 155 | 
            +
            }
         | 
| @@ -0,0 +1,24 @@ | |
| 1 | 
            +
            require 'pathname'
         | 
| 2 | 
            +
            require 'bundler/setup'
         | 
| 3 | 
            +
            require 'haml'
         | 
| 4 | 
            +
            require 'sass'
         | 
| 5 | 
            +
            require 'sinatra/base'
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            module RspecWeb
         | 
| 8 | 
            +
              class WebApplication < Sinatra::Base
         | 
| 9 | 
            +
                configure do
         | 
| 10 | 
            +
                  set :haml, :format => :html5
         | 
| 11 | 
            +
                  set :root, Pathname.new(__FILE__).dirname.join('web_application').expand_path.to_s
         | 
| 12 | 
            +
                  
         | 
| 13 | 
            +
                  enable :method_override
         | 
| 14 | 
            +
                end
         | 
| 15 | 
            +
                
         | 
| 16 | 
            +
                get '/css/style.css' do
         | 
| 17 | 
            +
                  scss :style
         | 
| 18 | 
            +
                end
         | 
| 19 | 
            +
                
         | 
| 20 | 
            +
                get '/' do
         | 
| 21 | 
            +
                  haml :index
         | 
| 22 | 
            +
                end
         | 
| 23 | 
            +
              end
         | 
| 24 | 
            +
            end
         | 
| @@ -0,0 +1,53 @@ | |
| 1 | 
            +
            require 'bundler/setup'
         | 
| 2 | 
            +
            require 'json'
         | 
| 3 | 
            +
            require 'em-websocket'
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            module RspecWeb
         | 
| 6 | 
            +
              module WebSocketServer
         | 
| 7 | 
            +
                class << self
         | 
| 8 | 
            +
                  def run
         | 
| 9 | 
            +
                    EventMachine.run do
         | 
| 10 | 
            +
                      @receivers = {}
         | 
| 11 | 
            +
                      
         | 
| 12 | 
            +
                      EventMachine::WebSocket.start(:host => "localhost", :port => 10081) do |ws|
         | 
| 13 | 
            +
                        ws.onmessage do |raw_msg|
         | 
| 14 | 
            +
                          msg = JSON.parse(raw_msg)
         | 
| 15 | 
            +
                          
         | 
| 16 | 
            +
                          if msg.has_key?("receiver")
         | 
| 17 | 
            +
                            receiver = msg["receiver"]
         | 
| 18 | 
            +
                            case receiver
         | 
| 19 | 
            +
                            when "server"
         | 
| 20 | 
            +
                              if msg.has_key?("method")
         | 
| 21 | 
            +
                                case msg["method"]
         | 
| 22 | 
            +
                                when "identify"
         | 
| 23 | 
            +
                                  identity = msg["arguments"].first
         | 
| 24 | 
            +
                                  @receivers[identity] ||= []
         | 
| 25 | 
            +
                                  @receivers[identity] << ws
         | 
| 26 | 
            +
                                when "disconnect"
         | 
| 27 | 
            +
                                  identity = msg["arguments"].first
         | 
| 28 | 
            +
                                  @receivers[identity] ||= []
         | 
| 29 | 
            +
                                  @receivers[identity].delete(ws)
         | 
| 30 | 
            +
                                when "runSpecs"
         | 
| 31 | 
            +
                                  command = msg["arguments"].first
         | 
| 32 | 
            +
                                  
         | 
| 33 | 
            +
                                  Thread.new { `#{command}` }
         | 
| 34 | 
            +
                                end
         | 
| 35 | 
            +
                              end
         | 
| 36 | 
            +
                            when "web" || "rspec"  
         | 
| 37 | 
            +
                              @receivers[receiver] ||= []
         | 
| 38 | 
            +
                              @receivers[receiver].each { |socket| socket.send(raw_msg) }
         | 
| 39 | 
            +
                            end
         | 
| 40 | 
            +
                          end
         | 
| 41 | 
            +
                        end
         | 
| 42 | 
            +
                        
         | 
| 43 | 
            +
                        # ws.onclose {}
         | 
| 44 | 
            +
                      end
         | 
| 45 | 
            +
                    end
         | 
| 46 | 
            +
                  end
         | 
| 47 | 
            +
                  
         | 
| 48 | 
            +
                  def run!
         | 
| 49 | 
            +
                    Thread.new { run }
         | 
| 50 | 
            +
                  end
         | 
| 51 | 
            +
                end
         | 
| 52 | 
            +
              end
         | 
| 53 | 
            +
            end
         | 
    
        data/lib/rspec_web.rb
    ADDED
    
    | @@ -0,0 +1,17 @@ | |
| 1 | 
            +
            require 'pathname'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            module RspecWeb
         | 
| 4 | 
            +
              LIB = Pathname.new(__FILE__).dirname.expand_path
         | 
| 5 | 
            +
              VERSION = LIB.join('..', 'VERSION').expand_path.read
         | 
| 6 | 
            +
            end
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            $:.unshift(RspecWeb::LIB.to_s) unless $:.include?(RspecWeb::LIB.to_s)
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            # Pathname.new(__FILE__).dirname.join('rspec_web').expand_path.tap do |rspec_web_dir|
         | 
| 11 | 
            +
            #   require rspec_web_dir.join('formatter').to_s
         | 
| 12 | 
            +
            #   require rspec_web_dir.join('web_socket_server').to_s
         | 
| 13 | 
            +
            #   require rspec_web_dir.join('web_application').to_s
         | 
| 14 | 
            +
            # end
         | 
| 15 | 
            +
            require 'rspec_web/formatter'
         | 
| 16 | 
            +
            require 'rspec_web/web_socket_server'
         | 
| 17 | 
            +
            require 'rspec_web/web_application'
         | 
    
        metadata
    ADDED
    
    | @@ -0,0 +1,137 @@ | |
| 1 | 
            +
            --- !ruby/object:Gem::Specification
         | 
| 2 | 
            +
            name: rspec-web
         | 
| 3 | 
            +
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            +
              version: 0.1.1
         | 
| 5 | 
            +
              prerelease: 
         | 
| 6 | 
            +
            platform: ruby
         | 
| 7 | 
            +
            authors:
         | 
| 8 | 
            +
            - Ryan Scott Lewis
         | 
| 9 | 
            +
            autorequire: 
         | 
| 10 | 
            +
            bindir: bin
         | 
| 11 | 
            +
            cert_chain: []
         | 
| 12 | 
            +
            date: 2012-03-07 00:00:00.000000000Z
         | 
| 13 | 
            +
            dependencies:
         | 
| 14 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 15 | 
            +
              name: em-websocket
         | 
| 16 | 
            +
              requirement: &70149113969880 !ruby/object:Gem::Requirement
         | 
| 17 | 
            +
                none: false
         | 
| 18 | 
            +
                requirements:
         | 
| 19 | 
            +
                - - ~>
         | 
| 20 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 21 | 
            +
                    version: 0.3.6
         | 
| 22 | 
            +
              type: :runtime
         | 
| 23 | 
            +
              prerelease: false
         | 
| 24 | 
            +
              version_requirements: *70149113969880
         | 
| 25 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 26 | 
            +
              name: haml
         | 
| 27 | 
            +
              requirement: &70149113966600 !ruby/object:Gem::Requirement
         | 
| 28 | 
            +
                none: false
         | 
| 29 | 
            +
                requirements:
         | 
| 30 | 
            +
                - - ~>
         | 
| 31 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 32 | 
            +
                    version: 3.1.4
         | 
| 33 | 
            +
              type: :runtime
         | 
| 34 | 
            +
              prerelease: false
         | 
| 35 | 
            +
              version_requirements: *70149113966600
         | 
| 36 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 37 | 
            +
              name: sass
         | 
| 38 | 
            +
              requirement: &70149113965820 !ruby/object:Gem::Requirement
         | 
| 39 | 
            +
                none: false
         | 
| 40 | 
            +
                requirements:
         | 
| 41 | 
            +
                - - ~>
         | 
| 42 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 43 | 
            +
                    version: 3.1.14
         | 
| 44 | 
            +
              type: :runtime
         | 
| 45 | 
            +
              prerelease: false
         | 
| 46 | 
            +
              version_requirements: *70149113965820
         | 
| 47 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 48 | 
            +
              name: sinatra
         | 
| 49 | 
            +
              requirement: &70149113964840 !ruby/object:Gem::Requirement
         | 
| 50 | 
            +
                none: false
         | 
| 51 | 
            +
                requirements:
         | 
| 52 | 
            +
                - - ~>
         | 
| 53 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            +
                    version: 1.3.2
         | 
| 55 | 
            +
              type: :runtime
         | 
| 56 | 
            +
              prerelease: false
         | 
| 57 | 
            +
              version_requirements: *70149113964840
         | 
| 58 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 59 | 
            +
              name: rspec
         | 
| 60 | 
            +
              requirement: &70149113963680 !ruby/object:Gem::Requirement
         | 
| 61 | 
            +
                none: false
         | 
| 62 | 
            +
                requirements:
         | 
| 63 | 
            +
                - - ~>
         | 
| 64 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 65 | 
            +
                    version: 2.8.0
         | 
| 66 | 
            +
              type: :runtime
         | 
| 67 | 
            +
              prerelease: false
         | 
| 68 | 
            +
              version_requirements: *70149113963680
         | 
| 69 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 70 | 
            +
              name: web-socket-ruby
         | 
| 71 | 
            +
              requirement: &70149113962080 !ruby/object:Gem::Requirement
         | 
| 72 | 
            +
                none: false
         | 
| 73 | 
            +
                requirements:
         | 
| 74 | 
            +
                - - ~>
         | 
| 75 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 76 | 
            +
                    version: 0.1.0
         | 
| 77 | 
            +
              type: :runtime
         | 
| 78 | 
            +
              prerelease: false
         | 
| 79 | 
            +
              version_requirements: *70149113962080
         | 
| 80 | 
            +
            description: A web front-end for RSpec tests.
         | 
| 81 | 
            +
            email: c00lryguy@gmail.com
         | 
| 82 | 
            +
            executables: []
         | 
| 83 | 
            +
            extensions: []
         | 
| 84 | 
            +
            extra_rdoc_files:
         | 
| 85 | 
            +
            - VERSION
         | 
| 86 | 
            +
            files:
         | 
| 87 | 
            +
            - VERSION
         | 
| 88 | 
            +
            - Gemfile.lock
         | 
| 89 | 
            +
            - bin/rspec-web
         | 
| 90 | 
            +
            - lib/rspec_web/formatter.rb
         | 
| 91 | 
            +
            - lib/rspec_web/web_application/public/css/bootstrap.bottombar.css
         | 
| 92 | 
            +
            - lib/rspec_web/web_application/public/css/bootstrap.css
         | 
| 93 | 
            +
            - lib/rspec_web/web_application/public/css/bootstrap.responsive.css
         | 
| 94 | 
            +
            - lib/rspec_web/web_application/public/img/bootstrap.png
         | 
| 95 | 
            +
            - lib/rspec_web/web_application/public/img/glyphicons-halflings-white.png
         | 
| 96 | 
            +
            - lib/rspec_web/web_application/public/img/glyphicons-halflings.png
         | 
| 97 | 
            +
            - lib/rspec_web/web_application/public/img/rails.png
         | 
| 98 | 
            +
            - lib/rspec_web/web_application/public/img/traffic.png
         | 
| 99 | 
            +
            - lib/rspec_web/web_application/public/js/bootstrap.js
         | 
| 100 | 
            +
            - lib/rspec_web/web_application/public/js/date.js
         | 
| 101 | 
            +
            - lib/rspec_web/web_application/public/js/jquery.cookie.js
         | 
| 102 | 
            +
            - lib/rspec_web/web_application/public/js/jquery.gracefulWebSocket.js
         | 
| 103 | 
            +
            - lib/rspec_web/web_application/public/js/jquery.js
         | 
| 104 | 
            +
            - lib/rspec_web/web_application/public/js/jquery.json.js
         | 
| 105 | 
            +
            - lib/rspec_web/web_application/public/js/script.js
         | 
| 106 | 
            +
            - lib/rspec_web/web_application/public/js/tmpl.js
         | 
| 107 | 
            +
            - lib/rspec_web/web_application/views/index.haml
         | 
| 108 | 
            +
            - lib/rspec_web/web_application/views/style.scss
         | 
| 109 | 
            +
            - lib/rspec_web/web_application.rb
         | 
| 110 | 
            +
            - lib/rspec_web/web_socket_server.rb
         | 
| 111 | 
            +
            - lib/rspec_web.rb
         | 
| 112 | 
            +
            homepage: http://github.com/c00lryguy/rspec-web
         | 
| 113 | 
            +
            licenses: []
         | 
| 114 | 
            +
            post_install_message: 
         | 
| 115 | 
            +
            rdoc_options: []
         | 
| 116 | 
            +
            require_paths:
         | 
| 117 | 
            +
            - lib
         | 
| 118 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 119 | 
            +
              none: false
         | 
| 120 | 
            +
              requirements:
         | 
| 121 | 
            +
              - - ! '>='
         | 
| 122 | 
            +
                - !ruby/object:Gem::Version
         | 
| 123 | 
            +
                  version: '0'
         | 
| 124 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 125 | 
            +
              none: false
         | 
| 126 | 
            +
              requirements:
         | 
| 127 | 
            +
              - - ! '>='
         | 
| 128 | 
            +
                - !ruby/object:Gem::Version
         | 
| 129 | 
            +
                  version: '0'
         | 
| 130 | 
            +
            requirements: []
         | 
| 131 | 
            +
            rubyforge_project: 
         | 
| 132 | 
            +
            rubygems_version: 1.8.10
         | 
| 133 | 
            +
            signing_key: 
         | 
| 134 | 
            +
            specification_version: 3
         | 
| 135 | 
            +
            summary: Run and view RSpec tests from the browser.
         | 
| 136 | 
            +
            test_files: []
         | 
| 137 | 
            +
            has_rdoc: 
         |