beaconable 0.1.1 → 0.1.2
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 +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +3 -1
- data/Gemfile.lock +2 -0
- data/README.md +3 -0
- data/beaconable.gemspec +1 -0
- data/lib/beaconable/base_beacon.rb +7 -0
- data/lib/beaconable/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b133e116dce56a3c9a54fbd591646329af2f06d659e51757d2c7368b54aef8ed
|
|
4
|
+
data.tar.gz: 257b7432b42229381bf2b59dfdc8081fa98194e6061bfc63274ed65e11968274
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2e532f351dc9a62a622bf9f50e9bf3e59e257ac144fd55ab34181045de26ff3c20747bf7c125394cd0486b6fdc25b3037f49697fc950054368e1616ecbeef87c
|
|
7
|
+
data.tar.gz: 1cd842ed8136ae51d735c59fcd2557e3e2a491bcdd981da5565a92b39139686ef939af22c31e9f73876a7b4d82b98f2f85c8c41d7b4247e105aff26532b28a71
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -21,6 +21,7 @@ GEM
|
|
|
21
21
|
ansi (1.5.0)
|
|
22
22
|
ast (2.4.0)
|
|
23
23
|
builder (3.2.3)
|
|
24
|
+
byebug (10.0.2)
|
|
24
25
|
concurrent-ruby (1.1.5)
|
|
25
26
|
i18n (1.6.0)
|
|
26
27
|
concurrent-ruby (~> 1.0)
|
|
@@ -57,6 +58,7 @@ PLATFORMS
|
|
|
57
58
|
DEPENDENCIES
|
|
58
59
|
beaconable!
|
|
59
60
|
bundler (~> 1.16)
|
|
61
|
+
byebug (~> 10.0)
|
|
60
62
|
minitest (~> 5.0)
|
|
61
63
|
minitest-reporters (~> 1.3)
|
|
62
64
|
rake (~> 10.0)
|
data/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Beaconable
|
|
2
2
|
|
|
3
|
+
[](https://travis-ci.org/Lastimoso/beaconable) [](https://github.com/dwyl/esta/issues)
|
|
4
|
+
|
|
3
5
|
Small OO patern to isolate side-effects and callbacks for your ActiveRecord Models.
|
|
4
6
|
|
|
5
7
|
## Installation
|
|
@@ -49,6 +51,7 @@ class UserBeacon < Beaconable::BaseBeacon
|
|
|
49
51
|
UpdateExternalServiceJob.perform_later(self.id) if field_changed? :email
|
|
50
52
|
end
|
|
51
53
|
end
|
|
54
|
+
```
|
|
52
55
|
|
|
53
56
|
## Development
|
|
54
57
|
|
data/beaconable.gemspec
CHANGED
|
@@ -15,6 +15,13 @@ module Beaconable
|
|
|
15
15
|
object.send(field) != object_was.send(field)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
def any_field_changed?(*fields)
|
|
19
|
+
fields.each do |field|
|
|
20
|
+
return true if field_changed?(field)
|
|
21
|
+
end
|
|
22
|
+
false
|
|
23
|
+
end
|
|
24
|
+
|
|
18
25
|
def new_entry?
|
|
19
26
|
object_was.created_at.nil?
|
|
20
27
|
end
|
data/lib/beaconable/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: beaconable
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gerardo Raiden
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-08-
|
|
11
|
+
date: 2019-08-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -108,6 +108,20 @@ dependencies:
|
|
|
108
108
|
- - "~>"
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
110
|
version: '1.3'
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: byebug
|
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
|
114
|
+
requirements:
|
|
115
|
+
- - "~>"
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: '10.0'
|
|
118
|
+
type: :development
|
|
119
|
+
prerelease: false
|
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
+
requirements:
|
|
122
|
+
- - "~>"
|
|
123
|
+
- !ruby/object:Gem::Version
|
|
124
|
+
version: '10.0'
|
|
111
125
|
description: Small OO patern to isolate side-effects and callbacks for your ActiveRecord
|
|
112
126
|
Models
|
|
113
127
|
email:
|