kudos 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 88b2bc3c5627913f22f9bc36b10acfc596e4e576535ab447bc31ff30bad45443
4
+ data.tar.gz: afc5348c4da73d71993684035eefb0d89248e6ded717faca5f6e6739c65e1c8d
5
+ SHA512:
6
+ metadata.gz: 34a55fcdfcb296a27b206e8c962053deef49b94b278e41cafc0b7e156d098224191aca358434828a931dc0aba187117f1ea75c209f6f9093886787c3fbfd09b0
7
+ data.tar.gz: a8e04bb860c279878d447191bc738a3ef12104645ab6d97602c9f2e558c57a5a7c04bf301c7940c5035e448d7316c20c57886059acad8571f5b2f918b71f2f94
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2022 Bogdanov Anton
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # Kudos
2
+ Reputation engine for Rails application similar to World of Warcraft achievements system.
3
+
4
+ ## Installation
5
+
6
+ Add this line to your application's Gemfile:
7
+ ```ruby
8
+ gem 'kudos'
9
+ ```
10
+
11
+ And then for generating migration and models execute:
12
+ ```bash
13
+ $ bundle install
14
+ $ rails g kudos:active_record
15
+ $ rails db:migrate
16
+ ```
17
+
18
+ If you would like to attach achievements not to User model, run instead
19
+ ```bash
20
+ $ rails g kudos:active_record ModelName
21
+ ```
22
+
23
+ ## Сonfiguration
24
+
25
+ ```ruby
26
+ class User < ApplicationRecord
27
+ include Kudos::Achievementable
28
+ ...
29
+ end
30
+ ```
31
+
32
+ ## Generating achievements
33
+
34
+ ### Achievements database records
35
+
36
+ ```ruby
37
+ general_group = Kudos::AchievementGroup.create(name: { en: 'General' })
38
+
39
+ Kudos::Achievement.create(
40
+ award_name: 'fantasy_team_create',
41
+ points: 5,
42
+ kudos_achievement_group: general_group
43
+ )
44
+ ```
45
+
46
+ ### Describe award rules
47
+
48
+ For one rank achievements conditions for awarding can be defined like
49
+ ```ruby
50
+ class Achievement < Kudos::Achievement
51
+ award_for :fantasy_team_create do |achievements, user|
52
+ achievement = achievements.first
53
+ user.award(achievement: achievement) unless user.awarded?(achievement: achievement)
54
+ end
55
+ end
56
+ ```
57
+
58
+ For multi-rank achievements conditions for awarding can be defined like
59
+ ```ruby
60
+ class Achievement < Kudos::Achievement
61
+ award_for :lineup_points do |achievements, lineup|
62
+ user = lineup.user
63
+ achievements.each do |achievement|
64
+ if !user.awarded?(achievement: achievement) && lineup.points >= (achievement.rank * 10)
65
+ user.award(achievement: achievement)
66
+ end
67
+ end
68
+ end
69
+ end
70
+ ```
71
+
72
+ ## Usage
73
+
74
+ For awarding user just call this code in callback or by any event generator
75
+ ```ruby
76
+ Achievement.award(:fantasy_team_create, user)
77
+ ```
78
+
79
+ ## License
80
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/setup'
4
+
5
+ APP_RAKEFILE = File.expand_path('spec/dummy/Rakefile', __dir__)
6
+ load 'rails/tasks/engine.rake'
7
+
8
+ load 'rails/tasks/statistics.rake'
9
+
10
+ require 'bundler/gem_tasks'
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Kudos
4
+ module Achievementable
5
+ extend ActiveSupport::Concern
6
+
7
+ included do
8
+ has_many :kudos_users_achievements,
9
+ class_name: 'Kudos::Users::Achievement',
10
+ dependent: :destroy
11
+
12
+ has_many :kudos_achievements, through: :kudos_users_achievements
13
+ end
14
+
15
+ def award(achievement:)
16
+ object = kudos_users_achievements.find_or_initialize_by(kudos_achievement_id: achievement.id)
17
+ return if object.rank.to_i > achievement.rank.to_i
18
+
19
+ object.update!(
20
+ {
21
+ rank: achievement.rank,
22
+ points: object.points.to_i + achievement.points,
23
+ title: achievement.title,
24
+ description: achievement.description
25
+ }.compact
26
+ )
27
+ end
28
+
29
+ def awarded?(achievement:)
30
+ kudos_users_achievements.find_by({ kudos_achievement_id: achievement.id, rank: achievement.rank }.compact)
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Kudos
4
+ module Uuidable
5
+ extend ActiveSupport::Concern
6
+
7
+ included do
8
+ after_initialize :generate_uuid
9
+ end
10
+
11
+ def generate_uuid
12
+ self.uuid ||= SecureRandom.uuid
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Kudos
4
+ class Achievement < Kudos::ApplicationRecord
5
+ self.table_name = :kudos_achievements
6
+
7
+ include Kudos
8
+ include Kudos::Uuidable
9
+
10
+ belongs_to :kudos_achievement_group, class_name: 'Kudos::AchievementGroup'
11
+
12
+ has_many :kudos_users_achievements,
13
+ class_name: 'Kudos::Users::Achievement',
14
+ foreign_key: :kudos_achievement_id,
15
+ dependent: :destroy
16
+
17
+ has_many :users, through: :kudos_users_achievements
18
+ end
19
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Kudos
4
+ class AchievementGroup < ApplicationRecord
5
+ self.table_name = :kudos_achievement_groups
6
+
7
+ include Kudos::Uuidable
8
+
9
+ belongs_to :parent,
10
+ class_name: 'Kudos::AchievementGroup',
11
+ foreign_key: :parent_id,
12
+ inverse_of: :children,
13
+ optional: true
14
+
15
+ has_many :children,
16
+ class_name: 'Kudos::AchievementGroup',
17
+ foreign_key: :parent_id,
18
+ inverse_of: :parent,
19
+ dependent: :nullify
20
+
21
+ has_many :kudos_achievements,
22
+ class_name: 'Kudos::Achievement',
23
+ foreign_key: :kudos_achievement_group_id,
24
+ dependent: :destroy
25
+ end
26
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Kudos
4
+ class ApplicationRecord < ActiveRecord::Base
5
+ self.abstract_class = true
6
+ end
7
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Kudos
4
+ module Users
5
+ class Achievement < ApplicationRecord
6
+ self.table_name = :kudos_users_achievements
7
+
8
+ belongs_to :user, class_name: '::User'
9
+ belongs_to :kudos_achievement, class_name: 'Kudos::Achievement'
10
+
11
+ scope :unread, -> { where(notified: false) }
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,43 @@
1
+ class CreateKudosTables < ActiveRecord::Migration[7.0]
2
+ def self.up
3
+ enable_extension 'pgcrypto' unless extensions.include?('pgcrypto')
4
+ enable_extension 'uuid-ossp' unless extensions.include?('uuid-ossp')
5
+
6
+ create_table :kudos_achievement_groups do |t|
7
+ t.uuid :uuid, null: false, index: { unique: true }
8
+ t.bigint :parent_id, index: true
9
+ t.integer :position, null: false, default: 0
10
+ t.jsonb :name, null: false, default: {}
11
+ t.timestamps
12
+ end
13
+
14
+ create_table :kudos_achievements do |t|
15
+ t.uuid :uuid, null: false, index: { unique: true }
16
+ t.string :award_name, null: false, index: true
17
+ t.integer :rank
18
+ t.integer :points
19
+ t.jsonb :title, null: false, default: {}
20
+ t.jsonb :description, null: false, default: {}
21
+ t.references :kudos_achievement_group, null: false, index: true, foreign_key: true
22
+ t.timestamps
23
+ end
24
+
25
+ create_table :kudos_users_achievements do |t|
26
+ t.references :user, null: false, foreign_key: true
27
+ t.references :kudos_achievement, null: false, foreign_key: true
28
+ t.boolean :notified, null: false, default: false
29
+ t.integer :rank
30
+ t.integer :points
31
+ t.jsonb :title, null: false, default: {}
32
+ t.jsonb :description, null: false, default: {}
33
+ t.timestamps
34
+ end
35
+ add_index :kudos_users_achievements, [:user_id, :kudos_achievement_id], unique: true, name: 'kudos_users_achievements_unique_index'
36
+ end
37
+
38
+ def self.down
39
+ drop_table :kudos_achievement_groups
40
+ drop_table :kudos_achievements
41
+ drop_table :kudos_users_achievements
42
+ end
43
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails/generators/active_record'
4
+
5
+ module Kudos
6
+ module Generators
7
+ class ActiveRecordGenerator < ::Rails::Generators::Base
8
+ include ::Rails::Generators::Migration
9
+ desc 'Generates migration for kudos tables'
10
+
11
+ source_paths << File.join(File.dirname(__FILE__), 'templates')
12
+
13
+ argument :name, type: :string, default: 'User'
14
+
15
+ def self.next_migration_number(dirname)
16
+ ::ActiveRecord::Generators::Base.next_migration_number(dirname)
17
+ end
18
+
19
+ def self.migration_version
20
+ "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]" if requires_migration_number?
21
+ end
22
+
23
+ def self.requires_migration_number?
24
+ Rails::VERSION::MAJOR.to_i >= 6
25
+ end
26
+
27
+ def create_migration_file
28
+ @user_model_name = name.underscore
29
+
30
+ migration_template 'migration.erb', 'db/migrate/create_kudos_tables.rb'
31
+ template 'achievement_group.erb', 'app/models/kudos/achievement_group.rb'
32
+ template 'achievement.erb', 'app/models/kudos/achievement.rb'
33
+ template 'users_achievement.erb', 'app/models/kudos/users/achievement.rb'
34
+ template 'achievementable.erb', 'app/models/concerns/kudos/achievementable.rb'
35
+ template 'uuidable.erb', 'app/models/concerns/kudos/uuidable.rb'
36
+ end
37
+
38
+ def migration_version
39
+ self.class.migration_version
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Kudos
4
+ class Achievement < Kudos::ApplicationRecord
5
+ self.table_name = :kudos_achievements
6
+
7
+ include Kudos
8
+ include Kudos::Uuidable
9
+
10
+ belongs_to :kudos_achievement_group, class_name: 'Kudos::AchievementGroup'
11
+
12
+ has_many :kudos_<%= @user_model_name %>s_achievements,
13
+ class_name: 'Kudos::<%= @user_model_name.capitalize %>s::Achievement',
14
+ foreign_key: :kudos_achievement_id,
15
+ dependent: :destroy
16
+
17
+ has_many :<%= @user_model_name %>s, through: :kudos_<%= @user_model_name %>s_achievements
18
+ end
19
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Kudos
4
+ class AchievementGroup < ApplicationRecord
5
+ self.table_name = :kudos_achievement_groups
6
+
7
+ include Kudos::Uuidable
8
+
9
+ belongs_to :parent,
10
+ class_name: 'Kudos::AchievementGroup',
11
+ foreign_key: :parent_id,
12
+ inverse_of: :children,
13
+ optional: true
14
+
15
+ has_many :children,
16
+ class_name: 'Kudos::AchievementGroup',
17
+ foreign_key: :parent_id,
18
+ inverse_of: :parent,
19
+ dependent: :nullify
20
+
21
+ has_many :kudos_achievements,
22
+ class_name: 'Kudos::Achievement',
23
+ foreign_key: :kudos_achievement_group_id,
24
+ dependent: :destroy
25
+ end
26
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Kudos
4
+ module Achievementable
5
+ extend ActiveSupport::Concern
6
+
7
+ included do
8
+ has_many :kudos_<%= @user_model_name %>s_achievements,
9
+ class_name: 'Kudos::<%= @user_model_name.capitalize %>s::Achievement',
10
+ dependent: :destroy
11
+
12
+ has_many :kudos_achievements, through: :kudos_<%= @user_model_name %>s_achievements
13
+ end
14
+
15
+ def award(achievement:)
16
+ object = kudos_<%= @user_model_name %>s_achievements.find_or_initialize_by(kudos_achievement_id: achievement.id)
17
+ return if object.rank.to_i > achievement.rank.to_i
18
+
19
+ object.update!(
20
+ {
21
+ rank: achievement.rank,
22
+ points: object.points.to_i + achievement.points,
23
+ title: achievement.title,
24
+ description: achievement.description
25
+ }.compact
26
+ )
27
+ end
28
+
29
+ def awarded?(achievement:)
30
+ kudos_<%= @user_model_name %>s_achievements.find_by({ kudos_achievement_id: achievement.id, rank: achievement.rank }.compact)
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,43 @@
1
+ class CreateKudosTables < ActiveRecord::Migration<%= migration_version %>
2
+ def self.up
3
+ enable_extension 'pgcrypto' unless extensions.include?('pgcrypto')
4
+ enable_extension 'uuid-ossp' unless extensions.include?('uuid-ossp')
5
+
6
+ create_table :kudos_achievement_groups do |t|
7
+ t.uuid :uuid, null: false, index: { unique: true }
8
+ t.bigint :parent_id, index: true
9
+ t.integer :position, null: false, default: 0
10
+ t.jsonb :name, null: false, default: {}
11
+ t.timestamps
12
+ end
13
+
14
+ create_table :kudos_achievements do |t|
15
+ t.uuid :uuid, null: false, index: { unique: true }
16
+ t.string :award_name, null: false, index: true
17
+ t.integer :rank
18
+ t.integer :points
19
+ t.jsonb :title, null: false, default: {}
20
+ t.jsonb :description, null: false, default: {}
21
+ t.references :kudos_achievement_group, null: false, index: true, foreign_key: true
22
+ t.timestamps
23
+ end
24
+
25
+ create_table :kudos_<%= @user_model_name %>s_achievements do |t|
26
+ t.references :<%= @user_model_name %>, null: false, foreign_key: true
27
+ t.references :kudos_achievement, null: false, foreign_key: true
28
+ t.boolean :notified, null: false, default: false
29
+ t.integer :rank
30
+ t.integer :points
31
+ t.jsonb :title, null: false, default: {}
32
+ t.jsonb :description, null: false, default: {}
33
+ t.timestamps
34
+ end
35
+ add_index :kudos_users_achievements, [:<%= @user_model_name %>_id, :kudos_achievement_id], unique: true, name: 'kudos_users_achievements_unique_index'
36
+ end
37
+
38
+ def self.down
39
+ drop_table :kudos_achievement_groups
40
+ drop_table :kudos_achievements
41
+ drop_table :kudos_users_achievements
42
+ end
43
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Kudos
4
+ module <%= @user_model_name.capitalize %>s
5
+ class Achievement < ApplicationRecord
6
+ self.table_name = :kudos_<%= @user_model_name %>s_achievements
7
+
8
+ belongs_to :<%= @user_model_name %>, class_name: '::<%= @user_model_name.capitalize %>'
9
+ belongs_to :kudos_achievement, class_name: 'Kudos::Achievement'
10
+
11
+ scope :unread, -> { where(notified: false) }
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Kudos
4
+ module Uuidable
5
+ extend ActiveSupport::Concern
6
+
7
+ included do
8
+ after_initialize :generate_uuid
9
+ end
10
+
11
+ def generate_uuid
12
+ self.uuid ||= SecureRandom.uuid
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Kudos
4
+ class Engine < ::Rails::Engine
5
+ isolate_namespace Kudos
6
+
7
+ config.generators do |g|
8
+ g.test_framework :rspec
9
+ g.fixture_replacement :factory_bot
10
+ g.factory_bot dir: 'spec/factories'
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Kudos
4
+ VERSION = '0.1.0'
5
+ end
data/lib/kudos.rb ADDED
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'kudos/version'
4
+ require 'kudos/engine'
5
+
6
+ module Kudos
7
+ def self.included(base)
8
+ base.class_eval do
9
+ extend ClassMethods
10
+ end
11
+ end
12
+
13
+ module ClassMethods
14
+ def awards
15
+ @awards ||= {}
16
+ end
17
+
18
+ def award_for(award_name, &block)
19
+ awards[award_name] = block
20
+ end
21
+
22
+ def award(award_name, *attributes)
23
+ achievements = Kudos::Achievement.where(award_name: award_name).order(rank: :asc)
24
+ awards[award_name].call(achievements, *attributes)
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+ # desc "Explaining what the task does"
3
+ # task :kudos do
4
+ # # Task goes here
5
+ # end
metadata ADDED
@@ -0,0 +1,194 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: kudos
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Bogdanov Anton
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-11-30 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">"
18
+ - !ruby/object:Gem::Version
19
+ version: 6.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">"
25
+ - !ruby/object:Gem::Version
26
+ version: 6.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pg
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: puma
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '6.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '6.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '13.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '13.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.39'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.39'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop-performance
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.8'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.8'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop-rake
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '0.6'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '0.6'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rubocop-rspec
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '2.0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '2.0'
139
+ description: Achievements engine for Rails application similar to World of Warcraft
140
+ achievements system.
141
+ email:
142
+ - kortirso@gmail.com
143
+ executables: []
144
+ extensions: []
145
+ extra_rdoc_files: []
146
+ files:
147
+ - MIT-LICENSE
148
+ - README.md
149
+ - Rakefile
150
+ - app/models/concerns/kudos/achievementable.rb
151
+ - app/models/concerns/kudos/uuidable.rb
152
+ - app/models/kudos/achievement.rb
153
+ - app/models/kudos/achievement_group.rb
154
+ - app/models/kudos/application_record.rb
155
+ - app/models/kudos/users/achievement.rb
156
+ - db/migrate/20221130175843_create_kudos_tables.rb
157
+ - lib/generators/kudos/active_record_generator.rb
158
+ - lib/generators/kudos/templates/achievement.erb
159
+ - lib/generators/kudos/templates/achievement_group.erb
160
+ - lib/generators/kudos/templates/achievementable.erb
161
+ - lib/generators/kudos/templates/migration.erb
162
+ - lib/generators/kudos/templates/users_achievement.erb
163
+ - lib/generators/kudos/templates/uuidable.erb
164
+ - lib/kudos.rb
165
+ - lib/kudos/engine.rb
166
+ - lib/kudos/version.rb
167
+ - lib/tasks/kudos_tasks.rake
168
+ homepage: https://github.com/kortirso/kudos
169
+ licenses:
170
+ - MIT
171
+ metadata:
172
+ homepage_uri: https://github.com/kortirso/kudos
173
+ source_code_uri: https://github.com/kortirso/kudos
174
+ changelog_uri: https://github.com/kortirso/kudos/blob/master/CHANGELOG.md
175
+ post_install_message:
176
+ rdoc_options: []
177
+ require_paths:
178
+ - lib
179
+ required_ruby_version: !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - ">="
182
+ - !ruby/object:Gem::Version
183
+ version: '2.7'
184
+ required_rubygems_version: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: '0'
189
+ requirements: []
190
+ rubygems_version: 3.3.7
191
+ signing_key:
192
+ specification_version: 4
193
+ summary: Achievements engine for Rails application
194
+ test_files: []