Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

Fixes Devise gem and updates migrations #15

Open
wants to merge 1 commit into
base: rails-5.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion Gemfile
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ gem 'sdoc', '~> 0.4.0', group: :doc

gem 'acts-as-taggable-on', git: 'https://github.com/mbleigh/acts-as-taggable-on'
gem 'acts_as_follower'
gem 'devise', git: 'https://github.com/gogovan/devise.git', branch: 'rails-5.1'
gem 'devise'
gem 'jwt', '~> 1.5.4'
gem 'puma'
gem 'rack-cors', '~> 0.4.0'
Expand Down
24 changes: 9 additions & 15 deletions Gemfile.lock
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
GIT
remote: https://github.com/gogovan/devise.git
revision: 931ae3985872ea1f0039cd3a749779c0023a622a
branch: rails-5.1
specs:
devise (4.2.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 5.2)
responders
warden (~> 1.2.3)

GIT
remote: https://github.com/mbleigh/acts-as-taggable-on
revision: 9bb57384398cd3e198c893b0345c7b26e3b5ad5e
Expand Down Expand Up @@ -60,11 +48,17 @@ GEM
acts_as_follower (0.2.1)
arel (8.0.0)
ast (2.3.0)
bcrypt (3.1.11)
bcrypt (3.1.12)
builder (3.2.3)
byebug (9.0.6)
coderay (1.1.1)
concurrent-ruby (1.0.5)
devise (4.5.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 6.0)
responders
warden (~> 1.2.3)
erubi (1.6.0)
ffi (1.9.18)
globalid (0.4.0)
Expand Down Expand Up @@ -179,7 +173,7 @@ DEPENDENCIES
acts-as-taggable-on!
acts_as_follower
byebug
devise!
devise
jbuilder (~> 2.0)
jwt (~> 1.5.4)
listen
Expand All @@ -196,4 +190,4 @@ RUBY VERSION
ruby 2.4.0p0

BUNDLED WITH
1.14.6
1.17.1
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified README.rdoc
100644 → 100755
Empty file.
Empty file modified Rakefile
100644 → 100755
Empty file.
Empty file modified app/controllers/application_controller.rb
100644 → 100755
Empty file.
Empty file modified app/controllers/articles_controller.rb
100644 → 100755
Empty file.
Empty file modified app/controllers/comments_controller.rb
100644 → 100755
Empty file.
Empty file modified app/controllers/concerns/.keep
100644 → 100755
Empty file.
Empty file modified app/controllers/favorites_controller.rb
100644 → 100755
Empty file.
Empty file modified app/controllers/follows_controller.rb
100644 → 100755
Empty file.
Empty file modified app/controllers/profiles_controller.rb
100644 → 100755
Empty file.
Empty file modified app/controllers/sessions_controller.rb
100644 → 100755
Empty file.
Empty file modified app/controllers/tags_controller.rb
100644 → 100755
Empty file.
Empty file modified app/controllers/users_controller.rb
100644 → 100755
Empty file.
Empty file modified app/helpers/application_helper.rb
100644 → 100755
Empty file.
Empty file modified app/mailers/.keep
100644 → 100755
Empty file.
Empty file modified app/models/.keep
100644 → 100755
Empty file.
Empty file modified app/models/application_record.rb
100644 → 100755
Empty file.
Empty file modified app/models/article.rb
100644 → 100755
Empty file.
Empty file modified app/models/comment.rb
100644 → 100755
Empty file.
Empty file modified app/models/concerns/.keep
100644 → 100755
Empty file.
Empty file modified app/models/favorite.rb
100644 → 100755
Empty file.
Empty file modified app/models/follow.rb
100644 → 100755
Empty file.
Empty file modified app/models/user.rb
100644 → 100755
Empty file.
Empty file modified app/views/articles/_article.json.jbuilder
100644 → 100755
Empty file.
Empty file modified app/views/articles/index.json.jbuilder
100644 → 100755
Empty file.
Empty file modified app/views/articles/show.json.jbuilder
100644 → 100755
Empty file.
Empty file modified app/views/comments/_comment.json.jbuilder
100644 → 100755
Empty file.
Empty file modified app/views/comments/create.json.jbuilder
100644 → 100755
Empty file.
Empty file modified app/views/comments/index.json.jbuilder
100644 → 100755
Empty file.
Empty file modified app/views/devise/registrations/create.json.jbuilder
100644 → 100755
Empty file.
Empty file modified app/views/devise/sessions/create.json.jbuilder
100644 → 100755
Empty file.
Empty file modified app/views/profiles/_profile.json.jbuilder
100644 → 100755
Empty file.
Empty file modified app/views/profiles/show.json.jbuilder
100644 → 100755
Empty file.
Empty file modified app/views/users/_user.json.jbuilder
100644 → 100755
Empty file.
Empty file modified app/views/users/show.json.jbuilder
100644 → 100755
Empty file.
Empty file modified config.ru
100644 → 100755
Empty file.
Empty file modified config/application.rb
100644 → 100755
Empty file.
Empty file modified config/boot.rb
100644 → 100755
Empty file.
Empty file modified config/database.yml
100644 → 100755
Empty file.
Empty file modified config/environment.rb
100644 → 100755
Empty file.
Empty file modified config/environments/development.rb
100644 → 100755
Empty file.
Empty file modified config/environments/production.rb
100644 → 100755
Empty file.
Empty file modified config/environments/test.rb
100644 → 100755
Empty file.
Empty file modified config/initializers/application_controller_renderer.rb
100644 → 100755
Empty file.
Empty file modified config/initializers/assets.rb
100644 → 100755
Empty file.
Empty file modified config/initializers/backtrace_silencers.rb
100644 → 100755
Empty file.
Empty file modified config/initializers/cookies_serializer.rb
100644 → 100755
Empty file.
Empty file modified config/initializers/devise.rb
100644 → 100755
Empty file.
Empty file modified config/initializers/filter_parameter_logging.rb
100644 → 100755
Empty file.
Empty file modified config/initializers/inflections.rb
100644 → 100755
Empty file.
Empty file modified config/initializers/jbuilder.rb
100644 → 100755
Empty file.
Empty file modified config/initializers/json_param_key_transform.rb
100644 → 100755
Empty file.
Empty file modified config/initializers/mime_types.rb
100644 → 100755
Empty file.
Empty file modified config/initializers/new_framework_defaults_5_1.rb
100644 → 100755
Empty file.
Empty file modified config/initializers/session_store.rb
100644 → 100755
Empty file.
Empty file modified config/initializers/wrap_parameters.rb
100644 → 100755
Empty file.
Empty file modified config/locales/devise.en.yml
100644 → 100755
Empty file.
Empty file modified config/locales/en.yml
100644 → 100755
Empty file.
Empty file modified config/locales/responders.en.yml
100644 → 100755
Empty file.
Empty file modified config/puma.rb
100644 → 100755
Empty file.
Empty file modified config/routes.rb
100644 → 100755
Empty file.
Empty file modified config/secrets.yml
100644 → 100755
Empty file.
Empty file modified config/secrets.yml.enc
100644 → 100755
Empty file.
Empty file modified config/spring.rb
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion db/migrate/20160712045707_devise_create_users.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class DeviseCreateUsers < ActiveRecord::Migration
class DeviseCreateUsers < ActiveRecord::Migration[5.1]
def change
create_table :users do |t|
## Database authenticatable
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160712045739_add_profile_fields_to_users.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class AddProfileFieldsToUsers < ActiveRecord::Migration
class AddProfileFieldsToUsers < ActiveRecord::Migration[5.1]
def change
add_column :users, :username, :string
add_index :users, :username, unique: true
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160712052128_create_articles.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class CreateArticles < ActiveRecord::Migration
class CreateArticles < ActiveRecord::Migration[5.1]
def change
create_table :articles do |t|
t.string :title
Expand Down
3 changes: 1 addition & 2 deletions db/migrate/20160712054809_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# This migration comes from acts_as_taggable_on_engine (originally 1)
class ActsAsTaggableOnMigration < ActiveRecord::Migration
class ActsAsTaggableOnMigration < ActiveRecord::Migration[5.1]
def self.up
create_table :tags do |t|
t.string :name
Expand All @@ -22,7 +22,6 @@ def self.up
t.datetime :created_at
end

add_index :taggings, :tag_id
add_index :taggings, %i[taggable_id taggable_type context]
end

Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160712054810_add_missing_unique_indices.acts_as_taggable_on_engine.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# This migration comes from acts_as_taggable_on_engine (originally 2)
class AddMissingUniqueIndices < ActiveRecord::Migration
class AddMissingUniqueIndices < ActiveRecord::Migration[5.1]
def self.up
add_index :tags, :name, unique: true

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# This migration comes from acts_as_taggable_on_engine (originally 3)
class AddTaggingsCounterCacheToTags < ActiveRecord::Migration
class AddTaggingsCounterCacheToTags < ActiveRecord::Migration[5.1]
def self.up
add_column :tags, :taggings_count, :integer, default: 0

Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160712054812_add_missing_taggable_index.acts_as_taggable_on_engine.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# This migration comes from acts_as_taggable_on_engine (originally 4)
class AddMissingTaggableIndex < ActiveRecord::Migration
class AddMissingTaggableIndex < ActiveRecord::Migration[5.1]
def self.up
add_index :taggings, %i[taggable_id taggable_type context]
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This migration comes from acts_as_taggable_on_engine (originally 5)
# This migration is added to circumvent issue #623 and have special characters
# work properly
class ChangeCollationForTagNames < ActiveRecord::Migration
class ChangeCollationForTagNames < ActiveRecord::Migration[5.1]
def up
if ActsAsTaggableOn::Utils.using_mysql?
execute('ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE utf8_bin;')
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160712055201_create_favorites.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class CreateFavorites < ActiveRecord::Migration
class CreateFavorites < ActiveRecord::Migration[5.1]
def change
create_table :favorites do |t|
t.references :user, index: true, foreign_key: true
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160712061113_create_comments.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class CreateComments < ActiveRecord::Migration
class CreateComments < ActiveRecord::Migration[5.1]
def change
create_table :comments do |t|
t.text :body
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160712061614_acts_as_follower_migration.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class ActsAsFollowerMigration < ActiveRecord::Migration
class ActsAsFollowerMigration < ActiveRecord::Migration[5.1]
def self.up
create_table :follows, force: true do |t|
t.references :followable, polymorphic: true, null: false
Expand Down
116 changes: 56 additions & 60 deletions db/schema.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
Expand All @@ -14,93 +13,90 @@
ActiveRecord::Schema.define(version: 20160712061614) do

create_table "articles", force: :cascade do |t|
t.string "title"
t.string "slug"
t.text "body"
t.string "description"
t.integer "favorites_count"
t.integer "user_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "title"
t.string "slug"
t.text "body"
t.string "description"
t.integer "favorites_count"
t.integer "user_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["slug"], name: "index_articles_on_slug", unique: true
t.index ["user_id"], name: "index_articles_on_user_id"
end

add_index "articles", ["slug"], name: "index_articles_on_slug", unique: true
add_index "articles", ["user_id"], name: "index_articles_on_user_id"

create_table "comments", force: :cascade do |t|
t.text "body"
t.integer "user_id"
t.integer "article_id"
t.text "body"
t.integer "user_id"
t.integer "article_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["article_id"], name: "index_comments_on_article_id"
t.index ["user_id"], name: "index_comments_on_user_id"
end

add_index "comments", ["article_id"], name: "index_comments_on_article_id"
add_index "comments", ["user_id"], name: "index_comments_on_user_id"

create_table "favorites", force: :cascade do |t|
t.integer "user_id"
t.integer "article_id"
t.integer "user_id"
t.integer "article_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["article_id"], name: "index_favorites_on_article_id"
t.index ["user_id"], name: "index_favorites_on_user_id"
end

add_index "favorites", ["article_id"], name: "index_favorites_on_article_id"
add_index "favorites", ["user_id"], name: "index_favorites_on_user_id"

create_table "follows", force: :cascade do |t|
t.integer "followable_id", null: false
t.string "followable_type", null: false
t.integer "follower_id", null: false
t.string "follower_type", null: false
t.boolean "blocked", default: false, null: false
t.datetime "created_at"
t.datetime "updated_at"
t.string "followable_type"
t.integer "followable_id", null: false
t.string "follower_type"
t.integer "follower_id", null: false
t.boolean "blocked", default: false, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["followable_id", "followable_type"], name: "fk_followables"
t.index ["followable_type", "followable_id"], name: "index_follows_on_followable_type_and_followable_id"
t.index ["follower_id", "follower_type"], name: "fk_follows"
t.index ["follower_type", "follower_id"], name: "index_follows_on_follower_type_and_follower_id"
end

add_index "follows", ["followable_id", "followable_type"], name: "fk_followables"
add_index "follows", ["follower_id", "follower_type"], name: "fk_follows"

create_table "taggings", force: :cascade do |t|
t.integer "tag_id"
t.integer "taggable_id"
t.string "taggable_type"
t.integer "tagger_id"
t.string "tagger_type"
t.string "context", limit: 128
t.integer "tag_id"
t.string "taggable_type"
t.integer "taggable_id"
t.string "tagger_type"
t.integer "tagger_id"
t.string "context", limit: 128
t.datetime "created_at"
t.index ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true
t.index ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context"
t.index ["taggable_type", "taggable_id"], name: "index_taggings_on_taggable_type_and_taggable_id"
t.index ["tagger_type", "tagger_id"], name: "index_taggings_on_tagger_type_and_tagger_id"
end

add_index "taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true
add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context"

create_table "tags", force: :cascade do |t|
t.string "name"
t.string "name"
t.integer "taggings_count", default: 0
t.index ["name"], name: "index_tags_on_name", unique: true
end

add_index "tags", ["name"], name: "index_tags_on_name", unique: true

create_table "users", force: :cascade do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", default: 0, null: false
t.integer "sign_in_count", default: 0, null: false
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "username"
t.string "image"
t.text "bio"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "username"
t.string "image"
t.text "bio"
t.index ["email"], name: "index_users_on_email", unique: true
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
t.index ["username"], name: "index_users_on_username", unique: true
end

add_index "users", ["email"], name: "index_users_on_email", unique: true
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
add_index "users", ["username"], name: "index_users_on_username", unique: true

end
Empty file modified db/seeds.rb
100644 → 100755
Empty file.
Empty file modified lib/assets/.keep
100644 → 100755
Empty file.
Empty file modified lib/tasks/.keep
100644 → 100755
Empty file.
Empty file modified log/.keep
100644 → 100755
Empty file.
Empty file modified project-logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified public/404.html
100644 → 100755
Empty file.
Empty file modified public/422.html
100644 → 100755
Empty file.
Empty file modified public/500.html
100644 → 100755
Empty file.
Empty file modified public/favicon.ico
100644 → 100755
Empty file.
Empty file modified public/robots.txt
100644 → 100755
Empty file.
Empty file modified test/controllers/.keep
100644 → 100755
Empty file.
Empty file modified test/controllers/articles_controller_test.rb
100644 → 100755
Empty file.
Empty file modified test/fixtures/.keep
100644 → 100755
Empty file.
Empty file modified test/fixtures/articles.yml
100644 → 100755
Empty file.
Empty file modified test/fixtures/comments.yml
100644 → 100755
Empty file.
Empty file modified test/fixtures/favorites.yml
100644 → 100755
Empty file.
Empty file modified test/fixtures/users.yml
100644 → 100755
Empty file.
Empty file modified test/helpers/.keep
100644 → 100755
Empty file.
Empty file modified test/integration/.keep
100644 → 100755
Empty file.
Empty file modified test/mailers/.keep
100644 → 100755
Empty file.
Empty file modified test/models/.keep
100644 → 100755
Empty file.
Empty file modified test/models/article_test.rb
100644 → 100755
Empty file.
Empty file modified test/models/comment_test.rb
100644 → 100755
Empty file.
Empty file modified test/models/favorite_test.rb
100644 → 100755
Empty file.
Empty file modified test/models/user_test.rb
100644 → 100755
Empty file.
Empty file modified test/test_helper.rb
100644 → 100755
Empty file.
Empty file modified vendor/assets/javascripts/.keep
100644 → 100755
Empty file.
Empty file modified vendor/assets/stylesheets/.keep
100644 → 100755
Empty file.