merit 4.0.2 → 4.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +6 -0
- data/lib/merit/generators/active_record/templates/create_merit_actions.erb +2 -2
- data/lib/merit.rb +13 -0
- data/merit.gemspec +2 -1
- data/test/dummy/db/schema.rb +2 -2
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1163ea7681b5daca51eb89a7785bc648fe86ddbefff1a05cdc765c20c9b91973
|
4
|
+
data.tar.gz: 1329168f700f69f1d0eff4ca196ed511302b7839745eb8ed58bb5bb277cd5d51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e112a21e6ada4964c86c7253c72bc4235f4ab478a876badfa27cf1d60d2cea3ec297f234219100bc9049e50ea859860a7d6c3f504dcca86b8424da3aa28e007
|
7
|
+
data.tar.gz: 39f8af732714702142e9b0f279c63b7aa528113fd81f39df99f94ae09ca0320e9a2f52b230dd919bedc9e42f5947aed9ad656df89c84c9bc09a56cdacd7e8438
|
data/NEWS.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
User-visible changes worth mentioning.
|
4
4
|
|
5
|
+
## 4.0.3
|
6
|
+
|
7
|
+
- Add webrick as a development dependency
|
8
|
+
- [#363] Fix: `warning: already initialized constant Merit::*` messages
|
9
|
+
- [#357] Fix `merit_actions` migration template
|
10
|
+
|
5
11
|
## 4.0.2
|
6
12
|
|
7
13
|
- [#355, #356] Add index on merit_actions.processed column
|
data/lib/merit.rb
CHANGED
@@ -35,6 +35,16 @@ module Merit
|
|
35
35
|
@config.add_observer(class_name)
|
36
36
|
end
|
37
37
|
|
38
|
+
# If the app is reloaded, avoid printing `warning: previous definition of AppBadgeRules was here`
|
39
|
+
def self.remove_badge_rules
|
40
|
+
remove_const(:AppBadgeRules) if self.const_defined?('AppBadgeRules')
|
41
|
+
end
|
42
|
+
|
43
|
+
# If the app is reloaded, avoid printing `warning: previous definition of AppPointRules was here`
|
44
|
+
def self.remove_point_rules
|
45
|
+
remove_const(:AppPointRules) if self.const_defined?('AppPointRules')
|
46
|
+
end
|
47
|
+
|
38
48
|
class Configuration
|
39
49
|
attr_accessor :checks_on_each_request, :orm, :user_model_name, :observers,
|
40
50
|
:current_user_method
|
@@ -65,6 +75,9 @@ module Merit
|
|
65
75
|
ActiveSupport.on_load(:active_record) { include Merit }
|
66
76
|
ActiveSupport.on_load(app.config.api_only ? :action_controller_api : :action_controller_base) do
|
67
77
|
begin
|
78
|
+
# Remove previous definitions of constant if they are defined when app reloads
|
79
|
+
Merit.remove_badge_rules
|
80
|
+
Merit.remove_point_rules
|
68
81
|
# Load app rules on boot up
|
69
82
|
Merit::AppBadgeRules = Merit::BadgeRules.new.defined_rules
|
70
83
|
Merit::AppPointRules = Merit::PointRules.new.defined_rules
|
data/merit.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.files = `git ls-files`.split("\n").reject{|f| f =~ /^\./ }
|
7
7
|
s.test_files = `git ls-files -- test/*`.split("\n")
|
8
8
|
s.license = 'MIT'
|
9
|
-
s.version = '4.0.
|
9
|
+
s.version = '4.0.3'
|
10
10
|
s.authors = ["Tute Costa"]
|
11
11
|
s.email = 'tutecosta@gmail.com'
|
12
12
|
|
@@ -21,4 +21,5 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.add_development_dependency 'rubocop'
|
22
22
|
s.add_development_dependency 'minitest-rails'
|
23
23
|
s.add_development_dependency 'mocha'
|
24
|
+
s.add_development_dependency 'webrick'
|
24
25
|
end
|
data/test/dummy/db/schema.rb
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
# of editing this file, please use the migrations feature of Active Record to
|
3
3
|
# incrementally modify your database, and then regenerate this schema definition.
|
4
4
|
#
|
5
|
-
# This file is the source Rails uses to define your schema when running `rails
|
6
|
-
# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
|
5
|
+
# This file is the source Rails uses to define your schema when running `bin/rails
|
6
|
+
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
7
7
|
# be faster and is potentially less error prone than running all of your
|
8
8
|
# migrations from scratch. Old migrations may fail to apply correctly if those
|
9
9
|
# migrations use external dependencies or application code.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tute Costa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ambry
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: webrick
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
125
139
|
description: Manage badges, points and rankings (reputation) in your Rails app.
|
126
140
|
email: tutecosta@gmail.com
|
127
141
|
executables: []
|
@@ -280,7 +294,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
280
294
|
- !ruby/object:Gem::Version
|
281
295
|
version: '0'
|
282
296
|
requirements: []
|
283
|
-
rubygems_version: 3.
|
297
|
+
rubygems_version: 3.2.32
|
284
298
|
signing_key:
|
285
299
|
specification_version: 4
|
286
300
|
summary: Reputation engine for Rails apps
|