GitHub PushEvent at 2014-11-26 08:03:02
Repository: mensagg
Actor: shin-szk-engineering
Payload: {"shas":[["1bbb945e749b0e9adefac43bc6537cd6fe76a6ee","1b09045adc25563ba7e1109faffde7df780c00f0@szk-engineering.com","[from now] 2014/11/26 17:02:55\n\ndiff --git a/Gemfile b/Gemfile\nindex 52bb4bc..a495e28 100644\n--- a/Gemfile\n+++ b/Gemfile\n@@ -46,7 +46,6 @@ group :development, :test do\n   gem 'annotate'\n   gem 'better_errors'\n   gem 'binding_of_caller'\n-  gem 'database_rewinder'\n   gem 'hirb'\n   gem 'hirb-unicode'\n   gem 'pry'\ndiff --git a/Gemfile.lock b/Gemfile.lock\nindex c182214..c513d7b 100644\n--- a/Gemfile.lock\n+++ b/Gemfile.lock\n@@ -86,7 +86,6 @@ GEM\n       term-ansicolor\n       thor\n     curb (0.8.6)\n-    database_rewinder (0.4.1)\n     debug_inspector (0.0.2)\n     debugger-linecache (1.2.0)\n     devise (3.4.1)\n@@ -302,7 +301,6 @@ DEPENDENCIES\n   coffee-rails (~> 4.0.0)\n   compass-rails\n   coveralls\n-  database_rewinder\n   devise\n   feedbag\n   feedjira\ndiff --git a/app/models/article.rb b/app/models/article.rb\nindex 4ada077..5532ce2 100644\n--- a/app/models/article.rb\n+++ b/app/models/article.rb\n@@ -1,3 +1,38 @@\n+# ## Schema Information\n+#\n+# Table name: `articles`\n+#\n+# ### Columns\n+#\n+# Name                          | Type               | Attributes\n+# ----------------------------- | ------------------ | ---------------------------\n+# **`id`**                      | `integer`          | `not null, primary key`\n+# **`feed_id`**                 | `integer`          |\n+# **`title`**                   | `string(255)`      |\n+# **`url`**                     | `string(255)`      |\n+# **`body`**                    | `text`             |\n+# **`comment`**                 | `text`             |\n+# **`kind`**                    | `integer`          |\n+# **`published`**               | `datetime`         |\n+# **`keyword_id`**              | `integer`          |\n+# **`article_has_keyword_id`**  | `integer`          |\n+# **`user_id`**                 | `integer`          |\n+# **`misc`**                    | `text`             |\n+# **`created_at`**              | `datetime`         |\n+# **`updated_at`**              | `datetime`         |\n+#\n+# ### Indexes\n+#\n+# * `index_articles_on_article_has_keyword_id`:\n+#     * **`article_has_keyword_id`**\n+# * `index_articles_on_feed_id`:\n+#     * **`feed_id`**\n+# * `index_articles_on_keyword_id`:\n+#     * **`keyword_id`**\n+# * `index_articles_on_user_id`:\n+#     * **`user_id`**\n+#\n+\n class Article < ActiveRecord::Base\n   belongs_to :feed\n   has_many :keywords, :through => :article_has_keywords\ndiff --git a/app/models/article_has_keyword.rb b/app/models/article_has_keyword.rb\nindex 3387a75..ec5901a 100644\n--- a/app/models/article_has_keyword.rb\n+++ b/app/models/article_has_keyword.rb\n@@ -1,3 +1,25 @@\n+# ## Schema Information\n+#\n+# Table name: `article_has_keywords`\n+#\n+# ### Columns\n+#\n+# Name              | Type               | Attributes\n+# ----------------- | ------------------ | ---------------------------\n+# **`id`**          | `integer`          | `not null, primary key`\n+# **`article_id`**  | `integer`          |\n+# **`keyword_id`**  | `integer`          |\n+# **`created_at`**  | `datetime`         |\n+# **`updated_at`**  | `datetime`         |\n+#\n+# ### Indexes\n+#\n+# * `index_article_has_keywords_on_article_id`:\n+#     * **`article_id`**\n+# * `index_article_has_keywords_on_keyword_id`:\n+#     * **`keyword_id`**\n+#\n+\n class ArticleHasKeyword < ActiveRecord::Base\n   belongs_to :article\n   belongs_to :keyword\ndiff --git a/app/models/category.rb b/app/models/category.rb\nindex d663c21..f87ed8d 100644\n--- a/app/models/category.rb\n+++ b/app/models/category.rb\n@@ -1,3 +1,24 @@\n+# ## Schema Information\n+#\n+# Table name: `categories`\n+#\n+# ### Columns\n+#\n+# Name              | Type               | Attributes\n+# ----------------- | ------------------ | ---------------------------\n+# **`id`**          | `integer`          | `not null, primary key`\n+# **`name`**        | `string(255)`      |\n+# **`user_id`**     | `integer`          |\n+# **`misc`**        | `text`             |\n+# **`created_at`**  | `datetime`         |\n+# **`updated_at`**  | `datetime`         |\n+#\n+# ### Indexes\n+#\n+# * `index_categories_on_user_id`:\n+#     * **`user_id`**\n+#\n+\n class Category < ActiveRecord::Base\n   has_many :feeds\n   belongs_to :user\ndiff --git a/app/models/feed.rb b/app/models/feed.rb\nindex 3a36962..87b903d 100644\n--- a/app/models/feed.rb\n+++ b/app/models/feed.rb\n@@ -1,3 +1,32 @@\n+# ## Schema Information\n+#\n+# Table name: `feeds`\n+#\n+# ### Columns\n+#\n+# Name                 | Type               | Attributes\n+# -------------------- | ------------------ | ---------------------------\n+# **`id`**             | `integer`          | `not null, primary key`\n+# **`name`**           | `string(255)`      |\n+# **`url`**            | `string(255)`      |\n+# **`endpoint`**       | `string(255)`      |\n+# **`etag`**           | `string(255)`      |\n+# **`last_modified`**  | `datetime`         |\n+# **`fetched_at`**     | `datetime`         |\n+# **`category_id`**    | `integer`          |\n+# **`user_id`**        | `integer`          |\n+# **`misc`**           | `text`             |\n+# **`created_at`**     | `datetime`         |\n+# **`updated_at`**     | `datetime`         |\n+#\n+# ### Indexes\n+#\n+# * `index_feeds_on_category_id`:\n+#     * **`category_id`**\n+# * `index_feeds_on_user_id`:\n+#     * **`user_id`**\n+#\n+\n class Feed < ActiveRecord::Base\n   belongs_to :category\n   has_many :articles\ndiff --git a/app/models/keyword.rb b/app/models/keyword.rb\nindex 817d3fd..5b8c886 100644\n--- a/app/models/keyword.rb\n+++ b/app/models/keyword.rb\n@@ -1,3 +1,32 @@\n+# ## Schema Information\n+#\n+# Table name: `keywords`\n+#\n+# ### Columns\n+#\n+# Name                          | Type               | Attributes\n+# ----------------------------- | ------------------ | ---------------------------\n+# **`id`**                      | `integer`          | `not null, primary key`\n+# **`name`**                    | `string(255)`      |\n+# **`article_id`**              | `integer`          |\n+# **`value_present`**           | `float`            |\n+# **`value_last_week`**         | `float`            |\n+# **`value_last_month`**        | `float`            |\n+# **`user_id`**                 | `integer`          |\n+# **`article_has_keyword_id`**  | `integer`          |\n+# **`created_at`**              | `datetime`         |\n+# **`updated_at`**              | `datetime`         |\n+#\n+# ### Indexes\n+#\n+# * `index_keywords_on_article_has_keyword_id`:\n+#     * **`article_has_keyword_id`**\n+# * `index_keywords_on_article_id`:\n+#     * **`article_id`**\n+# * `index_keywords_on_user_id`:\n+#     * **`user_id`**\n+#\n+\n class Keyword < ActiveRecord::Base\n   has_many :articles, :through => :article_has_keywords\n   has_many :article_has_keywords\ndiff --git a/app/models/user.rb b/app/models/user.rb\nindex 8dac97c..93d4e7c 100644\n--- a/app/models/user.rb\n+++ b/app/models/user.rb\n@@ -1,3 +1,33 @@\n+# ## Schema Information\n+#\n+# Table name: `users`\n+#\n+# ### Columns\n+#\n+# Name                          | Type               | Attributes\n+# ----------------------------- | ------------------ | ---------------------------\n+# **`id`**                      | `integer`          | `not null, primary key`\n+# **`email`**                   | `string(255)`      | `default(\"\"), not null`\n+# **`encrypted_password`**      | `string(255)`      | `default(\"\"), not null`\n+# **`reset_password_token`**    | `string(255)`      |\n+# **`reset_password_sent_at`**  | `datetime`         |\n+# **`remember_created_at`**     | `datetime`         |\n+# **`sign_in_count`**           | `integer`          | `default(0), not null`\n+# **`current_sign_in_at`**      | `datetime`         |\n+# **`last_sign_in_at`**         | `datetime`         |\n+# **`current_sign_in_ip`**      | `string(255)`      |\n+# **`last_sign_in_ip`**         | `string(255)`      |\n+# **`created_at`**              | `datetime`         |\n+# **`updated_at`**              | `datetime`         |\n+#\n+# ### Indexes\n+#\n+# * `index_users_on_email` (_unique_):\n+#     * **`email`**\n+# * `index_users_on_reset_password_token` (_unique_):\n+#     * **`reset_password_token`**\n+#\n+\n class User < ActiveRecord::Base\n   # Include default devise modules. Others available are:\n   # :confirmable, :lockable, :timeoutable and :omniauthable\ndiff --git a/config/routes.rb b/config/routes.rb\nindex 7e2c44b..37afbba 100644\n--- a/config/routes.rb\n+++ b/config/routes.rb\n@@ -1,3 +1,56 @@\n+# == Route Map\n+#\n+#                   Prefix Verb   URI Pattern                    Controller#Action\n+#                     root GET    /                              home#index\n+#                 keywords GET    /keywords(.:format)            keywords#index\n+#                          POST   /keywords(.:format)            keywords#create\n+#              new_keyword GET    /keywords/new(.:format)        keywords#new\n+#             edit_keyword GET    /keywords/:id/edit(.:format)   keywords#edit\n+#                  keyword GET    /keywords/:id(.:format)        keywords#show\n+#                          PATCH  /keywords/:id(.:format)        keywords#update\n+#                          PUT    /keywords/:id(.:format)        keywords#update\n+#                          DELETE /keywords/:id(.:format)        keywords#destroy\n+#                 articles GET    /articles(.:format)            articles#index\n+#                          POST   /articles(.:format)            articles#create\n+#              new_article GET    /articles/new(.:format)        articles#new\n+#             edit_article GET    /articles/:id/edit(.:format)   articles#edit\n+#                  article GET    /articles/:id(.:format)        articles#show\n+#                          PATCH  /articles/:id(.:format)        articles#update\n+#                          PUT    /articles/:id(.:format)        articles#update\n+#                          DELETE /articles/:id(.:format)        articles#destroy\n+#                    feeds GET    /feeds(.:format)               feeds#index\n+#                          POST   /feeds(.:format)               feeds#create\n+#                 new_feed GET    /feeds/new(.:format)           feeds#new\n+#                edit_feed GET    /feeds/:id/edit(.:format)      feeds#edit\n+#                     feed GET    /feeds/:id(.:format)           feeds#show\n+#                          PATCH  /feeds/:id(.:format)           feeds#update\n+#                          PUT    /feeds/:id(.:format)           feeds#update\n+#                          DELETE /feeds/:id(.:format)           feeds#destroy\n+#               categories GET    /categories(.:format)          categories#index\n+#                          POST   /categories(.:format)          categories#create\n+#             new_category GET    /categories/new(.:format)      categories#new\n+#            edit_category GET    /categories/:id/edit(.:format) categories#edit\n+#                 category GET    /categories/:id(.:format)      categories#show\n+#                          PATCH  /categories/:id(.:format)      categories#update\n+#                          PUT    /categories/:id(.:format)      categories#update\n+#                          DELETE /categories/:id(.:format)      categories#destroy\n+#         new_user_session GET    /users/sign_in(.:format)       devise/sessions#new\n+#             user_session POST   /users/sign_in(.:format)       devise/sessions#create\n+#     destroy_user_session DELETE /users/sign_out(.:format)      devise/sessions#destroy\n+#            user_password POST   /users/password(.:format)      devise/passwords#create\n+#        new_user_password GET    /users/password/new(.:format)  devise/passwords#new\n+#       edit_user_password GET    /users/password/edit(.:format) devise/passwords#edit\n+#                          PATCH  /users/password(.:format)      devise/passwords#update\n+#                          PUT    /users/password(.:format)      devise/passwords#update\n+# cancel_user_registration GET    /users/cancel(.:format)        devise/registrations#cancel\n+#        user_registration POST   /users(.:format)               devise/registrations#create\n+#    new_user_registration GET    /users/sign_up(.:format)       devise/registrations#new\n+#   edit_user_registration GET    /users/edit(.:format)          devise/registrations#edit\n+#                          PATCH  /users(.:format)               devise/registrations#update\n+#                          PUT    /users(.:format)               devise/registrations#update\n+#                          DELETE /users(.:format)               devise/registrations#destroy\n+#\n+\n Rails.application.routes.draw do\n   root 'home#index'\n\ndiff --git a/lib/tasks/auto_annotate_models.rake b/lib/tasks/auto_annotate_models.rake\nnew file mode 100644\nindex 0000000..e3a543c\n--- /dev/null\n+++ b/lib/tasks/auto_annotate_models.rake\n@@ -0,0 +1,34 @@\n+# NOTE: only doing this in development as some production environments (Heroku)\n+# NOTE: are sensitive to local FS writes, and besides -- it's just not proper\n+# NOTE: to have a dev-mode tool do its thing in production.\n+if Rails.env.development?\n+  task :set_annotation_options do\n+    # You can override any of these by setting an environment variable of the\n+    # same name.\n+    Annotate.set_defaults({\n+      'position_in_routes'   => \"before\",\n+      'position_in_class'    => \"before\",\n+      'position_in_test'     => \"before\",\n+      'position_in_fixture'  => \"before\",\n+      'position_in_factory'  => \"before\",\n+      'show_indexes'         => \"true\",\n+      'simple_indexes'       => \"true\",\n+      'model_dir'            => \"app/models\",\n+      'include_version'      => \"false\",\n+      'require'              => \"\",\n+      'exclude_tests'        => \"false\",\n+      'exclude_fixtures'     => \"false\",\n+      'exclude_factories'    => \"false\",\n+      'ignore_model_sub_dir' => \"false\",\n+      'skip_on_db_migrate'   => \"false\",\n+      'format_bare'          => \"true\",\n+      'format_rdoc'          => \"false\",\n+      'format_markdown'      => \"true\",\n+      'sort'                 => \"false\",\n+      'force'                => \"false\",\n+      'trace'                => \"false\",\n+    })\n+  end\n+\n+  Annotate.load_tasks\n+end\ndiff --git a/lib/tasks/diagram.rake b/lib/tasks/diagram.rake\ndeleted file mode 100644\nindex f592da6..0000000\n--- a/lib/tasks/diagram.rake\n+++ /dev/null\n@@ -1,2 +0,0 @@\n-namespace :diagram do\n-end\ndiff --git a/spec/models/article_has_keyword_spec.rb b/spec/models/article_has_keyword_spec.rb\nindex fa8c834..b60fe07 100644\n--- a/spec/models/article_has_keyword_spec.rb\n+++ b/spec/models/article_has_keyword_spec.rb\n@@ -1,3 +1,25 @@\n+# ## Schema Information\n+#\n+# Table name: `article_has_keywords`\n+#\n+# ### Columns\n+#\n+# Name              | Type               | Attributes\n+# ----------------- | ------------------ | ---------------------------\n+# **`id`**          | `integer`          | `not null, primary key`\n+# **`article_id`**  | `integer`          |\n+# **`keyword_id`**  | `integer`          |\n+# **`created_at`**  | `datetime`         |\n+# **`updated_at`**  | `datetime`         |\n+#\n+# ### Indexes\n+#\n+# * `index_article_has_keywords_on_article_id`:\n+#     * **`article_id`**\n+# * `index_article_has_keywords_on_keyword_id`:\n+#     * **`keyword_id`**\n+#\n+\n require 'rails_helper'\n\n RSpec.describe ArticleHasKeyword, :type => :model do\ndiff --git a/spec/models/article_spec.rb b/spec/models/article_spec.rb\nindex cfced13..07933a8 100644\n--- a/spec/models/article_spec.rb\n+++ b/spec/models/article_spec.rb\n@@ -1,3 +1,38 @@\n+# ## Schema Information\n+#\n+# Table name: `articles`\n+#\n+# ### Columns\n+#\n+# Name                          | Type               | Attributes\n+# ----------------------------- | ------------------ | ---------------------------\n+# **`id`**                      | `integer`          | `not null, primary key`\n+# **`feed_id`**                 | `integer`          |\n+# **`title`**                   | `string(255)`      |\n+# **`url`**                     | `string(255)`      |\n+# **`body`**                    | `text`             |\n+# **`comment`**                 | `text`             |\n+# **`kind`**                    | `integer`          |\n+# **`published`**               | `datetime`         |\n+# **`keyword_id`**              | `integer`          |\n+# **`article_has_keyword_id`**  | `integer`          |\n+# **`user_id`**                 | `integer`          |\n+# **`misc`**                    | `text`             |\n+# **`created_at`**              | `datetime`         |\n+# **`updated_at`**              | `datetime`         |\n+#\n+# ### Indexes\n+#\n+# * `index_articles_on_article_has_keyword_id`:\n+#     * **`article_has_keyword_id`**\n+# * `index_articles_on_feed_id`:\n+#     * **`feed_id`**\n+# * `index_articles_on_keyword_id`:\n+#     * **`keyword_id`**\n+# * `index_articles_on_user_id`:\n+#     * **`user_id`**\n+#\n+\n require 'rails_helper'\n\n RSpec.describe Article, :type => :model do\ndiff --git a/spec/models/category_spec.rb b/spec/models/category_spec.rb\nindex 880d824..3c2f278 100644\n--- a/spec/models/category_spec.rb\n+++ b/spec/models/category_spec.rb\n@@ -1,3 +1,24 @@\n+# ## Schema Information\n+#\n+# Table name: `categories`\n+#\n+# ### Columns\n+#\n+# Name              | Type               | Attributes\n+# ----------------- | ------------------ | ---------------------------\n+# **`id`**          | `integer`          | `not null, primary key`\n+# **`name`**        | `string(255)`      |\n+# **`user_id`**     | `integer`          |\n+# **`misc`**        | `text`             |\n+# **`created_at`**  | `datetime`         |\n+# **`updated_at`**  | `datetime`         |\n+#\n+# ### Indexes\n+#\n+# * `index_categories_on_user_id`:\n+#     * **`user_id`**\n+#\n+\n require 'rails_helper'\n\n RSpec.describe Category, :type => :model do\ndiff --git a/spec/models/feed_spec.rb b/spec/models/feed_spec.rb\nindex 2f4e517..ac0d617 100644\n--- a/spec/models/feed_spec.rb\n+++ b/spec/models/feed_spec.rb\n@@ -1,3 +1,32 @@\n+# ## Schema Information\n+#\n+# Table name: `feeds`\n+#\n+# ### Columns\n+#\n+# Name                 | Type               | Attributes\n+# -------------------- | ------------------ | ---------------------------\n+# **`id`**             | `integer`          | `not null, primary key`\n+# **`name`**           | `string(255)`      |\n+# **`url`**            | `string(255)`      |\n+# **`endpoint`**       | `string(255)`      |\n+# **`etag`**           | `string(255)`      |\n+# **`last_modified`**  | `datetime`         |\n+# **`fetched_at`**     | `datetime`         |\n+# **`category_id`**    | `integer`          |\n+# **`user_id`**        | `integer`          |\n+# **`misc`**           | `text`             |\n+# **`created_at`**     | `datetime`         |\n+# **`updated_at`**     | `datetime`         |\n+#\n+# ### Indexes\n+#\n+# * `index_feeds_on_category_id`:\n+#     * **`category_id`**\n+# * `index_feeds_on_user_id`:\n+#     * **`user_id`**\n+#\n+\n require 'rails_helper'\n\n RSpec.describe Feed, :type => :model do\ndiff --git a/spec/models/keyword_spec.rb b/spec/models/keyword_spec.rb\nindex 611615a..5b03d39 100644\n--- a/spec/models/keyword_spec.rb\n+++ b/spec/models/keyword_spec.rb\n@@ -1,3 +1,32 @@\n+# ## Schema Information\n+#\n+# Table name: `keywords`\n+#\n+# ### Columns\n+#\n+# Name                          | Type               | Attributes\n+# ----------------------------- | ------------------ | ---------------------------\n+# **`id`**                      | `integer`          | `not null, primary key`\n+# **`name`**                    | `string(255)`      |\n+# **`article_id`**              | `integer`          |\n+# **`value_present`**           | `float`            |\n+# **`value_last_week`**         | `float`            |\n+# **`value_last_month`**        | `float`            |\n+# **`user_id`**                 | `integer`          |\n+# **`article_has_keyword_id`**  | `integer`          |\n+# **`created_at`**              | `datetime`         |\n+# **`updated_at`**              | `datetime`         |\n+#\n+# ### Indexes\n+#\n+# * `index_keywords_on_article_has_keyword_id`:\n+#     * **`article_has_keyword_id`**\n+# * `index_keywords_on_article_id`:\n+#     * **`article_id`**\n+# * `index_keywords_on_user_id`:\n+#     * **`user_id`**\n+#\n+\n require 'rails_helper'\n\n RSpec.describe Keyword, :type => :model do\ndiff --git a/spec/rails_helper.rb b/spec/rails_helper.rb\nindex 38e0e6e..176e657 100644\n--- a/spec/rails_helper.rb\n+++ b/spec/rails_helper.rb\n@@ -5,7 +5,6 @@ require File.expand_path(\"../../config/environment\", __FILE__)\n require 'rspec/rails'\n # Add additional requires below this line. Rails is not loaded until this point!\n require 'devise'\n-require 'database_rewinder'\n\n require 'coveralls'\n Coveralls.wear!\n@@ -56,13 +55,5 @@ RSpec.configure do |config|\n   # https://relishapp.com/rspec/rspec-rails/docs\n   config.infer_spec_type_from_file_location!\n\n-  config.before :suite do\n-    DatabaseRewinder.clean_all\n-  end\n-\n-  config.after :each do\n-    DatabaseRewinder.clean\n-  end\n-\n   config.include Devise::TestHelpers, :type => :controller\n end","Shin'ichiro SUZUKI",true]],"size":1,"ref":"refs/heads/master","head":"1bbb945e749b0e9adefac43bc6537cd6fe76a6ee"}