Sha256: b55469530449346eb96d7293484e14a0923adf14183076332a99da5340dd84f5

Contents?: true

Size: 1.29 KB

Versions: 36

Compression:

Stored size: 1.29 KB

Contents

# Use this hook to configure merit parameters
Merit.setup do |config|
  # Add application observers to get notifications any time merit changes reputation.
  config.add_observer 'DummyObserver'

  config.orm = ENV['ORM'].try(:to_sym)
end

# Create application badges (uses https://github.com/norman/ambry)
badge_id = 0
[{
  id: (badge_id = badge_id+1),
  name: 'commenter',
  description: 'You\'ve participated good in our boards! (level 10)',
  level: 10
}, {
  id: (badge_id = badge_id+1),
  name: 'commenter',
  description: 'You\'ve participated great in our boards!'
}, {
  id: (badge_id = badge_id+1),
  name: 'visited_admin',
  description: 'You sneaked in!'
}, {
  id: (badge_id = badge_id+1),
  name: 'has_commenter_friend',
  description: 'Testing badge granting in more than one rule per action, with different targets'
}, {
  id: (badge_id = badge_id+1),
  name: 'relevant-commenter',
  description: 'You\'ve received 5 votes on a comment.'
}, {
  id: (badge_id = badge_id+1),
  name: 'autobiographer',
  description: 'You\'ve edited your name and it\'s above 4 characters! (?)'
}, {
  id: (badge_id = badge_id+1),
  name: 'just-registered'
}, {
  id: (badge_id = badge_id+1),
  name: 'wildcard_badge'
}, {
  id: (badge_id = badge_id+1),
  name: 'gossip'
}].each do |badge|
  Merit::Badge.create! badge
end

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
merit-4.0.3 test/dummy/config/initializers/merit.rb
qalam_merit-4.5.12 test/dummy/config/initializers/merit.rb
merit-4.0.2 test/dummy/config/initializers/merit.rb
qalam_merit-4.5.11 test/dummy/config/initializers/merit.rb
qalam_merit-4.5.10 test/dummy/config/initializers/merit.rb
qalam_merit-4.5.09 test/dummy/config/initializers/merit.rb
qalam_merit-4.5.08 test/dummy/config/initializers/merit.rb
qalam_merit-4.5.07 test/dummy/config/initializers/merit.rb
qalam_merit-4.5.06 test/dummy/config/initializers/merit.rb
qalam_merit-4.5.05 test/dummy/config/initializers/merit.rb
qalam_merit-4.5.04 test/dummy/config/initializers/merit.rb
qalam_merit-4.5.03 test/dummy/config/initializers/merit.rb
qalam_merit-4.5.02 test/dummy/config/initializers/merit.rb
qalam_merit-4.5.01 test/dummy/config/initializers/merit.rb
qalam_merit-4.5.00 test/dummy/config/initializers/merit.rb
qalam_merit-4.0.4 test/dummy/config/initializers/merit.rb
qalam_merit-4.0.35 test/dummy/config/initializers/merit.rb
merit-4.0.1 test/dummy/config/initializers/merit.rb
merit-4.0.0 test/dummy/config/initializers/merit.rb
merit-3.0.3 test/dummy/config/initializers/merit.rb