Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run app on Heroku fixed #127

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
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
11 changes: 8 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
language: ruby
branches:
only:
- master
cache:
bundler: true
sudo: false
bundler_args: --without development
rvm:
- 1.9.2
- 2.1.3
- 2.2.2
before_install:
- 'echo ''gem: --no-ri --no-rdoc'' > ~/.gemrc'
before_script:
Expand All @@ -14,4 +20,3 @@ before_script:
script: "bundle exec rake test:travis"
services:
- redis-server
cache: bundler
11 changes: 8 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
source 'http://rubygems.org'
ruby '2.2.2'

gem 'rails', '~> 3.2.21'

gem 'pg', '~> 0.11'
gem 'foreman'

gem 'pg'
gem 'simple_form', '~> 1.5'
gem 'kaminari', '~> 0.12'
gem 'make_voteable', '~> 0.1'
gem 'acts-as-taggable-on', '~> 2.1'
gem 'haml-rails', '~> 0.3.5'
gem 'friendly_id', '~> 4.0.9'
gem 'redis', '~> 2.2'
gem 'redis'
gem 'date_validator', '~> 0.6.3'
gem 'recaptcha', '~> 0.3', :require => 'recaptcha/rails'
gem 'httparty'
Expand Down Expand Up @@ -75,7 +78,9 @@ end

group :test do
gem 'rake', '~> 10.0'
gem 'test-unit', '~> 3.1'
gem 'minitest'
gem 'capybara', '~> 2.0'
gem 'fakeweb'
gem 'shoulda-matchers'
gem 'shoulda-matchers', '~> 2.8'
end
36 changes: 22 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ GEM
xml-simple
basic_active_model (1.0.0)
bcrypt-ruby (3.0.1)
bourne (1.1.2)
mocha (= 0.10.5)
builder (3.0.4)
cancan (1.6.8)
capybara (2.0.2)
Expand Down Expand Up @@ -70,6 +68,7 @@ GEM
orm_adapter (~> 0.0.3)
warden (~> 1.0.3)
diff-lcs (1.1.3)
dotenv (2.0.1)
erubis (2.7.0)
exceptional (2.0.32)
rack
Expand All @@ -84,6 +83,9 @@ GEM
faraday (0.8.5)
multipart-post (~> 1.1)
ffi (1.4.0)
foreman (0.63.0)
dotenv (>= 0.7)
thor (>= 0.13.6)
friendly_id (4.0.9)
geocoder (1.0.5)
gravtastic (3.2.6)
Expand All @@ -97,7 +99,7 @@ GEM
httparty (0.8.1)
multi_json
multi_xml
i18n (0.6.11)
i18n (0.7.0)
journey (1.0.4)
jquery-rails (1.0.14)
railties (~> 3.0)
Expand All @@ -118,19 +120,18 @@ GEM
activerecord (~> 3.0)
meta-tags (1.2.4)
actionpack
metaclass (0.0.1)
method_source (0.7.1)
mime-types (1.25.1)
mocha (0.10.5)
metaclass (~> 0.0.1)
multi_json (1.10.1)
minitest (5.6.1)
multi_json (1.11.0)
multi_xml (0.5.1)
multipart-post (1.1.5)
nokogiri (1.5.5)
orm_adapter (0.0.5)
pg (0.11.0)
pg (0.18.1)
polyglot (0.3.5)
posix-spawn (0.3.6)
power_assert (0.2.3)
pry (0.9.9.4)
coderay (~> 1.0.5)
method_source (~> 0.7.1)
Expand Down Expand Up @@ -169,7 +170,7 @@ GEM
json (~> 1.4)
recaptcha (0.3.1)
redcarpet (1.17.2)
redis (2.2.2)
redis (3.2.1)
ref (1.0.5)
routing-filter (0.3.0)
actionpack
Expand Down Expand Up @@ -197,9 +198,8 @@ GEM
multi_json (~> 1.0)
rubyzip
websocket (~> 1.0.4)
shoulda-matchers (1.4.2)
shoulda-matchers (2.8.0)
activesupport (>= 3.0.0)
bourne (~> 1.1.2)
simple_form (1.5.2)
actionpack (~> 3.0)
activemodel (~> 3.0)
Expand All @@ -211,6 +211,8 @@ GEM
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
state_machine (1.0.2)
test-unit (3.1.2)
power_assert
therubyracer (0.12.1)
libv8 (~> 3.16.14.0)
ref
Expand Down Expand Up @@ -253,6 +255,7 @@ DEPENDENCIES
exceptional (~> 2.0)
factory_girl_rails (~> 1.6)
fakeweb
foreman
friendly_id (~> 4.0.9)
geocoder (~> 1.0)
gravtastic (~> 3.2)
Expand All @@ -263,8 +266,9 @@ DEPENDENCIES
letter_opener
make_voteable (~> 0.1)
meta-tags (~> 1.2)
minitest
nokogiri (~> 1.3)
pg (~> 0.11)
pg
pry-rails
rack-gauges
rails (~> 3.2.21)
Expand All @@ -273,15 +277,19 @@ DEPENDENCIES
rake (~> 10.0)
recaptcha (~> 0.3)
redcarpet (~> 1.17)
redis (~> 2.2)
redis
routing-filter (~> 0.3.0)
rspec-rails (~> 2.6)
sanitize (~> 2.0)
sass-rails (~> 3.2.3)
shoulda-matchers
shoulda-matchers (~> 2.8)
simple_form (~> 1.5)
state_machine (~> 1.0)
test-unit (~> 3.1)
therubyracer (~> 0.12.1)
twitter (~> 4.4)
uglifier (>= 1.0.3)
whenever

BUNDLED WITH
1.10.3
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: bundle exec rails server -p $PORT
5 changes: 2 additions & 3 deletions config/application.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
require File.expand_path('../boot', __FILE__)

require 'rails/all'
require File.expand_path('../../lib/dotcloud.rb', __FILE__)

if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Expand Down Expand Up @@ -34,10 +33,10 @@ class Application < Rails::Application
# config.time_zone = 'Central Time (US & Canada)'
config.time_zone = 'Paris'

# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# The default locale is :fr and all translations from config/locales/*.rb,yml are auto loaded.
config.i18n.available_locales = [:fr]
config.i18n.load_path += Dir[Rails.root.join('config','locales', '**','*.{rb,yml}').to_s]
config.i18n.default_locale = :fr
I18n.locale = config.i18n.locale = config.i18n.default_locale

# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
Expand Down
2 changes: 1 addition & 1 deletion config/exceptional.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
api-key: <%= Dotcloud.env["EXCEPTIONAL_API_KEY"] %>
api-key: <%= ENV["EXCEPTIONAL_API_KEY"] %>
2 changes: 1 addition & 1 deletion config/initializers/redis.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
require 'redis'

$redis = Redis.new(Settings.redis.to_hash)
$redis = Redis.new(url: ENV["REDISTOGO_URL"])
30 changes: 13 additions & 17 deletions config/settings/production.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
app:
secret_token: <%= Dotcloud.env["SECRET_TOKEN"] %>
secret_token: <%= ENV["SECRET_TOKEN"] %>
cookie_key: "_rails_france_session"
devise:
pepper: <%= Dotcloud.env["PEPPER"] %>
pepper: <%= ENV["PEPPER"] %>
mailer:
host: "railsfrance.org"
from: "railsfrance.org@gmail.com"
aws_ses:
access_key_id: <%= Dotcloud.env["ACCESS_KEY_ID"] %>
secret_access_key: <%= Dotcloud.env["SECRET_ACCESS_KEY"] %>
access_key_id: <%= ENV["ACCESS_KEY_ID"] %>
secret_access_key: <%= ENV["SECRET_ACCESS_KEY"] %>
redis:
host: <%= Dotcloud.env["DOTCLOUD_REDIS_REDIS_HOST"] %>
port: <%= Dotcloud.env["DOTCLOUD_REDIS_REDIS_PORT"] %>
login: <%= Dotcloud.env["DOTCLOUD_REDIS_REDIS_LOGIN"] %>
password: <%= Dotcloud.env["DOTCLOUD_REDIS_REDIS_PASSWORD"] %>
db: 1
url: <%= ENV["REDISTOGO_URL"] %>
expire_view: 86400
expire_tweet: 3600
twitter:
account: <%= Dotcloud.env['TWITTER_ACCOUNT'] %>
consumer_key: <%= Dotcloud.env['TWITTER_CONSUMER_KEY'] %>
consumer_secret: <%= Dotcloud.env['TWITTER_CONSUMER_SECRET'] %>
oauth_token: <%= Dotcloud.env['TWITTER_OAUTH_TOKEN'] %>
oauth_token_secret: <%= Dotcloud.env['TWITTER_OAUTH_TOKEN_SECRET'] %>
account: <%= ENV['TWITTER_ACCOUNT'] %>
consumer_key: <%= ENV['TWITTER_CONSUMER_KEY'] %>
consumer_secret: <%= ENV['TWITTER_CONSUMER_SECRET'] %>
oauth_token: <%= ENV['TWITTER_OAUTH_TOKEN'] %>
oauth_token_secret: <%= ENV['TWITTER_OAUTH_TOKEN_SECRET'] %>
recaptcha:
public_key: <%= Dotcloud.env['RECAPTCHA_PUBLIC_KEY'] %>
private_key: <%= Dotcloud.env['RECAPTCHA_PRIVATE_KEY'] %>
public_key: <%= ENV['RECAPTCHA_PUBLIC_KEY'] %>
private_key: <%= ENV['RECAPTCHA_PRIVATE_KEY'] %>
api:
meetup:
key: <%= Dotcloud.env['MEETUP_KEY'] %>
key: <%= ENV['MEETUP_KEY'] %>
6 changes: 0 additions & 6 deletions lib/dotcloud.rb

This file was deleted.

17 changes: 0 additions & 17 deletions nginx.conf

This file was deleted.

10 changes: 5 additions & 5 deletions spec/models/job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
it { should validate_presence_of(:description) }
it { should validate_presence_of(:postal_code) }
#url
it { should validate_format_of(:url).with('http://railsfrance.org') }
it { should validate_format_of(:url).with('http://www.railsfrance.org') }
it { should validate_format_of(:url).with('https://railsfrance.org') }
it { should validate_format_of(:url).with('https://www.railsfrance.org') }
it { should allow_value('http://railsfrance.org').for(:url) }
it { should allow_value('http://www.railsfrance.org').for(:url) }
it { should allow_value('https://railsfrance.org').for(:url) }
it { should allow_value('https://www.railsfrance.org').for(:url) }
#email
it { should validate_presence_of(:email) }
it { should validate_format_of(:email).with('p@o.fr') }
it { should allow_value('p@o.fr').for(:email) }
#title
it { should validate_presence_of(:title) }
it { should validate_uniqueness_of(:title) }
Expand Down
8 changes: 4 additions & 4 deletions spec/support/addresseable_object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

shared_examples_for "an addresseable object" do
context "validations" do
it { should validate_format_of(:postal_code).with(75018) }
it { should validate_format_of(:postal_code).not_with(5018) }
it { should validate_format_of(:postal_code).not_with(750183) }
it { should validate_format_of(:postal_code).not_with("yo") }
it { should allow_value(75018).for(:postal_code) }
it { should_not allow_value(5018).for(:postal_code) }
it { should_not allow_value(750183).for(:postal_code) }
it { should_not allow_value("yo").for(:postal_code) }
end

it { should respond_to :address }
Expand Down