├── log └── .keep ├── app ├── mailers │ └── .keep ├── models │ ├── .keep │ ├── concerns │ │ └── .keep │ ├── application_record.rb │ ├── item.rb │ ├── pin.rb │ ├── user.rb │ └── follow.rb ├── assets │ ├── images │ │ └── .keep │ ├── stylesheets │ │ ├── pins.css.scss │ │ ├── feeds.css.scss │ │ ├── items.css.scss │ │ ├── follows.css.scss │ │ ├── landing.css.scss │ │ ├── framework_and_overrides.css.scss │ │ └── application.css.scss │ └── javascripts │ │ ├── feeds.js.coffee │ │ ├── follows.js.coffee │ │ ├── items.js.coffee │ │ ├── landing.js.coffee │ │ ├── pins.js.coffee │ │ └── application.js ├── controllers │ ├── concerns │ │ └── .keep │ ├── items_controller.rb │ ├── users_controller.rb │ ├── application_controller.rb │ ├── landing_controller.rb │ ├── pins_controller.rb │ ├── follows_controller.rb │ └── feeds_controller.rb ├── helpers │ ├── feeds_helper.rb │ ├── items_helper.rb │ ├── pins_helper.rb │ ├── follows_helper.rb │ ├── landing_helper.rb │ └── application_helper.rb ├── views │ ├── layouts │ │ ├── _navigation_links.html.erb │ │ ├── _messages.html.erb │ │ ├── _navigation.html.erb │ │ └── application.html.erb │ ├── users │ │ ├── _profile_small.html.erb │ │ ├── index.html.erb │ │ ├── _profile_full.html.erb │ │ └── _profile.html.erb │ ├── feeds │ │ ├── aggregated.html.erb │ │ ├── flat.html.erb │ │ └── user.html.erb │ ├── landing │ │ └── index.html.erb │ ├── devise │ │ ├── mailer │ │ │ ├── confirmation_instructions.html.erb │ │ │ ├── unlock_instructions.html.erb │ │ │ └── reset_password_instructions.html.erb │ │ ├── unlocks │ │ │ └── new.html.erb │ │ ├── confirmations │ │ │ └── new.html.erb │ │ ├── passwords │ │ │ ├── new.html.erb │ │ │ └── edit.html.erb │ │ ├── registrations │ │ │ ├── new.html.erb │ │ │ └── edit.html.erb │ │ ├── sessions │ │ │ └── new.html.erb │ │ └── shared │ │ │ └── _links.html.erb │ ├── activity │ │ ├── _pin.html.erb │ │ └── _follow.html.erb │ ├── aggregated_activity │ │ ├── _follow.html.erb │ │ └── _pin.html.erb │ ├── items │ │ └── _item.html.erb │ └── pins │ │ └── _pin_form.html.erb └── services │ └── create_admin_service.rb ├── lib ├── assets │ └── .keep └── tasks │ └── .keep ├── public ├── favicon.ico ├── images │ └── items │ │ ├── 011.jpg │ │ ├── 261379381_d8fde25053fa.jpg │ │ ├── 293704645_b4c6dab8ed99.jpg │ │ ├── 144568575661705981_4ade117f9005.jpeg │ │ ├── 164471358120532732_a3ae9498ad97.jpg │ │ ├── 167111313523218252_a6046175bb32.jpeg │ │ ├── 184290639033145973_71e492dacec6.jpeg │ │ ├── 1addc6292e97f5f796cf368df5d4b322.jpg │ │ ├── 272236897059737539_c4806e0b14c4.jpg │ │ ├── 275088534757448505_4f85768f71ec.jpg │ │ ├── 281485446934954481_c04cfc76c018.png │ │ ├── 389230669370236857_335b7c698687.jpg │ │ ├── 6fb3f77d22ddc23305fcd1a2fd8c4e80.jpg │ │ ├── 70602b9d4f965eee1d0345d99622798f.jpg │ │ ├── 73f98aae32e30a729bdf1031a78db65a.jpg │ │ ├── e2110e4545f1cc11043659fdd9c07b43.jpg │ │ ├── e315a43813c5533b9f47754406019e24.jpg │ │ ├── 272236897059737539_c4806e0b14c4_1.jpg │ │ └── 6fb3f77d22ddc23305fcd1a2fd8c4e80_1.jpg ├── robots.txt ├── 500.html ├── 422.html └── 404.html ├── test ├── helpers │ ├── .keep │ ├── feeds_helper_test.rb │ ├── items_helper_test.rb │ ├── pins_helper_test.rb │ ├── follows_helper_test.rb │ └── landing_helper_test.rb ├── mailers │ └── .keep ├── models │ ├── .keep │ ├── pin_test.rb │ ├── item_test.rb │ ├── user_test.rb │ ├── article_test.rb │ └── follow_test.rb ├── controllers │ ├── .keep │ ├── feeds_controller_test.rb │ ├── items_controller_test.rb │ ├── pins_controller_test.rb │ ├── follows_controller_test.rb │ └── landing_controller_test.rb ├── fixtures │ ├── .keep │ ├── users.yml │ └── items.yml ├── integration │ └── .keep └── test_helper.rb ├── vendor └── assets │ ├── javascripts │ └── .keep │ └── stylesheets │ ├── .keep │ ├── bootstrap │ ├── LICENSE │ ├── _breadcrumbs.scss │ ├── _component-animations.scss │ ├── _wells.scss │ ├── _thumbnails.scss │ ├── _utilities.scss │ ├── _close.scss │ ├── _jumbotron.scss │ ├── _media.scss │ ├── _pager.scss │ ├── _badges.scss │ ├── _labels.scss │ ├── _code.scss │ ├── _alerts.scss │ ├── _print.scss │ ├── _pagination.scss │ ├── _list-group.scss │ ├── _progress-bars.scss │ ├── _scaffolding.scss │ ├── _tooltip.scss │ ├── _input-groups.scss │ ├── _popovers.scss │ ├── _modals.scss │ ├── _panels.scss │ ├── _buttons.scss │ ├── _carousel.scss │ ├── _dropdowns.scss │ ├── _tables.scss │ ├── _navs.scss │ ├── _responsive-utilities.scss │ ├── _type.scss │ ├── _button-groups.scss │ ├── _theme.scss │ └── _normalize.scss │ └── _feedly.scss ├── Procfile ├── config ├── initializers │ ├── stream_rails.rb │ ├── session_store.rb │ ├── mime_types.rb │ ├── filter_parameter_logging.rb │ ├── application_controller_renderer.rb │ ├── cookies_serializer.rb │ ├── backtrace_silencers.rb │ ├── wrap_parameters.rb │ ├── new_framework_defaults_5_1.rb │ ├── assets.rb │ └── inflections.rb ├── spring.rb ├── boot.rb ├── environment.rb ├── cable.yml ├── routes.rb ├── application.rb ├── database.yml ├── locales │ ├── en.yml │ └── devise.en.yml ├── secrets.yml ├── environments │ ├── test.rb │ ├── development.rb │ └── production.rb └── puma.rb ├── .gitignore ├── bin ├── rake ├── bundle ├── rails └── spring ├── config.ru ├── Rakefile ├── db ├── migrate │ ├── 20141023083637_create_follows.rb │ ├── 20141023082904_create_items.rb │ ├── 20141026091357_add_name_to_users.rb │ ├── 20141023083116_create_pins.rb │ ├── 20141027094212_add_demo_users.rb │ └── 20141023091156_devise_create_users.rb ├── seeds.rb └── schema.rb ├── Gemfile ├── app.json ├── README.md └── Gemfile.lock /log/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/tasks/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/helpers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/controllers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/users.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/models/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/controllers/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/assets/javascripts/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: bundle exec rails server -p $PORT 2 | -------------------------------------------------------------------------------- /app/helpers/feeds_helper.rb: -------------------------------------------------------------------------------- 1 | module FeedsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/items_helper.rb: -------------------------------------------------------------------------------- 1 | module ItemsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/pins_helper.rb: -------------------------------------------------------------------------------- 1 | module PinsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/follows_helper.rb: -------------------------------------------------------------------------------- 1 | module FollowsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/landing_helper.rb: -------------------------------------------------------------------------------- 1 | module LandingHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/views/layouts/_navigation_links.html.erb: -------------------------------------------------------------------------------- 1 | <%# add navigation links to this file %> 2 | -------------------------------------------------------------------------------- /config/initializers/stream_rails.rb: -------------------------------------------------------------------------------- 1 | require 'stream_rails' 2 | 3 | StreamRails.configure do |config| 4 | end 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | coverage/ 3 | *.sublime-workspace 4 | /tmp 5 | gemfiles/*.lock 6 | .DS_Store 7 | .env 8 | log/* -------------------------------------------------------------------------------- /bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative '../config/boot' 3 | require 'rake' 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | self.abstract_class = true 3 | end -------------------------------------------------------------------------------- /public/images/items/011.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/Stream-Example-Rails/HEAD/public/images/items/011.jpg -------------------------------------------------------------------------------- /test/helpers/feeds_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class FeedsHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/helpers/items_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class ItemsHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/helpers/pins_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class PinsHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/helpers/follows_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class FollowsHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/helpers/landing_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class LandingHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /app/controllers/items_controller.rb: -------------------------------------------------------------------------------- 1 | class ItemsController < ApplicationController 2 | before_action :authenticate_user! 3 | end 4 | -------------------------------------------------------------------------------- /app/views/users/_profile_small.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <%= yield %> 4 |
5 |
-------------------------------------------------------------------------------- /app/controllers/users_controller.rb: -------------------------------------------------------------------------------- 1 | class UsersController < ApplicationController 2 | 3 | def index 4 | @users = User.all 5 | end 6 | 7 | end -------------------------------------------------------------------------------- /bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /config/spring.rb: -------------------------------------------------------------------------------- 1 | %w( 2 | .ruby-version 3 | .rbenv-vars 4 | tmp/restart.txt 5 | tmp/caching-dev.txt 6 | ).each { |path| Spring.watch(path) } 7 | -------------------------------------------------------------------------------- /config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 2 | 3 | require 'bundler/setup' # Set up gems listed in the Gemfile. 4 | -------------------------------------------------------------------------------- /public/images/items/261379381_d8fde25053fa.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/Stream-Example-Rails/HEAD/public/images/items/261379381_d8fde25053fa.jpg -------------------------------------------------------------------------------- /public/images/items/293704645_b4c6dab8ed99.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/Stream-Example-Rails/HEAD/public/images/items/293704645_b4c6dab8ed99.jpg -------------------------------------------------------------------------------- /app/views/feeds/aggregated.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <% for activity in @activities %> 3 | <%= render_activity activity %> 4 | <% end %> 5 |
-------------------------------------------------------------------------------- /bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path('../config/application', __dir__) 3 | require_relative '../config/boot' 4 | require 'rails/commands' 5 | -------------------------------------------------------------------------------- /test/models/pin_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class PinTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require_relative 'application' 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /test/models/item_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class ItemTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /test/models/user_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class UserTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /public/images/items/144568575661705981_4ade117f9005.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/Stream-Example-Rails/HEAD/public/images/items/144568575661705981_4ade117f9005.jpeg -------------------------------------------------------------------------------- /public/images/items/164471358120532732_a3ae9498ad97.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/Stream-Example-Rails/HEAD/public/images/items/164471358120532732_a3ae9498ad97.jpg -------------------------------------------------------------------------------- /public/images/items/167111313523218252_a6046175bb32.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/Stream-Example-Rails/HEAD/public/images/items/167111313523218252_a6046175bb32.jpeg -------------------------------------------------------------------------------- /public/images/items/184290639033145973_71e492dacec6.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/Stream-Example-Rails/HEAD/public/images/items/184290639033145973_71e492dacec6.jpeg -------------------------------------------------------------------------------- /public/images/items/1addc6292e97f5f796cf368df5d4b322.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/Stream-Example-Rails/HEAD/public/images/items/1addc6292e97f5f796cf368df5d4b322.jpg -------------------------------------------------------------------------------- /public/images/items/272236897059737539_c4806e0b14c4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/Stream-Example-Rails/HEAD/public/images/items/272236897059737539_c4806e0b14c4.jpg -------------------------------------------------------------------------------- /public/images/items/275088534757448505_4f85768f71ec.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/Stream-Example-Rails/HEAD/public/images/items/275088534757448505_4f85768f71ec.jpg -------------------------------------------------------------------------------- /public/images/items/281485446934954481_c04cfc76c018.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/Stream-Example-Rails/HEAD/public/images/items/281485446934954481_c04cfc76c018.png -------------------------------------------------------------------------------- /public/images/items/389230669370236857_335b7c698687.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/Stream-Example-Rails/HEAD/public/images/items/389230669370236857_335b7c698687.jpg -------------------------------------------------------------------------------- /public/images/items/6fb3f77d22ddc23305fcd1a2fd8c4e80.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/Stream-Example-Rails/HEAD/public/images/items/6fb3f77d22ddc23305fcd1a2fd8c4e80.jpg -------------------------------------------------------------------------------- /public/images/items/70602b9d4f965eee1d0345d99622798f.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/Stream-Example-Rails/HEAD/public/images/items/70602b9d4f965eee1d0345d99622798f.jpg -------------------------------------------------------------------------------- /public/images/items/73f98aae32e30a729bdf1031a78db65a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/Stream-Example-Rails/HEAD/public/images/items/73f98aae32e30a729bdf1031a78db65a.jpg -------------------------------------------------------------------------------- /public/images/items/e2110e4545f1cc11043659fdd9c07b43.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/Stream-Example-Rails/HEAD/public/images/items/e2110e4545f1cc11043659fdd9c07b43.jpg -------------------------------------------------------------------------------- /public/images/items/e315a43813c5533b9f47754406019e24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/Stream-Example-Rails/HEAD/public/images/items/e315a43813c5533b9f47754406019e24.jpg -------------------------------------------------------------------------------- /test/models/article_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class ArticleTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /test/models/follow_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class FollowTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /app/views/users/index.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /public/images/items/272236897059737539_c4806e0b14c4_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/Stream-Example-Rails/HEAD/public/images/items/272236897059737539_c4806e0b14c4_1.jpg -------------------------------------------------------------------------------- /public/images/items/6fb3f77d22ddc23305fcd1a2fd8c4e80_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/Stream-Example-Rails/HEAD/public/images/items/6fb3f77d22ddc23305fcd1a2fd8c4e80_1.jpg -------------------------------------------------------------------------------- /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: '_streamterest_session' 4 | -------------------------------------------------------------------------------- /test/controllers/feeds_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class FeedsControllerTest < ActionController::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /test/controllers/items_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class ItemsControllerTest < ActionController::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /test/controllers/pins_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class PinsControllerTest < ActionController::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /test/controllers/follows_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class FollowsControllerTest < ActionController::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /app/models/item.rb: -------------------------------------------------------------------------------- 1 | class Item < ActiveRecord::Base 2 | has_many :pins 3 | belongs_to :user 4 | 5 | def user_pin(user = nil) 6 | self.pins.where(user: user).first 7 | end 8 | 9 | end 10 | -------------------------------------------------------------------------------- /app/assets/stylesheets/pins.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the pins controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/feeds.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the feeds controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/items.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the items controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: async 6 | 7 | production: 8 | adapter: redis 9 | url: redis://localhost:6379/1 10 | channel_prefix: streamterest_production 11 | -------------------------------------------------------------------------------- /app/assets/stylesheets/follows.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the follows controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/landing.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the landing controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/views/feeds/flat.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <% for activity in @activities %> 4 | <%= render_activity activity %> 5 | <% end %> 6 |
7 |
-------------------------------------------------------------------------------- /app/views/feeds/user.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <% for activity in @activities %> 4 | <%= render_activity activity %> 5 | <% end %> 6 |
7 |
-------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/views/landing/index.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <% for item in @items %> 4 | <%= render partial: "items/item", locals: {item: item} %> 5 | <% end %> 6 |
7 |
-------------------------------------------------------------------------------- /test/controllers/landing_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class LandingControllerTest < ActionController::TestCase 4 | test "should get index" do 5 | get :index 6 | assert_response :success 7 | end 8 | 9 | end 10 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/assets/javascripts/feeds.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/follows.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/items.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/landing.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/pins.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/views/devise/mailer/confirmation_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Welcome <%= @email %>!

2 | 3 |

You can confirm your account email through the link below:

4 | 5 |

<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>

6 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/views/users/_profile_full.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <%= yield %> 4 |
5 |
6 |
7 | <%= yield :side %> 8 |
9 |
10 |
-------------------------------------------------------------------------------- /config/initializers/application_controller_renderer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # ActiveSupport::Reloader.to_prepare do 4 | # ApplicationController.renderer.defaults.merge!( 5 | # http_host: 'example.org', 6 | # https: false 7 | # ) 8 | # end 9 | -------------------------------------------------------------------------------- /config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Specify a serializer for the signed and encrypted cookie jars. 4 | # Valid options are :json, :marshal, and :hybrid. 5 | Rails.application.config.action_dispatch.cookies_serializer = :json 6 | -------------------------------------------------------------------------------- /db/migrate/20141023083637_create_follows.rb: -------------------------------------------------------------------------------- 1 | class CreateFollows < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :follows do |t| 4 | t.references :user, index: true 5 | t.references :target, index: true 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20141023082904_create_items.rb: -------------------------------------------------------------------------------- 1 | class CreateItems < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :items do |t| 4 | t.string :image 5 | t.text :message 6 | t.references :user, index: true 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/controllers/landing_controller.rb: -------------------------------------------------------------------------------- 1 | class LandingController < ApplicationController 2 | before_action :sign_in_admin, unless: :user_signed_in? 3 | 4 | def index 5 | @items = Item.all 6 | end 7 | 8 | def sign_in_admin 9 | sign_in (User.where(email: Rails.application.secrets.admin_email).first) 10 | end 11 | 12 | end 13 | -------------------------------------------------------------------------------- /app/services/create_admin_service.rb: -------------------------------------------------------------------------------- 1 | class CreateAdminService 2 | def call 3 | user = User.find_or_create_by!(email: Rails.application.secrets.admin_email) do |user| 4 | user.password = Rails.application.secrets.admin_password 5 | user.password_confirmation = Rails.application.secrets.admin_password 6 | end 7 | end 8 | end -------------------------------------------------------------------------------- /app/views/devise/mailer/unlock_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Your account has been locked due to an excessive number of unsuccessful sign in attempts.

4 | 5 |

Click the link below to unlock your account:

6 | 7 |

<%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>

8 | -------------------------------------------------------------------------------- /db/migrate/20141026091357_add_name_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddNameToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :name, :string 4 | User.all.each do |user| 5 | user.name = user.email.split('@')[0] 6 | user.save! 7 | end 8 | change_column :users, :name, :string, null: false 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | devise_for :users 3 | resources :users, only: [:index] 4 | get 'landing/index' 5 | 6 | root 'landing#index' 7 | resources :pins 8 | resources :follows 9 | 10 | get 'me', to: 'feeds#user' 11 | get 'flat', to: 'feeds#flat' 12 | get 'aggregated', to: 'feeds#aggregated' 13 | 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20141023083116_create_pins.rb: -------------------------------------------------------------------------------- 1 | class CreatePins < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :pins do |t| 4 | t.references :user, index: true 5 | t.references :item, index: true 6 | t.references :influencer, index: true 7 | t.text :message 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/models/pin.rb: -------------------------------------------------------------------------------- 1 | class Pin < ActiveRecord::Base 2 | belongs_to :user 3 | belongs_to :item 4 | 5 | validates :item, presence: true, :uniqueness => {:scope => :user} 6 | validates :user, presence: true, :uniqueness => {:scope => :item} 7 | 8 | include StreamRails::Activity 9 | as_activity 10 | 11 | def activity_object 12 | self.item 13 | end 14 | 15 | end 16 | -------------------------------------------------------------------------------- /app/models/user.rb: -------------------------------------------------------------------------------- 1 | class User < ActiveRecord::Base 2 | # Include default devise modules. Others available are: 3 | # :confirmable, :lockable, :timeoutable and :omniauthable 4 | devise :database_authenticatable, :registerable, 5 | :recoverable, :rememberable, :trackable, :validatable 6 | has_many :follows 7 | 8 | def followed(user = nil) 9 | self.follows.where(user: user).first 10 | end 11 | 12 | end 13 | -------------------------------------------------------------------------------- /app/views/devise/unlocks/new.html.erb: -------------------------------------------------------------------------------- 1 |

Resend unlock instructions

2 | 3 | <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> 4 | <%= devise_error_messages! %> 5 | 6 |
<%= f.label :email %>
7 | <%= f.email_field :email, autofocus: true %>
8 | 9 |
<%= f.submit "Resend unlock instructions" %>
10 | <% end %> 11 | 12 | <%= render "devise/shared/links" %> 13 | -------------------------------------------------------------------------------- /app/views/layouts/_messages.html.erb: -------------------------------------------------------------------------------- 1 | <%# Rails flash messages styled for Bootstrap 3.0 %> 2 | <% flash.each do |name, msg| %> 3 | <% if msg.is_a?(String) %> 4 |
5 | 6 | <%= content_tag :div, msg, :id => "flash_#{name}" %> 7 |
8 | <% end %> 9 | <% end %> 10 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/models/follow.rb: -------------------------------------------------------------------------------- 1 | class Follow < ActiveRecord::Base 2 | belongs_to :user 3 | belongs_to :target, class_name: "User" 4 | 5 | validates :target_id, presence: true 6 | validates :user, presence: true 7 | 8 | include StreamRails::Activity 9 | as_activity 10 | 11 | def activity_notify 12 | [StreamRails.feed_manager.get_notification_feed(self.target_id)] 13 | end 14 | 15 | def activity_object 16 | self.target 17 | end 18 | 19 | end 20 | -------------------------------------------------------------------------------- /app/views/devise/mailer/reset_password_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Someone has requested a link to change your password. You can do this through the link below.

4 | 5 |

<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

6 | 7 |

If you didn't request this, please ignore this email.

8 |

Your password won't change until you access the link above and create a new one.

9 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rails', '5.2.2' 4 | gem 'sass-rails', '~> 5.0.7' 5 | gem 'turbolinks' 6 | gem 'coffee-rails' 7 | gem 'jquery-rails' 8 | gem "stream_rails", '~> 2.6' 9 | gem 'devise' 10 | gem 'uglifier' 11 | gem 'bootstrap-sass' 12 | gem 'rails_layout' 13 | gem "pg", "~> 0.18" 14 | 15 | group :development do 16 | gem 'listen', '~> 3.1.5' 17 | gem 'spring' 18 | gem 'spring-watcher-listen', '~> 2.0.0' 19 | end 20 | 21 | ruby "2.5.5" 22 | -------------------------------------------------------------------------------- /app/views/devise/confirmations/new.html.erb: -------------------------------------------------------------------------------- 1 |

Resend confirmation instructions

2 | 3 | <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> 4 | <%= devise_error_messages! %> 5 | 6 |
<%= f.label :email %>
7 | <%= f.email_field :email, autofocus: true %>
8 | 9 |
<%= f.submit "Resend confirmation instructions" %>
10 | <% end %> 11 | 12 | <%= render "devise/shared/links" %> 13 | -------------------------------------------------------------------------------- /app/views/activity/_pin.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | <%= image_tag activity['object'].image, class: "pin-image" %> 5 |
6 |
7 | <%= render partial: "pins/pin_form", locals: {item: activity['object']} %> 8 | 11 |
12 | -------------------------------------------------------------------------------- /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] 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 | -------------------------------------------------------------------------------- /app/views/devise/passwords/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post, :role => 'form'}) do |f| %> 3 |

Forgot your password?

4 |

We'll send password reset instructions.

5 | <%= devise_error_messages! %> 6 |
7 | <%= f.label :email %> 8 | <%= f.email_field :email, :autofocus => true, class: 'form-control' %> 9 |
10 | <%= f.submit 'Reset Password', :class => 'button right' %> 11 | <% end %> 12 |
13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/views/aggregated_activity/_follow.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 | <%= time_ago_in_words(activity['updated_at']) %> ago 7 |
8 |
9 |
10 | <% for activity in activity['activities'] %> 11 | <%= render_activity activity %> 12 | <% end %> 13 |
14 |
-------------------------------------------------------------------------------- /app/controllers/pins_controller.rb: -------------------------------------------------------------------------------- 1 | class PinsController < ApplicationController 2 | 3 | def create 4 | @pin = Pin.new(pin_params) 5 | @pin.user = current_user 6 | @pin.save! 7 | session[:return_to] ||= request.referer 8 | redirect_to session.delete(:return_to) 9 | end 10 | 11 | def destroy 12 | @pin = Pin.find(params[:id]) 13 | @pin.destroy 14 | session[:return_to] ||= request.referer 15 | redirect_to session.delete(:return_to) 16 | end 17 | 18 | private 19 | def pin_params 20 | params.require(:pin).permit(:item_id, :influencer_id) 21 | end 22 | 23 | end 24 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Stream example ruby app", 3 | "description": "A simple Pinterest clone built with Rails 5 and stream_rails", 4 | "website": "https://getstream.io", 5 | "keywords": [ 6 | "getstream.io", 7 | "HTML5", 8 | "PHP" 9 | ], 10 | "repository": "https://github.com/GetStream/stream-example-ruby", 11 | "logo": "http://33.media.tumblr.com/avatar_be8b5eef9ae6_128.png", 12 | "scripts": { 13 | "postdeploy": "bundle exec rake db:migrate" 14 | }, 15 | "env": { 16 | "RAILS_ENV": "production" 17 | }, 18 | "addons": [ 19 | "stream", "heroku-postgresql" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /db/migrate/20141027094212_add_demo_users.rb: -------------------------------------------------------------------------------- 1 | class AddDemoUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | require 'active_record/fixtures' 4 | ActiveRecord::FixtureSet.create_fixtures(Rails.root.join('test/fixtures'), 5 | 'items') 6 | user = User.find_or_create_by!(email: Rails.application.secrets.admin_email) do |user| 7 | user.name = Rails.application.secrets.admin_name 8 | user.password = Rails.application.secrets.admin_password 9 | user.password_confirmation = Rails.application.secrets.admin_password 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2011 Twitter, Inc. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/bootstrap/_breadcrumbs.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: 8px 15px; 8 | margin-bottom: $line-height-computed; 9 | list-style: none; 10 | background-color: $breadcrumb-bg; 11 | border-radius: $border-radius-base; 12 | > li { 13 | display: inline-block; 14 | &+li:before { 15 | content: "/\00a0"; // Unicode space added since inline-block means non-collapsing white-space 16 | padding: 0 5px; 17 | color: $breadcrumb-color; 18 | } 19 | } 20 | > .active { 21 | color: $breadcrumb-active-color; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /config/application.rb: -------------------------------------------------------------------------------- 1 | require_relative 'boot' 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 Streamterest 10 | class Application < Rails::Application 11 | # Initialize configuration defaults for originally generated Rails version. 12 | config.load_defaults 5.1 13 | 14 | # Settings in config/environments/* take precedence over those specified here. 15 | # Application configuration should go into files in config/initializers 16 | # -- all .rb files in that directory are automatically loaded. 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /config/initializers/new_framework_defaults_5_1.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | # 3 | # This file contains migration options to ease your Rails 5.1 upgrade. 4 | # 5 | # Once upgraded flip defaults one by one to migrate to the new default. 6 | # 7 | # Read the Guide for Upgrading Ruby on Rails for more info on each option. 8 | 9 | # Make `form_with` generate non-remote forms. 10 | Rails.application.config.action_view.form_with_generates_remote_forms = false 11 | 12 | # Unknown asset fallback will return the path passed in when the given 13 | # asset is not present in the asset pipeline. 14 | # Rails.application.config.assets.unknown_asset_fallback = false 15 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/bootstrap/_component-animations.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | // Heads up! 6 | // 7 | // We don't use the `.opacity()` mixin here since it causes a bug with text 8 | // fields in IE7-8. Source: https://github.com/twitter/bootstrap/pull/3552. 9 | 10 | .fade { 11 | opacity: 0; 12 | @include transition(opacity .15s linear); 13 | &.in { 14 | opacity: 1; 15 | } 16 | } 17 | 18 | .collapse { 19 | display: none; 20 | &.in { 21 | display: block; 22 | } 23 | } 24 | .collapsing { 25 | position: relative; 26 | height: 0; 27 | overflow: hidden; 28 | @include transition(height .35s ease); 29 | } 30 | -------------------------------------------------------------------------------- /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 | # Add additional assets to the asset load path. 7 | # Rails.application.config.assets.paths << Emoji.images_path 8 | # Add Yarn node_modules folder to the asset load path. 9 | # Rails.application.config.assets.paths << Rails.root.join('node_modules') 10 | 11 | # Precompile additional assets. 12 | # application.js, application.css, and all non-JS/CSS in the app/assets 13 | # folder are already added. 14 | # Rails.application.config.assets.precompile += %w( admin.js admin.css ) 15 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/bootstrap/_wells.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Wells 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .well { 8 | min-height: 20px; 9 | padding: 19px; 10 | margin-bottom: 20px; 11 | background-color: $well-bg; 12 | border: 1px solid darken($well-bg, 7%); 13 | border-radius: $border-radius-base; 14 | @include box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 15 | blockquote { 16 | border-color: #ddd; 17 | border-color: rgba(0,0,0,.15); 18 | } 19 | } 20 | 21 | // Sizes 22 | .well-lg { 23 | padding: 24px; 24 | border-radius: $border-radius-large; 25 | } 26 | .well-sm { 27 | padding: 9px; 28 | border-radius: $border-radius-small; 29 | } 30 | -------------------------------------------------------------------------------- /config/database.yml: -------------------------------------------------------------------------------- 1 | # SQLite version 3.x 2 | # gem install sqlite3 3 | # 4 | # Ensure the SQLite 3 gem is defined in your Gemfile 5 | # gem 'sqlite3' 6 | # 7 | 8 | default: &default 9 | adapter: postgresql 10 | encoding: unicode 11 | # For details on connection pooling, see rails configuration guide 12 | # http://guides.rubyonrails.org/configuring.html#database-pooling 13 | pool: 5 14 | 15 | development: 16 | <<: *default 17 | 18 | # Warning: The database defined as "test" will be erased and 19 | # re-generated from your development database when you run "rake". 20 | # Do not set this db to the same as development or production. 21 | test: 22 | <<: *default 23 | 24 | production: 25 | <<: *default 26 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/bootstrap/_thumbnails.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Thumbnails 3 | // -------------------------------------------------- 4 | 5 | 6 | // Mixin and adjust the regular image class 7 | .thumbnail { 8 | @extend .img-thumbnail; 9 | display: block; // Override the inline-block from `.img-thumbnail` 10 | 11 | > img { 12 | @include img-responsive(); 13 | } 14 | } 15 | 16 | 17 | // Add a hover state for linked versions only 18 | a.thumbnail:hover, 19 | a.thumbnail:focus { 20 | border-color: $link-color; 21 | } 22 | 23 | // Images and captions 24 | .thumbnail > img { 25 | margin-left: auto; 26 | margin-right: auto; 27 | } 28 | .thumbnail .caption { 29 | padding: $thumbnail-caption-padding; 30 | color: $thumbnail-caption-color; 31 | } 32 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/bootstrap/_utilities.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // Floats 7 | // ------------------------- 8 | 9 | .clearfix { 10 | @include clearfix(); 11 | } 12 | .pull-right { 13 | float: right !important; 14 | } 15 | .pull-left { 16 | float: left !important; 17 | } 18 | 19 | 20 | // Toggling content 21 | // ------------------------- 22 | 23 | .hide { 24 | display: none !important; 25 | } 26 | .show { 27 | display: block !important; 28 | } 29 | .invisible { 30 | visibility: hidden; 31 | } 32 | .text-hide { 33 | @include hide-text(); 34 | } 35 | 36 | 37 | // For Affix plugin 38 | // ------------------------- 39 | 40 | .affix { 41 | position: fixed; 42 | } 43 | -------------------------------------------------------------------------------- /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 jquery_ujs 15 | //= require turbolinks 16 | //= require bootstrap-sprockets 17 | //= require_tree . 18 | -------------------------------------------------------------------------------- /app/views/devise/passwords/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %> 3 |

Change your password

4 | <%= devise_error_messages! %> 5 | <%= f.hidden_field :reset_password_token %> 6 |
7 | <%= f.label :password, 'New password' %> 8 | <%= f.password_field :password, autofocus: true, autocomplete: 'off', class: 'form-control' %> 9 | <%= f.label :password_confirmation, 'Confirm new password' %> 10 | <%= f.password_field :password_confirmation, autocomplete: 'off', class: 'form-control' %> 11 |
12 | <%= f.submit 'Change my Password', :class => 'button right' %> 13 | <% end %> 14 |
15 | -------------------------------------------------------------------------------- /app/views/devise/registrations/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :role => 'form'}) do |f| %> 3 |

Sign up

4 | <%= devise_error_messages! %> 5 |
6 | <%= f.label :email %> 7 | <%= f.email_field :email, :autofocus => true, class: 'form-control' %> 8 |
9 |
10 | <%= f.label :password %> 11 | <%= f.password_field :password, class: 'form-control' %> 12 |
13 |
14 | <%= f.label :password_confirmation %> 15 | <%= f.password_field :password_confirmation, class: 'form-control' %> 16 |
17 | <%= f.submit 'Sign up', :class => 'button right' %> 18 | <% end %> 19 |
20 | -------------------------------------------------------------------------------- /app/controllers/follows_controller.rb: -------------------------------------------------------------------------------- 1 | class FollowsController < ApplicationController 2 | 3 | def create 4 | follow = Follow.new(follow_params) 5 | follow.user = current_user 6 | if follow.save 7 | StreamRails.feed_manager.follow_user(follow.user_id, follow.target_id) 8 | end 9 | session[:return_to] ||= request.referer 10 | redirect_to session.delete(:return_to) 11 | end 12 | 13 | def destroy 14 | follow = Follow.find(params[:id]) 15 | if follow.user_id == current_user.id 16 | follow.destroy! 17 | StreamRails.feed_manager.unfollow_user(follow.user_id, follow.target_id) 18 | end 19 | session[:return_to] ||= request.referer 20 | redirect_to session.delete(:return_to) 21 | end 22 | 23 | private 24 | def follow_params 25 | params.require(:follow).permit(:target_id) 26 | end 27 | 28 | end 29 | -------------------------------------------------------------------------------- /app/views/items/_item.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | <% if(item.image) %> 5 | <%= image_tag item.image, class: "pin-image" %> 6 | <% else %> 7 | <%= image_tag item.item.image, class: "pin-image" %> 8 | <% end %> 9 |
10 | <% if(item.message) %> 11 |
12 | <%= item.message %> 13 |
14 | <% end %> 15 |
16 | <%= render partial: "pins/pin_form", locals: {item: item} %> 17 | 20 |
-------------------------------------------------------------------------------- /app/controllers/feeds_controller.rb: -------------------------------------------------------------------------------- 1 | class FeedsController < ApplicationController 2 | before_action :create_enricher 3 | before_action :authenticate_user! 4 | 5 | def user 6 | feed = StreamRails.feed_manager.get_user_feed(current_user.id) 7 | results = feed.get()['results'] 8 | @activities = @enricher.enrich_activities(results) 9 | end 10 | 11 | def flat 12 | feed = StreamRails.feed_manager.get_news_feeds(current_user.id)[:timeline] 13 | results = feed.get()['results'] 14 | @activities = @enricher.enrich_activities(results) 15 | end 16 | 17 | def aggregated 18 | feed = StreamRails.feed_manager.get_news_feeds(current_user.id)[:timeline_aggregated] 19 | results = feed.get()['results'] 20 | @activities = @enricher.enrich_aggregated_activities(results) 21 | end 22 | 23 | def create_enricher 24 | @enricher = StreamRails::Enrich.new 25 | end 26 | 27 | end 28 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/bootstrap/_close.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: ($font-size-base * 1.5); 9 | font-weight: $close-font-weight; 10 | line-height: 1; 11 | color: $close-color; 12 | text-shadow: $close-text-shadow; 13 | @include opacity(.2); 14 | 15 | &:hover, 16 | &:focus { 17 | color: $close-color; 18 | text-decoration: none; 19 | cursor: pointer; 20 | @include opacity(.5); 21 | } 22 | 23 | // [converter] extracted button& to button.close 24 | } 25 | 26 | // Additional properties for button version 27 | // iOS requires the button element instead of an anchor tag. 28 | // If you want the anchor version, it requires `href="#"`. 29 | button.close { 30 | padding: 0; 31 | cursor: pointer; 32 | background: transparent; 33 | border: 0; 34 | -webkit-appearance: none; 35 | } 36 | -------------------------------------------------------------------------------- /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 | # The following keys must be escaped otherwise they will not be retrieved by 20 | # the default I18n backend: 21 | # 22 | # true, false, on, off, yes, no 23 | # 24 | # Instead, surround them with single quotes. 25 | # 26 | # en: 27 | # 'true': 'foo' 28 | # 29 | # To learn more, please read the Rails Internationalization guide 30 | # available at http://guides.rubyonrails.org/i18n.html. 31 | 32 | en: 33 | hello: "Hello world" 34 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/bootstrap/_jumbotron.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Jumbotron 3 | // -------------------------------------------------- 4 | 5 | 6 | .jumbotron { 7 | padding: $jumbotron-padding; 8 | margin-bottom: $jumbotron-padding; 9 | font-size: ($font-size-base * 1.5); 10 | font-weight: 200; 11 | line-height: ($line-height-base * 1.5); 12 | color: $jumbotron-color; 13 | background-color: $jumbotron-bg; 14 | 15 | h1 { 16 | line-height: 1; 17 | color: $jumbotron-heading-color; 18 | } 19 | p { 20 | line-height: 1.4; 21 | } 22 | 23 | .container & { 24 | border-radius: $border-radius-large; // Only round corners at higher resolutions if contained in a container 25 | } 26 | 27 | @media screen and (min-width: $screen-tablet) { 28 | padding-top: ($jumbotron-padding * 1.6); 29 | padding-bottom: ($jumbotron-padding * 1.6); 30 | 31 | .container & { 32 | padding-left: ($jumbotron-padding * 2); 33 | padding-right: ($jumbotron-padding * 2); 34 | } 35 | 36 | h1 { 37 | font-size: ($font-size-base * 4.5); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/views/activity/_follow.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |

<%= activity['object'].name %>

6 |

and <%= activity['actor'].name %> are now friends

7 |
8 |
9 |
10 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/bootstrap/_media.scss: -------------------------------------------------------------------------------- 1 | // Media objects 2 | // Source: http://stubbornella.org/content/?p=497 3 | // -------------------------------------------------- 4 | 5 | 6 | // Common styles 7 | // ------------------------- 8 | 9 | // Clear the floats 10 | .media, 11 | .media-body { 12 | overflow: hidden; 13 | zoom: 1; 14 | } 15 | 16 | // Proper spacing between instances of .media 17 | .media, 18 | .media .media { 19 | margin-top: 15px; 20 | } 21 | .media:first-child { 22 | margin-top: 0; 23 | } 24 | 25 | // For images and videos, set to block 26 | .media-object { 27 | display: block; 28 | } 29 | 30 | // Reset margins on headings for tighter default spacing 31 | .media-heading { 32 | margin: 0 0 5px; 33 | } 34 | 35 | 36 | // Media image alignment 37 | // ------------------------- 38 | 39 | .media { 40 | > .pull-left { 41 | margin-right: 10px; 42 | } 43 | > .pull-right { 44 | margin-left: 10px; 45 | } 46 | } 47 | 48 | 49 | // Media list variation 50 | // ------------------------- 51 | 52 | // Undo default ul/ol styles 53 | .media-list { 54 | padding-left: 0; 55 | list-style: none; 56 | } 57 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/bootstrap/_pager.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Pager pagination 3 | // -------------------------------------------------- 4 | 5 | 6 | .pager { 7 | padding-left: 0; 8 | margin: $line-height-computed 0; 9 | list-style: none; 10 | text-align: center; 11 | @include clearfix(); 12 | li { 13 | display: inline; 14 | > a, 15 | > span { 16 | display: inline-block; 17 | padding: 5px 14px; 18 | background-color: $pagination-bg; 19 | border: 1px solid $pagination-border; 20 | border-radius: $pager-border-radius; 21 | } 22 | 23 | > a:hover, 24 | > a:focus { 25 | text-decoration: none; 26 | background-color: $pagination-hover-bg; 27 | } 28 | } 29 | 30 | .next { 31 | > a, 32 | > span { 33 | float: right; 34 | } 35 | } 36 | 37 | .previous { 38 | > a, 39 | > span { 40 | float: left; 41 | } 42 | } 43 | 44 | .disabled { 45 | > a, 46 | > a:hover, 47 | > a:focus, 48 | > span { 49 | color: $pager-disabled-color; 50 | background-color: $pagination-bg; 51 | cursor: not-allowed; 52 | } 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /app/views/devise/sessions/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :role => 'form'}) do |f| %> 3 |

Sign in

4 | <%= devise_error_messages! %> 5 |
6 | <%- if devise_mapping.registerable? %> 7 | <%= link_to 'Sign up', new_registration_path(resource_name), class: 'right' %> 8 | <% end -%> 9 | <%= f.label :email %> 10 | <%= f.email_field :email, :autofocus => true, class: 'form-control' %> 11 |
12 |
13 | <%- if devise_mapping.recoverable? %> 14 | <%= link_to "Forgot password?", new_password_path(resource_name), class: 'right' %> 15 | <% end -%> 16 | <%= f.label :password %> 17 | <%= f.password_field :password, class: 'form-control' %> 18 |
19 | <%= f.submit 'Sign in', :class => 'button right' %> 20 | <% if devise_mapping.rememberable? -%> 21 |
22 | 25 |
26 | <% end -%> 27 | <% end %> 28 |
29 | -------------------------------------------------------------------------------- /app/views/devise/shared/_links.html.erb: -------------------------------------------------------------------------------- 1 | <%- if controller_name != 'sessions' %> 2 | <%= link_to "Log in", new_session_path(resource_name) %>
3 | <% end -%> 4 | 5 | <%- if devise_mapping.registerable? && controller_name != 'registrations' %> 6 | <%= link_to "Sign up", new_registration_path(resource_name) %>
7 | <% end -%> 8 | 9 | <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %> 10 | <%= link_to "Forgot your password?", new_password_path(resource_name) %>
11 | <% end -%> 12 | 13 | <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> 14 | <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %>
15 | <% end -%> 16 | 17 | <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %> 18 | <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %>
19 | <% end -%> 20 | 21 | <%- if devise_mapping.omniauthable? %> 22 | <%- resource_class.omniauth_providers.each do |provider| %> 23 | <%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %>
24 | <% end -%> 25 | <% end -%> 26 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/bootstrap/_badges.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base classes 7 | .badge { 8 | display: inline-block; 9 | min-width: 10px; 10 | padding: 3px 7px; 11 | font-size: $font-size-small; 12 | font-weight: $badge-font-weight; 13 | color: $badge-color; 14 | line-height: $badge-line-height; 15 | vertical-align: baseline; 16 | white-space: nowrap; 17 | text-align: center; 18 | background-color: $badge-bg; 19 | border-radius: $badge-border-radius; 20 | 21 | // Empty badges collapse automatically (not available in IE8) 22 | &:empty { 23 | display: none; 24 | } 25 | } 26 | 27 | // Hover state, but only for links 28 | a.badge { 29 | &:hover, 30 | &:focus { 31 | color: $badge-link-hover-color; 32 | text-decoration: none; 33 | cursor: pointer; 34 | } 35 | } 36 | 37 | // Quick fix for labels/badges in buttons 38 | .btn .badge { 39 | position: relative; 40 | top: -1px; 41 | } 42 | 43 | // Account for counters in navs 44 | a.list-group-item.active > .badge, 45 | .nav-pills > .active > a > .badge { 46 | color: $badge-active-color; 47 | background-color: $badge-active-bg; 48 | } 49 | .nav-pills > li > a > .badge { 50 | margin-left: 3px; 51 | } 52 | -------------------------------------------------------------------------------- /app/views/aggregated_activity/_pin.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | <% if activity['actor_count'] == 1 %> 6 | <%= activity['activities'][0]['actor'].name %> pinned <%= pluralize(activity['activity_count'], 'item') %> 7 | <% elsif activity['actor_count'] == 2 %> 8 | <%= activity['activities'][0]['actor'].name %> and <%= activity['activities'][1]['actor'].name %> pinned <%= activity['activity_count'] %> items 9 | <% else %> 10 | <%= activity['activities'][0]['actor'].name %>, <%= activity['activities'][1]['actor'].name %> and <%= activity['actor_count'].name - 2 %> more pinned <%= activity['activity_count'] %> items 11 | <% end %> 12 |
13 | <%= time_ago_in_words(activity['updated_at']) %> ago 14 |
15 |
16 |
17 | <% for activity in activity['activities'] %> 18 | <%= render_activity activity %> 19 | <% end %> 20 |
21 |
-------------------------------------------------------------------------------- /test/fixtures/items.yml: -------------------------------------------------------------------------------- 1 | one: 2 | image: "items/011.jpg" 3 | message: "beautiful flowers in the window" 4 | two: 5 | image: "items/261379381_d8fde25053fa.jpg" 6 | message: "" 7 | three: 8 | image: "items/293704645_b4c6dab8ed99.jpg" 9 | message: "" 10 | four: 11 | image: "items/144568575661705981_4ade117f9005.jpeg" 12 | message: "" 13 | five: 14 | image: "items/164471358120532732_a3ae9498ad97.jpg" 15 | message: "" 16 | six: 17 | image: "items/184290639033145973_71e492dacec6.jpeg" 18 | message: "" 19 | seven: 20 | image: "items/272236897059737539_c4806e0b14c4.jpg" 21 | message: "But I must explain to you how all this mistaken idea" 22 | eight: 23 | image: "items/275088534757448505_4f85768f71ec.jpg" 24 | message: "Lorem ipsum dolor sit amet" 25 | nine: 26 | image: "items/281485446934954481_c04cfc76c018.png" 27 | message: "It is a long established fact that a reader will be distracted" 28 | ten: 29 | image: "items/389230669370236857_335b7c698687.jpg" 30 | message: "Lorem Ipsum is simply dummy text" 31 | eleven: 32 | image: "items/1addc6292e97f5f796cf368df5d4b322.jpg" 33 | message: "squirel power!" 34 | twelve: 35 | image: "items/6fb3f77d22ddc23305fcd1a2fd8c4e80_1.jpg" 36 | message: "designed amazingness" 37 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/bootstrap/_labels.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Labels 3 | // -------------------------------------------------- 4 | 5 | .label { 6 | display: inline; 7 | padding: .2em .6em .3em; 8 | font-size: 75%; 9 | font-weight: bold; 10 | line-height: 1; 11 | color: $label-color; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | border-radius: .25em; 16 | 17 | // Add hover effects, but only for links 18 | &[href] { 19 | &:hover, 20 | &:focus { 21 | color: $label-link-hover-color; 22 | text-decoration: none; 23 | cursor: pointer; 24 | } 25 | } 26 | 27 | // Empty labels collapse automatically (not available in IE8) 28 | &:empty { 29 | display: none; 30 | } 31 | } 32 | 33 | // Colors 34 | // Contextual variations (linked labels get darker on :hover) 35 | 36 | .label-default { 37 | @include label-variant($label-default-bg); 38 | } 39 | 40 | .label-primary { 41 | @include label-variant($label-primary-bg); 42 | } 43 | 44 | .label-success { 45 | @include label-variant($label-success-bg); 46 | } 47 | 48 | .label-info { 49 | @include label-variant($label-info-bg); 50 | } 51 | 52 | .label-warning { 53 | @include label-variant($label-warning-bg); 54 | } 55 | 56 | .label-danger { 57 | @include label-variant($label-danger-bg); 58 | } 59 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Stream Example App 2 | ------------------ 3 | 4 | This example app shows you how you can use [GetStream.io](https://getstream.io/ "GetStream.io") to build a site similar to Pinterest. 5 | 6 | If you have no idea what GetStream is: GetStream is an hosted API service that allows you to build activity feeds. It makes it very easy to build 7 | user activity feeds, public feeds, aggregated feeds and notification feeds. GetStream provides API clients in several language, in this example app we show how easy 8 | is to create a website with activity feeds using Rails and [stream_rails](https://github.com/GetStream/Stream-Rails "stream_rails"). 9 | 10 | The application is built using Rails 5; and stream_rails the best way to try this application is via Heroku; you can deploy this example (for free) on Heroku 11 | by pressing the Deploy button below. 12 | 13 | [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy) 14 | 15 | If you prefer to run this locally then make sure to generate the API keys on [GetStream.io](https://getstream.io/ "GetStream.io") and update the settings in 16 | config/initializers/stream_rails.rb 17 | 18 | More informations and code samples are available in [stream_rails](https://github.com/GetStream/Stream-Rails "stream_rails") documentation and in getstream.io [documentation](https://getstream.io/docs/ "documentation") pages. 19 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/bootstrap/_code.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Code (inline and blocK) 3 | // -------------------------------------------------- 4 | 5 | 6 | // Inline and block code styles 7 | code, 8 | pre { 9 | font-family: $font-family-monospace; 10 | } 11 | 12 | // Inline code 13 | code { 14 | padding: 2px 4px; 15 | font-size: 90%; 16 | color: $code-color; 17 | background-color: $code-bg; 18 | white-space: nowrap; 19 | border-radius: $border-radius-base; 20 | } 21 | 22 | // Blocks of code 23 | pre { 24 | display: block; 25 | padding: (($line-height-computed - 1) / 2); 26 | margin: 0 0 ($line-height-computed / 2); 27 | font-size: ($font-size-base - 1); // 14px to 13px 28 | line-height: $line-height-base; 29 | word-break: break-all; 30 | word-wrap: break-word; 31 | color: $pre-color; 32 | background-color: $pre-bg; 33 | border: 1px solid $pre-border-color; 34 | border-radius: $border-radius-base; 35 | 36 | // Make prettyprint styles more spaced out for readability 37 | &.prettyprint { 38 | margin-bottom: $line-height-computed; 39 | } 40 | 41 | // Account for some code outputs that place code tags in pre tags 42 | code { 43 | padding: 0; 44 | font-size: inherit; 45 | color: inherit; 46 | white-space: pre-wrap; 47 | background-color: transparent; 48 | border: 0; 49 | } 50 | } 51 | 52 | // Enable scrollable blocks of code 53 | .pre-scrollable { 54 | max-height: $pre-scrollable-max-height; 55 | overflow-y: scroll; 56 | } 57 | -------------------------------------------------------------------------------- /db/migrate/20141023091156_devise_create_users.rb: -------------------------------------------------------------------------------- 1 | class DeviseCreateUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table(:users) do |t| 4 | ## Database authenticatable 5 | t.string :email, null: false, default: "" 6 | t.string :encrypted_password, null: false, default: "" 7 | 8 | ## Recoverable 9 | t.string :reset_password_token 10 | t.datetime :reset_password_sent_at 11 | 12 | ## Rememberable 13 | t.datetime :remember_created_at 14 | 15 | ## Trackable 16 | t.integer :sign_in_count, default: 0, null: false 17 | t.datetime :current_sign_in_at 18 | t.datetime :last_sign_in_at 19 | t.string :current_sign_in_ip 20 | t.string :last_sign_in_ip 21 | 22 | ## Confirmable 23 | # t.string :confirmation_token 24 | # t.datetime :confirmed_at 25 | # t.datetime :confirmation_sent_at 26 | # t.string :unconfirmed_email # Only if using reconfirmable 27 | 28 | ## Lockable 29 | # t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts 30 | # t.string :unlock_token # Only if unlock strategy is :email or :both 31 | # t.datetime :locked_at 32 | 33 | 34 | t.timestamps 35 | end 36 | 37 | add_index :users, :email, unique: true 38 | add_index :users, :reset_password_token, unique: true 39 | # add_index :users, :confirmation_token, unique: true 40 | # add_index :users, :unlock_token, unique: true 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /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 `rails 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 | # Shared secrets are available across all environments. 14 | 15 | # shared: 16 | # api_key: a1B2c3D4e5F6 17 | 18 | # Environmental secrets are only available for that specific environment. 19 | 20 | development: 21 | admin_name: admin 22 | admin_email: user@example.com 23 | admin_password: changeme 24 | secret_key_base: e3b52d76eb6eed6dbc385a5823b85e3eba8994809c1c522783a127bb9cdf091396fdffdafa32b1dd9746650d3b52c4deb82251a0ab1698cb248e006299d3263b 25 | 26 | test: 27 | secret_key_base: c3b8e069b740373e4c753d9bb8af319142190a982518b2c1bde535f150d943ec23487d3ef116368681c9b7b0c49e9fc61dc4b3a10069b74e1ed681157bc2b784 28 | 29 | # Do not keep production secrets in the unencrypted secrets file. 30 | # Instead, either read values from the environment. 31 | # Or, use `bin/rails secrets:setup` to configure encrypted secrets 32 | # and move the `production:` environment over there. 33 | 34 | production: 35 | admin_name: admin 36 | admin_email: user@example.com 37 | admin_password: changeme 38 | secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> 39 | -------------------------------------------------------------------------------- /app/views/pins/_pin_form.html.erb: -------------------------------------------------------------------------------- 1 | <% if (item.user_pin(current_user)) %> 2 | 3 |
4 |
5 | <%= button_to "Unpin", pin_path(item.user_pin(current_user)), :method => "delete", :class => "btn btn-primary btn-sm btn-danger" %> 6 |
7 |
8 |
9 | in 10 | 11 |
12 |
13 |
14 | <% else %> 15 | <%= form_for :pin, url: pins_path do |f| %> 16 | 17 |
18 |
19 | 20 |
21 |
22 |
23 | in 24 | 25 |
26 |
27 |
28 | <%= f.hidden_field :influencer_id %> 29 | <%= f.hidden_field :item_id, :value => item.id %> 30 | <% end %> 31 | <% end %> 32 | -------------------------------------------------------------------------------- /app/views/users/_profile.html.erb: -------------------------------------------------------------------------------- 1 | 2 |

<%= user.email.split('@')[0] %>

3 |

Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh.

4 | 5 | <% if user.followed(current_user) %> 6 | <%= button_to "Unfollow", follow_path(user.followed(current_user)), :method => "delete", :class => "btn btn-primary btn-sm btn-danger" %> 7 | <% else %> 8 | <%= form_for :follow, url: follows_path do |f| %> 9 | <%= f.hidden_field :target_id, :value => user.id %> 10 | 11 | <% end %> 12 | <% end %> 13 | 14 | 15 | <% if @activities %> 16 | <% @activities.each do |activity| %> 17 | <%= render_activity activity %> 18 | <% end %> 19 | <% end %> -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/views/devise/registrations/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 |

Edit <%= resource_name.to_s.humanize %>

3 | <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :role => 'form'}) do |f| %> 4 | <%= devise_error_messages! %> 5 |
6 | <%= f.label :email %> 7 | <%= f.email_field :email, :autofocus => true, class: 'form-control' %> 8 | <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> 9 |
Currently waiting confirmation for: <%= resource.unconfirmed_email %>
10 | <% end %> 11 |
12 |
13 |

Leave these fields blank if you don't want to change your password.

14 |
15 | <%= f.label :password %> 16 | <%= f.password_field :password, :autocomplete => 'off', class: 'form-control' %> 17 |
18 |
19 | <%= f.label :password_confirmation %> 20 | <%= f.password_field :password_confirmation, class: 'form-control' %> 21 |
22 |
23 |
24 |

You must enter your current password to make changes.

25 |
26 | <%= f.label :current_password %> 27 | <%= f.password_field :current_password, class: 'form-control' %> 28 |
29 |
30 | <%= f.submit 'Update', :class => 'button right' %> 31 | <% end %> 32 |
33 |
34 |

Cancel Account

35 |

Unhappy? We'll be sad to see you go.

36 | <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete, :class => 'button right' %> 37 |
38 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/bootstrap/_alerts.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Alerts 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // ------------------------- 8 | 9 | .alert { 10 | padding: $alert-padding; 11 | margin-bottom: $line-height-computed; 12 | border: 1px solid transparent; 13 | border-radius: $alert-border-radius; 14 | 15 | // Headings for larger alerts 16 | h4 { 17 | margin-top: 0; 18 | // Specified for the h4 to prevent conflicts of changing $headingsColor 19 | color: inherit; 20 | } 21 | // Provide class for links that match alerts 22 | .alert-link { 23 | font-weight: $alert-link-font-weight; 24 | } 25 | 26 | // Improve alignment and spacing of inner content 27 | > p, 28 | > ul { 29 | margin-bottom: 0; 30 | } 31 | > p + p { 32 | margin-top: 5px; 33 | } 34 | } 35 | 36 | // Dismissable alerts 37 | // 38 | // Expand the right padding and account for the close button's positioning. 39 | 40 | .alert-dismissable { 41 | padding-right: ($alert-padding + 20); 42 | 43 | // Adjust close link position 44 | .close { 45 | position: relative; 46 | top: -2px; 47 | right: -21px; 48 | color: inherit; 49 | } 50 | } 51 | 52 | // Alternate styles 53 | // 54 | // Generate contextual modifier classes for colorizing the alert. 55 | 56 | .alert-success { 57 | @include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text); 58 | } 59 | .alert-info { 60 | @include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text); 61 | } 62 | .alert-warning { 63 | @include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text); 64 | } 65 | .alert-danger { 66 | @include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text); 67 | } 68 | -------------------------------------------------------------------------------- /app/assets/stylesheets/framework_and_overrides.css.scss: -------------------------------------------------------------------------------- 1 | // import the CSS framework 2 | @import "bootstrap-sprockets"; 3 | @import "bootstrap"; 4 | 5 | // make all images responsive by default 6 | img { 7 | @extend .img-responsive; 8 | margin: 0 auto; 9 | } 10 | // override for the 'Home' navigation link 11 | .navbar-brand { 12 | font-size: inherit; 13 | } 14 | 15 | // THESE ARE EXAMPLES YOU CAN MODIFY 16 | // create your own classes 17 | // to make views framework-neutral 18 | .column { 19 | @extend .col-md-6; 20 | @extend .text-center; 21 | } 22 | .form { 23 | @extend .col-md-6; 24 | } 25 | .form-centered { 26 | @extend .col-md-6; 27 | @extend .text-center; 28 | } 29 | .submit { 30 | @extend .btn; 31 | @extend .btn-primary; 32 | @extend .btn-lg; 33 | } 34 | // apply styles to HTML elements 35 | // to make views framework-neutral 36 | main { 37 | @extend .container; 38 | background-color: #eee; 39 | padding-bottom: 80px; 40 | width: 100%; 41 | margin-top: 51px; // accommodate the navbar 42 | } 43 | section { 44 | @extend .row; 45 | margin-top: 20px; 46 | } 47 | 48 | // Styles for form views 49 | // using Bootstrap 50 | // generated by the rails_layout gem 51 | .authform { 52 | padding-top: 30px; 53 | max-width: 320px; 54 | margin: 0 auto; 55 | } 56 | .authform form { 57 | @extend .well; 58 | @extend .well-lg; 59 | padding-bottom: 40px; 60 | } 61 | .authform .right { 62 | float: right !important; 63 | } 64 | .authform .button { 65 | @extend .btn; 66 | @extend .btn-primary; 67 | } 68 | .authform fieldset { 69 | @extend .well; 70 | } 71 | #error_explanation { 72 | @extend .alert; 73 | @extend .alert-danger; 74 | } 75 | #error_explanation h2 { 76 | font-size: 16px; 77 | } 78 | .button-xs { 79 | @extend .btn; 80 | @extend .btn-primary; 81 | @extend .btn-xs; 82 | } 83 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 public file server for tests with Cache-Control for performance. 16 | config.public_file_server.enabled = true 17 | config.public_file_server.headers = { 18 | 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}" 19 | } 20 | 21 | # Show full error reports and disable caching. 22 | config.consider_all_requests_local = true 23 | config.action_controller.perform_caching = false 24 | 25 | # Raise exceptions instead of rendering exception templates. 26 | config.action_dispatch.show_exceptions = false 27 | 28 | # Disable request forgery protection in test environment. 29 | config.action_controller.allow_forgery_protection = false 30 | config.action_mailer.perform_caching = false 31 | 32 | # Tell Action Mailer not to deliver emails to the real world. 33 | # The :test delivery method accumulates sent emails in the 34 | # ActionMailer::Base.deliveries array. 35 | config.action_mailer.delivery_method = :test 36 | 37 | # Print deprecation notices to the stderr. 38 | config.active_support.deprecation = :stderr 39 | 40 | # Raises error for missing translations 41 | # config.action_view.raise_on_missing_translations = true 42 | end 43 | -------------------------------------------------------------------------------- /app/views/layouts/_navigation.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/bootstrap/_print.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Basic print styles 3 | // -------------------------------------------------- 4 | // Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css 5 | 6 | @media print { 7 | 8 | * { 9 | text-shadow: none !important; 10 | color: #000 !important; // Black prints faster: h5bp.com/s 11 | background: transparent !important; 12 | box-shadow: none !important; 13 | } 14 | 15 | a, 16 | a:visited { 17 | text-decoration: underline; 18 | } 19 | 20 | a[href]:after { 21 | content: " (" attr(href) ")"; 22 | } 23 | 24 | abbr[title]:after { 25 | content: " (" attr(title) ")"; 26 | } 27 | 28 | // Don't show links for images, or javascript/internal links 29 | .ir a:after, 30 | a[href^="javascript:"]:after, 31 | a[href^="#"]:after { 32 | content: ""; 33 | } 34 | 35 | pre, 36 | blockquote { 37 | border: 1px solid #999; 38 | page-break-inside: avoid; 39 | } 40 | 41 | thead { 42 | display: table-header-group; // h5bp.com/t 43 | } 44 | 45 | tr, 46 | img { 47 | page-break-inside: avoid; 48 | } 49 | 50 | img { 51 | max-width: 100% !important; 52 | } 53 | 54 | @page { 55 | margin: 2cm .5cm; 56 | } 57 | 58 | p, 59 | h2, 60 | h3 { 61 | orphans: 3; 62 | widows: 3; 63 | } 64 | 65 | h2, 66 | h3 { 67 | page-break-after: avoid; 68 | } 69 | 70 | // Bootstrap components 71 | .navbar { 72 | display: none; 73 | } 74 | .table { 75 | td, 76 | th { 77 | background-color: #fff !important; 78 | } 79 | } 80 | .btn, 81 | .dropup > .btn { 82 | > .caret { 83 | border-top-color: #000 !important; 84 | } 85 | } 86 | .label { 87 | border: 1px solid #000; 88 | } 89 | 90 | .table { 91 | border-collapse: collapse !important; 92 | } 93 | .table-bordered { 94 | th, 95 | td { 96 | border: 1px solid #ddd !important; 97 | } 98 | } 99 | 100 | } 101 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/bootstrap/_pagination.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Pagination (multiple pages) 3 | // -------------------------------------------------- 4 | .pagination { 5 | display: inline-block; 6 | padding-left: 0; 7 | margin: $line-height-computed 0; 8 | border-radius: $border-radius-base; 9 | 10 | > li { 11 | display: inline; // Remove list-style and block-level defaults 12 | > a, 13 | > span { 14 | position: relative; 15 | float: left; // Collapse white-space 16 | padding: $padding-base-vertical $padding-base-horizontal; 17 | line-height: $line-height-base; 18 | text-decoration: none; 19 | background-color: $pagination-bg; 20 | border: 1px solid $pagination-border; 21 | margin-left: -1px; 22 | } 23 | &:first-child { 24 | > a, 25 | > span { 26 | margin-left: 0; 27 | @include border-left-radius($border-radius-base); 28 | } 29 | } 30 | &:last-child { 31 | > a, 32 | > span { 33 | @include border-right-radius($border-radius-base); 34 | } 35 | } 36 | } 37 | 38 | > li > a, 39 | > li > span { 40 | &:hover, 41 | &:focus { 42 | background-color: $pagination-hover-bg; 43 | } 44 | } 45 | 46 | > .active > a, 47 | > .active > span { 48 | &, 49 | &:hover, 50 | &:focus { 51 | z-index: 2; 52 | color: $pagination-active-color; 53 | background-color: $pagination-active-bg; 54 | border-color: $pagination-active-bg; 55 | cursor: default; 56 | } 57 | } 58 | 59 | > .disabled { 60 | > span, 61 | > a, 62 | > a:hover, 63 | > a:focus { 64 | color: $pagination-disabled-color; 65 | background-color: $pagination-bg; 66 | border-color: $pagination-border; 67 | cursor: not-allowed; 68 | } 69 | } 70 | } 71 | 72 | // Sizing 73 | // -------------------------------------------------- 74 | 75 | // Large 76 | .pagination-lg { 77 | @include pagination-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $border-radius-large); 78 | } 79 | 80 | // Small 81 | .pagination-sm { 82 | @include pagination-size($padding-small-vertical, $padding-small-horizontal, $font-size-small, $border-radius-small); 83 | } 84 | -------------------------------------------------------------------------------- /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. 13 | config.consider_all_requests_local = true 14 | 15 | # Enable/disable caching. By default caching is disabled. 16 | if Rails.root.join('tmp/caching-dev.txt').exist? 17 | config.action_controller.perform_caching = true 18 | 19 | config.cache_store = :memory_store 20 | config.public_file_server.headers = { 21 | 'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}" 22 | } 23 | else 24 | config.action_controller.perform_caching = false 25 | 26 | config.cache_store = :null_store 27 | end 28 | 29 | # Don't care if the mailer can't send. 30 | config.action_mailer.raise_delivery_errors = false 31 | 32 | config.action_mailer.perform_caching = false 33 | 34 | # Print deprecation notices to the Rails logger. 35 | config.active_support.deprecation = :log 36 | 37 | # Raise an error on page load if there are pending migrations. 38 | config.active_record.migration_error = :page_load 39 | 40 | # Debug mode disables concatenation and preprocessing of assets. 41 | # This option may cause significant delays in view rendering with a large 42 | # number of complex assets. 43 | config.assets.debug = true 44 | 45 | config.serve_static_files = true 46 | 47 | # Suppress logger output for asset requests. 48 | config.assets.quiet = true 49 | 50 | # Raises error for missing translations 51 | # config.action_view.raise_on_missing_translations = true 52 | 53 | # Use an evented file watcher to asynchronously detect changes in source code, 54 | # routes, locales, etc. This feature depends on the listen gem. 55 | config.file_watcher = ActiveSupport::EventedFileUpdateChecker 56 | config.assets.unknown_asset_fallback = true 57 | config.assets.raise_runtime_errors = false 58 | 59 | end 60 | -------------------------------------------------------------------------------- /app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%= content_for?(:title) ? yield(:title) : "Streamterest" %> 6 | "> 7 | 8 | 9 | 10 | 11 | 12 | <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> 13 | <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> 14 | <%= csrf_meta_tags %> 15 | 16 | 17 | 18 | 19 | <%= render 'layouts/navigation' %> 20 |
21 |
22 |
23 |
24 |

Stream in action

25 |

26 | Welcome to the Pinterest esque example app. We've conveniently logged you in as the admin user. 27 | Also admin is a slightly narcissistic user and can follow his own account. 28 | Pin a few items, follow the admin user and have a look at the Flat and Aggregated feed pages. 29 |

30 |

31 | 32 | GetStream 33 | 34 |

35 |
36 |
37 | <%= render 'layouts/messages' %> 38 | <%= yield %> 39 |
40 |
41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/bootstrap/_list-group.scss: -------------------------------------------------------------------------------- 1 | // 2 | // List groups 3 | // -------------------------------------------------- 4 | 5 | // Base class 6 | // 7 | // Easily usable on