Permalink
Browse files

Install omnisocial.

  • Loading branch information...
1 parent 33f8330 commit b9c9016eb35fc195961ede3b51c370f67ff49923 @spraints committed Feb 18, 2011
View
@@ -5,6 +5,7 @@ gem 'sqlite3'
gem 'haml-rails'
gem 'jquery-rails'
gem 'typus'
+gem 'omnisocial'
group :development, :test do
gem 'rspec-rails'
gem 'ruby-debug', :require => nil
View
@@ -28,12 +28,18 @@ GEM
activemodel (= 3.0.4)
activesupport (= 3.0.4)
activesupport (3.0.4)
+ addressable (2.2.4)
arel (2.0.8)
+ bcrypt-ruby (2.1.4)
builder (2.1.2)
columnize (0.3.2)
diff-lcs (1.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
+ faraday (0.5.4)
+ addressable (~> 2.2.2)
+ multipart-post (~> 1.1.0)
+ rack (>= 1.1.0, < 2)
fastercsv (1.5.4)
haml (3.0.25)
haml-rails (0.3.4)
@@ -52,6 +58,25 @@ GEM
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
+ multi_json (0.0.5)
+ multipart-post (1.1.0)
+ nokogiri (1.4.4)
+ oa-core (0.1.6)
+ rack (~> 1.1)
+ oa-oauth (0.1.6)
+ multi_json (~> 0.0.2)
+ nokogiri (~> 1.4.2)
+ oa-core (= 0.1.6)
+ oauth (~> 0.4.0)
+ oauth2 (~> 0.1.0)
+ oauth (0.4.4)
+ oauth2 (0.1.1)
+ faraday (~> 0.5.0)
+ multi_json (~> 0.0.4)
+ omnisocial (0.1.4)
+ bcrypt-ruby (~> 2.1)
+ oa-core (~> 0.1.2)
+ oa-oauth (~> 0.1.2)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
@@ -109,6 +134,7 @@ PLATFORMS
DEPENDENCIES
haml-rails
jquery-rails
+ omnisocial
rails (= 3.0.4)
rspec-rails
ruby-debug
View
@@ -0,0 +1,3 @@
+class User < Omnisocial::User
+ # Make any customisations here
+end
@@ -0,0 +1,19 @@
+Omnisocial.setup do |config|
+
+ # ==> Twitter
+ # config.twitter 'APP_KEY', 'APP_SECRET'
+
+ # ==> Facebook
+ # config.facebook 'APP_KEY', 'APP_SECRET', :scope => 'publish_stream'
+
+ if Rails.env.production?
+
+ # Configs for production mode go here
+
+ elsif Rails.env.development?
+
+ # Configs for development mode go here
+
+ end
+
+end
@@ -0,0 +1,33 @@
+class CreateOmnisocialTables < ActiveRecord::Migration
+ def self.up
+ create_table :users do |t|
+ t.string :remember_token
+ # Any additional fields here
+
+ t.timestamps
+ end
+
+ create_table :login_accounts do |t|
+ t.string :type
+ t.integer :user_id
+ t.string :remote_account_id
+ t.string :name
+ t.string :login
+ t.string :picture_url
+ t.string :access_token
+ # Any additional fields here
+
+ t.timestamps
+ end
+
+ add_index :login_accounts, :user_id
+ add_index :login_accounts, :type
+ end
+
+ def self.down
+ remove_index :login_accounts, :type
+ remove_index :login_accounts, :user_id
+ drop_table :login_accounts
+ drop_table :users
+ end
+end
View
@@ -10,7 +10,22 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20110217121023) do
+ActiveRecord::Schema.define(:version => 20110218142544) do
+
+ create_table "login_accounts", :force => true do |t|
+ t.string "type"
+ t.integer "user_id"
+ t.string "remote_account_id"
+ t.string "name"
+ t.string "login"
+ t.string "picture_url"
+ t.string "access_token"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "login_accounts", ["type"], :name => "index_login_accounts_on_type"
+ add_index "login_accounts", ["user_id"], :name => "index_login_accounts_on_user_id"
create_table "stories", :force => true do |t|
t.string "title"
@@ -21,4 +36,10 @@
t.datetime "updated_at"
end
+ create_table "users", :force => true do |t|
+ t.string "remember_token"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
end
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,68 @@
+#omnisocial-login {
+ overflow: hidden;
+}
+
+#omnisocial-login .information {
+ float: left;
+ margin-right: 40px;
+ width: 450px;
+}
+
+a.omnisocial-button {
+ text-decoration: none;
+}
+a.omnisocial-button span {
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-width: 1px;
+ border-style: solid;
+ font-weight: bold;
+ font-family: "proxima-nova-condensed-1", "proxima-nova-condensed-2", Helvetica, Arial, Verdana, sans-serif;
+ font-size: 16px;
+ cursor: pointer;
+ display: inline-block;
+ line-height: 1;
+ margin-top: 1px;
+ padding: 8px 10px 9px;
+ position: relative;
+ text-decoration: none;
+ text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0px;
+ background: #3583cf;
+ background: -webkit-gradient(linear, left top, left bottom, from(#629ed9), to(#3583cf));
+ border-color: #bbe2f8;
+ color: white;
+ float: none;
+ font-size: 18px;
+ position: absolute;
+}
+a:hover.omnisocial-button span {
+ text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0px;
+ background: #6ca520;
+ background: -webkit-gradient(linear, left top, left bottom, from(#90bb58), to(#6ca520));
+ border-color: #dcf1bf;
+ -o-box-shadow: rgba(0, 0, 0, 0.5) 0 0 5px 0;
+ -webkit-box-shadow: rgba(0, 0, 0, 0.5) 0 0 5px 0;
+ -moz-box-shadow: rgba(0, 0, 0, 0.5) 0 0 5px 0;
+ box-shadow: rgba(0, 0, 0, 0.5) 0 0 5px 0;
+}
+
+a.omnisocial-button.twitter {
+ background: url(/images/omnisocial/twitter.gif) center center no-repeat;
+ float: left;
+ height: 255px;
+ width: 200px;
+}
+a.omnisocial-button.twitter span {
+ margin: 240px 0 0 25px;
+}
+
+a.omnisocial-button.facebook {
+ background: url(/images/omnisocial/facebook.png) center center no-repeat;
+ float: left;
+ margin-left: 40px;
+ height: 255px;
+ width: 200px;
+}
+a.omnisocial-button.facebook span {
+ margin: 240px 0 0 11px;
+}

0 comments on commit b9c9016

Please sign in to comment.