- Overall permissions and assignments will be stored in PostgreSQL
- A simplified cached version of a users' permissions will be stored in Redis
- Contains a hash with the permission name and class and id of the object if relevant
- Authorization will reference the cached version in Redis using Ohm
- The cache will be build if there is no data in it when Rails starts
- Changes to permissions or permissions assignments will trigger a cache update job(in Resque)
- Users will have a default Role assigned which will contain permissions everyone who is logged in has
- AnonymousUsers will have a default Role assigned which will contain permissions logged out users have
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'httparty' | |
require 'feedjira' | |
def get_feed(source) | |
if source.start_with?("http") | |
xml = feed_from_url(source) | |
else | |
xml = feed_from_file(source) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
json.name task.name | |
json.due_at task.due_at.strftime("%Y-%m-%d") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http_basic_authenticate_with name: "cmaxw", password: "railsclips" |
- 5 minute Rails setup. (ie. if config options are missing, launch a form to get them in the browser.)
- "Rate this page" service (from Parley. Embeddable via JS for static sites.)
- Cohort plugin for devise, sorcery, or similar
- Cohort analytics (see above)
- Chat room (EM, Node, etc.)
- Survey plugin with simple markup language/DSL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/lib/chef/client.rb:193:in `fork' | |
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/lib/chef/client.rb:193:in `run' | |
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/lib/chef/application.rb:183:in `run_chef_client' | |
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/lib/chef/application/client.rb:302:in `block in run_application' | |
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/lib/chef/application/client.rb:294:in `loop' | |
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/lib/chef/application/client.rb:294:in `run_application' | |
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/lib/chef/application.rb:66:in `run' | |
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/bin/chef-client:26:in `<top (required)>' | |
/usr/bin/chef-client:23:in `load' | |
/usr/bin/chef-client:23:in `<main>'^C |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Generated at 2013-10-08 13:56:58 +0000 | |
Chef::Mixin::Template::TemplateError: | |
Chef::Mixin::Template::TemplateError (undefined method `each' for nil:NilClass) on line #5: | |
3: | |
4: <% @apache_listen_ports.each do |port| -%> | |
5: <% @apache_listen_addresses.each do |address| -%> | |
6: Listen <%= address.length > 0 ? "#{address}:" : '' %><%= port %> | |
7: <% end -%> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'csv' | |
module Baseballer | |
class Batter | |
attr_accessor :attributes | |
def self.load(file_path = "../../data/Batting-07-12.csv") | |
path_to_file = File.expand_path(file_path, File.dirname(__FILE__)) | |
batters = [] | |
CSV.foreach(path_to_file, headers: true, return_headers: false) do |row| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name rubyrogues.com www.rubyrogues.com rubyrogues.bluebox-placeholder.com; | |
access_log /var/log/nginx/rubyrogues.com.access.log; | |
error_log /var/log/nginx/rubyrogues.com.error.log; | |
root /var/www/rubyrogues; | |
passenger_enabled on; | |
passenger_base_uri /parley; | |
rails_env production; |
NewerOlder