Permalink
Browse files

Merge branch 'master' of github.com:newscloud/n2

  • Loading branch information...
newscloud committed Feb 10, 2012
2 parents 5c00c3e + 5d2affe commit cd49b26de9eac6da0b4eb0b2c050b39858016319
Showing with 1,473 additions and 901 deletions.
  1. +2 −0 .gitignore
  2. +0 −1 .rvmrc
  3. +1 −1 .travis.yml
  4. +6 −3 Gemfile
  5. +87 −31 Gemfile.lock
  6. +17 −2 README.md
  7. +3 −0 Rakefile
  8. +52 −0 app/admin/custom_menu.rb
  9. +44 −0 app/admin/dashboards.rb
  10. +2 −0 app/admin/feed.rb
  11. +2 −0 app/admin/image.rb
  12. +2 −0 app/admin/menu.rb
  13. +2 −0 app/admin/stories.rb
  14. +1 −0 app/assets/javascripts/active_admin.js
  15. +492 −306 app/assets/javascripts/jquery.masonry.js
  16. +10 −6 app/assets/javascripts/jquery.masonry.min.js
  17. +6 −0 app/assets/stylesheets/active_admin.css.scss
  18. +70 −35 app/assets/stylesheets/default_v3.sass
  19. +2 −0 app/assets/stylesheets/formtastic.sass
  20. +2 −0 app/assets/stylesheets/skin.sass
  21. +0 −15 app/controllers/admin_controller.rb
  22. +14 −0 app/controllers/application_controller.rb
  23. +4 −0 app/models/article.rb
  24. +5 −0 app/models/item_action.rb
  25. +2 −2 app/models/metadata.rb
  26. +4 −1 app/models/tweet.rb
  27. +2 −2 app/models/tweet_stream.rb
  28. +1 −1 app/views/admin/content_dashboard/index.html.haml
  29. +1 −1 app/views/admin/index.html.haml
  30. +1 −1 app/views/admin/translations/translations.html.erb
  31. +2 −2 app/views/articles/edit.html.haml
  32. +2 −2 app/views/articles/new.html.haml
  33. +7 −6 app/views/home/test_design.html.haml
  34. +2 −2 app/views/questions/index.html.haml
  35. +2 −2 app/views/questions/new.html.haml
  36. +1 −1 app/views/shared/_moderate_form.html.haml
  37. +1 −1 app/views/shared/external/_outbrain_widget.html.erb
  38. +32 −29 app/views/shared/forms/_media_items_simple.html.haml
  39. +163 −0 app/views/shared/forms/_simple_story_post.html.haml
  40. +6 −4 app/views/shared/sidebar/_other_posts.html.haml
  41. +2 −1 app/views/shared/sidebar/_post_story.html.haml
  42. +1 −1 app/views/shared/sidebar/_user_posts.html.haml
  43. +9 −9 app/views/shared/templates/_ad_template.html.haml
  44. +2 −1 app/views/shared/templates/_single_col_welcome_panel.html.haml
  45. +5 −3 app/views/shared/tests/old/_predictions.html.haml
  46. +1 −1 app/views/stories/new.html.haml
  47. +1 −0 app/views/users/current.js.haml
  48. +1 −1 config/application.god.sample
  49. +2 −2 config/database.ci.yml
  50. +4 −4 config/database.yml.sample
  51. +16 −10 config/deploy.rb
  52. +11 −0 config/environments/production.rb
  53. +131 −0 config/initializers/active_admin.rb
  54. +7 −0 config/initializers/antifreeze.rb
  55. +9 −0 config/initializers/quiet_asserts.rb
  56. +5 −11 config/initializers/resque.rb
  57. +13 −0 config/initializers/will_paginate.rb
  58. +1 −4 config/locales.yml.sample
  59. +0 −138 config/locales/defaults/fr.yml
  60. +0 −28 config/locales/forms/fr.yml
  61. +0 −4 config/locales/views/articles/fr.yml
  62. +0 −7 config/locales/views/newswires/fr.yml
  63. +0 −8 config/locales/views/sessions/fr.yml
  64. +2 −0 config/locales/views/shared/en.yml
  65. +0 −18 config/locales/views/shared/feed_items/fr.yml
  66. +0 −48 config/locales/views/shared/fr.yml
  67. +0 −14 config/locales/views/shared/sidebar/fr.yml
  68. +0 −11 config/locales/views/stories/fr.yml
  69. +0 −22 config/locales/views/users/fr.yml
  70. +8 −1 config/routes/admin.rb
  71. +16 −49 config/routes/main.rb
  72. +57 −38 config/sitemap.rb
  73. +16 −0 db/migrate/20120122122154_create_admin_notes.rb
  74. +25 −0 db/migrate/20120122122155_move_admin_notes_to_comments.rb
  75. +9 −7 db/seeds.rb
  76. +1 −1 lib/acts_as_moderatable.rb
  77. +4 −0 lib/locale_extensions.rb
  78. 0 lib/{parse.page.rb → parse.rb}
  79. +2 −2 lib/tasks/resque.rake
  80. +57 −0 lib/tasks/sitemap.rake
View
@@ -57,3 +57,5 @@ auto-save-list
tramp
.\#*
.rspec
+.rvmrc
+.idea
View
1 .rvmrc
@@ -1 +0,0 @@
-rvm use ree@n2
View
@@ -3,4 +3,4 @@ before_script:
- "mysql -e 'create database n2_development'; mysql n2_development < db/development_structure.sql"
script:
- - "echo $PWD; ruby script/copy_configs.rb; bundle exec rake db:setup db:migrate db:test:clone_structure spec"
+ - "echo $PWD; ruby script/copy_configs.rb; bundle exec rake db:migrate db:setup db:test:clone_structure spec"
View
@@ -1,6 +1,7 @@
source :gemcutter
gem "rails", "3.1.3"
+gem 'activeadmin', '0.4.0'
gem "acts_as_tree"
gem 'haml'
gem "sass-rails"
@@ -9,8 +10,9 @@ gem 'compass-960-plugin'
gem 'json'
gem 'mogli'
gem "thumbs_up"
+gem "prototype-rails"
-gem "formtastic"
+gem "formtastic", :git => "git://github.com/joevandyk/formtastic.git", :ref => "90e58f7"
gem "friendly_id", '3.3.1'
gem 'will_paginate'
gem "oauth-plugin", ">= 0.4.0.pre1"
@@ -46,8 +48,9 @@ gem 'redis-store'
# Feedzirra related
gem 'nokogiri'
gem 'loofah'
-gem 'curb', :git => 'git://github.com/taf2/curb.git'
-gem 'sax-machine', :git => 'git://github.com/pauldix/sax-machine.git'
+gem 'feedzirra', :git => 'https://github.com/pauldix/feedzirra.git'
+#gem 'curb', :git => 'git://github.com/taf2/curb.git'
+#gem 'sax-machine', :git => 'git://github.com/pauldix/sax-machine.git'
gem "omniauth", '1.0.1'
gem "omniauth-facebook", :git => "git://github.com/mkdynamic/omniauth-facebook.git"
View
@@ -7,9 +7,9 @@ GIT
GIT
remote: git://github.com/chriseppstein/compass.git
- revision: 297c0b24260a554876a7926d135cc5d96e8eec37
+ revision: 8c84869b0b6bc5396e264fea15c71d4e346ac5d0
specs:
- compass (0.12.alpha.4.297c0b2)
+ compass (0.12.alpha.4.8c84869)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
@@ -24,42 +24,52 @@ GIT
sinatra (>= 0.9.2)
vegas (~> 0.1.2)
+GIT
+ remote: git://github.com/joevandyk/formtastic.git
+ revision: 90e58f782be8d62c9586a62bb3399d1784651d9c
+ ref: 90e58f7
+ specs:
+ formtastic (2.0.2)
+ rails (~> 3.0)
+
GIT
remote: git://github.com/mkdynamic/omniauth-facebook.git
revision: 0a878f3520d21672772b6085442e13445e6e4784
specs:
omniauth-facebook (1.2.0)
omniauth-oauth2 (~> 1.0.0)
-GIT
- remote: git://github.com/pauldix/sax-machine.git
- revision: 41cae0195263b97da3029147d7214bfe3d24d0e4
- specs:
- sax-machine (0.1.0)
- nokogiri (> 0.0.0)
-
-GIT
- remote: git://github.com/taf2/curb.git
- revision: bf3556058c76846305f4e84fe0882270ae13b287
- specs:
- curb (0.7.17)
-
GIT
remote: https://github.com/jnunemaker/twitter.git
- revision: 5956ebfa491a2742c1491dc5e3e0db342cc66290
+ revision: 983be99d8af6cd0194271c0432f53075e01648be
specs:
twitter (2.0.2)
activesupport (>= 2.3.9, < 4)
faraday (~> 0.7)
multi_json (~> 1.0)
simple_oauth (~> 0.1)
+GIT
+ remote: https://github.com/pauldix/feedzirra.git
+ revision: dee1454980e7b93022776cd047ad419da3999332
+ specs:
+ feedzirra (0.1.1)
+ activesupport (>= 3.0.8)
+ builder (>= 2.1.2)
+ curb (~> 0.7.15)
+ i18n (>= 0.5.0)
+ loofah (~> 1.2.0)
+ nokogiri (>= 1.4.4)
+ rake (>= 0.8.7)
+ rdoc (~> 3.8)
+ sax-machine (~> 0.1.0)
+
GEM
remote: http://rubygems.org/
specs:
SystemTimer (1.2.3)
ZenTest (4.5.0)
- aasm (3.0.1)
+ aasm (3.0.2)
activerecord
acl9 (0.12.0)
actionmailer (3.1.3)
@@ -76,6 +86,17 @@ GEM
rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.3)
+ activeadmin (0.4.0)
+ bourbon (>= 1.0.0)
+ devise (>= 1.1.2)
+ fastercsv
+ formtastic (>= 2.0.0)
+ inherited_resources (< 1.3.0)
+ jquery-rails (>= 1.0.0)
+ kaminari (>= 0.13.0)
+ meta_search (>= 0.9.2)
+ rails (>= 3.0.0)
+ sass (>= 3.1.0)
activemodel (3.1.3)
activesupport (= 3.1.3)
builder (~> 3.0.0)
@@ -103,16 +124,19 @@ GEM
builder
mime-types
xml-simple
- aws-sdk (1.2.6)
+ aws-sdk (1.3.2)
httparty (~> 0.7)
json (~> 1.4)
nokogiri (>= 1.4.4)
uuidtools (~> 2.1)
babosa (0.3.5)
+ bcrypt-ruby (3.0.1)
bitly (0.7.0)
crack (>= 0.1.4)
httparty (>= 0.7.6)
oauth2 (~> 0.5.0)
+ bourbon (1.3.6)
+ sass (>= 3.1)
builder (3.0.0)
capistrano (2.9.0)
highline
@@ -146,24 +170,30 @@ GEM
capybara (>= 1.1.2)
cucumber (>= 1.1.3)
nokogiri (>= 1.5.0)
+ curb (0.7.18)
database_cleaner (0.7.0)
+ devise (2.0.0)
+ bcrypt-ruby (~> 3.0)
+ orm_adapter (~> 0.0.3)
+ railties (~> 3.1)
+ warden (~> 1.1)
diff-lcs (1.1.3)
erubis (2.7.0)
- factory_girl (2.4.0)
+ factory_girl (2.4.2)
activesupport
faraday (0.7.5)
addressable (~> 2.2.6)
multipart-post (~> 1.1.3)
rack (>= 1.1.0, < 2)
+ fastercsv (1.5.4)
ffi (1.0.11)
- formtastic (2.0.2)
- rails (~> 3.0)
friendly_id (3.3.1)
babosa (~> 0.3.0)
fssm (0.2.8.1)
gherkin (2.7.3)
json (>= 1.4.6)
haml (3.1.4)
+ has_scope (0.5.1)
hashie (1.2.0)
highline (1.6.9)
hike (1.2.1)
@@ -174,7 +204,17 @@ GEM
multi_json
multi_xml
i18n (0.6.0)
- json (1.6.4)
+ inherited_resources (1.2.2)
+ has_scope (~> 0.5.0)
+ responders (~> 0.6.0)
+ jquery-rails (1.0.19)
+ railties (~> 3.0)
+ thor (~> 0.14)
+ json (1.6.5)
+ kaminari (0.13.0)
+ actionpack (>= 3.0.0)
+ activesupport (>= 3.0.0)
+ railties (>= 3.0.0)
kgio (2.7.2)
launchy (2.0.5)
addressable (~> 2.2.6)
@@ -184,6 +224,11 @@ GEM
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
+ meta_search (1.1.3)
+ actionpack (~> 3.1)
+ activerecord (~> 3.1)
+ activesupport (~> 3.1)
+ polyamorous (~> 0.5.0)
mime-types (1.17.2)
mogli (0.0.28)
httparty (>= 0.4.3)
@@ -220,6 +265,7 @@ GEM
omniauth (~> 1.0)
omniauth-twitter (0.0.7)
omniauth-oauth (~> 1.0)
+ orm_adapter (0.0.6)
paperclip (2.5.0)
activerecord (>= 2.3.0)
activesupport (>= 2.3.2)
@@ -228,8 +274,12 @@ GEM
pickle (0.4.10)
cucumber (>= 0.8)
rake
+ polyamorous (0.5.0)
+ activerecord (~> 3.0)
polyglot (0.3.3)
- rack (1.3.5)
+ prototype-rails (3.1.0)
+ rails (~> 3.1)
+ rack (1.3.6)
rack-cache (1.1)
rack (>= 0.4)
rack-mount (0.8.3)
@@ -267,6 +317,7 @@ GEM
redis (< 3.0.0)
redis-store (1.0.0.1)
redis (~> 2.2.1)
+ responders (0.6.5)
resque-scheduler (1.9.9)
redis (>= 2.0.1)
resque (>= 1.8.0)
@@ -291,21 +342,23 @@ GEM
rubyzip (0.9.5)
rufus-scheduler (2.0.16)
tzinfo (>= 0.3.23)
- sass (3.1.12)
+ sass (3.1.13)
sass-rails (3.1.5)
actionpack (~> 3.1.0)
railties (~> 3.1.0)
sass (~> 3.1.10)
tilt (~> 1.3.2)
- selenium-webdriver (2.16.0)
+ sax-machine (0.1.0)
+ nokogiri (> 0.0.0)
+ selenium-webdriver (2.17.0)
childprocess (>= 0.2.5)
ffi (~> 1.0.9)
multi_json (~> 1.0.4)
rubyzip
simple_oauth (0.1.5)
- sinatra (1.3.1)
- rack (~> 1.3, >= 1.3.4)
- rack-protection (~> 1.1, >= 1.1.2)
+ sinatra (1.3.2)
+ rack (~> 1.3, >= 1.3.6)
+ rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
sitemap_generator (2.2.1)
sprockets (2.0.3)
@@ -328,6 +381,8 @@ GEM
uuidtools (2.1.2)
vegas (0.1.8)
rack (>= 1.0.0)
+ warden (1.1.0)
+ rack (>= 1.0)
will_paginate (3.0.2)
wirble (0.1.3)
xml-simple (1.1.1)
@@ -342,6 +397,7 @@ DEPENDENCIES
ZenTest (= 4.5.0)
aasm
acl9
+ activeadmin (= 0.4.0)
acts-as-taggable-on
acts_as_tree
amazon-ecs
@@ -356,10 +412,10 @@ DEPENDENCIES
compass-960-plugin
cucumber
cucumber-rails
- curb!
database_cleaner (= 0.7.0)
factory_girl
- formtastic
+ feedzirra!
+ formtastic!
friendly_id (= 3.3.1)
haml
hoptoad_notifier
@@ -377,6 +433,7 @@ DEPENDENCIES
omniauth-twitter
paperclip
pickle
+ prototype-rails
rails (= 3.1.3)
rails-dev-tweaks
rcov
@@ -390,7 +447,6 @@ DEPENDENCIES
rspec
rspec-rails
sass-rails
- sax-machine!
sitemap_generator
thumbs_up
twitter!
View
@@ -103,6 +103,15 @@ We provide .sample files for the majority of these config files to facilitate ea
As mentioned above, when you set your config options, **remember to use** http://my.site.com and **not** http://my.site.com/iframe/
+Internationalization (Locales)
+------------------------------
+
+For every language you add in the file config/locales.yml (there is a sample file named config/locales.yml.sample), you
+should be sure that you check all the files under /config/locales and create the right locale file for it.
+In example, if you add the language "Spanish" with the code "es", you should make sure that under the directory
+/config/locales, in each subdirectory, there is a file names es.yml with the right translation.
+
+
Install dependencies and setup the framework
--------------------------------------------
@@ -112,10 +121,16 @@ Now that we got the hard part out of the way, there are just a few commands left
sudo gem install bundler
# Install the required gems
bundle install
+ # Copy the locales file
+ cp config/locales.yml.sample config/locales.yml
+ # Temporary workaround for locales bootstrap issue
+ # This is strictly to initialize the database so there is at least a locales table in existence to
+ # prevent i18n_backend_database from exploding while bootstrapping itself.
+ mysql -u mydbuser -p my_n2_db < db/development_structure.sql
# Run the newscloud setup process, this will create your database along with configuring your application
- rake n2:setup
+ bundle exec rake n2:setup
# Load the default locales
- bundle exec rake i18n:populate:load_default_locales LOCALE_FILE=config/locales.yml
+ bundle exec rake i18n:populate:update_from_rails
Post Installation
-----------------
View
@@ -4,4 +4,7 @@
require File.expand_path('../config/application', __FILE__)
+require 'resque/tasks'
+require 'resque_scheduler/tasks'
+
N2::Application.load_tasks
Oops, something went wrong.

0 comments on commit cd49b26

Please sign in to comment.