Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo day 期中考測驗 #187

Open
wants to merge 73 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
c24c1e0
setting tweets#index routes
yungchenglin Jul 22, 2018
8b85c97
add tweets index action and view for public users
yungchenglin Jul 22, 2018
b195ee3
add tweet index action and view for admin
yungchenglin Jul 22, 2018
037aeaa
add login process and update view with login message
yungchenglin Jul 22, 2018
9fa987f
set up admin authentication
yungchenglin Jul 22, 2018
6ecfa39
add user name to registration form
yungchenglin Jul 22, 2018
9a9e30c
add tweets resources for admin
yungchenglin Jul 22, 2018
7b4f9f0
add tweet destroy action for admin
yungchenglin Jul 22, 2018
58f34b9
generate fake data using FFaker gem
yungchenglin Jul 22, 2018
b3c6efc
add paginationooooo using Kaminari gem
yungchenglin Jul 22, 2018
f633a8c
move authenticate_user to application_controller.rb
yungchenglin Jul 22, 2018
dddf2bd
add Admin::BaseController and move authenticate_admin here
yungchenglin Jul 22, 2018
0bacf42
setup tweet resources for public users
yungchenglin Jul 22, 2018
bf22a95
setup route for user profile page
yungchenglin Jul 22, 2018
993d9cc
add user show page
yungchenglin Jul 22, 2018
03687e9
user can update the profile details
yungchenglin Jul 22, 2018
8a2f023
install bootstrap-sass and setup scss
yungchenglin Jul 22, 2018
5aac946
install gem 'jquery-rails' for bootstrap js
yungchenglin Jul 22, 2018
dedb38e
change navbar
yungchenglin Jul 22, 2018
afd534f
abjest user#show & user#edit page
yungchenglin Jul 22, 2018
46bcfc0
add input tweet box to index page
yungchenglin Jul 22, 2018
f131bc9
user can add tweet on index page
yungchenglin Jul 23, 2018
b98553b
admin can delete tweet
yungchenglin Jul 23, 2018
209641d
change Profile controller seeting
yungchenglin Jul 24, 2018
7c65647
change model user and tweet seeting
yungchenglin Jul 24, 2018
30a8f52
change model for user/tweet/reply seeting
yungchenglin Jul 24, 2018
2c71a10
add replies routes for tweet
yungchenglin Jul 24, 2018
e9aff4d
fix tweet bug
yungchenglin Jul 24, 2018
17f26ab
creat like model and setup relation among user,tweet and like
yungchenglin Jul 24, 2018
f317017
setup routes for like/unlike
yungchenglin Jul 25, 2018
1cb72f8
fix like butten seeting
yungchenglin Jul 25, 2018
e197667
add like/unlike button on index page using shared partial
yungchenglin Jul 26, 2018
8d75504
fix dev:fake_user
yungchenglin Jul 26, 2018
eb342f4
setup self-referential relationships within users table through follo…
yungchenglin Jul 26, 2018
6144ce0
setup routes for user index page and follow/unfollow function
yungchenglin Jul 26, 2018
565d865
add create action for followship record
yungchenglin Jul 26, 2018
47998ee
add unfollow button on user index page and destroy action
yungchenglin Jul 26, 2018
deb83af
hide button & add following method & add partial for un/follow button
yungchenglin Jul 26, 2018
f8e6be7
styled user index page
yungchenglin Jul 26, 2018
87a9219
setup:user has many followrs
yungchenglin Jul 26, 2018
0220ff0
add following/follower post to cofung routes
yungchenglin Jul 28, 2018
ad52098
reseeting config/routes
yungchenglin Jul 28, 2018
10a97fc
add link_to tweet_user_path to navbar
yungchenglin Jul 28, 2018
d35c62f
add tweet index css seeting
yungchenglin Jul 28, 2018
d43e551
fix tweet index css bug
yungchenglin Jul 28, 2018
7718015
add model for reply(counter_cache:true)
yungchenglin Jul 28, 2018
3ebbf49
add index for tweets/like size
yungchenglin Jul 28, 2018
0c32641
add _tweet_item page
yungchenglin Jul 29, 2018
af785ec
add replies/index page
yungchenglin Jul 29, 2018
d761d7a
add user_item page
yungchenglin Jul 29, 2018
d9f7da7
add user_info page
yungchenglin Jul 29, 2018
c96bf53
add replice#index page
yungchenglin Jul 29, 2018
ff37fac
delete reply_item page to fix bug
yungchenglin Jul 29, 2018
4511d26
add link_to user_name
yungchenglin Jul 29, 2018
295b0e7
add link_to followings/followers/likes page
yungchenglin Jul 29, 2018
45a81e0
fix admin#user#index and users#following css seeting
yungchenglin Jul 29, 2018
9e66aef
fix user#following css seeting
yungchenglin Jul 29, 2018
e9fe664
add user#followers seeting
yungchenglin Jul 29, 2018
5924b7b
add replies show admin#tweets#index page
yungchenglin Jul 29, 2018
dc36193
add dev:fake_user/tweets/replies for test
yungchenglin Jul 29, 2018
2bb983b
fix some Rspac fail
yungchenglin Jul 30, 2018
2bfd96a
fix some Rspac fail-2
yungchenglin Jul 30, 2018
16949e5
add edit/follow button to _user_info page
yungchenglin Jul 30, 2018
38168d1
fix edit/follow button to _user_info page css seeting
yungchenglin Jul 30, 2018
041c95b
fix tweet_controller for popular
yungchenglin Jul 30, 2018
ebf3c0f
add navbar to admin tweet/user page
yungchenglin Jul 30, 2018
a95f8a5
fix controller#user seeting
yungchenglin Jul 30, 2018
8c20cdc
add pg,update Gemfile.lock, change production db to pg
yungchenglin Jul 30, 2018
8abb9a6
Update Gemfile.lock for Heroku
yungchenglin Jul 30, 2018
c852895
fix dev:fake_all
yungchenglin Jul 31, 2018
cb57e11
fix html title
yungchenglin Jul 31, 2018
b065349
fix some bugs
yungchenglin Jul 31, 2018
7339701
fix some bug
yungchenglin Aug 4, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ gem 'carrierwave'
# gem 'mini_magick'

gem 'ffaker'
gem 'kaminari'
gem 'bootstrap-sass','~>3.3.7'
gem 'sass-rails','~>5.0'
gem 'jquery-rails'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.4'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'

# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
Expand Down Expand Up @@ -51,8 +55,10 @@ group :development, :test do
gem 'factory_bot_rails'
gem 'shoulda-matchers', '~> 3.1'
gem 'rails-controller-testing'
gem 'sqlite3'
end


group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
Expand All @@ -64,3 +70,7 @@ end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

group :production do
gem 'pg','~>0.21'
end
192 changes: 110 additions & 82 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,65 +1,70 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (5.1.4)
actionpack (= 5.1.4)
actioncable (5.1.6)
actionpack (= 5.1.6)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.1.4)
actionpack (= 5.1.4)
actionview (= 5.1.4)
activejob (= 5.1.4)
actionmailer (5.1.6)
actionpack (= 5.1.6)
actionview (= 5.1.6)
activejob (= 5.1.6)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.1.4)
actionview (= 5.1.4)
activesupport (= 5.1.4)
actionpack (5.1.6)
actionview (= 5.1.6)
activesupport (= 5.1.6)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.4)
activesupport (= 5.1.4)
actionview (5.1.6)
activesupport (= 5.1.6)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.1.4)
activesupport (= 5.1.4)
activejob (5.1.6)
activesupport (= 5.1.6)
globalid (>= 0.3.6)
activemodel (5.1.4)
activesupport (= 5.1.4)
activerecord (5.1.4)
activemodel (= 5.1.4)
activesupport (= 5.1.4)
activemodel (5.1.6)
activesupport (= 5.1.6)
activerecord (5.1.6)
activemodel (= 5.1.6)
activesupport (= 5.1.6)
arel (~> 8.0)
activesupport (5.1.4)
activesupport (5.1.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
arel (8.0.0)
bcrypt (3.1.11)
bcrypt (3.1.11-java)
bcrypt (3.1.11-x64-mingw32)
bcrypt (3.1.11-x86-mingw32)
autoprefixer-rails (9.0.0)
execjs
bcrypt (3.1.12)
bcrypt (3.1.12-java)
bcrypt (3.1.12-x64-mingw32)
bcrypt (3.1.12-x86-mingw32)
bindex (0.5.0)
bootstrap-sass (3.3.7)
autoprefixer-rails (>= 5.2.1)
sass (>= 3.3.4)
builder (3.2.3)
byebug (10.0.0)
capybara (2.17.0)
byebug (10.0.2)
capybara (2.18.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (>= 2.0, < 4.0)
carrierwave (1.2.2)
carrierwave (1.2.3)
activemodel (>= 4.0.0)
activesupport (>= 4.0.0)
mime-types (>= 1.16)
childprocess (0.8.0)
childprocess (0.9.0)
ffi (~> 1.0, >= 1.0.11)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
Expand All @@ -70,38 +75,54 @@ GEM
coffee-script-source (1.12.2)
concurrent-ruby (1.0.5)
concurrent-ruby (1.0.5-java)
crass (1.0.3)
devise (4.4.1)
crass (1.0.4)
devise (4.4.3)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 5.2)
railties (>= 4.1.0, < 6.0)
responders
warden (~> 1.2.3)
diff-lcs (1.3)
erubi (1.7.0)
erubi (1.7.1)
execjs (2.7.0)
factory_bot (4.8.2)
factory_bot (4.10.0)
activesupport (>= 3.0.0)
factory_bot_rails (4.8.2)
factory_bot (~> 4.8.2)
factory_bot_rails (4.10.0)
factory_bot (~> 4.10.0)
railties (>= 3.0.0)
ffaker (2.8.1)
ffi (1.9.18)
ffi (1.9.18-java)
ffi (1.9.18-x64-mingw32)
ffi (1.9.18-x86-mingw32)
ffaker (2.10.0)
ffi (1.9.25)
ffi (1.9.25-java)
ffi (1.9.25-x64-mingw32)
ffi (1.9.25-x86-mingw32)
globalid (0.4.1)
activesupport (>= 4.2.0)
i18n (0.9.3)
i18n (1.0.1)
concurrent-ruby (~> 1.0)
jbuilder (2.7.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
jquery-rails (4.3.3)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
kaminari (1.1.1)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.1.1)
kaminari-activerecord (= 1.1.1)
kaminari-core (= 1.1.1)
kaminari-actionview (1.1.1)
actionview
kaminari-core (= 1.1.1)
kaminari-activerecord (1.1.1)
activerecord
kaminari-core (= 1.1.1)
kaminari-core (1.1.1)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.1.1)
loofah (2.2.2)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.0)
Expand All @@ -114,33 +135,36 @@ GEM
mini_portile2 (2.3.0)
minitest (5.11.3)
multi_json (1.13.1)
nio4r (2.2.0)
nio4r (2.2.0-java)
nokogiri (1.8.1)
nio4r (2.3.1)
nio4r (2.3.1-java)
nokogiri (1.8.4)
mini_portile2 (~> 2.3.0)
nokogiri (1.8.1-java)
nokogiri (1.8.1-x64-mingw32)
nokogiri (1.8.4-java)
nokogiri (1.8.4-x64-mingw32)
mini_portile2 (~> 2.3.0)
nokogiri (1.8.1-x86-mingw32)
nokogiri (1.8.4-x86-mingw32)
mini_portile2 (~> 2.3.0)
orm_adapter (0.5.0)
public_suffix (3.0.1)
puma (3.11.2)
puma (3.11.2-java)
rack (2.0.3)
rack-test (0.8.2)
pg (0.21.0)
pg (0.21.0-x64-mingw32)
pg (0.21.0-x86-mingw32)
public_suffix (3.0.2)
puma (3.12.0)
puma (3.12.0-java)
rack (2.0.5)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.1.4)
actioncable (= 5.1.4)
actionmailer (= 5.1.4)
actionpack (= 5.1.4)
actionview (= 5.1.4)
activejob (= 5.1.4)
activemodel (= 5.1.4)
activerecord (= 5.1.4)
activesupport (= 5.1.4)
rails (5.1.6)
actioncable (= 5.1.6)
actionmailer (= 5.1.6)
actionpack (= 5.1.6)
actionview (= 5.1.6)
activejob (= 5.1.6)
activemodel (= 5.1.6)
activerecord (= 5.1.6)
activesupport (= 5.1.6)
bundler (>= 1.3.0)
railties (= 5.1.4)
railties (= 5.1.6)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.2)
actionpack (~> 5.x, >= 5.0.1)
Expand All @@ -149,16 +173,16 @@ GEM
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (5.1.4)
actionpack (= 5.1.4)
activesupport (= 5.1.4)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (5.1.6)
actionpack (= 5.1.6)
activesupport (= 5.1.6)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.3.0)
rb-fsevent (0.10.2)
rake (12.3.1)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
responders (2.4.0)
Expand All @@ -180,10 +204,10 @@ GEM
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.0)
rspec-support (3.7.1)
ruby_dep (1.5.0)
rubyzip (1.2.1)
sass (3.5.5)
sass (3.5.7)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
Expand All @@ -194,17 +218,17 @@ GEM
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
selenium-webdriver (3.8.0)
selenium-webdriver (3.13.1)
childprocess (~> 0.5)
rubyzip (~> 1.0)
rubyzip (~> 1.2)
shoulda-matchers (3.1.2)
activesupport (>= 4.0.0)
spring (2.0.2)
activesupport (>= 4.2)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (3.7.1)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
Expand All @@ -219,18 +243,18 @@ GEM
thread_safe (0.3.6)
thread_safe (0.3.6-java)
tilt (2.0.8)
turbolinks (5.1.0)
turbolinks (5.1.1)
turbolinks-source (~> 5.1)
turbolinks-source (5.1.0)
tzinfo (1.2.4)
tzinfo (1.2.5)
thread_safe (~> 0.1)
tzinfo-data (1.2018.3)
tzinfo-data (1.2018.5)
tzinfo (>= 1.0.0)
uglifier (4.1.4)
uglifier (4.1.17)
execjs (>= 0.3.0, < 3)
warden (1.2.7)
rack (>= 1.0)
web-console (3.5.1)
web-console (3.6.2)
actionview (>= 5.0)
activemodel (>= 5.0)
bindex (>= 0.4.0)
Expand All @@ -240,7 +264,7 @@ GEM
websocket-driver (0.6.5-java)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
xpath (3.0.0)
xpath (3.1.0)
nokogiri (~> 1.8)

PLATFORMS
Expand All @@ -251,6 +275,7 @@ PLATFORMS
x86-mswin32

DEPENDENCIES
bootstrap-sass (~> 3.3.7)
byebug
capybara (~> 2.13)
carrierwave
Expand All @@ -259,7 +284,10 @@ DEPENDENCIES
factory_bot_rails
ffaker
jbuilder (~> 2.5)
jquery-rails
kaminari
listen (>= 3.0.5, < 3.2)
pg (~> 0.21)
puma (~> 3.7)
rails (~> 5.1.4)
rails-controller-testing
Expand All @@ -276,4 +304,4 @@ DEPENDENCIES
web-console (>= 3.3.0)

BUNDLED WITH
1.16.1
1.16.2
2 changes: 2 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@
//= require rails-ujs
//= require turbolinks
//= require_tree .
//= require jquery
//= require bootstrap-sprockets
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* 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 "bootstrap-sprockets";
@import "bootstrap";
@import "style"
Loading