├── meetup ├── log │ └── .keep ├── app │ ├── models │ │ ├── .keep │ │ ├── concerns │ │ │ └── .keep │ │ ├── issue.rb │ │ └── comment.rb │ ├── mailers │ │ └── .keep │ ├── controllers │ │ ├── concerns │ │ │ └── .keep │ │ ├── page_controller.rb │ │ ├── application_controller.rb │ │ ├── comments_controller.rb │ │ └── issues_controller.rb │ ├── helpers │ │ └── application_helper.rb │ ├── views │ │ ├── issues │ │ │ ├── edit.html.erb │ │ │ ├── new.html.erb │ │ │ ├── _form.html.erb │ │ │ └── show.html.erb │ │ ├── page │ │ │ ├── about.html.erb │ │ │ ├── welcome.html.erb │ │ │ └── _issue_list.html.erb │ │ ├── shared │ │ │ ├── _comment_list.html.erb │ │ │ └── _comment_box.html.erb │ │ └── layouts │ │ │ └── application.html.erb │ └── assets │ │ ├── images │ │ ├── default_avatar.png │ │ └── home-banner-bg.jpg │ │ ├── stylesheets │ │ ├── sections │ │ │ ├── issue_new.css.scss │ │ │ ├── layout.css.scss │ │ │ ├── issue_show.css.scss │ │ │ └── welcome.css.scss │ │ ├── application.css │ │ └── shared │ │ │ └── common.css.scss │ │ └── javascripts │ │ ├── application.js │ │ └── vendor │ │ └── jquery.anystretch.min.js ├── lib │ ├── assets │ │ └── .keep │ └── tasks │ │ └── .keep ├── public │ ├── favicon.ico │ ├── robots.txt │ ├── 500.html │ ├── 422.html │ └── 404.html ├── test │ ├── fixtures │ │ └── .keep │ ├── helpers │ │ └── .keep │ ├── mailers │ │ └── .keep │ ├── models │ │ └── .keep │ ├── controllers │ │ └── .keep │ ├── integration │ │ └── .keep │ └── test_helper.rb ├── vendor │ └── assets │ │ ├── javascripts │ │ └── .keep │ │ └── stylesheets │ │ └── .keep ├── bin │ ├── bundle │ ├── rake │ ├── rails │ └── spring ├── config.ru ├── config │ ├── initializers │ │ ├── cookies_serializer.rb │ │ ├── session_store.rb │ │ ├── mime_types.rb │ │ ├── filter_parameter_logging.rb │ │ ├── assets.rb │ │ ├── backtrace_silencers.rb │ │ ├── wrap_parameters.rb │ │ └── inflections.rb │ ├── environment.rb │ ├── boot.rb │ ├── locales │ │ └── en.yml │ ├── secrets.yml │ ├── application.rb │ ├── environments │ │ ├── development.rb │ │ ├── test.rb │ │ └── production.rb │ ├── database.yml │ └── routes.rb ├── db │ ├── migrate │ │ ├── 20141106033327_add_content_to_issues.rb │ │ ├── 20141105032146_create_issues.rb │ │ └── 20141109034315_create_comments.rb │ ├── seeds.rb │ └── schema.rb ├── Rakefile ├── .gitignore ├── README.rdoc ├── Gemfile └── Gemfile.lock ├── README.md └── Vagrantfile /meetup/log/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /meetup/app/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /meetup/lib/assets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /meetup/lib/tasks/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /meetup/app/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /meetup/public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /meetup/test/fixtures/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /meetup/test/helpers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /meetup/test/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /meetup/test/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /meetup/app/models/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /meetup/test/controllers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /meetup/test/integration/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /meetup/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /meetup/vendor/assets/javascripts/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /meetup/vendor/assets/stylesheets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /meetup/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /meetup/app/models/issue.rb: -------------------------------------------------------------------------------- 1 | class Issue < ActiveRecord::Base 2 | has_many :comments 3 | end 4 | -------------------------------------------------------------------------------- /meetup/app/views/issues/edit.html.erb: -------------------------------------------------------------------------------- 1 | <%= render partial: 'form', locals: {issue: @issue} %> 2 | -------------------------------------------------------------------------------- /meetup/app/views/issues/new.html.erb: -------------------------------------------------------------------------------- 1 | <%= render partial: 'form', locals: {issue: @issue} %> 2 | -------------------------------------------------------------------------------- /meetup/app/views/page/about.html.erb: -------------------------------------------------------------------------------- 1 | 2 |
3 |

about

4 |
5 | -------------------------------------------------------------------------------- /meetup/app/assets/images/default_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/happypeter/rails10/HEAD/meetup/app/assets/images/default_avatar.png -------------------------------------------------------------------------------- /meetup/app/assets/images/home-banner-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/happypeter/rails10/HEAD/meetup/app/assets/images/home-banner-bg.jpg -------------------------------------------------------------------------------- /meetup/bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /meetup/app/controllers/page_controller.rb: -------------------------------------------------------------------------------- 1 | class PageController < ApplicationController 2 | def welcome 3 | @issues = Issue.all.reverse 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /meetup/config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /meetup/config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.action_dispatch.cookies_serializer = :json -------------------------------------------------------------------------------- /meetup/config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.session_store :cookie_store, key: '_meetup_session' 4 | -------------------------------------------------------------------------------- /meetup/db/migrate/20141106033327_add_content_to_issues.rb: -------------------------------------------------------------------------------- 1 | class AddContentToIssues < ActiveRecord::Migration 2 | def change 3 | add_column :issues, :content, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /meetup/config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /meetup/config/boot.rb: -------------------------------------------------------------------------------- 1 | # Set up gems listed in the Gemfile. 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | 4 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### Rails 十日谈 2 | 3 | 是一套零基础开始学习 web 开发的系统教材,每章有相应视频。文字内容在 gh-pages 分支上呢,在线版: 4 | 5 | ### 课程视频 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /meetup/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | begin 3 | load File.expand_path("../spring", __FILE__) 4 | rescue LoadError 5 | end 6 | require_relative '../config/boot' 7 | require 'rake' 8 | Rake.application.run 9 | -------------------------------------------------------------------------------- /meetup/config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /meetup/db/migrate/20141105032146_create_issues.rb: -------------------------------------------------------------------------------- 1 | class CreateIssues < ActiveRecord::Migration 2 | def change 3 | create_table :issues do |t| 4 | t.string :title 5 | t.timestamps 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /meetup/public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /meetup/bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | begin 3 | load File.expand_path("../spring", __FILE__) 4 | rescue LoadError 5 | end 6 | APP_PATH = File.expand_path('../../config/application', __FILE__) 7 | require_relative '../config/boot' 8 | require 'rails/commands' 9 | -------------------------------------------------------------------------------- /meetup/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /meetup/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | # Prevent CSRF attacks by raising an exception. 3 | # For APIs, you may want to use :null_session instead. 4 | protect_from_forgery with: :exception 5 | end 6 | -------------------------------------------------------------------------------- /meetup/app/models/comment.rb: -------------------------------------------------------------------------------- 1 | class Comment < ActiveRecord::Base 2 | belongs_to :issue 3 | 4 | def user_avatar 5 | gravatar_id = Digest::MD5.hexdigest(self.email.downcase) 6 | "http://gravatar.com/avatar/#{gravatar_id}.png?s=512&d=retro" 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /meetup/Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /meetup/app/assets/stylesheets/sections/issue_new.css.scss: -------------------------------------------------------------------------------- 1 | .new-issue-form-container { 2 | width: 800px; 3 | background: white; 4 | margin: 30px auto; 5 | .new-issue-form { 6 | width: 600px; 7 | margin: 10px auto; 8 | } 9 | } 10 | .submit-issue-button { 11 | height: 50px; 12 | width: 100%; 13 | } 14 | -------------------------------------------------------------------------------- /meetup/db/migrate/20141109034315_create_comments.rb: -------------------------------------------------------------------------------- 1 | class CreateComments < ActiveRecord::Migration 2 | def change 3 | create_table :comments do |t| 4 | t.text :content 5 | t.string :username 6 | t.string :email 7 | t.integer :issue_id 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /meetup/app/controllers/comments_controller.rb: -------------------------------------------------------------------------------- 1 | class CommentsController < ApplicationController 2 | def create 3 | c = Comment.new 4 | c.username = params[:username] 5 | c.email = params[:email] 6 | c.content = params[:content] 7 | c.issue_id = params[:issue_id] 8 | c.save 9 | redirect_to c.issue 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /meetup/db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Emanuel', city: cities.first) 8 | -------------------------------------------------------------------------------- /meetup/test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV['RAILS_ENV'] ||= 'test' 2 | require File.expand_path('../../config/environment', __FILE__) 3 | require 'rails/test_help' 4 | 5 | class ActiveSupport::TestCase 6 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 7 | fixtures :all 8 | 9 | # Add more helper methods to be used by all tests here... 10 | end 11 | -------------------------------------------------------------------------------- /meetup/config/initializers/assets.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Version of your assets, change this if you want to expire all your assets. 4 | Rails.application.config.assets.version = '1.0' 5 | 6 | # Precompile additional assets. 7 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. 8 | # Rails.application.config.assets.precompile += %w( search.js ) 9 | -------------------------------------------------------------------------------- /meetup/config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /meetup/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore the default SQLite database. 11 | /db/*.sqlite3 12 | /db/*.sqlite3-journal 13 | 14 | # Ignore all logfiles and tempfiles. 15 | /log/*.log 16 | /tmp 17 | -------------------------------------------------------------------------------- /meetup/app/views/issues/_form.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <%= form_for issue do |f| %> 4 |
5 |
<%= f.label :title %>
6 |
<%= f.text_field :title %>
7 |
8 |
9 |
<%= f.label :content %>
10 |
<%= f.text_area :content %>
11 |
12 |

<%= f.submit :class => "submit-issue-button btn btn-primary" %>

13 | <% end %> 14 |
15 |
16 | -------------------------------------------------------------------------------- /meetup/bin/spring: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | # This file loads spring without using Bundler, in order to be fast 4 | # It gets overwritten when you run the `spring binstub` command 5 | 6 | unless defined?(Spring) 7 | require "rubygems" 8 | require "bundler" 9 | 10 | if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m) 11 | ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR) 12 | ENV["GEM_HOME"] = "" 13 | Gem.paths = ENV 14 | 15 | gem "spring", match[1] 16 | require "spring/binstub" 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /meetup/config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters) 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /meetup/README.rdoc: -------------------------------------------------------------------------------- 1 | == README 2 | 3 | This README would normally document whatever steps are necessary to get the 4 | application up and running. 5 | 6 | Things you may want to cover: 7 | 8 | * Ruby version 9 | 10 | * System dependencies 11 | 12 | * Configuration 13 | 14 | * Database creation 15 | 16 | * Database initialization 17 | 18 | * How to run the test suite 19 | 20 | * Services (job queues, cache servers, search engines, etc.) 21 | 22 | * Deployment instructions 23 | 24 | * ... 25 | 26 | 27 | Please feel free to use a different markup language if you do not plan to run 28 | rake doc:app. 29 | -------------------------------------------------------------------------------- /meetup/app/views/shared/_comment_list.html.erb: -------------------------------------------------------------------------------- 1 | <% comments.each do |c| %> 2 |
3 |
4 | <%= link_to '#' do %> 5 | <%= image_tag c.user_avatar, class: 'image-circle' %> 6 | <% end %> 7 |
8 |
9 |
10 |
<%= link_to c.username, "#" %>
11 | 12 | <%= time_ago_in_words c.created_at %> ago 13 | 14 |
15 | <%= c.content %> 16 |
17 |
18 | <% end %> 19 | -------------------------------------------------------------------------------- /meetup/app/views/shared/_comment_box.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <%= link_to "#" do %> 4 | <%= image_tag "default_avatar.png", class: "image-circle" %> 5 | <% end %> 6 |
7 |
8 | <%= form_tag("/issues/#{issue.id}/comments", method: :post) do %> 9 | <%= label_tag :username, "用户名" %> 10 |   <%= text_field_tag(:username) %> 11 | <%= label_tag :email, "邮箱" %> 12 | <%= text_field_tag(:email) %> 13 |   <%= text_area_tag(:content) %> 14 | <%= submit_tag '提交评论', class: 'btn btn-primary btn-submit' %> 15 | <% end %> 16 |
17 |
18 | -------------------------------------------------------------------------------- /meetup/config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /meetup/config/locales/en.yml: -------------------------------------------------------------------------------- 1 | # Files in the config/locales directory are used for internationalization 2 | # and are automatically loaded by Rails. If you want to use locales other 3 | # than English, add the necessary files in this directory. 4 | # 5 | # To use the locales, use `I18n.t`: 6 | # 7 | # I18n.t 'hello' 8 | # 9 | # In views, this is aliased to just `t`: 10 | # 11 | # <%= t('hello') %> 12 | # 13 | # To use a different locale, set it with `I18n.locale`: 14 | # 15 | # I18n.locale = :es 16 | # 17 | # This would use the information in config/locales/es.yml. 18 | # 19 | # To learn more, please read the Rails Internationalization guide 20 | # available at http://guides.rubyonrails.org/i18n.html. 21 | 22 | en: 23 | hello: "Hello world" 24 | -------------------------------------------------------------------------------- /meetup/app/views/page/welcome.html.erb: -------------------------------------------------------------------------------- 1 |
"> 2 | 9 |
10 |
11 |
12 |

所有活动都在下面了...

13 |
14 |
15 | 16 |
17 | <%= render partial: 'issue_list', locals: { issues: @issues } %> 18 |
19 | 20 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /meetup/app/assets/stylesheets/application.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, 6 | * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. 7 | * 8 | * You're free to add application-wide styles to this file and they'll appear at the bottom of the 9 | * compiled file so the styles you add here take precedence over styles defined in any styles 10 | * defined in the other CSS/SCSS files in this directory. It is generally better to create a new 11 | * file per style scope. 12 | *= require font-awesome 13 | *= require_tree . 14 | *= require_self 15 | */ 16 | -------------------------------------------------------------------------------- /meetup/app/controllers/issues_controller.rb: -------------------------------------------------------------------------------- 1 | class IssuesController < ApplicationController 2 | def show 3 | @issue = Issue.find(params[:id]) 4 | @comments = @issue.comments 5 | end 6 | 7 | def new 8 | @issue = Issue.new 9 | end 10 | 11 | def edit 12 | @issue = Issue.find(params[:id]) 13 | end 14 | 15 | def create 16 | Issue.create(issue_params) 17 | redirect_to :root 18 | end 19 | 20 | def update 21 | i = Issue.find(params[:id]) 22 | i.update_attributes(issue_params) 23 | redirect_to :root 24 | end 25 | 26 | def destroy 27 | i = Issue.find(params[:id]) 28 | i.destroy 29 | redirect_to :root 30 | end 31 | 32 | private 33 | def issue_params 34 | params.require(:issue).permit(:title, :content) 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /meetup/app/assets/javascripts/application.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, 5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. 6 | // 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8 | // compiled file. 9 | // 10 | // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details 11 | // about supported directives. 12 | // 13 | //= require jquery 14 | //= require vendor/jquery.anystretch.min 15 | //= require jquery_ujs 16 | //= require turbolinks 17 | //= require_tree . 18 | -------------------------------------------------------------------------------- /meetup/app/views/page/_issue_list.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <% issues.each do |i| %> 3 |
4 |
5 | 6 | 7 | 8 |
9 |
10 |
11 | <%= link_to i.title, issue_path(i) %> 12 |
13 | read 14 | 18 |
19 |
20 | 21 | <%= link_to i.comments.count, i %> 22 |
23 |
24 | <% end %> 25 |
26 | -------------------------------------------------------------------------------- /meetup/app/assets/stylesheets/sections/layout.css.scss: -------------------------------------------------------------------------------- 1 | .navbar { 2 | background: #222; 3 | position: relative; 4 | z-index: 1000; 5 | a { 6 | color: white; 7 | } 8 | } 9 | .navbar a:hover { 10 | color: #c0865e; 11 | } 12 | .navbar-brand { 13 | float: left; 14 | padding-left: 0; 15 | line-height: 80px; 16 | font-size: 40px; 17 | } 18 | .nav.left { 19 | float: left; 20 | margin-left: 40px; 21 | font-size: 15px; 22 | } 23 | .nav.right { 24 | float: right; 25 | } 26 | .nav li { 27 | float: left; 28 | } 29 | .nav li a { 30 | display: block; 31 | font-size: 1.1em; 32 | line-height: 40px; 33 | padding: 5px 10px; 34 | margin: 15px 10px; 35 | } 36 | .nav li a:hover { 37 | color: #000; 38 | background: #fff; 39 | } 40 | 41 | .footer { 42 | border-top: 1px solid #c5c5c5; 43 | min-height: 200px; 44 | margin: 3em 0; 45 | padding-top: 3em; 46 | padding-bottom: 3em; 47 | background: #f8f5f0; 48 | } 49 | 50 | .home-banner { 51 | height: 600px; 52 | margin-top: -80px; 53 | } 54 | -------------------------------------------------------------------------------- /meetup/app/views/issues/show.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <%= @issue.title %> 4 | <%= link_to 'Destroy', issue_path(@issue), method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-primary" %> 5 | <%= link_to 'edit', edit_issue_path(@issue), class: "btn btn-primary" %> 6 |
7 |
8 |
9 |
10 |
11 |
12 | 13 |
14 |
15 |
16 |
happypeter
17 |
18 | <%= @issue.content %> 19 |
20 |
21 | <%= render partial: 'shared/comment_list', locals: {comments: @comments} %> 22 | <%= render partial: 'shared/comment_box', locals: {issue: @issue} %> 23 |
24 |
25 | -------------------------------------------------------------------------------- /meetup/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | meetup 6 | <%= stylesheet_link_tag "application" %> 7 | <%= javascript_include_tag "application" %> 8 | <%= csrf_meta_tags %> 9 | 10 | 11 | 26 | 27 | <%= yield %> 28 | 29 | 34 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /meetup/config/secrets.yml: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Your secret key is used for verifying the integrity of signed cookies. 4 | # If you change this key, all old signed cookies will become invalid! 5 | 6 | # Make sure the secret is at least 30 characters and all random, 7 | # no regular words or you'll be exposed to dictionary attacks. 8 | # You can use `rake secret` to generate a secure secret key. 9 | 10 | # Make sure the secrets in this file are kept private 11 | # if you're sharing your code publicly. 12 | 13 | development: 14 | secret_key_base: 832854f482963d7c7f4cbe8ce028f9400d76fb247f648029cb5643d90560367a34347aa491a3b1a96dce0ebddce8093fc296fed2bfabf1c79de5bcfb3a405238 15 | 16 | test: 17 | secret_key_base: 5ea2bfada24c63887702efa3ec22a173d99502a895920ce7b21846b312c2cf9f77a10e04ec3044bad3ccdcc4a9a670bfb54aaf09d9a03d92dc9b864bae79fc3e 18 | 19 | # Do not keep production secrets in the repository, 20 | # instead read values from the environment. 21 | production: 22 | secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> 23 | -------------------------------------------------------------------------------- /meetup/config/application.rb: -------------------------------------------------------------------------------- 1 | require File.expand_path('../boot', __FILE__) 2 | 3 | require 'rails/all' 4 | 5 | # Require the gems listed in Gemfile, including any gems 6 | # you've limited to :test, :development, or :production. 7 | Bundler.require(*Rails.groups) 8 | 9 | module Meetup 10 | class Application < Rails::Application 11 | # Settings in config/environments/* take precedence over those specified here. 12 | # Application configuration should go into files in config/initializers 13 | # -- all .rb files in that directory are automatically loaded. 14 | config.generators do |g| 15 | g.assets false 16 | g.helper false 17 | g.test_framework false 18 | end 19 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. 20 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. 21 | # config.time_zone = 'Central Time (US & Canada)' 22 | 23 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. 24 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] 25 | # config.i18n.default_locale = :de 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /meetup/db/schema.rb: -------------------------------------------------------------------------------- 1 | # encoding: UTF-8 2 | # This file is auto-generated from the current state of the database. Instead 3 | # of editing this file, please use the migrations feature of Active Record to 4 | # incrementally modify your database, and then regenerate this schema definition. 5 | # 6 | # Note that this schema.rb definition is the authoritative source for your 7 | # database schema. If you need to create the application database on another 8 | # system, you should be using db:schema:load, not running all the migrations 9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations 10 | # you'll amass, the slower it'll run and the greater likelihood for issues). 11 | # 12 | # It's strongly recommended that you check this file into your version control system. 13 | 14 | ActiveRecord::Schema.define(version: 20141109034315) do 15 | 16 | create_table "comments", force: true do |t| 17 | t.text "content" 18 | t.string "username" 19 | t.string "email" 20 | t.integer "issue_id" 21 | t.datetime "created_at" 22 | t.datetime "updated_at" 23 | end 24 | 25 | create_table "issues", force: true do |t| 26 | t.string "title" 27 | t.datetime "created_at" 28 | t.datetime "updated_at" 29 | t.text "content" 30 | end 31 | 32 | end 33 | -------------------------------------------------------------------------------- /meetup/app/assets/stylesheets/sections/issue_show.css.scss: -------------------------------------------------------------------------------- 1 | .issue-heading { 2 | border-bottom: 1px solid #ddd; 3 | padding-bottom: 30px; 4 | padding-top: 30px; 5 | margin-top: 0; 6 | margin-bottom: 35px; 7 | background: #7EB6AD; 8 | color: #fff; 9 | font-size: 2em; 10 | a { 11 | margin-left: 30px; 12 | } 13 | } 14 | 15 | .reply { 16 | position: relative; 17 | overflow: hidden; 18 | margin-bottom: 30px; 19 | width: 91%; 20 | .heading { 21 | margin-bottom: 5px; 22 | .name { 23 | font-size: 18px; 24 | display: inline; 25 | font-weight: normal; 26 | } 27 | } 28 | .body { 29 | padding: 15px; 30 | border-radius: 5px; 31 | position: relative; 32 | overflow: visible; 33 | float: left; 34 | width: 87%; 35 | border: 1px solid #ddd; 36 | line-height: 26px; 37 | &::before { 38 | content: ""; 39 | display: block; 40 | position: absolute; 41 | top: 21px; 42 | left: -6px; 43 | width: 10px; 44 | height: 10px; 45 | background: #fff; 46 | border-left: 1px solid #cad5e0; 47 | border-top: 1px solid #cad5e0; 48 | -moz-transform: rotate(-45deg); 49 | -webkit-transform: rotate(-45deg); 50 | } 51 | } 52 | .avatar { 53 | float: left; 54 | margin-right: 29px; 55 | position: relative; 56 | overflow: visible; 57 | text-align: center; 58 | .image-circle { 59 | width: 75px; 60 | border-radius: 50%; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /meetup/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'font-awesome-rails' 4 | # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 5 | gem 'rails', '4.1.2' 6 | # Use mysql as the database for Active Record 7 | gem 'mysql2' 8 | # Use SCSS for stylesheets 9 | gem 'sass-rails', '~> 4.0.3' 10 | # Use Uglifier as compressor for JavaScript assets 11 | gem 'uglifier', '>= 1.3.0' 12 | # Use CoffeeScript for .js.coffee assets and views 13 | gem 'coffee-rails', '~> 4.0.0' 14 | # See https://github.com/sstephenson/execjs#readme for more supported runtimes 15 | # gem 'therubyracer', platforms: :ruby 16 | 17 | # Use jquery as the JavaScript library 18 | gem 'jquery-rails' 19 | # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks 20 | gem 'turbolinks' 21 | # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 22 | gem 'jbuilder', '~> 2.0' 23 | # bundle exec rake doc:rails generates the API under doc/api. 24 | gem 'sdoc', '~> 0.4.0', group: :doc 25 | 26 | # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring 27 | gem 'spring', group: :development 28 | 29 | # Use ActiveModel has_secure_password 30 | # gem 'bcrypt', '~> 3.1.7' 31 | 32 | # Use unicorn as the app server 33 | # gem 'unicorn' 34 | 35 | # Use Capistrano for deployment 36 | # gem 'capistrano-rails', group: :development 37 | 38 | # Use debugger 39 | # gem 'debugger', group: [:development, :test] 40 | 41 | -------------------------------------------------------------------------------- /meetup/config/environments/development.rb: -------------------------------------------------------------------------------- 1 | Rails.application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # In the development environment your application's code is reloaded on 5 | # every request. This slows down response time but is perfect for development 6 | # since you don't have to restart the web server when you make code changes. 7 | config.cache_classes = false 8 | 9 | # Do not eager load code on boot. 10 | config.eager_load = false 11 | 12 | # Show full error reports and disable caching. 13 | config.consider_all_requests_local = true 14 | config.action_controller.perform_caching = false 15 | 16 | # Don't care if the mailer can't send. 17 | config.action_mailer.raise_delivery_errors = false 18 | 19 | # Print deprecation notices to the Rails logger. 20 | config.active_support.deprecation = :log 21 | 22 | # Raise an error on page load if there are pending migrations. 23 | config.active_record.migration_error = :page_load 24 | 25 | # Debug mode disables concatenation and preprocessing of assets. 26 | # This option may cause significant delays in view rendering with a large 27 | # number of complex assets. 28 | config.assets.debug = true 29 | 30 | # Adds additional error checking when serving assets at runtime. 31 | # Checks for improperly declared sprockets dependencies. 32 | # Raises helpful error messages. 33 | config.assets.raise_runtime_errors = true 34 | 35 | # Raises error for missing translations 36 | # config.action_view.raise_on_missing_translations = true 37 | end 38 | -------------------------------------------------------------------------------- /meetup/public/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | We're sorry, but something went wrong (500) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

We're sorry, but something went wrong.

62 |
63 |

If you are the application owner check the logs for more information.

64 |
65 | 66 | 67 | -------------------------------------------------------------------------------- /meetup/config/environments/test.rb: -------------------------------------------------------------------------------- 1 | Rails.application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # The test environment is used exclusively to run your application's 5 | # test suite. You never need to work with it otherwise. Remember that 6 | # your test database is "scratch space" for the test suite and is wiped 7 | # and recreated between test runs. Don't rely on the data there! 8 | config.cache_classes = true 9 | 10 | # Do not eager load code on boot. This avoids loading your whole application 11 | # just for the purpose of running a single test. If you are using a tool that 12 | # preloads Rails for running tests, you may have to set it to true. 13 | config.eager_load = false 14 | 15 | # Configure static asset server for tests with Cache-Control for performance. 16 | config.serve_static_assets = true 17 | config.static_cache_control = 'public, max-age=3600' 18 | 19 | # Show full error reports and disable caching. 20 | config.consider_all_requests_local = true 21 | config.action_controller.perform_caching = false 22 | 23 | # Raise exceptions instead of rendering exception templates. 24 | config.action_dispatch.show_exceptions = false 25 | 26 | # Disable request forgery protection in test environment. 27 | config.action_controller.allow_forgery_protection = false 28 | 29 | # Tell Action Mailer not to deliver emails to the real world. 30 | # The :test delivery method accumulates sent emails in the 31 | # ActionMailer::Base.deliveries array. 32 | config.action_mailer.delivery_method = :test 33 | 34 | # Print deprecation notices to the stderr. 35 | config.active_support.deprecation = :stderr 36 | 37 | # Raises error for missing translations 38 | # config.action_view.raise_on_missing_translations = true 39 | end 40 | -------------------------------------------------------------------------------- /meetup/public/422.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The change you wanted was rejected (422) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

The change you wanted was rejected.

62 |

Maybe you tried to change something you didn't have access to.

63 |
64 |

If you are the application owner check the logs for more information.

65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /meetup/config/database.yml: -------------------------------------------------------------------------------- 1 | # MySQL. Versions 5.0+ are recommended. 2 | # 3 | # Install the MYSQL driver 4 | # gem install mysql2 5 | # 6 | # Ensure the MySQL gem is defined in your Gemfile 7 | # gem 'mysql2' 8 | # 9 | # And be sure to use new-style password hashing: 10 | # http://dev.mysql.com/doc/refman/5.0/en/old-client.html 11 | # 12 | default: &default 13 | adapter: mysql2 14 | encoding: utf8 15 | pool: 5 16 | username: root 17 | password: 18 | socket: /var/run/mysqld/mysqld.sock 19 | 20 | development: 21 | <<: *default 22 | database: meetup_development 23 | 24 | # Warning: The database defined as "test" will be erased and 25 | # re-generated from your development database when you run "rake". 26 | # Do not set this db to the same as development or production. 27 | test: 28 | <<: *default 29 | database: meetup_test 30 | 31 | # As with config/secrets.yml, you never want to store sensitive information, 32 | # like your database password, in your source code. If your source code is 33 | # ever seen by anyone, they now have access to your database. 34 | # 35 | # Instead, provide the password as a unix environment variable when you boot 36 | # the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database 37 | # for a full rundown on how to provide these environment variables in a 38 | # production deployment. 39 | # 40 | # On Heroku and other platform providers, you may have a full connection URL 41 | # available as an environment variable. For example: 42 | # 43 | # DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase" 44 | # 45 | # You can use this database configuration with: 46 | # 47 | # production: 48 | # url: <%= ENV['DATABASE_URL'] %> 49 | # 50 | production: 51 | <<: *default 52 | database: meetup_production 53 | username: meetup 54 | password: <%= ENV['MEETUP_DATABASE_PASSWORD'] %> 55 | -------------------------------------------------------------------------------- /meetup/public/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The page you were looking for doesn't exist (404) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

The page you were looking for doesn't exist.

62 |

You may have mistyped the address or the page may have moved.

63 |
64 |

If you are the application owner check the logs for more information.

65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /meetup/app/assets/stylesheets/shared/common.css.scss: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: sans-serif; 3 | margin: 0; 4 | font-size: 14px; 5 | color: #666; 6 | } 7 | 8 | .container { 9 | width: 1170px; 10 | margin: 0 auto; 11 | } 12 | 13 | *, *:before, *:after { 14 | -webkit-box-sizing: border-box; 15 | -moz-box-sizing: border-box; 16 | box-sizing: border-box; 17 | } 18 | 19 | .clearfix:before, 20 | .clearfix:after { 21 | content: " "; 22 | display: table; 23 | } 24 | .clearfix:after { 25 | clear: both; 26 | } 27 | .clearfix { 28 | *zoom: 1; 29 | } 30 | 31 | ul { 32 | list-style: none; 33 | padding: 0; 34 | margin: 0; 35 | } 36 | a { 37 | text-decoration: none; 38 | color: #c0865e; 39 | &:hover { 40 | color: #845534; 41 | } 42 | } 43 | 44 | .btn-primary { 45 | color: white; 46 | background: #c0865e; 47 | border-color: #b9784c; 48 | &:hover { 49 | background-color: #b9784c; 50 | border-color: #845534; 51 | } 52 | } 53 | .btn { 54 | display: inline-block; 55 | padding: 6px 12px; 56 | margin-bottom: 0; 57 | font-size: 14px; 58 | font-weight: normal; 59 | line-height: 1.428571429; 60 | text-align: center; 61 | vertical-align: middle; 62 | cursor: pointer; 63 | border: 1px solid transparent; 64 | border-radius: 4px; 65 | white-space: nowrap; 66 | -webkit-user-select: none; 67 | -moz-user-select: none; 68 | -ms-user-select: none; 69 | -o-user-select: none; 70 | user-select: none; 71 | } 72 | 73 | form { 74 | input { 75 | font-size: 21px; 76 | width: 100%; 77 | padding: 10px 12px; 78 | color: #555; 79 | } 80 | textarea { 81 | height: 180px; 82 | font-size: 21px; 83 | width: 100%; 84 | padding: 10px 12px; 85 | color: #555; 86 | } 87 | label { 88 | display: inline-block; 89 | margin-bottom: 5px; 90 | } 91 | dd { 92 | margin: 0; 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /meetup/config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | 3 | # The priority is based upon order of creation: first created -> highest priority. 4 | # See how all your routes lay out with "rake routes". 5 | 6 | # You can have the root of your site routed with "root" 7 | root 'page#welcome' 8 | get '/about' => 'page#about' 9 | 10 | # issues 11 | resources :issues 12 | 13 | # comments 14 | 15 | post '/issues/:issue_id/comments' => 'comments#create' 16 | 17 | # Example of regular route: 18 | # get 'products/:id' => 'catalog#view' 19 | 20 | # Example of named route that can be invoked with purchase_url(id: product.id) 21 | # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase 22 | 23 | # Example resource route (maps HTTP verbs to controller actions automatically): 24 | # resources :products 25 | 26 | # Example resource route with options: 27 | # resources :products do 28 | # member do 29 | # get 'short' 30 | # post 'toggle' 31 | # end 32 | # 33 | # collection do 34 | # get 'sold' 35 | # end 36 | # end 37 | 38 | # Example resource route with sub-resources: 39 | # resources :products do 40 | # resources :comments, :sales 41 | # resource :seller 42 | # end 43 | 44 | # Example resource route with more complex sub-resources: 45 | # resources :products do 46 | # resources :comments 47 | # resources :sales do 48 | # get 'recent', on: :collection 49 | # end 50 | # end 51 | 52 | # Example resource route with concerns: 53 | # concern :toggleable do 54 | # post 'toggle' 55 | # end 56 | # resources :posts, concerns: :toggleable 57 | # resources :photos, concerns: :toggleable 58 | 59 | # Example resource route within a namespace: 60 | # namespace :admin do 61 | # # Directs /admin/products/* to Admin::ProductsController 62 | # # (app/controllers/admin/products_controller.rb) 63 | # resources :products 64 | # end 65 | end 66 | -------------------------------------------------------------------------------- /meetup/app/assets/javascripts/vendor/jquery.anystretch.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Anystretch 3 | * Version 1.2 (@jbrooksuk / me.itslimetime.com) 4 | * https://github.com/jbrooksuk/jquery-anystretch 5 | * Based on Dan Millar's Port 6 | * https://github.com/danmillar/jquery-anystretch 7 | * 8 | * Add a dynamically-resized background image to the body 9 | * of a page or any other block level element within it 10 | * 11 | * Copyright (c) 2012 Dan Millar (@danmillar / decode.uk.com) 12 | * Dual licensed under the MIT and GPL licenses. 13 | * 14 | * This is a fork of jQuery Backstretch (v1.2) 15 | * Copyright (c) 2011 Scott Robbin (srobbin.com) 16 | */ 17 | (function(a){a.fn.anystretch=function(d,c,e){var b=this.selector.length?false:true;return this.each(function(q){var s={positionX:"center",positionY:"center",speed:0,elPosition:"relative",dataName:"stretch"},h=a(this),g=b?a(".anystretch"):h.children(".anystretch"),l=g.data("settings")||s,m=g.data("settings"),j,f,r,p,v,u;if(c&&typeof c=="object"){a.extend(l,c)}if(c&&typeof c=="function"){e=c}a(document).ready(t);return this;function t(){if(d||h.length>=1){var i;if(!b){h.css({position:l.elPosition,background:"none"})}if(g.length==0){g=a("
").attr("class","anystretch").css({left:0,top:0,position:(b?"fixed":"absolute"),overflow:"hidden",zIndex:(b?-999999:-999998),margin:0,padding:0,height:"100%",width:"100%"})}else{g.find("img").addClass("deleteable")}i=a("").css({position:"absolute",display:"none",margin:0,padding:0,border:"none",zIndex:-999999}).bind("load",function(A){var z=a(this),y,x;z.css({width:"auto",height:"auto"});y=this.width||a(A.target).width();x=this.height||a(A.target).height();j=y/x;o(function(){z.fadeIn(l.speed,function(){g.find(".deleteable").remove();if(typeof e=="function"){e()}})})}).appendTo(g);if(h.children(".anystretch").length==0){if(b){a("body").append(g)}else{h.append(g)}}g.data("settings",l);var w="";if(d){w=d}else{if(h.data(l.dataName)){w=h.data(l.dataName)}else{return}}i.attr("src",w);a(window).resize(o)}}function o(i){try{u={left:0,top:0};r=k();p=r/j;if(p>=n()){v=(p-n())/2;if(l.positionY=="center"||l.centeredY){a.extend(u,{top:"-"+v+"px"})}else{if(l.positionY=="bottom"){a.extend(u,{top:"auto",bottom:"0px"})}}}else{p=n();r=p*j;v=(r-k())/2;if(l.positionX=="center"||l.centeredX){a.extend(u,{left:"-"+v+"px"})}else{if(l.positionX=="right"){a.extend(u,{left:"auto",right:"0px"})}}}g.children("img:not(.deleteable)").width(r).height(p).filter("img").css(u)}catch(w){}if(typeof i=="function"){i()}}function k(){return b?h.width():h.innerWidth()}function n(){return b?h.height():h.innerHeight()}})};a.anystretch=function(d,b,e){var c=("onorientationchange" in window)?a(document):a(window);c.anystretch(d,b,e)}})(jQuery); -------------------------------------------------------------------------------- /meetup/app/assets/stylesheets/sections/welcome.css.scss: -------------------------------------------------------------------------------- 1 | .page-welcome .navbar { 2 | background: transparent; 3 | } 4 | .home-banner { 5 | margin-top: -80px; 6 | padding-top: 80px; 7 | .banner-inner { 8 | height: 600px; 9 | position: relative; 10 | h1 { 11 | font-family: "museo-sans-condensed"; 12 | font-size: 88px; 13 | font-weight: 400; 14 | letter-spacing: -2px; 15 | border-radius: 5px; 16 | margin-top: 60px; 17 | line-height: 1.2; 18 | max-width: 50%; 19 | text-transform: capitalize; 20 | color: #fff; 21 | text-shadow: 0 1px 81px rgba(0,0,0,0.3); 22 | } 23 | .subheading { 24 | color: #fff; 25 | font-weight: 300; 26 | font-size: 1.3em; 27 | margin-top: 26px; 28 | background: rgba(0,0,0,0.5); 29 | display: block; 30 | width: 45%; 31 | padding: 5px 10px; 32 | line-height: 30px; 33 | text-align: center; 34 | } 35 | } 36 | } 37 | 38 | .home-banner-links { 39 | position: absolute; 40 | right: 160px; 41 | top: 194px; 42 | .banner-btn { 43 | padding: 15px 15px; 44 | font-size: 1.2em; 45 | font-weight: 300; 46 | font-family: "museo-sans-condensed"; 47 | border-radius: 5px; 48 | color: #fff; 49 | background: rgba(0,0,0,0.1); 50 | margin-left: 8px; 51 | border: 1px solid transparent; 52 | &:hover { 53 | border: 1px solid rgba(0,0,0,0.2); 54 | } 55 | } 56 | } 57 | .issue-list-header { 58 | border-bottom: 1px solid #ddd; 59 | padding-bottom: 30px; 60 | padding-top: 30px; 61 | margin-top: 0; 62 | margin-bottom: 35px; 63 | background: #7EB6AD; 64 | color: #fff; 65 | .issue-list-heading { 66 | font-size: 2em; 67 | font-weight: normal; 68 | } 69 | } 70 | 71 | .issue-list { 72 | background: #fff; 73 | clear: both; 74 | padding: 0 2em; 75 | margin-bottom: 1em; 76 | border: 1px solid #ddd; 77 | article { 78 | border-bottom: 1px solid #e3e3e3; 79 | position: relative; 80 | margin-top: 0; 81 | padding: 1em 0; 82 | .body { 83 | margin-right: 2em; 84 | width: 70%; 85 | float: left; 86 | .read-more{ 87 | background-color: #316A72; 88 | color: #fff; 89 | font-size: 13px; 90 | border-radius: 4px; 91 | letter-spacing: -0.3px; 92 | display: inline-block; 93 | line-height: 1.7; 94 | font-weight: 100; 95 | padding: 0 6px; 96 | } 97 | .meta-data { 98 | color: #999; 99 | font-size: 12px; 100 | } 101 | 102 | h5 { 103 | font-size: 22px; 104 | line-height: 35px; 105 | font-weight: normal; 106 | margin: 0 0 5px; 107 | a { 108 | color: #555; 109 | &:hover { 110 | color: black; 111 | } 112 | } 113 | } 114 | } 115 | .issue-comment-count { 116 | float: right; 117 | margin-top: 15px; 118 | a { 119 | font-size: 45px; 120 | } 121 | .icon-muted { 122 | font-size: 25px; 123 | position: relative; 124 | top: -20px; 125 | color: #c9c9c9; 126 | } 127 | } 128 | .avatar { 129 | width: 75px; 130 | float: left; 131 | img { 132 | width: 65px; 133 | padding: 4px; 134 | border: 1px solid #ddd; 135 | } 136 | } 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /meetup/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | actionmailer (4.1.2) 5 | actionpack (= 4.1.2) 6 | actionview (= 4.1.2) 7 | mail (~> 2.5.4) 8 | actionpack (4.1.2) 9 | actionview (= 4.1.2) 10 | activesupport (= 4.1.2) 11 | rack (~> 1.5.2) 12 | rack-test (~> 0.6.2) 13 | actionview (4.1.2) 14 | activesupport (= 4.1.2) 15 | builder (~> 3.1) 16 | erubis (~> 2.7.0) 17 | activemodel (4.1.2) 18 | activesupport (= 4.1.2) 19 | builder (~> 3.1) 20 | activerecord (4.1.2) 21 | activemodel (= 4.1.2) 22 | activesupport (= 4.1.2) 23 | arel (~> 5.0.0) 24 | activesupport (4.1.2) 25 | i18n (~> 0.6, >= 0.6.9) 26 | json (~> 1.7, >= 1.7.7) 27 | minitest (~> 5.1) 28 | thread_safe (~> 0.1) 29 | tzinfo (~> 1.1) 30 | arel (5.0.1.20140414130214) 31 | builder (3.2.2) 32 | coffee-rails (4.0.1) 33 | coffee-script (>= 2.2.0) 34 | railties (>= 4.0.0, < 5.0) 35 | coffee-script (2.3.0) 36 | coffee-script-source 37 | execjs 38 | coffee-script-source (1.8.0) 39 | erubis (2.7.0) 40 | execjs (2.2.2) 41 | font-awesome-rails (4.2.0.0) 42 | railties (>= 3.2, < 5.0) 43 | hike (1.2.3) 44 | i18n (0.6.11) 45 | jbuilder (2.2.4) 46 | activesupport (>= 3.0.0, < 5) 47 | multi_json (~> 1.2) 48 | jquery-rails (3.1.2) 49 | railties (>= 3.0, < 5.0) 50 | thor (>= 0.14, < 2.0) 51 | json (1.8.1) 52 | mail (2.5.4) 53 | mime-types (~> 1.16) 54 | treetop (~> 1.4.8) 55 | mime-types (1.25.1) 56 | minitest (5.4.2) 57 | multi_json (1.10.1) 58 | mysql2 (0.3.16) 59 | polyglot (0.3.5) 60 | rack (1.5.2) 61 | rack-test (0.6.2) 62 | rack (>= 1.0) 63 | rails (4.1.2) 64 | actionmailer (= 4.1.2) 65 | actionpack (= 4.1.2) 66 | actionview (= 4.1.2) 67 | activemodel (= 4.1.2) 68 | activerecord (= 4.1.2) 69 | activesupport (= 4.1.2) 70 | bundler (>= 1.3.0, < 2.0) 71 | railties (= 4.1.2) 72 | sprockets-rails (~> 2.0) 73 | railties (4.1.2) 74 | actionpack (= 4.1.2) 75 | activesupport (= 4.1.2) 76 | rake (>= 0.8.7) 77 | thor (>= 0.18.1, < 2.0) 78 | rake (10.3.2) 79 | rdoc (4.1.2) 80 | json (~> 1.4) 81 | sass (3.2.19) 82 | sass-rails (4.0.4) 83 | railties (>= 4.0.0, < 5.0) 84 | sass (~> 3.2.2) 85 | sprockets (~> 2.8, < 2.12) 86 | sprockets-rails (~> 2.0) 87 | sdoc (0.4.1) 88 | json (~> 1.7, >= 1.7.7) 89 | rdoc (~> 4.0) 90 | spring (1.1.3) 91 | sprockets (2.11.3) 92 | hike (~> 1.2) 93 | multi_json (~> 1.0) 94 | rack (~> 1.0) 95 | tilt (~> 1.1, != 1.3.0) 96 | sprockets-rails (2.2.0) 97 | actionpack (>= 3.0) 98 | activesupport (>= 3.0) 99 | sprockets (>= 2.8, < 4.0) 100 | thor (0.19.1) 101 | thread_safe (0.3.4) 102 | tilt (1.4.1) 103 | treetop (1.4.15) 104 | polyglot 105 | polyglot (>= 0.3.1) 106 | turbolinks (2.5.1) 107 | coffee-rails 108 | tzinfo (1.2.2) 109 | thread_safe (~> 0.1) 110 | uglifier (2.5.3) 111 | execjs (>= 0.3.0) 112 | json (>= 1.8.0) 113 | 114 | PLATFORMS 115 | ruby 116 | 117 | DEPENDENCIES 118 | coffee-rails (~> 4.0.0) 119 | font-awesome-rails 120 | jbuilder (~> 2.0) 121 | jquery-rails 122 | mysql2 123 | rails (= 4.1.2) 124 | sass-rails (~> 4.0.3) 125 | sdoc (~> 0.4.0) 126 | spring 127 | turbolinks 128 | uglifier (>= 1.3.0) 129 | -------------------------------------------------------------------------------- /meetup/config/environments/production.rb: -------------------------------------------------------------------------------- 1 | Rails.application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # Code is not reloaded between requests. 5 | config.cache_classes = true 6 | 7 | # Eager load code on boot. This eager loads most of Rails and 8 | # your application in memory, allowing both threaded web servers 9 | # and those relying on copy on write to perform better. 10 | # Rake tasks automatically ignore this option for performance. 11 | config.eager_load = true 12 | 13 | # Full error reports are disabled and caching is turned on. 14 | config.consider_all_requests_local = false 15 | config.action_controller.perform_caching = true 16 | 17 | # Enable Rack::Cache to put a simple HTTP cache in front of your application 18 | # Add `rack-cache` to your Gemfile before enabling this. 19 | # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. 20 | # config.action_dispatch.rack_cache = true 21 | 22 | # Disable Rails's static asset server (Apache or nginx will already do this). 23 | config.serve_static_assets = false 24 | 25 | # Compress JavaScripts and CSS. 26 | config.assets.js_compressor = :uglifier 27 | # config.assets.css_compressor = :sass 28 | 29 | # Do not fallback to assets pipeline if a precompiled asset is missed. 30 | config.assets.compile = false 31 | 32 | # Generate digests for assets URLs. 33 | config.assets.digest = true 34 | 35 | # `config.assets.precompile` has moved to config/initializers/assets.rb 36 | 37 | # Specifies the header that your server uses for sending files. 38 | # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache 39 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx 40 | 41 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 42 | # config.force_ssl = true 43 | 44 | # Set to :debug to see everything in the log. 45 | config.log_level = :info 46 | 47 | # Prepend all log lines with the following tags. 48 | # config.log_tags = [ :subdomain, :uuid ] 49 | 50 | # Use a different logger for distributed setups. 51 | # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) 52 | 53 | # Use a different cache store in production. 54 | # config.cache_store = :mem_cache_store 55 | 56 | # Enable serving of images, stylesheets, and JavaScripts from an asset server. 57 | # config.action_controller.asset_host = "http://assets.example.com" 58 | 59 | # Precompile additional assets. 60 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. 61 | # config.assets.precompile += %w( search.js ) 62 | 63 | # Ignore bad email addresses and do not raise email delivery errors. 64 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. 65 | # config.action_mailer.raise_delivery_errors = false 66 | 67 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to 68 | # the I18n.default_locale when a translation cannot be found). 69 | config.i18n.fallbacks = true 70 | 71 | # Send deprecation notices to registered listeners. 72 | config.active_support.deprecation = :notify 73 | 74 | # Disable automatic flushing of the log to improve performance. 75 | # config.autoflush_log = false 76 | 77 | # Use default logging formatter so that PID and timestamp are not suppressed. 78 | config.log_formatter = ::Logger::Formatter.new 79 | 80 | # Do not dump schema after migrations. 81 | config.active_record.dump_schema_after_migration = false 82 | end 83 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! 5 | VAGRANTFILE_API_VERSION = "2" 6 | 7 | Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 8 | # All Vagrant configuration is done here. The most common configuration 9 | # options are documented and commented below. For a complete reference, 10 | # please see the online documentation at vagrantup.com. 11 | 12 | # Every Vagrant virtual environment requires a box to build off of. 13 | config.vm.box = "ubuntu/trusty64" 14 | 15 | config.vm.provider "virtualbox" do |v| 16 | v.memory = 2048 17 | end 18 | 19 | config.vm.network :private_network, ip: "192.168.10.10" 20 | 21 | # Create a forwarded port mapping which allows access to a specific port 22 | # within the machine from a port on the host machine. In the example below, 23 | # accessing "localhost:8080" will access port 80 on the guest machine. 24 | 25 | # Create a private network, which allows host-only access to the machine 26 | # using a specific IP. 27 | # config.vm.network "private_network", ip: "192.168.33.10" 28 | 29 | # Create a public network, which generally matched to bridged network. 30 | # Bridged networks make the machine appear as another physical device on 31 | # your network. 32 | # config.vm.network "public_network" 33 | 34 | # If true, then any SSH connections made will enable agent forwarding. 35 | # Default value: false 36 | # config.ssh.forward_agent = true 37 | 38 | # Share an additional folder to the guest VM. The first argument is 39 | # the path on the host to the actual folder. The second argument is 40 | # the path on the guest to mount the folder. And the optional third 41 | # argument is a set of non-required options. 42 | # config.vm.synced_folder "../data", "/vagrant_data" 43 | 44 | # Provider-specific configuration so you can fine-tune various 45 | # backing providers for Vagrant. These expose provider-specific options. 46 | # Example for VirtualBox: 47 | # 48 | # config.vm.provider "virtualbox" do |vb| 49 | # # Don't boot with headless mode 50 | # vb.gui = true 51 | # 52 | # # Use VBoxManage to customize the VM. For example to change memory: 53 | # vb.customize ["modifyvm", :id, "--memory", "1024"] 54 | # end 55 | # 56 | # View the documentation for the provider you're using for more 57 | # information on available options. 58 | 59 | # Enable provisioning with CFEngine. CFEngine Community packages are 60 | # automatically installed. For example, configure the host as a 61 | # policy server and optionally a policy file to run: 62 | # 63 | # config.vm.provision "cfengine" do |cf| 64 | # cf.am_policy_hub = true 65 | # # cf.run_file = "motd.cf" 66 | # end 67 | # 68 | # You can also configure and bootstrap a client to an existing 69 | # policy server: 70 | # 71 | # config.vm.provision "cfengine" do |cf| 72 | # cf.policy_server_address = "10.0.2.15" 73 | # end 74 | 75 | # Enable provisioning with Puppet stand alone. Puppet manifests 76 | # are contained in a directory path relative to this Vagrantfile. 77 | # You will need to create the manifests directory and a manifest in 78 | # the file default.pp in the manifests_path directory. 79 | # 80 | # config.vm.provision "puppet" do |puppet| 81 | # puppet.manifests_path = "manifests" 82 | # puppet.manifest_file = "default.pp" 83 | # end 84 | 85 | # Enable provisioning with chef solo, specifying a cookbooks path, roles 86 | # path, and data_bags path (all relative to this Vagrantfile), and adding 87 | # some recipes and/or roles. 88 | # 89 | # config.vm.provision "chef_solo" do |chef| 90 | # chef.cookbooks_path = "../my-recipes/cookbooks" 91 | # chef.roles_path = "../my-recipes/roles" 92 | # chef.data_bags_path = "../my-recipes/data_bags" 93 | # chef.add_recipe "mysql" 94 | # chef.add_role "web" 95 | # 96 | # # You may also specify custom JSON attributes: 97 | # chef.json = { mysql_password: "foo" } 98 | # end 99 | 100 | # Enable provisioning with chef server, specifying the chef server URL, 101 | # and the path to the validation key (relative to this Vagrantfile). 102 | # 103 | # The Opscode Platform uses HTTPS. Substitute your organization for 104 | # ORGNAME in the URL and validation key. 105 | # 106 | # If you have your own Chef Server, use the appropriate URL, which may be 107 | # HTTP instead of HTTPS depending on your configuration. Also change the 108 | # validation key to validation.pem. 109 | # 110 | # config.vm.provision "chef_client" do |chef| 111 | # chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME" 112 | # chef.validation_key_path = "ORGNAME-validator.pem" 113 | # end 114 | # 115 | # If you're using the Opscode platform, your validator client is 116 | # ORGNAME-validator, replacing ORGNAME with your organization name. 117 | # 118 | # If you have your own Chef Server, the default validation client name is 119 | # chef-validator, unless you changed the configuration. 120 | # 121 | # chef.validation_client_name = "ORGNAME-validator" 122 | end 123 | --------------------------------------------------------------------------------