Skip to content
This repository was archived by the owner on May 28, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ rvm:
- 2.1.5
# TODO: tests on Ruby 2.2.0
# - 2.2.0
bundler_args: --without postgresql
env:
- DB=sqlite
script:
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ gem 'simple_form'

gem 'coveralls', require: false

gem 'pg', group: :postgresql

group :development do
# better_errors 2.0 requires Ruby 2.0 or higher
gem 'better_errors', '1.1.0'
Expand Down
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ GEM
omniauth-openid (1.0.1)
omniauth (~> 1.0)
rack-openid (~> 1.3.1)
pg (0.18.2)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
Expand Down Expand Up @@ -224,6 +225,7 @@ DEPENDENCIES
magic_encoding
mizuno
omniauth-openid
pg
pry-rails
rails (= 4.0.13)
rails_autolink
Expand All @@ -238,3 +240,6 @@ DEPENDENCIES
thin
twitter-bootstrap-rails
uglifier (>= 1.0.3)

BUNDLED WITH
1.10.5
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Many companies and organizations use Gistub for sharing code snippets safely in
[![Coverage Status](https://coveralls.io/repos/seratch/gistub/badge.png?branch=develop)](https://coveralls.io/r/seratch/gistub?branch=develop)
[![Code Climate](https://codeclimate.com/github/seratch/gistub.png)](https://codeclimate.com/github/seratch/gistub)

[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)

## How to use

`master` branch is always the lastest stable version.
Expand Down
43 changes: 43 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "Gistub",
"description": "Sharing code snippets in-house",
"keywords": ["gist"],
"scripts": {
"postdeploy": "bundle exec rake db:create db:migrate"
},
"env": {
"BUNDLE_WITHOUT": {
"description": "bundle install --without <these>",
"value": "test:development"
},
"GISTUB_APP_NAME": {
"description": "variable to customize header",
"value": "",
"required": false
},
"GISTUB_OPENID_IDENTIFIER": {
"description": "specify auth server instead of Google OpenID",
"value": "",
"required": false
},
"GISTUB_AUTO_LINK": {
"description": "whether enabling rails_autolink",
"value": "true",
"required": false
},
"GISTUB_ALLOWS_ANONYMOUS": {
"description": "whether enabling anonymous post",
"value": "false",
"required": false
},
"GISTUB_SECRET_TOKEN": {
"generator": "secret"
},
"GISTUB_SECRET_KEY_BASE": {
"generator": "secret"
}
},
"addons": [
"papertrail"
]
}
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% app_name = ENV['GISTUB_APP_NAME'] || 'Gistub' %>
<% app_name = ENV['GISTUB_APP_NAME'].presence || 'Gistub' %>
<!DOCTYPE html>
<html lang="en">
<head>
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/omniauth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
Rails.application.config.middleware.use OmniAuth::Builder do
require 'openid/store/filesystem'
provider :open_id,
:identifier => ENV['GISTUB_OPENID_IDENTIFIER'] || 'https://www.google.com/accounts/o8/id',
:identifier => ENV['GISTUB_OPENID_IDENTIFIER'].presence || 'https://www.google.com/accounts/o8/id',
:store => OpenID::Store::Filesystem.new("#{Rails.root}/tmp/openid")
end