squeezer 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/{lib/app → app}/controllers/application_controller.rb +0 -0
- data/{lib/app → app}/controllers/blogs_controller.rb +0 -0
- data/{lib/app → app}/controllers/comments_controller.rb +0 -0
- data/{lib/app → app}/controllers/pages_controller.rb +0 -0
- data/{lib/app → app}/controllers/posts_controller.rb +0 -0
- data/{lib/app → app}/controllers/roles_controller.rb +0 -0
- data/{lib/app → app}/controllers/sites_controller.rb +0 -0
- data/{lib/app → app}/controllers/users_controller.rb +0 -0
- data/{lib/app → app}/helpers/squeezer_helper.rb +0 -0
- data/{lib/app → app}/models/ability.rb +0 -0
- data/{lib/app → app}/models/blog.rb +0 -0
- data/{lib/app → app}/models/comment.rb +0 -0
- data/{lib/app → app}/models/page.rb +0 -0
- data/{lib/app → app}/models/post.rb +0 -0
- data/{lib/app → app}/models/role.rb +0 -0
- data/{lib/app → app}/models/site.rb +0 -0
- data/{lib/app → app}/models/user.rb +0 -0
- data/{lib/app → app}/views/blogs/_entry.haml +0 -0
- data/{lib/app → app}/views/blogs/_form.html.haml +0 -0
- data/{lib/app → app}/views/blogs/edit.html.haml +0 -0
- data/{lib/app → app}/views/blogs/index.html.haml +0 -0
- data/{lib/app → app}/views/blogs/new.html.haml +0 -0
- data/{lib/app → app}/views/blogs/show.html.haml +0 -0
- data/{lib/app → app}/views/comments/_form.html.haml +0 -0
- data/{lib/app → app}/views/comments/_index.html.haml +0 -0
- data/{lib/app → app}/views/comments/_post.html.haml +0 -0
- data/{lib/app → app}/views/comments/show.js.erb +0 -0
- data/{lib/app → app}/views/layouts/_footer.html.haml +0 -0
- data/{lib/app → app}/views/layouts/_login.haml +0 -0
- data/{lib/app → app}/views/layouts/_menu.html.haml +0 -0
- data/{lib/app → app}/views/layouts/_msn.haml +0 -0
- data/{lib/app → app}/views/layouts/_sidebar.html.haml +0 -0
- data/{lib/app → app}/views/layouts/application.html.erb +0 -0
- data/{lib/app → app}/views/layouts/ice/squeezer/_ice.haml +0 -0
- data/{lib/app → app}/views/layouts/ice/squeezer/ice/_ice.haml +0 -0
- data/{lib/app → app}/views/layouts/ice/squeezer/ice/squeezer/_ice.haml +0 -0
- data/{lib/app → app}/views/layouts/ice/squeezer/ice/squeezer/ice/_ice.haml +0 -0
- data/{lib/app → app}/views/layouts/ice/squeezer/ice/squeezer/ice/squeezer/_ice.haml +0 -0
- data/{lib/app → app}/views/layouts/squeezer/ice/_ice.haml +0 -0
- data/{lib/app → app}/views/layouts/squeezer/ice/squeezer/_ice.haml +0 -0
- data/{lib/app → app}/views/layouts/squeezer/ice/squeezer/ice/_ice.haml +0 -0
- data/{lib/app → app}/views/layouts/squeezer/ice/squeezer/ice/squeezer/_ice.haml +0 -0
- data/{lib/app → app}/views/layouts/squeezer/squeezer.css +0 -0
- data/{lib/app → app}/views/pages/_form.html.haml +0 -0
- data/{lib/app → app}/views/pages/edit.html.haml +0 -0
- data/{lib/app → app}/views/pages/index.html.haml +0 -0
- data/{lib/app → app}/views/pages/new.html.haml +0 -0
- data/{lib/app → app}/views/pages/show.html.haml +0 -0
- data/{lib/app → app}/views/roles/_form.html.haml +0 -0
- data/{lib/app → app}/views/roles/edit.html.haml +0 -0
- data/{lib/app → app}/views/roles/index.html.haml +0 -0
- data/{lib/app → app}/views/roles/new.html.haml +0 -0
- data/{lib/app → app}/views/roles/show.html.haml +0 -0
- data/{lib/app → app}/views/sites/_form.html.haml +0 -0
- data/{lib/app → app}/views/sites/edit.html.haml +0 -0
- data/{lib/app → app}/views/sites/index.html.haml +0 -0
- data/{lib/app → app}/views/sites/new.html.haml +0 -0
- data/{lib/app → app}/views/sites/show.html.haml +0 -0
- data/{lib/app → app}/views/users/index.haml +0 -0
- data/{lib/app → app}/views/users/roles.haml +0 -0
- data/{lib/app → app}/views/users/show.haml +0 -0
- data/lib/generators/squeezer/Gemfile +37 -0
- data/lib/generators/squeezer/README +2 -0
- data/lib/generators/squeezer/USAGE +7 -0
- data/lib/generators/squeezer/squeezer_generator.rb +114 -0
- data/lib/generators/squeezer/templates/Gemfile +37 -0
- data/lib/generators/squeezer/templates/app/controllers/application_controller.rb +25 -0
- data/lib/{blogs_controller.rb → generators/squeezer/templates/app/controllers/blogs_controller.rb} +0 -0
- data/lib/generators/squeezer/templates/app/controllers/comments_controller.rb +37 -0
- data/lib/generators/squeezer/templates/app/controllers/forums_controller.rb +42 -0
- data/lib/generators/squeezer/templates/app/controllers/pages_controller.rb +3 -0
- data/lib/generators/squeezer/templates/app/controllers/posts_controller.rb +23 -0
- data/lib/generators/squeezer/templates/app/controllers/roles_controller.rb +3 -0
- data/lib/generators/squeezer/templates/app/controllers/sites_controller.rb +70 -0
- data/lib/generators/squeezer/templates/app/controllers/topics_controller.rb +46 -0
- data/lib/generators/squeezer/templates/app/controllers/users_controller.rb +22 -0
- data/lib/generators/squeezer/templates/app/helpers/application_helper.rb +66 -0
- data/lib/generators/squeezer/templates/app/helpers/blogs_helper.rb +2 -0
- data/lib/generators/squeezer/templates/app/helpers/layout_helper.rb +71 -0
- data/lib/generators/squeezer/templates/app/helpers/pages_helper.rb +2 -0
- data/lib/generators/squeezer/templates/app/models/ability.rb +17 -0
- data/lib/generators/squeezer/templates/app/models/blog.rb +6 -0
- data/lib/generators/squeezer/templates/app/models/comment.rb +4 -0
- data/lib/generators/squeezer/templates/app/models/forum.rb +5 -0
- data/lib/generators/squeezer/templates/app/models/isntall.rb +9 -0
- data/lib/generators/squeezer/templates/app/models/page.rb +3 -0
- data/lib/generators/squeezer/templates/app/models/post.rb +12 -0
- data/lib/generators/squeezer/templates/app/models/role.rb +3 -0
- data/lib/generators/squeezer/templates/app/models/site.rb +17 -0
- data/lib/generators/squeezer/templates/app/models/topic.rb +6 -0
- data/lib/generators/squeezer/templates/app/models/user.rb +35 -0
- data/lib/generators/squeezer/templates/app/views/blogs/_entry.haml +26 -0
- data/lib/generators/squeezer/templates/app/views/blogs/_form.html.haml +15 -0
- data/lib/generators/squeezer/templates/app/views/blogs/edit.html.haml +8 -0
- data/lib/generators/squeezer/templates/app/views/blogs/index.html.haml +8 -0
- data/lib/generators/squeezer/templates/app/views/blogs/new.html.haml +5 -0
- data/lib/generators/squeezer/templates/app/views/blogs/show.html.haml +4 -0
- data/lib/generators/squeezer/templates/app/views/comments/_form.html.erb +5 -0
- data/lib/generators/squeezer/templates/app/views/comments/_form.html.haml +19 -0
- data/lib/generators/squeezer/templates/app/views/comments/_index.html.haml +26 -0
- data/lib/generators/squeezer/templates/app/views/comments/_post.html.haml +19 -0
- data/lib/generators/squeezer/templates/app/views/comments/_post2.haml +14 -0
- data/lib/generators/squeezer/templates/app/views/comments/edit.haml +7 -0
- data/lib/generators/squeezer/templates/app/views/comments/show.js.erb +1 -0
- data/lib/generators/squeezer/templates/app/views/confirmations/new.html.erb +12 -0
- data/lib/generators/squeezer/templates/app/views/devise/confirmations/new.html.erb +12 -0
- data/lib/generators/squeezer/templates/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/lib/generators/squeezer/templates/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/lib/generators/squeezer/templates/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/lib/generators/squeezer/templates/app/views/devise/passwords/edit.html.erb +16 -0
- data/lib/generators/squeezer/templates/app/views/devise/passwords/new.html.erb +12 -0
- data/lib/generators/squeezer/templates/app/views/devise/registrations/edit.html.erb +28 -0
- data/lib/generators/squeezer/templates/app/views/devise/registrations/new.html.erb +21 -0
- data/lib/generators/squeezer/templates/app/views/devise/sessions/new.html.erb +17 -0
- data/lib/generators/squeezer/templates/app/views/devise/shared/_links.erb +19 -0
- data/lib/generators/squeezer/templates/app/views/devise/unlocks/new.html.erb +12 -0
- data/lib/generators/squeezer/templates/app/views/devise_mailer/confirmation_instructions.html.erb +5 -0
- data/lib/generators/squeezer/templates/app/views/devise_mailer/reset_password_instructions.html.erb +8 -0
- data/lib/generators/squeezer/templates/app/views/devise_mailer/unlock_instructions.html.erb +7 -0
- data/lib/generators/squeezer/templates/app/views/forums/_form.html.haml +14 -0
- data/lib/generators/squeezer/templates/app/views/forums/edit.html.haml +8 -0
- data/lib/generators/squeezer/templates/app/views/forums/index.html.haml +37 -0
- data/lib/generators/squeezer/templates/app/views/forums/new.html.haml +5 -0
- data/lib/generators/squeezer/templates/app/views/forums/show.html.haml +43 -0
- data/lib/generators/squeezer/templates/app/views/layouts/_footer.html.haml +5 -0
- data/lib/generators/squeezer/templates/app/views/layouts/_header.html.haml +10 -0
- data/lib/generators/squeezer/templates/app/views/layouts/_ice.haml +27 -0
- data/lib/generators/squeezer/templates/app/views/layouts/_latest.haml +15 -0
- data/lib/generators/squeezer/templates/app/views/layouts/_login.html.erb +9 -0
- data/lib/generators/squeezer/templates/app/views/layouts/_login.html.haml +12 -0
- data/lib/generators/squeezer/templates/app/views/layouts/_menu.html.haml +6 -0
- data/lib/generators/squeezer/templates/app/views/layouts/_msn.haml +12 -0
- data/lib/generators/squeezer/templates/app/views/layouts/_sidebar.html.haml +1 -0
- data/lib/generators/squeezer/templates/app/views/layouts/application.html.erb +14 -0
- data/lib/generators/squeezer/templates/app/views/layouts/application.html.haml +14 -0
- data/lib/generators/squeezer/templates/app/views/layouts/ice/squeezer/_ice.haml +27 -0
- data/lib/generators/squeezer/templates/app/views/pages/_form.html.haml +17 -0
- data/lib/generators/squeezer/templates/app/views/pages/edit.html.haml +8 -0
- data/lib/generators/squeezer/templates/app/views/pages/index.html.haml +22 -0
- data/lib/generators/squeezer/templates/app/views/pages/new.html.haml +5 -0
- data/lib/generators/squeezer/templates/app/views/pages/show.html.haml +12 -0
- data/lib/generators/squeezer/templates/app/views/passwords/edit.html.erb +16 -0
- data/lib/generators/squeezer/templates/app/views/passwords/new.html.erb +12 -0
- data/lib/generators/squeezer/templates/app/views/registrations/edit.html.erb +25 -0
- data/lib/generators/squeezer/templates/app/views/registrations/new.html.erb +17 -0
- data/lib/generators/squeezer/templates/app/views/roles/_form.html.haml +9 -0
- data/lib/generators/squeezer/templates/app/views/roles/edit.html.haml +7 -0
- data/lib/generators/squeezer/templates/app/views/roles/index.html.haml +19 -0
- data/lib/generators/squeezer/templates/app/views/roles/new.html.haml +5 -0
- data/lib/generators/squeezer/templates/app/views/roles/show.html.haml +13 -0
- data/lib/generators/squeezer/templates/app/views/roles/user.html.erb +14 -0
- data/lib/generators/squeezer/templates/app/views/sessions/new.html.erb +17 -0
- data/lib/generators/squeezer/templates/app/views/shared/_devise_links.erb +19 -0
- data/lib/generators/squeezer/templates/app/views/sites/_form.html.haml +42 -0
- data/lib/generators/squeezer/templates/app/views/sites/edit.html.haml +1 -0
- data/lib/generators/squeezer/templates/app/views/sites/index.html.haml +165 -0
- data/lib/generators/squeezer/templates/app/views/sites/new.html.haml +1 -0
- data/lib/generators/squeezer/templates/app/views/sites/show.html.haml +18 -0
- data/lib/generators/squeezer/templates/app/views/topics/_form.html.haml +16 -0
- data/lib/generators/squeezer/templates/app/views/topics/edit.html.erb +8 -0
- data/lib/generators/squeezer/templates/app/views/topics/index.html.haml +23 -0
- data/lib/generators/squeezer/templates/app/views/topics/new.html.erb +5 -0
- data/lib/generators/squeezer/templates/app/views/topics/show.html.haml +16 -0
- data/lib/generators/squeezer/templates/app/views/unlocks/new.html.erb +12 -0
- data/lib/generators/squeezer/templates/app/views/users/index.haml +5 -0
- data/lib/generators/squeezer/templates/app/views/users/roles.haml +14 -0
- data/lib/generators/squeezer/templates/config/devise.rb +142 -0
- data/lib/generators/squeezer/templates/db/migrate/add_username_user.rb +11 -0
- data/lib/generators/squeezer/templates/db/migrate/blogs.rb +15 -0
- data/lib/generators/squeezer/templates/db/migrate/comments.rb +15 -0
- data/lib/generators/squeezer/templates/db/migrate/create_blogs.rb +15 -0
- data/lib/generators/squeezer/templates/db/migrate/create_comments.rb +15 -0
- data/lib/generators/squeezer/templates/db/migrate/create_pages.rb +16 -0
- data/lib/generators/squeezer/templates/db/migrate/create_posts.rb +16 -0
- data/lib/generators/squeezer/templates/db/migrate/create_roles.rb +13 -0
- data/lib/generators/squeezer/templates/db/migrate/create_roles_users.rb +15 -0
- data/lib/generators/squeezer/templates/db/migrate/create_sites.rb +26 -0
- data/lib/generators/squeezer/templates/db/migrate/data.rb +7 -0
- data/lib/generators/squeezer/templates/db/migrate/page_data.rb +10 -0
- data/lib/generators/squeezer/templates/db/migrate/pages.rb +16 -0
- data/lib/generators/squeezer/templates/db/migrate/posts.rb +16 -0
- data/lib/generators/squeezer/templates/db/migrate/roles.rb +13 -0
- data/lib/generators/squeezer/templates/db/migrate/roles_users.rb +15 -0
- data/lib/generators/squeezer/templates/db/migrate/sites.rb +26 -0
- data/lib/generators/squeezer/templates/db/migrate/squeez_data.rb +7 -0
- data/lib/generators/squeezer/templates/doc/clases.png +0 -0
- data/lib/generators/squeezer/templates/ice/squeezer/ice/_ice.haml +6 -0
- data/lib/generators/squeezer/templates/ice/squeezer/ice/squeezer/_ice.haml +28 -0
- data/lib/generators/squeezer/templates/ice/squeezer/ice/squeezer/ice/_ice.haml +6 -0
- data/lib/generators/squeezer/templates/ice/squeezer/ice/squeezer/ice/squeezer/_ice.haml +7 -0
- data/lib/generators/squeezer/templates/ice/squeezer/squeezer.css +252 -0
- data/lib/generators/squeezer/templates/public/javascripts/application.js +53 -0
- data/lib/generators/squeezer/templates/public/javascripts/jquery-ui.js +11437 -0
- data/lib/generators/squeezer/templates/public/javascripts/jquery-ui.min.js +401 -0
- data/lib/generators/squeezer/templates/public/javascripts/jquery.cleditor.min.js +31 -0
- data/lib/generators/squeezer/templates/public/javascripts/jquery.js +6883 -0
- data/lib/generators/squeezer/templates/public/javascripts/jquery.layout.min-1.2.0.js +80 -0
- data/lib/generators/squeezer/templates/public/javascripts/jquery.min.js +166 -0
- data/lib/generators/squeezer/templates/public/javascripts/rails.js +146 -0
- data/lib/generators/squeezer/templates/public/stylesheets/CLEditor1_3_0/images/buttons.gif +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/CLEditor1_3_0/images/toolbar.gif +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/CLEditor1_3_0/jquery.cleditor.css +24 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ice/lagota/ice/_ice.haml +6 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ice/lagota/lagota.css +284 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ice/squeezer/ice/_ice.haml +6 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ice/squeezer/ice/squeezer/_ice.haml +27 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ice/squeezer/ice/squeezer/ice/_ice.haml +6 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ice/squeezer/ice/squeezer/ice/squeezer/_ice.haml +7 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ice/squeezer/squeezer.css +249 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/jquery-ui-1.8.5.custom.css +572 -0
- data/lib/squeezer.rb +1 -1
- data/pkg/squeezer-0.1.3.gem +0 -0
- data/pkg/squeezer-0.1.4.gem +0 -0
- data/squeezer.gemspec +227 -65
- metadata +229 -67
- data/lib/squeezer/engine.rb +0 -0
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,37 @@
|
|
1
|
+
source 'http://rubygems.org'
|
2
|
+
|
3
|
+
gem 'rails', '3.0.0.beta4'
|
4
|
+
|
5
|
+
# Bundle edge Rails instead:
|
6
|
+
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
7
|
+
|
8
|
+
gem 'sqlite3-ruby', :require => 'sqlite3'
|
9
|
+
|
10
|
+
gem "will_paginate", "~> 3.0.pre2"
|
11
|
+
gem 'haml'
|
12
|
+
gem 'devise',"~>1.1.rc2"
|
13
|
+
gem 'paperclip'
|
14
|
+
gem 'cancan'
|
15
|
+
gem 'nifty-generators'
|
16
|
+
|
17
|
+
|
18
|
+
# Use unicorn as the web server
|
19
|
+
# gem 'unicorn'
|
20
|
+
|
21
|
+
# Deploy with Capistrano
|
22
|
+
# gem 'capistrano'
|
23
|
+
|
24
|
+
# To use debugger
|
25
|
+
# gem 'ruby-debug'
|
26
|
+
|
27
|
+
# Bundle the extra gems:
|
28
|
+
# gem 'bj'
|
29
|
+
# gem 'nokogiri', '1.4.1'
|
30
|
+
# gem 'sqlite3-ruby', :require => 'sqlite3'
|
31
|
+
# gem 'aws-s3', :require => 'aws/s3'
|
32
|
+
|
33
|
+
# Bundle gems for certain environments:
|
34
|
+
# gem 'rspec', :group => :test
|
35
|
+
# group :test do
|
36
|
+
# gem 'webrat'
|
37
|
+
# end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
require 'rails/generators/resource_helpers'
|
2
|
+
require 'rails/generators/rails/model/model_generator'
|
3
|
+
require 'active_support/core_ext/object/blank'
|
4
|
+
|
5
|
+
class SqueezerGenerator < Rails::Generators::Base
|
6
|
+
include Rails::Generators::Migration
|
7
|
+
|
8
|
+
source_root File.expand_path('../templates', __FILE__)
|
9
|
+
|
10
|
+
def self.next_migration_number(dirname)
|
11
|
+
if ActiveRecord::Base.timestamped_migrations
|
12
|
+
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
13
|
+
else
|
14
|
+
"%.3d" % (current_migration_number(dirname) + 1 )
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def squeez
|
19
|
+
gem "will_paginate", "~> 3.0.pre2"
|
20
|
+
puts "paginacion"
|
21
|
+
gem 'haml'
|
22
|
+
puts "para escribir en haml en lugar de html"
|
23
|
+
gem 'devise',"~>1.1.rc2"
|
24
|
+
puts "maneja la registracion de usuario, login, emails de confirmacion, etc"
|
25
|
+
gem 'paperclip'
|
26
|
+
puts "para subir archivos"
|
27
|
+
gem 'cancan'
|
28
|
+
puts "permisos para roles"
|
29
|
+
gem 'nifty-generators'
|
30
|
+
puts "un generador de scaffold mas lindo"
|
31
|
+
gem 'jquery-rails'
|
32
|
+
puts "para usar jquery en lugar de prototype"
|
33
|
+
gem 'inherited_resources'
|
34
|
+
puts "para no tener que repetir el mismo controlardor todas las veces, util para entidades simples."
|
35
|
+
gem 'mysql'
|
36
|
+
puts "para usar mysql"
|
37
|
+
gem "meta_search"
|
38
|
+
puts "hace las busquedas mas faciles"
|
39
|
+
gem "rails_helpers_fix"
|
40
|
+
puts "hasta que salga laversion 3.1 esto soluciona el error de no inclir los helpers"
|
41
|
+
|
42
|
+
generate('bundler install')
|
43
|
+
generate('jquery:install --ui')
|
44
|
+
generate('devise:install')
|
45
|
+
generate('devise user')
|
46
|
+
#generate('nifty:layout')
|
47
|
+
#generate('devise:views')
|
48
|
+
|
49
|
+
#models
|
50
|
+
cf_m "user.rb"
|
51
|
+
cf_m "ability.rb"
|
52
|
+
|
53
|
+
#vistas
|
54
|
+
cf_v "layouts/application.html.erb"
|
55
|
+
cf_v "layouts/_msn.haml"
|
56
|
+
cf_v "layouts/_login.html.erb"
|
57
|
+
cf_v "layouts/_sidebar.html.haml"
|
58
|
+
cf_v "layouts/_menu.html.haml"
|
59
|
+
cf_v "layouts/_msn.haml"
|
60
|
+
cf_v "layouts/_footer.html.haml"
|
61
|
+
cf_v "layouts/_ice.haml"
|
62
|
+
copy_file("public/javascripts/application.js","public/javascripts/application.js")
|
63
|
+
copy_file("public/javascripts/jquery.layout.min-1.2.0.js","public/javascripts/jquery.layout.min-1.2.0.js")
|
64
|
+
|
65
|
+
copy_file("config/devise.rb","config/initializers/devise.rb")
|
66
|
+
|
67
|
+
FileUtils.cp_r "vendor/plugins/squeezer/lib/generators/squeezer/templates/public/stylesheets" ,"public"
|
68
|
+
|
69
|
+
migrations
|
70
|
+
|
71
|
+
end
|
72
|
+
|
73
|
+
private
|
74
|
+
|
75
|
+
def migrations
|
76
|
+
#migraciones
|
77
|
+
cf_mig("create_roles")
|
78
|
+
cf_mig("create_pages")
|
79
|
+
cf_mig("create_blogs")
|
80
|
+
cf_mig("create_comments")
|
81
|
+
cf_mig("create_posts")
|
82
|
+
cf_mig("create_roles_users")
|
83
|
+
cf_mig("create_sites")
|
84
|
+
cf_mig("add_username_user")
|
85
|
+
cf_mig("squeez_data")
|
86
|
+
cf_mig("page_data")
|
87
|
+
end
|
88
|
+
|
89
|
+
def cf_mig(dir)
|
90
|
+
migration_template "db/migrate/#{dir}.rb", "db/migrate/#{dir}"
|
91
|
+
sleep 1
|
92
|
+
end
|
93
|
+
|
94
|
+
def cf_js(dir)
|
95
|
+
copy_file("public/javascripts/#{dir}","public/javascripts/#{dir}")
|
96
|
+
end
|
97
|
+
|
98
|
+
def cf_h(dir)
|
99
|
+
copy_file("app/helpers/#{dir}","app/helpers/#{dir}")
|
100
|
+
end
|
101
|
+
|
102
|
+
def cf_v(dir)
|
103
|
+
copy_file("app/views/#{dir}","app/views/#{dir}")
|
104
|
+
end
|
105
|
+
|
106
|
+
def cf_m(dir)
|
107
|
+
copy_file("app/models/#{dir}","app/models/#{dir}")
|
108
|
+
end
|
109
|
+
|
110
|
+
def cf_c(dir)
|
111
|
+
copy_file("app/controllers/#{dir}","app/controllers/#{dir}")
|
112
|
+
end
|
113
|
+
|
114
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
source 'http://rubygems.org'
|
2
|
+
|
3
|
+
gem 'rails', '~> 3.0.0.rc'
|
4
|
+
|
5
|
+
# Bundle edge Rails instead:
|
6
|
+
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
7
|
+
|
8
|
+
gem 'sqlite3-ruby', :require => 'sqlite3'
|
9
|
+
|
10
|
+
gem "will_paginate", "~> 3.0.pre2"
|
11
|
+
gem 'haml'
|
12
|
+
gem 'devise',"~>1.1.rc2"
|
13
|
+
gem 'paperclip'
|
14
|
+
gem 'cancan'
|
15
|
+
gem 'nifty-generators'
|
16
|
+
|
17
|
+
|
18
|
+
# Use unicorn as the web server
|
19
|
+
# gem 'unicorn'
|
20
|
+
|
21
|
+
# Deploy with Capistrano
|
22
|
+
# gem 'capistrano'
|
23
|
+
|
24
|
+
# To use debugger
|
25
|
+
# gem 'ruby-debug'
|
26
|
+
|
27
|
+
# Bundle the extra gems:
|
28
|
+
# gem 'bj'
|
29
|
+
# gem 'nokogiri', '1.4.1'
|
30
|
+
# gem 'sqlite3-ruby', :require => 'sqlite3'
|
31
|
+
# gem 'aws-s3', :require => 'aws/s3'
|
32
|
+
|
33
|
+
# Bundle gems for certain environments:
|
34
|
+
# gem 'rspec', :group => :test
|
35
|
+
# group :test do
|
36
|
+
# gem 'webrat'
|
37
|
+
# end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Filters added to this controller apply to all controllers in the application.
|
2
|
+
# Likewise, all the methods added will be available for all controllers.
|
3
|
+
|
4
|
+
class ApplicationController < ActionController::Base
|
5
|
+
|
6
|
+
protect_from_forgery
|
7
|
+
layout 'application'
|
8
|
+
|
9
|
+
helper_method :site
|
10
|
+
helper_method :latests
|
11
|
+
|
12
|
+
def latests
|
13
|
+
Blog.paginate :page =>1,:per_page=>5, :order => 'created_at DESC'
|
14
|
+
end
|
15
|
+
|
16
|
+
def site
|
17
|
+
return Site.last
|
18
|
+
end
|
19
|
+
|
20
|
+
rescue_from CanCan::AccessDenied do |exception|
|
21
|
+
flash[:error] = "Acceso no permitido!"
|
22
|
+
redirect_to root_url
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
data/lib/{blogs_controller.rb → generators/squeezer/templates/app/controllers/blogs_controller.rb}
RENAMED
File without changes
|
@@ -0,0 +1,37 @@
|
|
1
|
+
class CommentsController < ApplicationController
|
2
|
+
load_and_authorize_resource
|
3
|
+
|
4
|
+
def show
|
5
|
+
time = Time.at(params[:after].to_i + 1)
|
6
|
+
@post = Post.where("comment_id = ? and created_at > ?",@comment.id,time)
|
7
|
+
end
|
8
|
+
|
9
|
+
def open
|
10
|
+
@comment = Comment.find(params[:id])
|
11
|
+
@comment.open=1
|
12
|
+
@comment.save
|
13
|
+
redirect_to :back
|
14
|
+
end
|
15
|
+
|
16
|
+
def close
|
17
|
+
@comment = Comment.find(params[:id])
|
18
|
+
@comment.open = false
|
19
|
+
@comment.save
|
20
|
+
redirect_to :back
|
21
|
+
end
|
22
|
+
|
23
|
+
def new
|
24
|
+
@comment = Comment.new
|
25
|
+
@comment.commentable_id = params[:id]
|
26
|
+
@comment.open = true
|
27
|
+
@comment.commentable_type = params[:type]
|
28
|
+
@comment.save
|
29
|
+
redirect_to :back
|
30
|
+
end
|
31
|
+
|
32
|
+
def remove
|
33
|
+
@comment = Comment.find(params[:id])
|
34
|
+
@comment.destroy
|
35
|
+
redirect_to :back
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
class ForumsController < ApplicationController
|
2
|
+
filter_resource_access
|
3
|
+
def index
|
4
|
+
@forums = Forum.all
|
5
|
+
end
|
6
|
+
|
7
|
+
def show
|
8
|
+
search = Topic.search(params[:search]).forum_id_equals(@forum.id)
|
9
|
+
@topics = search.all.paginate(:per_page => 20, :page => params[:page])
|
10
|
+
end
|
11
|
+
|
12
|
+
def new
|
13
|
+
end
|
14
|
+
|
15
|
+
def create
|
16
|
+
if @forum.save
|
17
|
+
flash[:notice] = "Successfully created forum."
|
18
|
+
redirect_to @forum
|
19
|
+
else
|
20
|
+
render :action => 'new'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def edit
|
25
|
+
end
|
26
|
+
|
27
|
+
def update
|
28
|
+
if @forum.update_attributes(params[:forum])
|
29
|
+
flash[:notice] = "Successfully updated forum."
|
30
|
+
redirect_to @forum
|
31
|
+
else
|
32
|
+
render :action => 'edit'
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def destroy
|
37
|
+
@forum = Forum.find(params[:id])
|
38
|
+
@forum.destroy
|
39
|
+
flash[:notice] = "Successfully destroyed forum."
|
40
|
+
redirect_to forums_url
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class PostsController < InheritedResources::Base
|
2
|
+
load_and_authorize_resource
|
3
|
+
|
4
|
+
def edit
|
5
|
+
@post = Post.find(params[:id])
|
6
|
+
render "comments/edit"
|
7
|
+
end
|
8
|
+
def create
|
9
|
+
@post = Post.new(params[:post])
|
10
|
+
@post.user =current_user
|
11
|
+
if @post.save
|
12
|
+
redirect_to(@post.comment.commentable, :notice => 'Post was successfully created.')
|
13
|
+
else
|
14
|
+
redirect_to :back
|
15
|
+
flash[:error]="Completa todos los datos"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def destroy
|
20
|
+
@post.destroy
|
21
|
+
redirect_to @post.comment.commentable
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
class SitesController < InheritedResources::Base
|
2
|
+
load_and_authorize_resource
|
3
|
+
|
4
|
+
def new
|
5
|
+
@files = Dir.open("public/stylesheets/ice")
|
6
|
+
@site=site
|
7
|
+
if(!@site)
|
8
|
+
@site = Site.new
|
9
|
+
|
10
|
+
respond_to do |format|
|
11
|
+
format.html # new.html.erb
|
12
|
+
format.xml { render :xml => @site }
|
13
|
+
end
|
14
|
+
else
|
15
|
+
flash[:notice]="el sitio ya fue creado"
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
# GET /sites/1/edit
|
21
|
+
def edit
|
22
|
+
if site
|
23
|
+
@site = site
|
24
|
+
@files = Dir.open("public/stylesheets/ice")
|
25
|
+
else
|
26
|
+
redirect_to({:action=>new})
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
# POST /sites
|
31
|
+
# POST /sites.xml
|
32
|
+
def create
|
33
|
+
@site = Site.new(params[:site])
|
34
|
+
respond_to do |format|
|
35
|
+
if @site.save
|
36
|
+
flash[:notice] = 'El sitio fue creado'
|
37
|
+
format.html { redirect_to(:controller=>"users",:action=>'sign_up') }
|
38
|
+
format.xml { render :xml => @site, :status => :created, :location => @site }
|
39
|
+
else
|
40
|
+
format.html { render :action => "new" }
|
41
|
+
format.xml { render :xml => @site.errors, :status => :unprocessable_entity }
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# PUT /sites/1
|
47
|
+
# PUT /sites/1.xml
|
48
|
+
def update
|
49
|
+
@site = Site.find(params[:id])
|
50
|
+
|
51
|
+
respond_to do |format|
|
52
|
+
if @site.update_attributes(params[:site])
|
53
|
+
files = Dir.open("public/stylesheets/ice/#{@site.style}/ice")
|
54
|
+
FileUtils.cp_r files ,"app/views/layouts/ice/#{@site.style}"
|
55
|
+
flash[:notice] = 'Site was successfully updated.'
|
56
|
+
format.html { redirect_to(@site) }
|
57
|
+
format.xml { head :ok }
|
58
|
+
else
|
59
|
+
format.html { render :action => "edit" }
|
60
|
+
format.xml { render :xml => @site.errors, :status => :unprocessable_entity }
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def destroy
|
66
|
+
@site = Site.last
|
67
|
+
@site.destroy
|
68
|
+
redirect_to(@site)
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
class TopicsController < ApplicationController
|
2
|
+
def index
|
3
|
+
@topics = Topic.all
|
4
|
+
end
|
5
|
+
|
6
|
+
def show
|
7
|
+
@topic = Topic.find(params[:id])
|
8
|
+
Comment.posts(@topic)
|
9
|
+
end
|
10
|
+
|
11
|
+
def new
|
12
|
+
@topic = Topic.new
|
13
|
+
@topic.forum_id=params[:id]
|
14
|
+
@post = Post.new
|
15
|
+
end
|
16
|
+
|
17
|
+
def create
|
18
|
+
@topic = Topic.new(params[:topic])
|
19
|
+
@topic=Comment.add_comment(@topic)
|
20
|
+
Comment.add_post(@topic.comment.id,params[:post][:body])
|
21
|
+
|
22
|
+
flash[:notice]="Listo!"
|
23
|
+
redirect_to @topic
|
24
|
+
end
|
25
|
+
|
26
|
+
def edit
|
27
|
+
@topic = Topic.find(params[:id])
|
28
|
+
end
|
29
|
+
|
30
|
+
def update
|
31
|
+
@topic = Topic.find(params[:id])
|
32
|
+
if @topic.update_attributes(params[:topic])
|
33
|
+
flash[:notice] = "Successfully updated topic."
|
34
|
+
redirect_to @topic
|
35
|
+
else
|
36
|
+
render :action => 'edit'
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def destroy
|
41
|
+
@topic = Topic.find(params[:id])
|
42
|
+
@topic.destroy
|
43
|
+
flash[:notice] = "Successfully destroyed topic."
|
44
|
+
redirect_to topics_url
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class UsersController < ApplicationController
|
2
|
+
load_and_authorize_resource
|
3
|
+
|
4
|
+
def index
|
5
|
+
@users = User.all
|
6
|
+
end
|
7
|
+
|
8
|
+
def roles
|
9
|
+
end
|
10
|
+
|
11
|
+
def update
|
12
|
+
if !params[:user]
|
13
|
+
roles = []
|
14
|
+
else
|
15
|
+
roles = params[:user][:role_ids]
|
16
|
+
end
|
17
|
+
flash[:notice]=params[:id]
|
18
|
+
@user.update_attributes({:role_ids =>roles})
|
19
|
+
redirect_to roles_path
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|