Skip to content

Commit

Permalink
Updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
Devan committed Oct 26, 2017
1 parent 61753c6 commit 6ab7419
Show file tree
Hide file tree
Showing 58 changed files with 858 additions and 598 deletions.
129 changes: 129 additions & 0 deletions .byebug_history
Original file line number Diff line number Diff line change
@@ -1,3 +1,132 @@
exit
continue
more_time
next
continue
hobbies
continue
where("admin = (?) AND name != (?)", true, "Yoda").count
where("admin = (?) AND name != (?)", true, "Yoda")
continue
User.where("admin = (?) AND name != (?)", true, "Yoda").count
User.where("admin = (?) AND name != (?)", true, "Yoda")
User.where(admin: true)
User.select_droids
User.all.select_droids
User.select_droids
continue
@droids.count
@droids
exit
self.conversation.recipient
self.conversation.sender
self
message
User.find(2)
self
self.conversation_recipient.is_droid?
self.conversation.sender.is_droid?
self.conversation.sender
self.sender
self.conversation_recipient.is_droid?
!self.conversation.sender.is_droid?
continue
!self.conversation.sender.is_droid?
self.conversation_recipient.is_droid?
exit
conversation.id
droid_responder_id
gather_droid_response
exit
continue
self
exit
Message.create!(message_params)
message_params
data
continue
self.valid?
self
continue
self.conversation
self
continue
Message.create(body: gather_droid_response, user_id: droid_responder_id, conversation_id: conversation.id)
gather_droid_response
self.gather_droid_response
self.conversation.id
droid_responder_id
self.conversation.recipient.random_droid_response.strip
self.conversation.recipient.random_droid_response
self.conversation.recipient
self
continue
self
gather_droid_response
Message.create(body: gather_droid_response, user_id: droid_responder_id, conversation_id: message_conversation.id)
continue
quote.slice(rand(quote.size), rand(quote.size) +1)
quote.slice(rand(quote.size), rand(s.size) +1)
quote = self.conversation.recipient.quote
self.conversation.recipient.quote.slice(rand(quote.size), rand(quote.size) + 1)
self.conversation.recipient.quote.slice(rand(s.size), rand(s.size) + 1)
self.conversation.recipient[rand(quote.length), rand(quote.length - 1) + 1]
self.conversation.recipient.quote[rand(quote.length), rand(quote.length - 1) + 1]
self.conversation.recipient.quote[rand(s.length), rand(s.length - 1) + 1]
self.conversation.recipient.quote
self.conversation.recipient.name != "Yoda"
name != "Yoda"
self.conversation.recipient.admin?
self.conversation.recipient
continue
self.persisted?
conversation.persisted?
Message.create(body: @yoda.quote, user_id: @yoda.id, conversation_id: conversation.id)
conversation = Conversation.create(recipient_id: self.id, sender_id: @yoda.id)
continue
message.save
message = conversation.messages.create(body: @yoda.quote, user_id: @yoda.id, conversation_id: conversation.id)
conversation.save
conversation = Conversation.create(recipient_id: self.id, sender_id: @yoda.id)
continue
self.conversations.first.messages.first
self.conversations.first.message.first
conversation.messages.create(body: @yoda.quote, user_id: @yoda.id, conversation_id: conversation.id)
self.conversations.first
self.conversations.last
Conversation.last
conversation = Conversation.create(recipient_id: self.id, sender_id: @yoda.id)
continue
quote
self
exit
next
User.find_yoda
self.find_yoda
find_yoda
self
continue
exit
continue
user.strip.name.downcase
user.name.downcase
user.downcase
user
continue
user
continue
user
continue
user
exit
user
continue
user
continue
user
exit
continue
current_user
continue
@conversation.nil?
@conversation.id unless @conversation.nil?
Expand Down
26 changes: 13 additions & 13 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end

ruby '2.4.2'
gem 'rails', '~> 5.1.4'
gem 'puma', '~> 3.7'
Expand All @@ -12,37 +13,36 @@ gem 'coffee-rails', '~> 4.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'faker', :git => 'git://github.com/stympy/faker.git', :branch => 'master'


group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'capybara', '~> 2.13'
gem 'selenium-webdriver'
end
group :development do
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'bootstrap-sass'
gem 'devise'
gem 'jquery-rails'
gem 'pg'
gem 'inline_svg'

group :development do
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'better_errors'
gem 'hub', :require=>nil
gem 'rails_layout'
gem 'spring-commands-rspec'
end

group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'capybara', '~> 2.13'
gem 'selenium-webdriver'
gem 'binding_of_caller'
gem 'factory_girl_rails'
gem 'pry-rails'
gem 'pry-rescue'
gem 'rspec-rails'
gem 'rubocop'
end

group :test do
gem 'database_cleaner'
gem 'launchy'
Expand Down
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ GEM
erubi (>= 1.0.0)
rack (>= 0.9.0)
bindex (0.5.0)
binding_of_caller (0.7.3)
debug_inspector (>= 0.0.1)
bootstrap-sass (3.3.7)
autoprefixer-rails (>= 5.2.1)
sass (>= 3.3.4)
Expand All @@ -83,6 +85,7 @@ GEM
concurrent-ruby (1.0.5)
crass (1.0.2)
database_cleaner (1.6.1)
debug_inspector (0.0.3)
devise (4.3.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
Expand All @@ -103,6 +106,9 @@ GEM
hub (1.12.4)
i18n (0.9.0)
concurrent-ruby (~> 1.0)
inline_svg (1.2.3)
activesupport (>= 3.0)
nokogiri (>= 1.6)
interception (0.5)
jbuilder (2.7.0)
activesupport (>= 4.2.0)
Expand Down Expand Up @@ -269,6 +275,7 @@ PLATFORMS

DEPENDENCIES
better_errors
binding_of_caller
bootstrap-sass
byebug
capybara (~> 2.13)
Expand All @@ -278,6 +285,7 @@ DEPENDENCIES
factory_girl_rails
faker!
hub
inline_svg
jbuilder (~> 2.5)
jquery-rails
launchy
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Star Support
Star Chat Support
================

Rails Composer is supported by developers who purchase our RailsApps tutorials.
Expand Down
17 changes: 4 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
Star Support
Star Chat
================

[![Deploy to Heroku](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)

This application was generated with the [rails_apps_composer](https://github.com/RailsApps/rails_apps_composer) gem
provided by the [RailsApps Project](http://railsapps.github.io/).

Rails Composer is supported by developers who purchase our RailsApps tutorials.
Welcome to the futuristic platform called Star Chat,
a product of BiggerPockets in the year 2079.

Problems? Issues?
-----------

Need help? Ask on Stack Overflow with the tag 'railsapps.'

Your application contains diagnostics in the README file. Please provide a copy of the README file when reporting any issues.

If the application doesn't work as expected, please [report an issue](https://github.com/RailsApps/rails_apps_composer/issues)
and include the diagnostics.
Need help? Email Devan at [email protected]

Ruby on Rails
-------------
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added app/assets/images/admin/yoda.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/images/branding/logo-pocket.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/branding/logo_black_text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/branding/logo_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/visitors/more_time_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/visitors/more_time_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/visitors/more_time_3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/visitors/more_time_4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/visitors/more_time_5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/visitors/more_time_6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/visitors/stars.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions app/assets/javascripts/alerts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$(document).ready(function () {
$('#alert-notice').delay(5000).fadeOut('slow');
});
7 changes: 4 additions & 3 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
//= require bootstrap-sprockets
//= require_tree .

(function() {
$(document).on('click', '.toggle-window', function(e) {
(function () {
$(document).on('click', '.toggle-window', function (e) {
e.preventDefault();
var panel = $(this).parent().parent();
var messages_list = panel.find('.messages-list');
Expand All @@ -30,4 +30,5 @@
messages_list.scrollTop(height);
}
});
})();
})();

31 changes: 31 additions & 0 deletions app/assets/javascripts/sidebar_nav.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
$(document).ready(function () {

// Closes the sidebar menu
$("#menu-close").click(function (e) {
e.preventDefault();
$("#sidebar-wrapper").toggleClass("active");
});

// Opens the sidebar menu
$("#menu-toggle").click(function (e) {
e.preventDefault();
$("#sidebar-wrapper").toggleClass("active");
});

// Scrolls to the selected menu item on the page
$(function () {
$('a[href*=#]:not([href=#])').click(function () {
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') || location.hostname == this.hostname) {

var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
});
});
24 changes: 13 additions & 11 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,25 @@
* files in this directory. Styles in this file should be added after the last require_* statement.
* It is generally better to create a new file per style scope.
*
*= require_tree .
*= require_self
*/

@import "variables/*";
@import "bootstrap-sprockets";
@import "bootstrap";
@import "navigation/*";
@import "base";
@import "visitors/*";
@import "messages/*";
@import "conversations/*";
@import "users/*";

.page-container {
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
padding-top: 70px;
html,
body {
width: 100%;
height: 100%;
}

ul {
padding-left: 0px;
list-style: none;
body {
font-family: $font-stack;
}

Loading

0 comments on commit 6ab7419

Please sign in to comment.