-
-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/dashboard-api' of github.com:DiUS/pact-broker-saas…
… into feat/dashboard-api
- Loading branch information
Showing
15 changed files
with
139 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# SAAS Pact Broker | ||
|
||
## Updating code from the open source repository | ||
|
||
git remote add upstream [email protected]:pact-foundation/pact_broker.git | ||
git pull upstream master #(or appropriate branch) | ||
bundle exec rake | ||
git push | ||
|
||
Remember to merge the changes in to any WIP branches. | ||
|
||
## Deploying | ||
|
||
See the [RELEASING.md](https://github.com/DiUS/pact-broker-docker-private/blob/master/RELEASING.md) file in the pact-broker-docker-private project. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'pact_broker' | ||
gem 'pact_broker', path: '..' | ||
gem 'sqlite3', '~>1.3' # Sqlite is just for testing, replace this with your choice of database driver | ||
# gem 'pg' # Recommended production gem for postgres | ||
gem 'thin', '~>1.7' # Keep, or replace with your choice of web server |
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
require 'pact_broker/api/resources/base_resource' | ||
|
||
module PactBroker | ||
module Api | ||
module Resources | ||
|
||
class Dashboard < BaseResource | ||
|
||
def content_types_provided | ||
[["application/hal+json", :to_json]] | ||
end | ||
|
||
def allowed_methods | ||
["GET"] | ||
end | ||
|
||
def to_json | ||
|
||
end | ||
end | ||
end | ||
end | ||
end |
Empty file.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module PactBroker | ||
module Domain | ||
class Dashboard | ||
|
||
def initialize *relationships | ||
|
||
end | ||
|
||
|
||
end | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,16 @@ | |
%script{type: 'text/javascript', src:'/javascripts/jquery-2.1.1.min.js'} | ||
%script{type: 'text/javascript', src:'/javascripts/jquery.tablesorter.min.js'} | ||
%script{type: 'text/javascript', src:'/js/bootstrap.min.js'} | ||
%nav.navbase-default.navbar-right{role: "navigation"} | ||
.container | ||
%ul | ||
%li.navbar-right | ||
%a{ href: '/hal-browser/browser.html' } | ||
API Browser | ||
.container | ||
%nav.navbase-default{role: "navigation", id: "navigation"} | ||
.container-fluid | ||
.navbar-header | ||
%a.navbar-brand{href: "#"} | ||
%img{alt: "Brand", src: "/images/[email protected]", height: "24px"} | ||
%ul.navbar-right | ||
%li | ||
%a{href: '/hal-browser/browser.html'} | ||
API Browser | ||
%h1.page-header | ||
Pacts | ||
%table.table.table-bordered.table-striped{ id: 'relationships' } | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,16 @@ | |
%script{type: 'text/javascript', src:'/javascripts/jquery-2.1.1.min.js'} | ||
%script{type: 'text/javascript', src:'/javascripts/jquery.tablesorter.min.js'} | ||
%script{type: 'text/javascript', src:'/js/bootstrap.min.js'} | ||
%nav.navbase-default.navbar-right{role: "navigation"} | ||
.container | ||
%ul | ||
%li.navbar-right | ||
%a{ href: '/hal-browser/browser.html' } | ||
API Browser | ||
.container | ||
%nav.navbase-default{role: "navigation", id: "navigation"} | ||
.container-fluid | ||
.navbar-header | ||
%a.navbar-brand{href: "#"} | ||
%img{alt: "Brand", src: "/images/[email protected]", height: "24px"} | ||
%ul.navbar-right | ||
%li | ||
%a{href: '/hal-browser/browser.html'} | ||
API Browser | ||
%h1.page-header | ||
Pacts | ||
%table.table.table-bordered.table-striped{ id: 'relationships' } | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
require 'spec/support/test_data_builder' | ||
|
||
describe "Get dashboard" do | ||
|
||
let(:path) { "/dashboard" } | ||
let(:last_response_body) { JSON.parse(subject.body, symbolize_names: true) } | ||
|
||
before do | ||
TestDataBuilder.new | ||
.create_consumer("Foo") | ||
.create_provider("Bar") | ||
.create_webhook | ||
.create_consumer_version("1.2.3") | ||
.create_pact | ||
.create_verification | ||
end | ||
|
||
subject { get path; last_response } | ||
|
||
it "returns a 200 HAL JSON response", pending: true do | ||
expect(subject).to be_a_hal_json_success_response | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
require 'pact_broker/api/resources/dashboard' | ||
|
||
module PactBroker | ||
module Api | ||
module Resources | ||
|
||
describe Dashboard do | ||
|
||
let(:path) { "/dashboard" } | ||
subject { get path; last_response } | ||
|
||
|
||
end | ||
end | ||
end | ||
end |