activerecord-reputation-system 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +0 -1
- data/lib/generators/reputation_system/templates/change_evaluations_index_to_unique.rb +27 -0
- data/lib/generators/reputation_system/templates/change_reputation_messages_index_to_unique.rb +28 -0
- data/lib/generators/reputation_system/templates/change_reputations_index_to_unique.rb +27 -0
- data/lib/reputation_system/version.rb +1 -1
- metadata +103 -109
    
        data/README.md
    CHANGED
    
    
| @@ -0,0 +1,27 @@ | |
| 1 | 
            +
            ##
         | 
| 2 | 
            +
            #  Copyright 2012 Twitter, Inc
         | 
| 3 | 
            +
            #
         | 
| 4 | 
            +
            #  Licensed under the Apache License, Version 2.0 (the "License");
         | 
| 5 | 
            +
            #  you may not use this file except in compliance with the License.
         | 
| 6 | 
            +
            #  You may obtain a copy of the License at
         | 
| 7 | 
            +
            #
         | 
| 8 | 
            +
            #  http://www.apache.org/licenses/LICENSE-2.0
         | 
| 9 | 
            +
            #
         | 
| 10 | 
            +
            #  Unless required by applicable law or agreed to in writing, software
         | 
| 11 | 
            +
            #  distributed under the License is distributed on an "AS IS" BASIS,
         | 
| 12 | 
            +
            #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         | 
| 13 | 
            +
            #  See the License for the specific language governing permissions and
         | 
| 14 | 
            +
            #  limitations under the License.
         | 
| 15 | 
            +
            ##
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            class ChangeEvaluationsIndexToUnique < ActiveRecord::Migration
         | 
| 18 | 
            +
              def self.up
         | 
| 19 | 
            +
                remove_index :rs_evaluations, :name => "index_rs_evaluations_on_reputation_name_and_source_and_target"
         | 
| 20 | 
            +
                add_index :rs_evaluations, [:reputation_name, :source_id, :source_type, :target_id, :target_type], :name => "index_rs_evaluations_on_reputation_name_and_source_and_target", :unique => true
         | 
| 21 | 
            +
              end
         | 
| 22 | 
            +
             | 
| 23 | 
            +
              def self.down
         | 
| 24 | 
            +
                remove_index :rs_evaluations, :name => "index_rs_evaluations_on_reputation_name_and_source_and_target"
         | 
| 25 | 
            +
                add_index :rs_evaluations, [:reputation_name, :source_id, :source_type, :target_id, :target_type], :name => "index_rs_evaluations_on_reputation_name_and_source_and_target"
         | 
| 26 | 
            +
              end
         | 
| 27 | 
            +
            end
         | 
| @@ -0,0 +1,28 @@ | |
| 1 | 
            +
            ##
         | 
| 2 | 
            +
            #  Copyright 2012 Twitter, Inc
         | 
| 3 | 
            +
            #
         | 
| 4 | 
            +
            #  Licensed under the Apache License, Version 2.0 (the "License");
         | 
| 5 | 
            +
            #  you may not use this file except in compliance with the License.
         | 
| 6 | 
            +
            #  You may obtain a copy of the License at
         | 
| 7 | 
            +
            #
         | 
| 8 | 
            +
            #  http://www.apache.org/licenses/LICENSE-2.0
         | 
| 9 | 
            +
            #
         | 
| 10 | 
            +
            #  Unless required by applicable law or agreed to in writing, software
         | 
| 11 | 
            +
            #  distributed under the License is distributed on an "AS IS" BASIS,
         | 
| 12 | 
            +
            #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         | 
| 13 | 
            +
            #  See the License for the specific language governing permissions and
         | 
| 14 | 
            +
            #  limitations under the License.
         | 
| 15 | 
            +
            ##
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            class ChangeReputationMessagesIndex < ActiveRecord::Migration
         | 
| 18 | 
            +
              def self.up
         | 
| 19 | 
            +
                remove_index :rs_reputation_messages, :name => "index_rs_reputation_messages_on_receiver_id_and_sender"
         | 
| 20 | 
            +
                add_index :rs_reputation_messages, [:receiver_id, :sender_id, :sender_type], :name => "index_rs_reputation_messages_on_receiver_id_and_sender", :unique => true
         | 
| 21 | 
            +
              end
         | 
| 22 | 
            +
             | 
| 23 | 
            +
              def self.down
         | 
| 24 | 
            +
                remove_index :rs_reputation_messages, :name => "index_rs_reputation_messages_on_receiver_id_and_sender"
         | 
| 25 | 
            +
                add_index :rs_reputation_messages, [:receiver_id, :sender_id, :sender_type], :name => "index_rs_reputation_messages_on_receiver_id_and_sender"
         | 
| 26 | 
            +
              end
         | 
| 27 | 
            +
            end
         | 
| 28 | 
            +
             | 
| @@ -0,0 +1,27 @@ | |
| 1 | 
            +
            ##
         | 
| 2 | 
            +
            #  Copyright 2012 Twitter, Inc
         | 
| 3 | 
            +
            #
         | 
| 4 | 
            +
            #  Licensed under the Apache License, Version 2.0 (the "License");
         | 
| 5 | 
            +
            #  you may not use this file except in compliance with the License.
         | 
| 6 | 
            +
            #  You may obtain a copy of the License at
         | 
| 7 | 
            +
            #
         | 
| 8 | 
            +
            #  http://www.apache.org/licenses/LICENSE-2.0
         | 
| 9 | 
            +
            #
         | 
| 10 | 
            +
            #  Unless required by applicable law or agreed to in writing, software
         | 
| 11 | 
            +
            #  distributed under the License is distributed on an "AS IS" BASIS,
         | 
| 12 | 
            +
            #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         | 
| 13 | 
            +
            #  See the License for the specific language governing permissions and
         | 
| 14 | 
            +
            #  limitations under the License.
         | 
| 15 | 
            +
            ##
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            class ChangeReputationsIndexToUnique < ActiveRecord::Migration
         | 
| 18 | 
            +
              def self.up
         | 
| 19 | 
            +
                remove_index :rs_reputations, :name => "index_rs_reputations_on_reputation_name_and_target"
         | 
| 20 | 
            +
                add_index :rs_reputations, [:reputation_name, :target_id, :target_type], :name => "index_rs_reputations_on_reputation_name_and_target", :unique => true
         | 
| 21 | 
            +
              end
         | 
| 22 | 
            +
             | 
| 23 | 
            +
              def self.down
         | 
| 24 | 
            +
                remove_index :rs_reputations, :name => "index_rs_reputations_on_reputation_name_and_target"
         | 
| 25 | 
            +
                add_index :rs_reputations, [:reputation_name, :target_id, :target_type], :name => "index_rs_reputations_on_reputation_name_and_target"
         | 
| 26 | 
            +
              end
         | 
| 27 | 
            +
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,120 +1,111 @@ | |
| 1 | 
            -
            --- !ruby/object:Gem::Specification
         | 
| 1 | 
            +
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: activerecord-reputation-system
         | 
| 3 | 
            -
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
               | 
| 5 | 
            -
               | 
| 3 | 
            +
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            +
              prerelease: false
         | 
| 5 | 
            +
              segments: 
         | 
| 6 | 
            +
              - 1
         | 
| 7 | 
            +
              - 3
         | 
| 8 | 
            +
              - 1
         | 
| 9 | 
            +
              version: 1.3.1
         | 
| 6 10 | 
             
            platform: ruby
         | 
| 7 | 
            -
            authors:
         | 
| 11 | 
            +
            authors: 
         | 
| 8 12 | 
             
            - Katsuya Noguchi
         | 
| 9 13 | 
             
            autorequire: 
         | 
| 10 14 | 
             
            bindir: bin
         | 
| 11 15 | 
             
            cert_chain: []
         | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 16 | 
            +
             | 
| 17 | 
            +
            date: 2012-08-09 00:00:00 +09:00
         | 
| 18 | 
            +
            default_executable: 
         | 
| 19 | 
            +
            dependencies: 
         | 
| 20 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 15 21 | 
             
              name: activerecord
         | 
| 16 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 17 | 
            -
                none: false
         | 
| 18 | 
            -
                requirements:
         | 
| 19 | 
            -
                - - ! '>='
         | 
| 20 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 21 | 
            -
                    version: '0'
         | 
| 22 | 
            -
              type: :development
         | 
| 23 22 | 
             
              prerelease: false
         | 
| 24 | 
            -
               | 
| 25 | 
            -
                 | 
| 26 | 
            -
                 | 
| 27 | 
            -
             | 
| 28 | 
            -
             | 
| 29 | 
            -
                     | 
| 30 | 
            -
             | 
| 31 | 
            -
              name: rake
         | 
| 32 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 33 | 
            -
                none: false
         | 
| 34 | 
            -
                requirements:
         | 
| 35 | 
            -
                - - ! '>='
         | 
| 36 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 37 | 
            -
                    version: 0.8.7
         | 
| 23 | 
            +
              requirement: &id001 !ruby/object:Gem::Requirement 
         | 
| 24 | 
            +
                requirements: 
         | 
| 25 | 
            +
                - - ">="
         | 
| 26 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 27 | 
            +
                    segments: 
         | 
| 28 | 
            +
                    - 0
         | 
| 29 | 
            +
                    version: "0"
         | 
| 38 30 | 
             
              type: :development
         | 
| 31 | 
            +
              version_requirements: *id001
         | 
| 32 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 33 | 
            +
              name: rake
         | 
| 39 34 | 
             
              prerelease: false
         | 
| 40 | 
            -
               | 
| 41 | 
            -
                 | 
| 42 | 
            -
                 | 
| 43 | 
            -
             | 
| 44 | 
            -
             | 
| 35 | 
            +
              requirement: &id002 !ruby/object:Gem::Requirement 
         | 
| 36 | 
            +
                requirements: 
         | 
| 37 | 
            +
                - - ">="
         | 
| 38 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 39 | 
            +
                    segments: 
         | 
| 40 | 
            +
                    - 0
         | 
| 41 | 
            +
                    - 8
         | 
| 42 | 
            +
                    - 7
         | 
| 45 43 | 
             
                    version: 0.8.7
         | 
| 46 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 47 | 
            -
              name: rspec
         | 
| 48 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 49 | 
            -
                none: false
         | 
| 50 | 
            -
                requirements:
         | 
| 51 | 
            -
                - - ~>
         | 
| 52 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 53 | 
            -
                    version: '2.8'
         | 
| 54 44 | 
             
              type: :development
         | 
| 45 | 
            +
              version_requirements: *id002
         | 
| 46 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 47 | 
            +
              name: rspec
         | 
| 55 48 | 
             
              prerelease: false
         | 
| 56 | 
            -
               | 
| 57 | 
            -
                 | 
| 58 | 
            -
                requirements:
         | 
| 49 | 
            +
              requirement: &id003 !ruby/object:Gem::Requirement 
         | 
| 50 | 
            +
                requirements: 
         | 
| 59 51 | 
             
                - - ~>
         | 
| 60 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 61 | 
            -
                     | 
| 62 | 
            -
            -  | 
| 63 | 
            -
             | 
| 64 | 
            -
             | 
| 65 | 
            -
                none: false
         | 
| 66 | 
            -
                requirements:
         | 
| 67 | 
            -
                - - ! '>='
         | 
| 68 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 69 | 
            -
                    version: '0'
         | 
| 52 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 53 | 
            +
                    segments: 
         | 
| 54 | 
            +
                    - 2
         | 
| 55 | 
            +
                    - 8
         | 
| 56 | 
            +
                    version: "2.8"
         | 
| 70 57 | 
             
              type: :development
         | 
| 58 | 
            +
              version_requirements: *id003
         | 
| 59 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 60 | 
            +
              name: rdoc
         | 
| 71 61 | 
             
              prerelease: false
         | 
| 72 | 
            -
               | 
| 73 | 
            -
                 | 
| 74 | 
            -
                 | 
| 75 | 
            -
             | 
| 76 | 
            -
             | 
| 77 | 
            -
                     | 
| 78 | 
            -
             | 
| 79 | 
            -
              name: database_cleaner
         | 
| 80 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 81 | 
            -
                none: false
         | 
| 82 | 
            -
                requirements:
         | 
| 83 | 
            -
                - - ~>
         | 
| 84 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 85 | 
            -
                    version: 0.7.1
         | 
| 62 | 
            +
              requirement: &id004 !ruby/object:Gem::Requirement 
         | 
| 63 | 
            +
                requirements: 
         | 
| 64 | 
            +
                - - ">="
         | 
| 65 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 66 | 
            +
                    segments: 
         | 
| 67 | 
            +
                    - 0
         | 
| 68 | 
            +
                    version: "0"
         | 
| 86 69 | 
             
              type: :development
         | 
| 70 | 
            +
              version_requirements: *id004
         | 
| 71 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 72 | 
            +
              name: database_cleaner
         | 
| 87 73 | 
             
              prerelease: false
         | 
| 88 | 
            -
               | 
| 89 | 
            -
                 | 
| 90 | 
            -
                requirements:
         | 
| 74 | 
            +
              requirement: &id005 !ruby/object:Gem::Requirement 
         | 
| 75 | 
            +
                requirements: 
         | 
| 91 76 | 
             
                - - ~>
         | 
| 92 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 77 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 78 | 
            +
                    segments: 
         | 
| 79 | 
            +
                    - 0
         | 
| 80 | 
            +
                    - 7
         | 
| 81 | 
            +
                    - 1
         | 
| 93 82 | 
             
                    version: 0.7.1
         | 
| 94 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 95 | 
            -
              name: sqlite3
         | 
| 96 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 97 | 
            -
                none: false
         | 
| 98 | 
            -
                requirements:
         | 
| 99 | 
            -
                - - ~>
         | 
| 100 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 101 | 
            -
                    version: 1.3.5
         | 
| 102 83 | 
             
              type: :development
         | 
| 84 | 
            +
              version_requirements: *id005
         | 
| 85 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 86 | 
            +
              name: sqlite3
         | 
| 103 87 | 
             
              prerelease: false
         | 
| 104 | 
            -
               | 
| 105 | 
            -
                 | 
| 106 | 
            -
                requirements:
         | 
| 88 | 
            +
              requirement: &id006 !ruby/object:Gem::Requirement 
         | 
| 89 | 
            +
                requirements: 
         | 
| 107 90 | 
             
                - - ~>
         | 
| 108 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 91 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 92 | 
            +
                    segments: 
         | 
| 93 | 
            +
                    - 1
         | 
| 94 | 
            +
                    - 3
         | 
| 95 | 
            +
                    - 5
         | 
| 109 96 | 
             
                    version: 1.3.5
         | 
| 110 | 
            -
             | 
| 111 | 
            -
               | 
| 112 | 
            -
             | 
| 97 | 
            +
              type: :development
         | 
| 98 | 
            +
              version_requirements: *id006
         | 
| 99 | 
            +
            description: ActiveRecord Reputation System gem allows rails apps to compute and publish reputation scores for active record models.
         | 
| 100 | 
            +
            email: 
         | 
| 113 101 | 
             
            - katsuya@twitter.com
         | 
| 114 102 | 
             
            executables: []
         | 
| 103 | 
            +
             | 
| 115 104 | 
             
            extensions: []
         | 
| 105 | 
            +
             | 
| 116 106 | 
             
            extra_rdoc_files: []
         | 
| 117 | 
            -
             | 
| 107 | 
            +
             | 
| 108 | 
            +
            files: 
         | 
| 118 109 | 
             
            - LICENSE
         | 
| 119 110 | 
             
            - README.md
         | 
| 120 111 | 
             
            - Rakefile
         | 
| @@ -122,6 +113,9 @@ files: | |
| 122 113 | 
             
            - lib/generators/reputation_system/templates/add_evaluations_index.rb
         | 
| 123 114 | 
             
            - lib/generators/reputation_system/templates/add_reputation_messages_index.rb
         | 
| 124 115 | 
             
            - lib/generators/reputation_system/templates/add_reputations_index.rb
         | 
| 116 | 
            +
            - lib/generators/reputation_system/templates/change_evaluations_index_to_unique.rb
         | 
| 117 | 
            +
            - lib/generators/reputation_system/templates/change_reputation_messages_index_to_unique.rb
         | 
| 118 | 
            +
            - lib/generators/reputation_system/templates/change_reputations_index_to_unique.rb
         | 
| 125 119 | 
             
            - lib/generators/reputation_system/templates/create_reputation_system.rb
         | 
| 126 120 | 
             
            - lib/models/rs_evaluation.rb
         | 
| 127 121 | 
             
            - lib/models/rs_reputation.rb
         | 
| @@ -144,35 +138,35 @@ files: | |
| 144 138 | 
             
            - spec/reputation_system/reputation_spec.rb
         | 
| 145 139 | 
             
            - spec/reputation_system/scope_spec.rb
         | 
| 146 140 | 
             
            - spec/spec_helper.rb
         | 
| 141 | 
            +
            has_rdoc: true
         | 
| 147 142 | 
             
            homepage: https://github.com/twitter/activerecord-reputation-system
         | 
| 148 143 | 
             
            licenses: []
         | 
| 144 | 
            +
             | 
| 149 145 | 
             
            post_install_message: 
         | 
| 150 146 | 
             
            rdoc_options: []
         | 
| 151 | 
            -
             | 
| 147 | 
            +
             | 
| 148 | 
            +
            require_paths: 
         | 
| 152 149 | 
             
            - lib
         | 
| 153 | 
            -
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 154 | 
            -
               | 
| 155 | 
            -
               | 
| 156 | 
            -
             | 
| 157 | 
            -
             | 
| 158 | 
            -
                  version: '0'
         | 
| 159 | 
            -
                  segments:
         | 
| 150 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement 
         | 
| 151 | 
            +
              requirements: 
         | 
| 152 | 
            +
              - - ">="
         | 
| 153 | 
            +
                - !ruby/object:Gem::Version 
         | 
| 154 | 
            +
                  segments: 
         | 
| 160 155 | 
             
                  - 0
         | 
| 161 | 
            -
                   | 
| 162 | 
            -
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 163 | 
            -
               | 
| 164 | 
            -
               | 
| 165 | 
            -
             | 
| 166 | 
            -
             | 
| 167 | 
            -
                  version: '0'
         | 
| 168 | 
            -
                  segments:
         | 
| 156 | 
            +
                  version: "0"
         | 
| 157 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement 
         | 
| 158 | 
            +
              requirements: 
         | 
| 159 | 
            +
              - - ">="
         | 
| 160 | 
            +
                - !ruby/object:Gem::Version 
         | 
| 161 | 
            +
                  segments: 
         | 
| 169 162 | 
             
                  - 0
         | 
| 170 | 
            -
                   | 
| 163 | 
            +
                  version: "0"
         | 
| 171 164 | 
             
            requirements: []
         | 
| 165 | 
            +
             | 
| 172 166 | 
             
            rubyforge_project: 
         | 
| 173 | 
            -
            rubygems_version: 1. | 
| 167 | 
            +
            rubygems_version: 1.3.6
         | 
| 174 168 | 
             
            signing_key: 
         | 
| 175 169 | 
             
            specification_version: 3
         | 
| 176 | 
            -
            summary: ActiveRecord Reputation System gem allows rails apps to compute and publish
         | 
| 177 | 
            -
              reputation scores for active record models
         | 
| 170 | 
            +
            summary: ActiveRecord Reputation System gem allows rails apps to compute and publish reputation scores for active record models
         | 
| 178 171 | 
             
            test_files: []
         | 
| 172 | 
            +
             |