Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 8 files changed
  • 0 commit comments
  • 1 contributor
Showing with 27 additions and 31 deletions.
  1. +4 −3 .gitignore
  2. +1 −0 Gemfile
  3. +14 −0 Gemfile.lock
  4. +1 −2 app/models/person.rb
  5. +1 −0 config/application.rb
  6. +0 −25 config/database.yml
  7. +1 −1 config/initializers/secret_token.rb
  8. +5 −0 config/secrets.rb.sample
View
7 .gitignore
@@ -7,12 +7,13 @@
# Ignore bundler config
/.bundle
-# Ignore the default SQLite database.
+# Ignore the database and its configuration.
/db/*.sqlite3
+/config/database.yml
# Ignore all logfiles and tempfiles.
/log/*.log
/tmp
-# Ignore instagram API keys
-/config/initializers/instagram.rb
+# Ignore API keys
+/config/secrets.rb
View
1 Gemfile
@@ -16,6 +16,7 @@ group :development, :test do
end
gem 'activerecord-mysql2spatial-adapter'
+gem 'face'
gem 'geokit'
gem 'instagram', "~> 0.8.3"
gem 'jquery-rails'
View
14 Gemfile.lock
@@ -22,6 +22,9 @@ GEM
activesupport (= 3.2.2)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
+ activerecord-mysql2spatial-adapter (0.4.2)
+ mysql2 (>= 0.2.13)
+ rgeo-activerecord (~> 0.4.3)
activeresource (3.2.2)
activemodel (= 3.2.2)
activesupport (= 3.2.2)
@@ -61,6 +64,8 @@ GEM
faraday_middleware (0.8.4)
faraday (>= 0.7.4, < 0.9)
ffi (1.0.11)
+ geokit (1.6.5)
+ multi_json
hashie (1.2.0)
hike (1.2.1)
i18n (0.6.0)
@@ -81,6 +86,7 @@ GEM
mime-types (1.17.2)
multi_json (1.0.4)
multipart-post (1.1.5)
+ mysql2 (0.3.11)
nokogiri (1.5.0)
polyglot (0.3.3)
rack (1.4.1)
@@ -110,6 +116,11 @@ GEM
json (~> 1.4)
rest-client (1.6.7)
mime-types (>= 1.16)
+ rgeo (0.3.5)
+ rgeo-activerecord (0.4.3)
+ activerecord (>= 3.0.3)
+ arel (>= 2.0.6)
+ rgeo (>= 0.3.4)
rspec (2.8.0)
rspec-core (~> 2.8.0)
rspec-expectations (~> 2.8.0)
@@ -155,11 +166,14 @@ PLATFORMS
ruby
DEPENDENCIES
+ activerecord-mysql2spatial-adapter
capybara
coffee-rails (~> 3.2.1)
face
+ geokit
instagram (~> 0.8.3)
jquery-rails
+ mysql2
rails (= 3.2.2)
rspec-rails
sass-rails (~> 3.2.3)
View
3 app/models/person.rb
@@ -2,8 +2,7 @@ class Person < ActiveRecord::Base
serialize :data
def self.api
- @@api ||= Face.get_client api_key: ENV.fetch('FACE_API_KEY'),
- api_secret: ENV.fetch('FACE_API_SECRET')
+ @@api ||= Face.get_client api_key: FACE_API_KEY, api_secret: FACE_API_SECRET
end
def self.create_from_faces(image_url)
View
1 config/application.rb
@@ -1,4 +1,5 @@
require File.expand_path('../boot', __FILE__)
+require File.expand_path('../secrets', __FILE__)
require 'rails/all'
View
25 config/database.yml
@@ -1,25 +0,0 @@
-# SQLite version 3.x
-# gem install sqlite3
-#
-# Ensure the SQLite 3 gem is defined in your Gemfile
-# gem 'sqlite3'
-development:
- adapter: sqlite3
- database: db/development.sqlite3
- pool: 5
- timeout: 5000
-
-# Warning: The database defined as "test" will be erased and
-# re-generated from your development database when you run "rake".
-# Do not set this db to the same as development or production.
-test:
- adapter: sqlite3
- database: db/test.sqlite3
- pool: 5
- timeout: 5000
-
-production:
- adapter: sqlite3
- database: db/production.sqlite3
- pool: 5
- timeout: 5000
View
2 config/initializers/secret_token.rb
@@ -4,4 +4,4 @@
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
-Instaface::Application.config.secret_token = '0a27aa1cda560e1682585c4e8cf956101cb325638ab8c472d588efa2f0de89ed3063153c17852a57d98f0ea2a8fe6826ed4f1a294141b32d7ed156b6c14d1256'
+Instaface::Application.config.secret_token = RAILS_SECRET_TOKEN
View
5 config/secrets.rb.sample
@@ -0,0 +1,5 @@
+FACE_API_KEY=''
+FACE_API_SECRET=''
+INSTAGRAM_CLIENT_ID=''
+INSTAGRAM_CLIENT_SECRET=''
+RAILS_SECRET_TOKEN='' # Generate with `rake secret`

No commit comments for this range

Something went wrong with that request. Please try again.