Feel free to open tickets or send pull requests with improvements. Thanks in advance for your help!
Please follow the contribution guidelines.
OSX or Linux
PostgreSQL >= 9.6, Ruby >= 2.6, NodeJS >= 10.0, Memcached, Redis
https://agileseason.com/shared/boards/a98d1565b276f3781070f0e74a7ffcf1
psql -d postgres
postgres=# create user shikimori_production;
postgres=# create user shikimori_test;
postgres=# alter user shikimori_production createdb;
postgres=# alter user shikimori_test createdb;
postgres=# alter user shikimori_production with superuser;
postgres=# alter user shikimori_test with superuser;
rails db:create
psql -d shikimori_test
shikimori_test=# CREATE EXTENSION unaccent;
shikimori_test=# CREATE EXTENSION hstore;
shikimori_test=# CREATE EXTENSION pg_stat_statements;
psql -d shikimori_production
shikimori_production=# CREATE EXTENSION unaccent;
shikimori_production=# CREATE EXTENSION hstore;
shikimori_production=# CREATE EXTENSION pg_stat_statements;
rails db:drop && rails db:create
psql -U shikimori_production -d shikimori_production -f db/dump.sql
RAILS_ENV=test rails db:schema:load
rake db:migrate
pg_dump -c shikimori_production > db/dump.sql
git clone [email protected]:shikimori/shikimori.git
git clone [email protected]:shikimori/neko-achievements.git
git clone [email protected]:shikimori/camo-server.git
git clone [email protected]:shikimori/faye-server.git
cd shikimori
brew install yarn
brew install honcho # https://github.com/nickstenning/honcho
yarn install
bundle install
honcho start
guard
In rails console:
pry(main)> AnimesIndex.reset!
pry(main)> MangasIndex.reset!
pry(main)> RanobeIndex.reset!
pry(main)> PeopleIndex.reset!
pry(main)> CharactersIndex.reset!
pry(main)> ClubsIndex.reset!
pry(main)> CollectionsIndex.reset!
pry(main)> UsersIndex.reset!
pry(main)> TopicsIndex.reset!
rails neko:update
# app/services/video_extractor/player_url_extractor.rb
https://nodejs.org/en/docs/inspector/ Install the Chrome Extension NIM (Node Inspector Manager): https://chrome.google.com/webstore/detail/nim-node-inspector-manage/gnhhdgbaldcilmgcpfddgdbkhjohddkj
~ RAILS_ENV=development NODE_ENV=development NODE_PATH=node_modules node --inspect node_modules/.bin/webpack-dev-server --progress --color --config config/webpack/development.js
https://chrisbateman.github.io/webpack-visualizer/
@dependabot ignore this dependency
user = User.find(215190);
File.open('/tmp/z.json', 'w') do |f|
f.write({
user: user,
user_preferences: user.preferences,
style: user.style,
user_history: UserHistory.where(user_id: user.id),
user_rates: UserRate.where(user_id: user.id)
}.to_json);
end;
scp /tmp/z.json devops@shiki_web:/tmp/
user_id = 215190;
json = JSON.parse(open('/tmp/z.json').read).symbolize_keys;
UserRate.where(user_id: user_id).destroy_all;
UserHistory.where(user_id: user_id).destroy_all;
UserHistory.wo_timestamp { UserHistory.import(json[:user_history].map {|v| UserHistory.new v }); };
UserRate.wo_timestamp { UserRate.import(json[:user_rates].map {|v| UserRate.new v }); };
User.wo_timestamp { v = User.new json[:user]; v.save validate: false }
UserPreferences.wo_timestamp { v = UserPreferences.new json[:user_preferences]; v.save validate: false }
Style.wo_timestamp { v = Style.new json[:style]; v.save validate: false }
User.find(user_id).touch