• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

joker1007 / octogate / 45
95%
master: 95%

Build:
Build:
LAST BUILD BRANCH: v0.3.0
DEFAULT BRANCH: master
Ran 09 Mar 2014 10:30AM UTC
Jobs 1
Files 33
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
45

push

travis-ci

joker1007
[from now] 2014/03/09 19:26:29

diff --git a/lib/octogate/server.rb b/lib/octogate/server.rb
index b0924f8..b348003 100644
--- a/lib/octogate/server.rb
+++ b/lib/octogate/server.rb
@@ -11,18 +11,30 @@ class Octogate::Server < Sinatra::Base
     enable :logging
   end

-  get '/received_events' do
+  get '/:token/received_events' do
+    unless Octogate.config.token == params[:token]
+      status 403
+      body "Access forbidden"
+      return
+    end
+
     received = Octogate.received
     haml :received_events, locals: {received: received}
   end

-  get '/sent_events' do
+  get '/:token/sent_events' do
+    unless Octogate.config.token == params[:token]
+      status 403
+      body "Access forbidden"
+      return
+    end
+
     sent = Octogate.sent
     haml :sent_events, locals: {sent: sent}
   end

   post '/:token' do
-    unless Octogate.conffig.token == params[:token]
+    unless Octogate.config.token == params[:token]
       status 403
       body "Access forbidden"
       return
diff --git a/web/views/sent_events.haml b/web/views/sent_events.haml
new file mode 100644
index 0000000..a81ffbb
--- /dev/null
+++ b/web/views/sent_events.haml
@@ -0,0 +1,24 @@
+!!! 5
+%html
+  %head
+    %title Octogate Sent Events
+    %link{rel: "stylesheet", href: "/bootstrap/css/bootstrap.css"}
+
+%body
+  %h2 Octogate Sent Events (Recently 100 Targets)
+  %table.table
+    %thead
+      %tr
+        %th Delivery ID
+        %th Event Name
+        %th Target Name
+        %th URL
+        %th Sent at
+    %tbody
+      - sent.each do |s|
+        %tr
+          %td= s.delivery_id
+          %td= s.name
+          %td= s.target_name
+          %td= s.target_url
+          %td= s.sent_at.strftime("%Y/%m/%d %H:%M:%S")
diff --git a/web/views/sent_targets.haml b/web/views/sent_targets.haml
deleted file mode 100644
index a81ffbb..0000000
--- a/web/views/sent_targets.haml
+++ /dev/null
@@ -1,24 +0,0 @@
-!!! 5
-%html
-  %head
-    %title Octogate Sent Events
-   ... (continued)

382 of 400 relevant lines covered (95.5%)

3.22 hits per line

Jobs
ID Job ID Ran Files Coverage
1 45.1 (2.1.1) 09 Mar 2014 10:30AM UTC 0
95.5
Travis Job 45.1
Source Files on build 45
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #45
  • 508e51c1 on github
  • Prev Build on logging_and_viewer (#44)
  • Next Build on logging_and_viewer (#47)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc