go_gamification 0.0.4
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.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +37 -0
- data/app/controllers/go_gamification/application_controller.rb +4 -0
- data/app/controllers/go_gamification/rewards_controller.rb +7 -0
- data/app/helpers/go_gamification/application_helper.rb +31 -0
- data/app/helpers/go_gamification/rewards_helper.rb +20 -0
- data/app/models/go_gamification/goal.rb +5 -0
- data/app/models/go_gamification/medal.rb +5 -0
- data/app/models/go_gamification/reward.rb +5 -0
- data/app/uploaders/go_gamification/image_uploader.rb +47 -0
- data/app/views/go_gamification/rewards/_presentation.html.erb +7 -0
- data/app/views/go_gamification/rewards/_reward.html.erb +9 -0
- data/app/views/go_gamification/scorings/create.html.erb +2 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20171020181447_create_go_gamification_tasks.rb +10 -0
- data/db/migrate/20171020181620_create_go_gamification_scorings.rb +10 -0
- data/db/migrate/20171020182027_rename_everything.rb +10 -0
- data/db/migrate/20171020182119_create_go_gamification_medals.rb +11 -0
- data/db/migrate/20171020182210_add_description_to_go_gamification_medals.rb +5 -0
- data/db/migrate/20171020182248_rename_go_gamification_tasks_to_goals.rb +7 -0
- data/db/migrate/20171020182329_add_seen_at_to_go_gamification_rewards.rb +9 -0
- data/lib/go_gamefication.rb +6 -0
- data/lib/go_gamification/activerecord.rb +13 -0
- data/lib/go_gamification/checksum.rb +28 -0
- data/lib/go_gamification/concerns/controllers/rewards_controller.rb +55 -0
- data/lib/go_gamification/concerns/controllers.rb +3 -0
- data/lib/go_gamification/concerns/models/goal.rb +44 -0
- data/lib/go_gamification/concerns/models/medal.rb +13 -0
- data/lib/go_gamification/concerns/models/reward.rb +33 -0
- data/lib/go_gamification/concerns/models.rb +5 -0
- data/lib/go_gamification/concerns/rewardable.rb +12 -0
- data/lib/go_gamification/concerns/rewarding.rb +7 -0
- data/lib/go_gamification/concerns.rb +6 -0
- data/lib/go_gamification/engine.rb +24 -0
- data/lib/go_gamification/version.rb +3 -0
- data/lib/tasks/go_gamefication_tasks.rake +4 -0
- metadata +136 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3fb86cf728e56675260225b07d108a17f89e3a85
|
4
|
+
data.tar.gz: 8d03d03b15e0fd901dd9255595b035df475c6ae5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cdd7f6db325a7d18d0ebce1e116821f8da48d7b3d4c4d701cd3b7be79eb94c1f42a47b188a8c46147cd884dfa9aa3c4ddf182485a63bfc22fe34bc1d9ca96f03
|
7
|
+
data.tar.gz: a1076d5420f09ff672cfa0e5b13d21723e809454b9f662dd3ec0b4a9a7ff95367bbe2943262463a8e2d3f0b606b4f1a03703349b34e4bc6aae08a7a79abc3950
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2017 João Carlos Ottobboni
|
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/Rakefile
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'GoGamification'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
18
|
+
load 'rails/tasks/engine.rake'
|
19
|
+
|
20
|
+
|
21
|
+
load 'rails/tasks/statistics.rake'
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
Bundler::GemHelper.install_tasks
|
26
|
+
|
27
|
+
require 'rake/testtask'
|
28
|
+
|
29
|
+
Rake::TestTask.new(:test) do |t|
|
30
|
+
t.libs << 'lib'
|
31
|
+
t.libs << 'test'
|
32
|
+
t.pattern = 'test/**/*_test.rb'
|
33
|
+
t.verbose = false
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
task default: :test
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module GoGamification
|
2
|
+
module ApplicationHelper
|
3
|
+
|
4
|
+
# Create a form to reward someone for something.
|
5
|
+
#
|
6
|
+
# rewardable - A model that is rewardable (e.g. a user)
|
7
|
+
# options - A Hash of options:
|
8
|
+
# :for - A model that is rewarding (e.g. an article)
|
9
|
+
# :redirect - A String describing a URL to redirect to.
|
10
|
+
def reward rewardable, options
|
11
|
+
rewarding = options[:for]
|
12
|
+
redirect = options[:redirect]
|
13
|
+
|
14
|
+
form_tag Gamification::Engine.routes.url_helpers.rewards_path, method: :post do
|
15
|
+
concat hidden_field_tag 'reward[rewarding_type]', rewarding.class.name
|
16
|
+
concat hidden_field_tag 'reward[rewarding_id]', rewarding.id
|
17
|
+
concat hidden_field_tag 'reward[rewardable_type]', rewardable.class.name
|
18
|
+
concat hidden_field_tag 'reward[rewardable_id]', rewardable.id
|
19
|
+
concat hidden_field_tag 'checksum', Checksum.generate(
|
20
|
+
[rewarding.class.name, rewarding.id, rewardable.class.name, rewardable.id]
|
21
|
+
)
|
22
|
+
|
23
|
+
if redirect
|
24
|
+
concat hidden_field_tag 'redirect_url', redirect
|
25
|
+
end
|
26
|
+
|
27
|
+
concat submit_tag I18n.t 'go_gamification.complete'
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module GoGamification
|
2
|
+
module RewardsHelper
|
3
|
+
|
4
|
+
# Present unseen rewards for the given user.
|
5
|
+
#
|
6
|
+
# options - A Hash of options:
|
7
|
+
# for: A rewardable model.
|
8
|
+
#
|
9
|
+
# Returns HTML.
|
10
|
+
def present_rewards options
|
11
|
+
rewardable = options[:for]
|
12
|
+
rewards = rewardable.rewards.unseen
|
13
|
+
presentation = render partial: 'go_gamification/rewards/presentation', locals: { rewards: rewards }
|
14
|
+
|
15
|
+
rewards.see
|
16
|
+
|
17
|
+
presentation
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'carrierwave'
|
3
|
+
|
4
|
+
class GoGamification::ImageUploader < CarrierWave::Uploader::Base
|
5
|
+
|
6
|
+
# Include MiniMagick support
|
7
|
+
include CarrierWave::MiniMagick
|
8
|
+
|
9
|
+
# Override the directory where uploaded files will be stored.
|
10
|
+
# This is a sensible default for uploaders that are meant to be mounted:
|
11
|
+
def store_dir
|
12
|
+
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
|
13
|
+
end
|
14
|
+
|
15
|
+
# Provide a default URL as a default if there hasn't been a file uploaded:
|
16
|
+
# def default_url
|
17
|
+
# # For Rails 3.1+ asset pipeline compatibility:
|
18
|
+
# # ActionController::Base.helpers.asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
|
19
|
+
#
|
20
|
+
# "/images/fallback/" + [version_name, "default.png"].compact.join('_')
|
21
|
+
# end
|
22
|
+
|
23
|
+
# Process files as they are uploaded:
|
24
|
+
# process :scale => [200, 300]
|
25
|
+
#
|
26
|
+
# def scale(width, height)
|
27
|
+
# # do something
|
28
|
+
# end
|
29
|
+
|
30
|
+
# Create different versions of your uploaded files:
|
31
|
+
version :small do
|
32
|
+
process :resize_to_fit => [150, 150]
|
33
|
+
end
|
34
|
+
|
35
|
+
# Add a white list of extensions which are allowed to be uploaded.
|
36
|
+
# For images you might use something like this:
|
37
|
+
# def extension_white_list
|
38
|
+
# %w(jpg jpeg gif png)
|
39
|
+
# end
|
40
|
+
|
41
|
+
# Override the filename of the uploaded files:
|
42
|
+
# Avoid using model.id or version_name here, see uploader/store.rb for details.
|
43
|
+
# def filename
|
44
|
+
# "something.jpg" if original_filename
|
45
|
+
# end
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<% if reward.medal %>
|
2
|
+
<div class="medal">
|
3
|
+
<div class="image"><%= image_tag reward.medal.image %></div>
|
4
|
+
<div class="name"><%= reward.medal.name %></div>
|
5
|
+
<div class="description"><%= reward.medal.description %></div>
|
6
|
+
</div>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<div class="points"><%= reward.points %></div>
|
data/config/routes.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
class RenameEverything < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
rename_table :go_gamification_scorings, :gamification_rewards
|
4
|
+
rename_column :go_gamification_rewards, :subjectable_id, :rewardable_id
|
5
|
+
rename_column :go_gamification_rewards, :subjectable_type, :rewardable_type
|
6
|
+
|
7
|
+
rename_column :go_gamification_tasks, :taskable_id, :rewarding_id
|
8
|
+
rename_column :go_gamification_tasks, :taskable_type, :rewarding_type
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
class RenameGoGamificationTasksToGoals < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
rename_table :go_gamification_tasks, :gamification_goals
|
4
|
+
rename_column :go_gamification_rewards, :task_id, :goal_id
|
5
|
+
rename_column :go_gamification_medals, :task_id, :goal_id
|
6
|
+
end
|
7
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class AddSeenAtToGoGamificationRewards < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
change_table :go_gamification_rewards do |t|
|
4
|
+
t.datetime :seen_at
|
5
|
+
end
|
6
|
+
|
7
|
+
add_index :go_gamification_rewards, :seen_at, name: 'index_go_gamification_rewards_on_seen_at'
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module GoGamification::ActiveRecord
|
2
|
+
module Extensions
|
3
|
+
def rewarding
|
4
|
+
include GoGamification::Concerns::Rewarding
|
5
|
+
end
|
6
|
+
|
7
|
+
def rewardable
|
8
|
+
include GoGamification::Concerns::Rewardable
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
::ActiveRecord::Base.send :extend, GoGamification::ActiveRecord::Extensions if defined?(ActiveRecord)
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module GoGamification
|
2
|
+
module Checksum
|
3
|
+
# Generate a checksum from the given values.
|
4
|
+
#
|
5
|
+
# values - An Array of values.
|
6
|
+
#
|
7
|
+
# Returns a String.
|
8
|
+
def self.generate values
|
9
|
+
Digest::MD5.hexdigest "#{secret_key}#{values.join}"
|
10
|
+
end
|
11
|
+
|
12
|
+
# Verify a given checksum against the given values.
|
13
|
+
#
|
14
|
+
# checksum - A String describing a checksum.
|
15
|
+
# values - An Array of values.
|
16
|
+
#
|
17
|
+
# Returns a boolean.
|
18
|
+
def self.verify checksum, values
|
19
|
+
checksum == generate(values)
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def self.secret_key
|
25
|
+
Rails.application.secrets[:secret_key_base]
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module GoGamification
|
2
|
+
module Concerns::Controllers::RewardsController
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
included do
|
6
|
+
before_action :verify_checksum
|
7
|
+
|
8
|
+
def create
|
9
|
+
if rewarding.is_a? ::GoGamification::Goal
|
10
|
+
rewarding.complete_for rewardable
|
11
|
+
else
|
12
|
+
rewarding.goals.each do |goal|
|
13
|
+
goal.complete_for rewardable
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
respond_to do |format|
|
18
|
+
format.json { render json: {}, status: :created }
|
19
|
+
format.html { redirect_to redirect_url }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def verify_checksum
|
26
|
+
render text: "Invalid checksum", status: :forbidden unless Checksum.verify(params[:checksum],
|
27
|
+
[rewarding.class.name, rewarding.id, rewardable.class.name, rewardable.id])
|
28
|
+
end
|
29
|
+
|
30
|
+
def redirect_url
|
31
|
+
params[:redirect_url] || request.env['HTTP_REFERER']
|
32
|
+
end
|
33
|
+
|
34
|
+
def rewarding
|
35
|
+
rewarding_model.find reward_params[:rewarding_id]
|
36
|
+
end
|
37
|
+
|
38
|
+
def rewardable
|
39
|
+
rewardable_model.find reward_params[:rewardable_id]
|
40
|
+
end
|
41
|
+
|
42
|
+
def rewarding_model
|
43
|
+
reward_params[:rewarding_type].constantize
|
44
|
+
end
|
45
|
+
|
46
|
+
def rewardable_model
|
47
|
+
reward_params[:rewardable_type].constantize
|
48
|
+
end
|
49
|
+
|
50
|
+
def reward_params
|
51
|
+
params.require(:reward).permit(:rewarding_type, :rewarding_id, :rewardable_type, :rewardable_id)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module GoGamification::Concerns::Models::Goal
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
included do
|
5
|
+
belongs_to :rewarding, polymorphic: true
|
6
|
+
has_one :medal, dependent: :destroy
|
7
|
+
has_many :rewards, dependent: :destroy
|
8
|
+
|
9
|
+
accepts_nested_attributes_for :medal, allow_destroy: true, reject_if: :all_blank
|
10
|
+
|
11
|
+
# TODO: These should be SQL. But that's hard.
|
12
|
+
scope :completed_by, ->(subject) { all.select { |goal| goal.completed_by? subject }}
|
13
|
+
scope :incomplete_by, ->(subject) { all.reject { |goal| goal.completed_by? subject }}
|
14
|
+
|
15
|
+
# Determine whether the given subject has completed the goal.
|
16
|
+
#
|
17
|
+
# subject - An ActiveRecord model that can receive rewards.
|
18
|
+
def completed_by? subject
|
19
|
+
!!reward_for(subject)
|
20
|
+
end
|
21
|
+
|
22
|
+
# Complete the goal for the given subject.
|
23
|
+
#
|
24
|
+
# subject - An ActiveRecord model that can receive rewards.
|
25
|
+
def complete_for subject
|
26
|
+
if completed_by? subject
|
27
|
+
raise Completed, "#{self} is already completed for #{subject}"
|
28
|
+
else
|
29
|
+
::GoGamification::Reward.create! goal: self, rewardable: subject
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
# Find the Reward for the given subject.
|
36
|
+
#
|
37
|
+
# subject - A rewardable model.
|
38
|
+
def reward_for rewardable
|
39
|
+
rewards.find_by rewardable: rewardable
|
40
|
+
end
|
41
|
+
|
42
|
+
class Completed < StandardError; end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module GoGamification::Concerns::Models::Reward
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
included do
|
5
|
+
belongs_to :goal, class_name: 'GoGamification::Goal'
|
6
|
+
belongs_to :rewardable, polymorphic: true, inverse_of: :rewards
|
7
|
+
|
8
|
+
scope :unseen, -> { where seen_at: nil }
|
9
|
+
scope :seen, -> { where.not seen_at: nil }
|
10
|
+
|
11
|
+
scope :with_medals, -> { all.select &:medal }
|
12
|
+
scope :without_medals, -> { all.reject &:medal }
|
13
|
+
|
14
|
+
validates :rewardable_id, uniqueness: { scope: [:rewardable_type, :goal] }
|
15
|
+
|
16
|
+
delegate :points, to: :goal
|
17
|
+
delegate :medal, to: :goal
|
18
|
+
|
19
|
+
def see
|
20
|
+
touch :seen_at
|
21
|
+
end
|
22
|
+
|
23
|
+
def seen?
|
24
|
+
!!seen_at
|
25
|
+
end
|
26
|
+
|
27
|
+
class << self
|
28
|
+
def see
|
29
|
+
all.map { |reward| reward.see }
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module GoGamification::Concerns::Rewardable
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
included do
|
5
|
+
has_many :rewards, class_name: '::GoGamification::Reward', as: :rewardable
|
6
|
+
has_many :goals, through: :rewards, class_name: '::GoGamification::Goal'
|
7
|
+
|
8
|
+
def medals
|
9
|
+
rewards.includes(goal: :medal).collect(&:medal).compact || []
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'rails/all'
|
2
|
+
module GoGamification
|
3
|
+
class Engine < ::Rails::Engine
|
4
|
+
|
5
|
+
initializer :append_migrations do |app|
|
6
|
+
# This prevents migrations from being loaded twice from the inside of the
|
7
|
+
# gem itself (dummy test app)
|
8
|
+
if app.root.to_s !~ /#{root}/
|
9
|
+
config.paths['db/migrate'].expanded.each do |migration_path|
|
10
|
+
app.config.paths['db/migrate'] << migration_path
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
config.i18n.default_locale = :'pt-BR'
|
16
|
+
config.autoload_paths += %W(#{config.root}/lib)
|
17
|
+
config.time_zone = 'Brasilia'
|
18
|
+
config.i18n.load_path += Dir[config.root.join('config', 'locales','**', '*.{rb,yml}').to_s]
|
19
|
+
config.encoding = "utf-8"
|
20
|
+
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,136 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: go_gamification
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.4
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- João Carlos Ottobboni
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-10-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: draper
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rails
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
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: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: sqlite3
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: go_gamification engine
|
70
|
+
email:
|
71
|
+
- jcottobboni@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- MIT-LICENSE
|
77
|
+
- Rakefile
|
78
|
+
- app/controllers/go_gamification/application_controller.rb
|
79
|
+
- app/controllers/go_gamification/rewards_controller.rb
|
80
|
+
- app/helpers/go_gamification/application_helper.rb
|
81
|
+
- app/helpers/go_gamification/rewards_helper.rb
|
82
|
+
- app/models/go_gamification/goal.rb
|
83
|
+
- app/models/go_gamification/medal.rb
|
84
|
+
- app/models/go_gamification/reward.rb
|
85
|
+
- app/uploaders/go_gamification/image_uploader.rb
|
86
|
+
- app/views/go_gamification/rewards/_presentation.html.erb
|
87
|
+
- app/views/go_gamification/rewards/_reward.html.erb
|
88
|
+
- app/views/go_gamification/scorings/create.html.erb
|
89
|
+
- config/routes.rb
|
90
|
+
- db/migrate/20171020181447_create_go_gamification_tasks.rb
|
91
|
+
- db/migrate/20171020181620_create_go_gamification_scorings.rb
|
92
|
+
- db/migrate/20171020182027_rename_everything.rb
|
93
|
+
- db/migrate/20171020182119_create_go_gamification_medals.rb
|
94
|
+
- db/migrate/20171020182210_add_description_to_go_gamification_medals.rb
|
95
|
+
- db/migrate/20171020182248_rename_go_gamification_tasks_to_goals.rb
|
96
|
+
- db/migrate/20171020182329_add_seen_at_to_go_gamification_rewards.rb
|
97
|
+
- lib/go_gamefication.rb
|
98
|
+
- lib/go_gamification/activerecord.rb
|
99
|
+
- lib/go_gamification/checksum.rb
|
100
|
+
- lib/go_gamification/concerns.rb
|
101
|
+
- lib/go_gamification/concerns/controllers.rb
|
102
|
+
- lib/go_gamification/concerns/controllers/rewards_controller.rb
|
103
|
+
- lib/go_gamification/concerns/models.rb
|
104
|
+
- lib/go_gamification/concerns/models/goal.rb
|
105
|
+
- lib/go_gamification/concerns/models/medal.rb
|
106
|
+
- lib/go_gamification/concerns/models/reward.rb
|
107
|
+
- lib/go_gamification/concerns/rewardable.rb
|
108
|
+
- lib/go_gamification/concerns/rewarding.rb
|
109
|
+
- lib/go_gamification/engine.rb
|
110
|
+
- lib/go_gamification/version.rb
|
111
|
+
- lib/tasks/go_gamefication_tasks.rake
|
112
|
+
homepage: http://www.gorails.com.br
|
113
|
+
licenses:
|
114
|
+
- MIT
|
115
|
+
metadata: {}
|
116
|
+
post_install_message:
|
117
|
+
rdoc_options: []
|
118
|
+
require_paths:
|
119
|
+
- lib
|
120
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
requirements: []
|
131
|
+
rubyforge_project:
|
132
|
+
rubygems_version: 2.6.13
|
133
|
+
signing_key:
|
134
|
+
specification_version: 4
|
135
|
+
summary: go_gamification engine
|
136
|
+
test_files: []
|