mentionable 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ef19a9bd48e602074c2fff6f168520764a06fa37e72407851499d3e97fee45c
4
- data.tar.gz: '08eec1bf9f85b3448b7225d368b54c47fe182e115fe617aca8f9d7bd357f06d8'
3
+ metadata.gz: c30772dc75b4010c83e322d4a5cd12eae0505957221929975da5e0e55e39455d
4
+ data.tar.gz: ffda83a175fe71c01527df236e0fe5e903a38b2256600a98b6ba14d22db10f6a
5
5
  SHA512:
6
- metadata.gz: 74316de70bc031c06f27f9ea5fe0c79a6c746a688257b5c45967fe7c861e55d814a527aa40f1b6a30c8c3af7579cbd534ed9c1f0a6cded5114830382585cb2d6
7
- data.tar.gz: e0973b6c93f5ea03feaa13fd8fdd93e800590703181ab8da234f552d780244f86a54d7c17bd3ea74a223b53f3d5bf32d5ba766cc8ba4c7a4ec6b0011b1c0ace8
6
+ metadata.gz: b74d45e06a7d71138f71bee39b8aaf88341b937d7eb9e40abed20f6013877ebebea616cce07ee2290f8bbdb2c95dd80177b88ecfc4c9a948d1b22354d0e47f7f
7
+ data.tar.gz: b28a744af9fdb97aeb2a6f42c620617be44010217fc8c045c79273bab3455de639881a3d1cd1d52dc0e2a6bd5a6cfac308e19141c5f8d00c10cd45a3fa4f579c
data/README.md CHANGED
@@ -24,9 +24,9 @@ Or install it yourself as:
24
24
 
25
25
  ```ruby
26
26
  class Comment
27
- mentionable_as :body #, on_mention: :after_mention, regexp: /@\w+/
27
+ mentionable_as :body #, on_mention: :after_save_mention, regexp: /@\w+/
28
28
 
29
- def after_mention(mentions)
29
+ def after_save_mention(mentions)
30
30
  p mentions # Send notification if you want.
31
31
  end
32
32
  end
@@ -15,7 +15,7 @@ module Mentionable
15
15
  end
16
16
 
17
17
  module ClassMethods
18
- def mentionable_as(column, on_mention: :after_mention, regexp: REGEXP)
18
+ def mentionable_as(column, on_mention: :after_save_mention, regexp: REGEXP)
19
19
  klass = name.constantize
20
20
  klass.class_variable_set :@@mentionable_name, column
21
21
  klass.class_variable_set :@@on_mention, on_mention
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mentionable
4
- VERSION = '0.1.1'
4
+ VERSION = '0.2.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mentionable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masaki Komagata
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-06 00:00:00.000000000 Z
11
+ date: 2020-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -106,7 +106,7 @@ licenses:
106
106
  metadata:
107
107
  homepage_uri: https://github.com/komagata/mentionable
108
108
  source_code_uri: https://github.com/komagata/mentionable
109
- post_install_message:
109
+ post_install_message:
110
110
  rdoc_options: []
111
111
  require_paths:
112
112
  - lib
@@ -121,8 +121,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  requirements: []
124
- rubygems_version: 3.1.2
125
- signing_key:
124
+ rubygems_version: 3.0.3
125
+ signing_key:
126
126
  specification_version: 4
127
127
  summary: Discovery mentions from ActiveRecord column.
128
128
  test_files: []