3scale/porta

View on GitHub
db/migrate/20121018100514_removing_bcms_tables.rb

Summary

Maintainability
D
1 day
Test Coverage

Method down has 586 lines of code (exceeds 25 allowed). Consider refactoring.
Wontfix

  def self.down
    create_table "account_group_memberships", :force => true do |t|
      t.integer "account_id", :limit => 8
      t.integer "group_id",   :limit => 8
      t.integer "tenant_id",  :limit => 8
Severity: Major
Found in db/migrate/20121018100514_removing_bcms_tables.rb - About 2 days to fix

    File 20121018100514_removing_bcms_tables.rb has 632 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    class RemovingBcmsTables < ActiveRecord::Migration
      def self.up
        drop_table :account_group_memberships
        drop_table :app_exhibits
        drop_table :assets
    Severity: Major
    Found in db/migrate/20121018100514_removing_bcms_tables.rb - About 1 day to fix

      Method up has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def self.up
          drop_table :account_group_memberships
          drop_table :app_exhibits
          drop_table :assets
          drop_table :attachment_versions
      Severity: Minor
      Found in db/migrate/20121018100514_removing_bcms_tables.rb - About 1 hr to fix

        RemovingBcmsTables#self.down has approx 545 statements
        Open

          def self.down

        A method with Too Many Statements is any method that has a large number of lines.

        Too Many Statements warns about any method that has more than 5 statements. Reek's smell detector for Too Many Statements counts +1 for every simple statement in a method and +1 for every statement within a control structure (if, else, case, when, for, while, until, begin, rescue) but it doesn't count the control structure itself.

        So the following method would score +6 in Reek's statement-counting algorithm:

        def parse(arg, argv, &error)
          if !(val = arg) and (argv.empty? or /\A-/ =~ (val = argv[0]))
            return nil, block, nil                                         # +1
          end
          opt = (val = parse_arg(val, &error))[1]                          # +2
          val = conv_arg(*val)                                             # +3
          if opt and !arg
            argv.shift                                                     # +4
          else
            val[0] = nil                                                   # +5
          end
          val                                                              # +6
        end

        (You might argue that the two assigments within the first @if@ should count as statements, and that perhaps the nested assignment should count as +2.)

        RemovingBcmsTables#self.up has approx 40 statements
        Open

          def self.up

        A method with Too Many Statements is any method that has a large number of lines.

        Too Many Statements warns about any method that has more than 5 statements. Reek's smell detector for Too Many Statements counts +1 for every simple statement in a method and +1 for every statement within a control structure (if, else, case, when, for, while, until, begin, rescue) but it doesn't count the control structure itself.

        So the following method would score +6 in Reek's statement-counting algorithm:

        def parse(arg, argv, &error)
          if !(val = arg) and (argv.empty? or /\A-/ =~ (val = argv[0]))
            return nil, block, nil                                         # +1
          end
          opt = (val = parse_arg(val, &error))[1]                          # +2
          val = conv_arg(*val)                                             # +3
          if opt and !arg
            argv.shift                                                     # +4
          else
            val[0] = nil                                                   # +5
          end
          val                                                              # +6
        end

        (You might argue that the two assigments within the first @if@ should count as statements, and that perhaps the nested assignment should count as +2.)

        RemovingBcmsTables#self.down calls 't.datetime "published_at"' 2 times
        Open

              t.datetime "published_at"
              t.boolean  "published",                                 :default => false
              t.boolean  "deleted",                                   :default => false
              t.boolean  "archived",                                  :default => false
              t.string   "version_comment"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "attachment_content_type"' 2 times
        Open

              t.string   "attachment_content_type"
              t.integer  "attachment_file_size"
              t.string   "title"
              t.string   "url"
              t.text     "description"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "format"' 4 times
        Open

              t.string   "format"
              t.text     "template"
              t.boolean  "published",                    :default => false
              t.boolean  "deleted",                      :default => false
              t.boolean  "archived",                     :default => false

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "language"' 2 times
        Open

              t.string   "language"
              t.boolean  "cacheable",                       :default => false
              t.boolean  "hidden",                          :default => false
              t.boolean  "published",                       :default => false
              t.boolean  "deleted",                         :default => false

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "notes"' 2 times
        Open

              t.string   "notes"
              t.integer  "tenant_id",       :limit => 8
            end
            add_index "dynamic_view_versions", ["account_id"], :name => "index_dynamic_view_versions_on_account_id"
            add_index "dynamic_view_versions", ["dynamic_view_id"], :name => "index_dynamic_view_versions_on_dynamic_view_id"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "title"' 4 times
        Open

              t.string   "title"
              t.string   "url"
              t.text     "description"
              t.datetime "created_at"
              t.datetime "updated_at"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.boolean "archived", :default => false' 21 times
        Open

              t.boolean  "archived",                     :default => false
              t.string   "version_comment"
              t.integer  "created_by_id",   :limit => 8
              t.integer  "updated_by_id",   :limit => 8
              t.integer  "account_id",      :limit => 8

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.integer "page_id", :limit => 8' 3 times
        Open

              t.integer  "page_id",             :limit => 8
              t.integer  "page_version"
              t.integer  "connectable_id",      :limit => 8
              t.string   "connectable_type",    :limit => 50
              t.integer  "connectable_version"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.integer "group_id", :limit => 8' 5 times
        Open

              t.integer "group_id",   :limit => 8
              t.integer "tenant_id",  :limit => 8
            end
            add_index "account_group_memberships", ["account_id"], :name => "idx_account_id"
            add_index "account_group_memberships", ["group_id"], :name => "idx_group_id"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "file_extension"' 2 times
        Open

              t.string   "file_extension"
              t.string   "file_type"
              t.integer  "file_size"
              t.datetime "created_at"
              t.datetime "updated_at"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "url"' 5 times
        Open

              t.string   "url"
              t.text     "description"
              t.datetime "created_at"
              t.datetime "updated_at"
              t.integer  "position"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.boolean "deleted", :default => false' 21 times
        Open

              t.boolean  "deleted",                      :default => false
              t.boolean  "archived",                     :default => false
              t.string   "version_comment"
              t.integer  "created_by_id",   :limit => 8
              t.integer  "updated_by_id",   :limit => 8

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.integer "comments_count"' 2 times
        Open

              t.integer  "comments_count"
              t.datetime "published_at"
              t.boolean  "published",                                 :default => false
              t.boolean  "deleted",                                   :default => false
              t.boolean  "archived",                                  :default => false

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.integer "version"' 20 times
        Open

              t.integer  "version"
              t.string   "file_path"
              t.string   "file_location"
              t.string   "file_extension"
              t.string   "file_type"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.integer "tenant_id", :limit => 8' 35 times
        Open

              t.integer "tenant_id",  :limit => 8
            end
            add_index "account_group_memberships", ["account_id"], :name => "idx_account_id"
            add_index "account_group_memberships", ["group_id"], :name => "idx_group_id"
            create_table "app_exhibits", :force => true do |t|

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "author"' 2 times
        Open

              t.string   "author"
              t.string   "email"
              t.string   "url"
              t.string   "ip"
              t.text     "body"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "file_path"' 2 times
        Open

              t.string   "file_path"
              t.string   "file_location"
              t.string   "file_extension"
              t.string   "file_type"
              t.integer  "file_size"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.integer "post_id", :limit => 8' 2 times
        Open

              t.integer  "post_id",         :limit => 8
              t.string   "author"
              t.string   "email"
              t.string   "url"
              t.string   "ip"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.integer "account_id", :limit => 8' 23 times
        Open

              t.integer "account_id", :limit => 8
              t.integer "group_id",   :limit => 8
              t.integer "tenant_id",  :limit => 8
            end
            add_index "account_group_memberships", ["account_id"], :name => "idx_account_id"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.text "summary"' 2 times
        Open

              t.text     "summary"
              t.text     "body"
              t.integer  "comments_count"
              t.datetime "published_at"
              t.boolean  "published",                                 :default => false

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 'create_table "content_type_groups", :force => true do |t| ... end' 2 times
        Open

            create_table "content_type_groups", :force => true do |t|
              t.string   "name"
              t.datetime "created_at"
              t.datetime "updated_at"
            end

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.datetime "updated_at"' 36 times
        Open

              t.datetime "updated_at"
              t.integer  "position"
              t.integer  "tenant_id",               :limit => 8
            end
            create_table "assets", :force => true do |t|

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.text "content", :limit => 2147483647' 2 times
        Open

              t.text     "content",             :limit => 2147483647
              t.boolean  "published",                                 :default => false
              t.boolean  "deleted",                                   :default => false
              t.boolean  "archived",                                  :default => false
              t.string   "version_comment"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.text "content_with_markup", :limit => 2147483647' 4 times
        Open

              t.text     "content_with_markup", :limit => 2147483647
              t.integer  "account_id",          :limit => 8
              t.integer  "tenant_id",           :limit => 8
            end
            add_index "blog_post_versions", ["account_id"], :name => "index_blog_post_versions_on_account_id"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.integer "attachment_file_size"' 2 times
        Open

              t.integer  "attachment_file_size"
              t.string   "title"
              t.string   "url"
              t.text     "description"
              t.datetime "created_at"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.integer "file_size"' 2 times
        Open

              t.integer  "file_size"
              t.datetime "created_at"
              t.datetime "updated_at"
              t.string   "name"
              t.boolean  "published",                    :default => false

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "file_location"' 2 times
        Open

              t.string   "file_location"
              t.string   "file_extension"
              t.string   "file_type"
              t.integer  "file_size"
              t.datetime "created_at"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "handler"' 2 times
        Open

              t.string   "handler"
              t.text     "body"
              t.datetime "created_at"
              t.datetime "updated_at"
              t.boolean  "published",                    :default => false

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.boolean "hidden", :default => false' 2 times
        Open

              t.boolean  "hidden",                          :default => false
              t.boolean  "published",                       :default => false
              t.boolean  "deleted",                         :default => false
              t.boolean  "archived",                        :default => false
              t.string   "version_comment"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.integer "created_by_id", :limit => 8' 21 times
        Open

              t.integer  "created_by_id",   :limit => 8
              t.integer  "updated_by_id",   :limit => 8
              t.integer  "account_id",      :limit => 8
              t.integer  "tenant_id",       :limit => 8
            end

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.integer "lock_version", :default => 0' 10 times
        Open

              t.integer  "lock_version",                :default => 0
              t.string   "file_path"
              t.string   "file_location"
              t.string   "file_extension"
              t.string   "file_type"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.text "description"' 3 times
        Open

              t.text     "description"
              t.datetime "created_at"
              t.datetime "updated_at"
              t.integer  "position"
              t.integer  "tenant_id",               :limit => 8

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.integer "attachment_version"' 2 times
        Open

              t.integer  "attachment_version"
              t.boolean  "published",                       :default => false
              t.boolean  "deleted",                         :default => false
              t.boolean  "archived",                        :default => false
              t.string   "version_comment"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.integer "blog_id", :limit => 8' 5 times
        Open

              t.integer  "blog_id",                  :limit => 8
              t.integer  "group_id",                 :limit => 8
              t.string   "name"
              t.boolean  "published",                             :default => false
              t.boolean  "deleted",                               :default => false

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "markup_type", :default => "simple"' 4 times
        Open

              t.string   "markup_type",                               :default => "simple"
              t.text     "content_with_markup", :limit => 2147483647
              t.integer  "account_id",          :limit => 8
              t.integer  "tenant_id",           :limit => 8
            end

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.text "keywords"' 2 times
        Open

              t.text     "keywords"
              t.string   "language"
              t.boolean  "cacheable",                       :default => false
              t.boolean  "hidden",                          :default => false
              t.boolean  "published",                       :default => false

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.boolean "published", :default => false' 20 times
        Open

              t.boolean  "published",                    :default => false
              t.boolean  "deleted",                      :default => false
              t.boolean  "archived",                     :default => false
              t.string   "version_comment"
              t.integer  "created_by_id",   :limit => 8

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.integer "attachment_id", :limit => 8' 3 times
        Open

              t.integer  "attachment_id",   :limit => 8
              t.integer  "version"
              t.string   "file_path"
              t.string   "file_location"
              t.string   "file_extension"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "name"' 31 times
        Open

              t.string   "name"
              t.boolean  "published",                    :default => false
              t.boolean  "deleted",                      :default => false
              t.boolean  "archived",                     :default => false
              t.string   "version_comment"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "type"' 6 times
        Open

              t.string   "type"
              t.string   "name"
              t.string   "format"
              t.string   "handler"
              t.text     "body"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.integer "permission_id", :limit => 8' 2 times
        Open

              t.integer "permission_id", :limit => 8
              t.integer "tenant_id",     :limit => 8
            end
            create_table "group_type_permissions", :force => true do |t|
              t.integer "group_type_id", :limit => 8

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "file_type"' 2 times
        Open

              t.string   "file_type"
              t.integer  "file_size"
              t.datetime "created_at"
              t.datetime "updated_at"
              t.string   "name"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.text "headers"' 2 times
        Open

              t.text     "headers"
              t.string   "notes"
              t.integer  "tenant_id",       :limit => 8
            end
            add_index "dynamic_view_versions", ["account_id"], :name => "index_dynamic_view_versions_on_account_id"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 'create_table "content_type_groups", :force => true' 2 times
        Open

            create_table "content_type_groups", :force => true do |t|
              t.string   "name"
              t.datetime "created_at"
              t.datetime "updated_at"
            end

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "path"' 3 times
        Open

              t.string   "path"
              t.string   "template_file_name"
              t.text     "description"
              t.text     "keywords"
              t.string   "language"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "slug"' 2 times
        Open

              t.string   "slug"
              t.text     "summary"
              t.text     "body"
              t.integer  "comments_count"
              t.datetime "published_at"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "version_comment"' 10 times
        Open

              t.string   "version_comment"
              t.integer  "created_by_id",   :limit => 8
              t.integer  "updated_by_id",   :limit => 8
              t.integer  "account_id",      :limit => 8
              t.integer  "tenant_id",       :limit => 8

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.boolean "new_window", :default => false' 2 times
        Open

              t.boolean  "new_window",                   :default => false
              t.datetime "created_at"
              t.datetime "updated_at"
              t.boolean  "published",                    :default => false
              t.boolean  "deleted",                      :default => false

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.datetime "created_at"' 36 times
        Open

              t.datetime "created_at"
              t.datetime "updated_at"
              t.integer  "position"
              t.integer  "tenant_id",               :limit => 8
            end

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.integer "author_id", :limit => 8' 2 times
        Open

              t.integer  "author_id",           :limit => 8
              t.integer  "category_id",         :limit => 8
              t.string   "name"
              t.string   "slug"
              t.text     "summary"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.integer "updated_by_id", :limit => 8' 21 times
        Open

              t.integer  "updated_by_id",   :limit => 8
              t.integer  "account_id",      :limit => 8
              t.integer  "tenant_id",       :limit => 8
            end
            add_index "attachment_versions", ["account_id"], :name => "index_attachment_versions_on_account_id"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "attachment_file_name"' 2 times
        Open

              t.string   "attachment_file_name"
              t.string   "attachment_content_type"
              t.integer  "attachment_file_size"
              t.string   "title"
              t.string   "url"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.boolean "cacheable", :default => false' 2 times
        Open

              t.boolean  "cacheable",                       :default => false
              t.boolean  "hidden",                          :default => false
              t.boolean  "published",                       :default => false
              t.boolean  "deleted",                         :default => false
              t.boolean  "archived",                        :default => false

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "ip"' 2 times
        Open

              t.string   "ip"
              t.text     "body"
              t.string   "name"
              t.boolean  "published",                    :default => false
              t.boolean  "deleted",                      :default => false

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.text "body"' 6 times
        Open

              t.text     "body"
              t.string   "name"
              t.boolean  "published",                    :default => false
              t.boolean  "deleted",                      :default => false
              t.boolean  "archived",                     :default => false

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.text "template"' 2 times
        Open

              t.text     "template"
              t.boolean  "published",                    :default => false
              t.boolean  "deleted",                      :default => false
              t.boolean  "archived",                     :default => false
              t.string   "version_comment"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.integer "category_id", :limit => 8' 2 times
        Open

              t.integer  "category_id",         :limit => 8
              t.string   "name"
              t.string   "slug"
              t.text     "summary"
              t.text     "body"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.integer "position"' 4 times
        Open

              t.integer  "position"
              t.integer  "tenant_id",               :limit => 8
            end
            create_table "assets", :force => true do |t|
              t.integer  "account_id",              :limit => 8

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down calls 't.string "email"' 2 times
        Open

              t.string   "email"
              t.string   "url"
              t.string   "ip"
              t.text     "body"
              t.string   "name"

        Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

        Reek implements a check for Duplicate Method Call.

        Example

        Here's a very much simplified and contrived example. The following method will report a warning:

        def double_thing()
          @other.thing + @other.thing
        end

        One quick approach to silence Reek would be to refactor the code thus:

        def double_thing()
          thing = @other.thing
          thing + thing
        end

        A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

        class Other
          def double_thing()
            thing + thing
          end
        end

        The approach you take will depend on balancing other factors in your code.

        RemovingBcmsTables#self.down has the variable name 't'
        Open

            create_table "account_group_memberships", :force => true do |t|
              t.integer "account_id", :limit => 8
              t.integer "group_id",   :limit => 8
              t.integer "tenant_id",  :limit => 8
            end

        An Uncommunicative Variable Name is a variable name that doesn't communicate its intent well enough.

        Poor names make it hard for the reader to build a mental picture of what's going on in the code. They can also be mis-interpreted; and they hurt the flow of reading, because the reader must slow down to interpret the names.

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

            create_table "wiki_pages", :force => true do |t|
              t.integer  "account_id", :limit => 8
              t.string   "title"
              t.text     "content"
              t.datetime "created_at"
        Severity: Minor
        Found in db/migrate/20121018100514_removing_bcms_tables.rb and 2 other locations - About 35 mins to fix
        db/migrate/20121018100514_removing_bcms_tables.rb on lines 66..74
        db/migrate/20121018100514_removing_bcms_tables.rb on lines 489..497

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 35.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

            create_table "page_route_options", :force => true do |t|
              t.integer  "page_route_id", :limit => 8
              t.string   "type"
              t.string   "name"
              t.string   "value"
        Severity: Minor
        Found in db/migrate/20121018100514_removing_bcms_tables.rb and 2 other locations - About 35 mins to fix
        db/migrate/20121018100514_removing_bcms_tables.rb on lines 66..74
        db/migrate/20121018100514_removing_bcms_tables.rb on lines 623..631

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 35.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

            create_table "assets", :force => true do |t|
              t.integer  "account_id",              :limit => 8
              t.string   "attachment_file_name"
              t.string   "attachment_content_type"
              t.integer  "attachment_file_size"
        Severity: Minor
        Found in db/migrate/20121018100514_removing_bcms_tables.rb and 2 other locations - About 35 mins to fix
        db/migrate/20121018100514_removing_bcms_tables.rb on lines 489..497
        db/migrate/20121018100514_removing_bcms_tables.rb on lines 623..631

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 35.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 7 locations. Consider refactoring.
        Open

            create_table "permissions", :force => true do |t|
              t.string   "name"
              t.string   "full_name"
              t.string   "description"
              t.string   "for_module"
        Severity: Minor
        Found in db/migrate/20121018100514_removing_bcms_tables.rb and 6 other locations - About 15 mins to fix
        db/migrate/20100125103539_browser_cms_tables.rb on lines 252..258
        db/migrate/20100125103539_browser_cms_tables.rb on lines 261..267
        db/migrate/20100125103539_browser_cms_tables.rb on lines 313..319
        db/migrate/20100125103539_browser_cms_tables.rb on lines 346..352
        db/migrate/20100125103539_browser_cms_tables.rb on lines 365..371
        db/migrate/20111205143403_dropping_applications_and_application_tokens.rb on lines 15..21

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 26.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

            create_table "group_permissions", :force => true do |t|
              t.integer "group_id",      :limit => 8
              t.integer "permission_id", :limit => 8
              t.integer "tenant_id",     :limit => 8
            end
        Severity: Minor
        Found in db/migrate/20121018100514_removing_bcms_tables.rb and 2 other locations - About 15 mins to fix
        db/migrate/20121018100514_removing_bcms_tables.rb on lines 46..50
        db/migrate/20121018100514_removing_bcms_tables.rb on lines 616..620

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 26.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

            create_table "user_group_memberships", :force => true do |t|
              t.integer "user_id",   :limit => 8
              t.integer "group_id",  :limit => 8
              t.integer "tenant_id", :limit => 8
            end
        Severity: Minor
        Found in db/migrate/20121018100514_removing_bcms_tables.rb and 2 other locations - About 15 mins to fix
        db/migrate/20121018100514_removing_bcms_tables.rb on lines 46..50
        db/migrate/20121018100514_removing_bcms_tables.rb on lines 390..394

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 26.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

            create_table "account_group_memberships", :force => true do |t|
              t.integer "account_id", :limit => 8
              t.integer "group_id",   :limit => 8
              t.integer "tenant_id",  :limit => 8
            end
        Severity: Minor
        Found in db/migrate/20121018100514_removing_bcms_tables.rb and 2 other locations - About 15 mins to fix
        db/migrate/20121018100514_removing_bcms_tables.rb on lines 390..394
        db/migrate/20121018100514_removing_bcms_tables.rb on lines 616..620

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 26.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        There are no issues that match your filters.

        Category
        Status