Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rolling release 3_4

  • Loading branch information...
commit 83f2c854de990ff8c0845f86e0465d436086ec4c 1 parent 669ba55
@chewbranca chewbranca authored
View
2  README.md
@@ -44,7 +44,7 @@ Getting Started
Clone this application to your machine and checkout release 3
git clone git://github.com/newscloud/n2.git
- git checkout --track -b release3_3 origin/release3_3
+ git checkout --track -b release3_4 origin/release3_4
Alternatively, download release 3 directly [http://github.com/newscloud/n2/archives/v3.3_stable](http://github.com/newscloud/n2/archives/v3.3_stable)
View
25 app/views/shared/templates/_double_col_feature_triple_item.html.haml
@@ -20,15 +20,16 @@
%h6= posted_by_with_date(item1)
%h6= action_links(item1)
- - remaining_items.each_with_index do |item, index|
- %div.panel-third{:class => (index == 0 ? "first" : index == 2 ? "last" : "")}
- .panel-bar.top-secondary-corners.bottom-secondary-corners
- %h5= item.model_index_name
- .item-thumb.bottom-secondary-corners
- = link_to image_tag(medium_image_or_default(item)), item.item_link
- .item-text
- %h3
- %span.ellipsis_title_2= link_to sanitize_title(item.item_title), item.item_link, :class => 'ellipsis_text'
- .meta-data
- %h6= posted_by_with_date(item)
- %h6= action_links(item)
+ - if remaining_items
+ - remaining_items.each_with_index do |item, index|
+ %div.panel-third{:class => (index == 0 ? "first" : index == 2 ? "last" : "")}
+ .panel-bar.top-secondary-corners.bottom-secondary-corners
+ %h5= item.model_index_name
+ .item-thumb.bottom-secondary-corners
+ = link_to image_tag(medium_image_or_default(item)), item.item_link
+ .item-text
+ %h3
+ %span.ellipsis_title_2= link_to sanitize_title(item.item_title), item.item_link, :class => 'ellipsis_text'
+ .meta-data
+ %h6= posted_by_with_date(item)
+ %h6= action_links(item)
View
19 app/views/shared/templates/_double_col_item_list.html.haml
@@ -27,12 +27,13 @@
.panel-half.pad-left
.panel-content
%ul.list-items
- - remaining_items.each do |item|
- %li
- .item-with-no-image
- .item-text
- %h3
- %span.ellipsis_title_2= link_to sanitize_title(item.item_title), item.item_link, :class => 'ellipsis_text'
- .meta-data
- %h6= posted_by_with_topic(item)
- %h6= action_links(item)
+ - if remaining_items
+ - remaining_items.each do |item|
+ %li
+ .item-with-no-image
+ .item-text
+ %h3
+ %span.ellipsis_title_2= link_to sanitize_title(item.item_title), item.item_link, :class => 'ellipsis_text'
+ .meta-data
+ %h6= posted_by_with_topic(item)
+ %h6= action_links(item)
View
4 config/deploy/recipes/capistrano_facebooker_yml.rb
@@ -113,8 +113,8 @@
end
- after "deploy:setup", "deploy:config:setup_facebooker" unless fetch(:skip_facebooker_setup, false)
- after "deploy:finalize_update", "deploy:config:symlink_facebooker"
+ #after "deploy:setup", "deploy:config:setup_facebooker" unless fetch(:skip_facebooker_setup, false)
+ #after "deploy:finalize_update", "deploy:config:symlink_facebooker"
end
View
4 config/deploy/recipes/config_wizard.rb
@@ -157,7 +157,7 @@ def get_facebook_config
say_headline("Facebook Configuration")
settings = Hash.new
- settings[:api_key] = non_blank_request("Facebook API Key e.g. 218234865890233 (see http://newscloud.net/qiiwyM for more information):")
+ settings[:app_id] = non_blank_request("Facebook Application ID e.g. 218234865890233 (NOTE: this used to be API key, we now need the Application ID for OAuth 2 support; see http://newscloud.net/qiiwyM for more information):")
settings[:secret_key] = non_blank_request("Facebook Secret Key e.g. aff4c01ca4203bc22fea22728a1d982c:")
settings[:canvas_page_name] = ui.ask("Please enter your Facebook Canvas Page Name:") do |q|
@@ -288,7 +288,7 @@ def extract_settings config
:facebooker => {
:canvas_page_name => config["facebooker"]["canvas_page_name"],
:callback_url => config["facebooker"]["callback_url"],
- :api_key => config["facebooker"]["api_key"],
+ :app_id => config["facebooker"]["app_id"],
:secret_key => config["facebooker"]["secret_key"]
},
:database => {
View
66 config/deploy/recipes/providers.yml.rb
@@ -0,0 +1,66 @@
+# = Capistrano providers.yml task
+#
+# Forked from::
+# = Capistrano database.yml task
+#
+# Provides a couple of tasks for creating the database.yml
+# configuration file dynamically when deploy:setup is run.
+#
+# Category:: Capistrano
+# Package:: Database
+# Author:: Simone Carletti <weppos@weppos.net>
+# Copyright:: 2007-2010 The Authors
+# License:: MIT License
+# Link:: http://www.simonecarletti.com/
+# Source:: http://gist.github.com/2769
+#
+
+unless Capistrano::Configuration.respond_to?(:instance)
+ abort "This extension requires Capistrano 2"
+end
+
+Capistrano::Configuration.instance.load do
+
+ namespace :deploy do
+
+ namespace :config do
+
+ desc <<-DESC
+ Creates the providers.yml configuration file in shared path.
+ DESC
+ task :setup_providers, :except => { :no_release => true } do
+ location = fetch(:template_dir, "config/deploy/templates") + '/providers.yml.erb'
+ template = File.read(location)
+
+ config = ERB.new(template)
+
+ run "mkdir -p #{shared_path}/config"
+ put config.result(binding), "#{shared_path}/config/providers.yml"
+ end
+
+ desc <<-DESC
+ [internal] Updates the symlink for providers.yml file to the just deployed release.
+ DESC
+ task :symlink_providers, :except => { :no_release => true } do
+ run "ln -nfs #{shared_path}/config/providers.yml #{release_path}/config/providers.yml"
+ end
+
+ desc <<-DESC
+ Test file write
+ DESC
+ task :test_providers_write, :except => { :no_release => true } do
+ location = fetch(:template_dir, "config/deploy/templates") + '/providers.yml.erb'
+ template = File.file?(location) ? File.read(location) : default_template
+
+ config = ERB.new(template)
+ File.open("tmp/test_providers.yml", "w") {|f| f.write config.result(binding) }
+ end
+
+ end
+
+ after "deploy:setup", "deploy:config:setup_providers" unless fetch(:skip_providers_setup, false)
+ after "deploy:finalize_update", "deploy:config:symlink_providers"
+
+ end
+
+end
View
4 config/deploy/templates/deploy.rb.erb
@@ -10,7 +10,7 @@ role :db, "<%= @settings[:base_url] %>", :primary => true
set :rails_env, "production"
set :application, "<%= @settings[:app_name] %>"
set :base_url, "<%= @settings[:base_url] %>"
-set :branch, "<%= @settings[:branch] || "release3_3" %>"
+set :branch, "<%= @settings[:branch] || "release3_4" %>"
# database.yml settings
set :db_user, "<%= @settings[:database][:user] %>"
@@ -18,7 +18,7 @@ set :db_name, "<%= @settings[:database][:name] %>"
set :db_password, "<%= @settings[:database][:password] %>"
# facebooker.yml settings
-set :facebook_api_key, "<%= @settings[:facebooker][:api_key] %>"
+set :facebook_app_id, "<%= @settings[:facebooker][:app_id] %>"
set :facebook_secret_key, "<%= @settings[:facebooker][:secret_key] %>"
set :facebook_canvas_page_name, "<%= @settings[:facebooker][:canvas_page_name] %>"
set :facebook_callback_url, "<%= @settings[:facebooker][:callback_url] %>"
View
11 config/deploy/templates/providers.yml.erb
@@ -0,0 +1,11 @@
+providers:
+ twitter:
+ key: "consumer_key"
+ secret: "consumer_secret"
+ facebook:
+ key: "<%= facebook_app_id %>"
+ secret: "<%= facebook_secret_key %>"
+ options:
+ client_options:
+ ssl:
+ ca_path: "/etc/ssl/certs"
Please sign in to comment.
Something went wrong with that request. Please try again.