Commit b55a6775 by tadyjp

Merge pull request #6 from tadyjp/wip/ci-setting

[WIP] CI settings
parents cec2bdf2 30c1e025
service_name: travis-ci
......@@ -17,6 +17,4 @@
/bin/set-env.sh
/config/database.yml
*.bk
language: ruby
rvm:
- 2.0.0
source 'https://rubygems.org'
ruby '2.1.0'
ruby '2.0.0'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 4.0.2'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
gem 'sass-rails'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
gem 'uglifier'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
gem 'coffee-rails'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
......@@ -24,7 +24,7 @@ gem 'coffee-rails', '~> 4.0.0'
# gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
gem 'jbuilder'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
......@@ -67,6 +67,9 @@ group :development do
# gem 'capistrano', '~> 3.0.1'
gem 'pry-rails'
# profiler
gem 'rack-mini-profiler'
end
group :development, :test do
......@@ -77,23 +80,18 @@ group :development, :test do
gem 'spring'
end
group :test do
gem 'email_spec'
end
# group :test do
# gem 'email_spec'
# end
group :production do
gem 'rails_12factor'
gem 'pg'
end
# group :production do
# gem 'rails_12factor'
# gem 'pg'
# end
# tree structure
gem 'ancestry'
# profiler
gem 'rack-mini-profiler'
# Send mail via gmail oauth
# ref. https://github.com/popgiro/action-gmailer
gem 'mail'
......@@ -104,3 +102,7 @@ gem 'nokogiri'
gem 'premailer'
gem 'faraday'
group :test do
gem 'coveralls', :require => false
end
......@@ -47,7 +47,7 @@ GEM
arel (4.0.1)
atomic (1.1.14)
bcrypt-ruby (3.1.2)
better_errors (1.0.1)
better_errors (1.1.0)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
binding_of_caller (0.7.2)
......@@ -63,6 +63,12 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.6.3)
coveralls (0.7.0)
multi_json (~> 1.3)
rest-client
simplecov (>= 0.7)
term-ansicolor
thor
css_parser (1.3.5)
addressable
daemons (1.1.9)
......@@ -74,9 +80,7 @@ GEM
thread_safe (~> 0.1)
warden (~> 1.2.3)
diff-lcs (1.2.5)
email_spec (1.5.0)
launchy (~> 2.1)
mail (~> 2.2)
docile (1.1.1)
erubis (2.7.0)
eventmachine (1.0.3)
execjs (2.0.2)
......@@ -91,15 +95,15 @@ GEM
formatador (0.2.4)
gmail_xoauth (0.4.1)
oauth (>= 0.3.6)
guard (2.2.4)
guard (2.2.5)
formatador (>= 0.2.4)
listen (~> 2.1)
lumberjack (~> 1.0)
pry (>= 0.9.12)
thor (>= 0.18.1)
guard-rspec (4.0.4)
guard-rspec (4.2.0)
guard (>= 2.1.1)
rspec (~> 2.14)
rspec (>= 2.14, < 4.0)
guard-spring (0.0.4)
guard
spring
......@@ -108,15 +112,13 @@ GEM
htmlentities (4.3.1)
httpauth (0.2.0)
i18n (0.6.9)
jbuilder (1.5.3)
jbuilder (2.0.1)
activesupport (>= 3.0.0)
multi_json (>= 1.2.0)
json (1.8.1)
jwt (0.1.8)
multi_json (>= 1.5)
launchy (2.4.2)
addressable (~> 2.3)
listen (2.2.0)
listen (2.4.0)
celluloid (>= 0.15.2)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
......@@ -149,12 +151,11 @@ GEM
oauth2 (~> 0.8.0)
omniauth (~> 1.0)
orm_adapter (0.5.0)
pg (0.17.0)
polyglot (0.3.3)
premailer (1.7.9)
css_parser (>= 1.1.9)
htmlentities (>= 4.0.0)
pry (0.9.12.3)
pry (0.9.12.4)
coderay (~> 1.0)
method_source (~> 0.8)
slop (~> 3.4)
......@@ -173,22 +174,19 @@ GEM
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.2)
sprockets-rails (~> 2.0.0)
rails_12factor (0.0.2)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.1)
rails_stdout_logging (0.0.3)
railties (4.0.2)
actionpack (= 4.0.2)
activesupport (= 4.0.2)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.1.0)
rake (10.1.1)
rb-fsevent (0.9.3)
rb-inotify (0.9.2)
rb-inotify (0.9.3)
ffi (>= 0.5.0)
rdoc (3.12.2)
json (~> 1.4)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
......@@ -204,7 +202,7 @@ GEM
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
sass (3.2.12)
sass (3.2.13)
sass-rails (4.0.1)
railties (>= 4.0.0, < 5.0)
sass (>= 3.1.10)
......@@ -212,6 +210,11 @@ GEM
sdoc (0.3.20)
json (>= 1.1.3)
rdoc (~> 3.10)
simplecov (0.8.2)
docile (~> 1.1.0)
multi_json
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
slop (3.4.7)
spring (1.0.0)
sprockets (2.10.1)
......@@ -224,6 +227,8 @@ GEM
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.8)
term-ansicolor (1.2.2)
tins (~> 0.8)
thin (1.6.1)
daemons (>= 1.0.9)
eventmachine (>= 1.0.0)
......@@ -233,11 +238,12 @@ GEM
atomic
tilt (1.4.1)
timers (1.1.0)
tins (0.13.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.38)
uglifier (2.3.2)
uglifier (2.4.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
warden (1.2.3)
......@@ -252,28 +258,26 @@ DEPENDENCIES
better_errors
binding_of_caller
coderay
coffee-rails (~> 4.0.0)
coffee-rails
coveralls
devise
email_spec
factory_girl_rails
faraday
guard-rspec
guard-spring
jbuilder (~> 1.2)
jbuilder
mail
nokogiri
omniauth-google-oauth2
pg
premailer
pry-rails
rack-mini-profiler
rails (~> 4.0.2)
rails_12factor
redcarpet!
rspec-rails
sass-rails (~> 4.0.0)
sass-rails
sdoc
spring
sqlite3
thin
uglifier (>= 1.3.0)
uglifier
rendezvous
==========
## Badge
[![Build Status](https://travis-ci.org/tadyjp/rendezvous.png)](https://travis-ci.org/tadyjp/rendezvous)
[![Coverage Status](https://coveralls.io/repos/tadyjp/rendezvous/badge.png)](https://coveralls.io/r/tadyjp/rendezvous)
[![Code Climate](https://codeclimate.com/github/tadyjp/rendezvous.png)](https://codeclimate.com/github/tadyjp/rendezvous)
[![Dependency Status](https://gemnasium.com/tadyjp/rendezvous.png)](https://gemnasium.com/tadyjp/rendezvous)
## ENVの設定
```
......
......@@ -40,7 +40,7 @@ class PostsController < ApplicationController
end
def fork
@post = set_post.generate_fork(user: current_user)
@post = set_post.generate_fork(current_user)
render action: 'new'
end
......
......@@ -38,7 +38,7 @@ class Post < ActiveRecord::Base
end
# generate forked post (not saved)
def generate_fork(user: )
def generate_fork(user)
forked_post = self.clone
forked_post.title = forked_post.title.gsub(/%Name/, user.name)
forked_post.title = Time.now.strftime(forked_post.title) # TODO
......
{
"result": {
"covered_percent": 82.72
}
}
......@@ -10,7 +10,7 @@ describe Post do
describe 'Fork' do
subject { @post.generate_fork(user: @alice) }
subject { @post.generate_fork(@alice) }
it 'valid title' do
expect(subject.title).to eq('sample title')
......
# coveralls
require 'coveralls'
Coveralls.wear!
# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'
require 'email_spec'
# require 'email_spec'
require 'factory_girl'
# Requires supporting ruby files with custom matchers and macros, etc,
......@@ -44,8 +50,8 @@ RSpec.configure do |config|
config.include FactoryGirl::Syntax::Methods
config.include(EmailSpec::Helpers)
config.include(EmailSpec::Matchers)
# config.include(EmailSpec::Helpers)
# config.include(EmailSpec::Matchers)
config.before(:all) do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment