quickery 0.1.0 → 0.1.1
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/.travis.yml +4 -3
- data/README.md +7 -1
- data/lib/quickery/version.rb +1 -1
- data/quickery.gemspec +5 -2
- metadata +19 -6
- data/Gemfile.lock +0 -163
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f70692a2f4e06fd43908254b29130a6216a7c2601fcd80f82375a31bfd03931
|
4
|
+
data.tar.gz: '079641a4f8fba9b911442849a4d8cff55c39b4668904b76e7e807e6f167b73e8'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f719cb216c2f99ee6268088f630180d4dd190942fa96ae85062a00ff2613342b2cd34a4ac295b8c03ce833bf245c3d76c7fa17459695bc29fb95cf54ee989555
|
7
|
+
data.tar.gz: b7aff203442a9a8b6d16cbb138aaa5193bc2ab409efc769a9eeccc907bc13feee423381e3b76a7cc69d38e2e1afc7988d6dc4abb25ee112995bf8df35862982b
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Quickery
|
2
2
|
|
3
|
+
[](https://travis-ci.org/jrpolidario/quickery)
|
4
|
+
[](https://badge.fury.io/rb/quickery)
|
5
|
+
|
3
6
|
## About
|
4
7
|
|
5
8
|
* Implements Law of Demeter by mapping associated record attributes as own attributes (one-way read-only)
|
@@ -35,7 +38,7 @@ class Employee < ApplicationRecord
|
|
35
38
|
belongs_to :branch
|
36
39
|
|
37
40
|
quickery do
|
38
|
-
# TL;
|
41
|
+
# TL;DR: the following line means:
|
39
42
|
# make sure that this record's `branch_company_name` attribute will always have
|
40
43
|
# the same value as branch.company.name and updates the value accordingly if it changes
|
41
44
|
branch.company.name == :branch_company_name
|
@@ -194,6 +197,7 @@ puts Employee.joins(branch: :company).where(companies: { id: company.id })
|
|
194
197
|
|
195
198
|
## TODOs
|
196
199
|
* Possibly support two-way mapping of attributes? So that you can do, say... `employee.update!(branch_company_name: 'somenewcompanyname')`
|
200
|
+
* Improve "updates" across the quickery-defined model callbacks, by grouping attributes that will be updated and update in one go, instead of independently updating per each quickery-defined attribute
|
197
201
|
|
198
202
|
## Contributing
|
199
203
|
* pull requests and forks are very much welcomed! :) Let me know if you find any bug! Thanks
|
@@ -205,5 +209,7 @@ puts Employee.joins(branch: :company).where(companies: { id: company.id })
|
|
205
209
|
* see [developer_guide.md](developer_guide.md)
|
206
210
|
|
207
211
|
## Changelog
|
212
|
+
* 0.1.1
|
213
|
+
* Gemspec fixes and travis build fixes.
|
208
214
|
* 0.1.0
|
209
215
|
* initial beta release
|
data/lib/quickery/version.rb
CHANGED
data/quickery.gemspec
CHANGED
@@ -21,9 +21,12 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ['lib']
|
23
23
|
|
24
|
-
spec.
|
25
|
-
spec.add_dependency 'activesupport', '~> 4.0'
|
24
|
+
spec.required_ruby_version = '>= 1.9.3'
|
26
25
|
|
26
|
+
spec.add_dependency 'activerecord', '>= 4.0'
|
27
|
+
spec.add_dependency 'activesupport', '>= 4.0'
|
28
|
+
|
29
|
+
spec.add_development_dependency 'rails', '~> 4.0'
|
27
30
|
spec.add_development_dependency 'byebug', '~> 9.0'
|
28
31
|
spec.add_development_dependency 'bundler', '~> 1.16'
|
29
32
|
spec.add_development_dependency 'rake', '~> 10.0'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quickery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jules Roman Polidario
|
@@ -14,25 +14,39 @@ dependencies:
|
|
14
14
|
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '4.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '4.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rails
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '4.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
52
|
- - "~>"
|
@@ -208,7 +222,6 @@ files:
|
|
208
222
|
- ".travis.yml"
|
209
223
|
- Appraisals
|
210
224
|
- Gemfile
|
211
|
-
- Gemfile.lock
|
212
225
|
- Guardfile
|
213
226
|
- LICENSE.txt
|
214
227
|
- README.md
|
@@ -240,7 +253,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
240
253
|
requirements:
|
241
254
|
- - ">="
|
242
255
|
- !ruby/object:Gem::Version
|
243
|
-
version:
|
256
|
+
version: 1.9.3
|
244
257
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
245
258
|
requirements:
|
246
259
|
- - ">="
|
data/Gemfile.lock
DELETED
@@ -1,163 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
quickery (0.1.0)
|
5
|
-
activerecord
|
6
|
-
activesupport
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: https://rubygems.org/
|
10
|
-
specs:
|
11
|
-
actionpack (5.2.0)
|
12
|
-
actionview (= 5.2.0)
|
13
|
-
activesupport (= 5.2.0)
|
14
|
-
rack (~> 2.0)
|
15
|
-
rack-test (>= 0.6.3)
|
16
|
-
rails-dom-testing (~> 2.0)
|
17
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
18
|
-
actionview (5.2.0)
|
19
|
-
activesupport (= 5.2.0)
|
20
|
-
builder (~> 3.1)
|
21
|
-
erubi (~> 1.4)
|
22
|
-
rails-dom-testing (~> 2.0)
|
23
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
24
|
-
activemodel (5.2.0)
|
25
|
-
activesupport (= 5.2.0)
|
26
|
-
activerecord (5.2.0)
|
27
|
-
activemodel (= 5.2.0)
|
28
|
-
activesupport (= 5.2.0)
|
29
|
-
arel (>= 9.0)
|
30
|
-
activesupport (5.2.0)
|
31
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
32
|
-
i18n (>= 0.7, < 2)
|
33
|
-
minitest (~> 5.1)
|
34
|
-
tzinfo (~> 1.1)
|
35
|
-
appraisal (2.2.0)
|
36
|
-
bundler
|
37
|
-
rake
|
38
|
-
thor (>= 0.14.0)
|
39
|
-
arel (9.0.0)
|
40
|
-
builder (3.2.3)
|
41
|
-
byebug (9.1.0)
|
42
|
-
coderay (1.1.2)
|
43
|
-
combustion (0.9.1)
|
44
|
-
activesupport (>= 3.0.0)
|
45
|
-
railties (>= 3.0.0)
|
46
|
-
thor (>= 0.14.6)
|
47
|
-
concurrent-ruby (1.0.5)
|
48
|
-
crass (1.0.4)
|
49
|
-
database_cleaner (1.7.0)
|
50
|
-
diff-lcs (1.3)
|
51
|
-
erubi (1.7.1)
|
52
|
-
factory_bot (4.10.0)
|
53
|
-
activesupport (>= 3.0.0)
|
54
|
-
factory_bot_rails (4.10.0)
|
55
|
-
factory_bot (~> 4.10.0)
|
56
|
-
railties (>= 3.0.0)
|
57
|
-
faker (1.9.1)
|
58
|
-
i18n (>= 0.7)
|
59
|
-
ffi (1.9.25)
|
60
|
-
formatador (0.2.5)
|
61
|
-
guard (2.14.2)
|
62
|
-
formatador (>= 0.2.4)
|
63
|
-
listen (>= 2.7, < 4.0)
|
64
|
-
lumberjack (>= 1.0.12, < 2.0)
|
65
|
-
nenv (~> 0.1)
|
66
|
-
notiffany (~> 0.0)
|
67
|
-
pry (>= 0.9.12)
|
68
|
-
shellany (~> 0.0)
|
69
|
-
thor (>= 0.18.1)
|
70
|
-
guard-compat (1.2.1)
|
71
|
-
guard-rspec (4.7.3)
|
72
|
-
guard (~> 2.1)
|
73
|
-
guard-compat (~> 1.1)
|
74
|
-
rspec (>= 2.99.0, < 4.0)
|
75
|
-
i18n (1.0.1)
|
76
|
-
concurrent-ruby (~> 1.0)
|
77
|
-
listen (3.1.5)
|
78
|
-
rb-fsevent (~> 0.9, >= 0.9.4)
|
79
|
-
rb-inotify (~> 0.9, >= 0.9.7)
|
80
|
-
ruby_dep (~> 1.2)
|
81
|
-
loofah (2.2.2)
|
82
|
-
crass (~> 1.0.2)
|
83
|
-
nokogiri (>= 1.5.9)
|
84
|
-
lumberjack (1.0.13)
|
85
|
-
method_source (0.9.0)
|
86
|
-
mini_portile2 (2.3.0)
|
87
|
-
minitest (5.11.3)
|
88
|
-
nenv (0.3.0)
|
89
|
-
nokogiri (1.8.4)
|
90
|
-
mini_portile2 (~> 2.3.0)
|
91
|
-
notiffany (0.1.1)
|
92
|
-
nenv (~> 0.1)
|
93
|
-
shellany (~> 0.0)
|
94
|
-
pry (0.11.3)
|
95
|
-
coderay (~> 1.1.0)
|
96
|
-
method_source (~> 0.9.0)
|
97
|
-
rack (2.0.5)
|
98
|
-
rack-test (1.1.0)
|
99
|
-
rack (>= 1.0, < 3)
|
100
|
-
rails-dom-testing (2.0.3)
|
101
|
-
activesupport (>= 4.2.0)
|
102
|
-
nokogiri (>= 1.6)
|
103
|
-
rails-html-sanitizer (1.0.4)
|
104
|
-
loofah (~> 2.2, >= 2.2.2)
|
105
|
-
railties (5.2.0)
|
106
|
-
actionpack (= 5.2.0)
|
107
|
-
activesupport (= 5.2.0)
|
108
|
-
method_source
|
109
|
-
rake (>= 0.8.7)
|
110
|
-
thor (>= 0.18.1, < 2.0)
|
111
|
-
rake (10.5.0)
|
112
|
-
rb-fsevent (0.10.3)
|
113
|
-
rb-inotify (0.9.10)
|
114
|
-
ffi (>= 0.5.0, < 2)
|
115
|
-
rspec (3.7.0)
|
116
|
-
rspec-core (~> 3.7.0)
|
117
|
-
rspec-expectations (~> 3.7.0)
|
118
|
-
rspec-mocks (~> 3.7.0)
|
119
|
-
rspec-core (3.7.1)
|
120
|
-
rspec-support (~> 3.7.0)
|
121
|
-
rspec-expectations (3.7.0)
|
122
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
123
|
-
rspec-support (~> 3.7.0)
|
124
|
-
rspec-mocks (3.7.0)
|
125
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
126
|
-
rspec-support (~> 3.7.0)
|
127
|
-
rspec-rails (3.7.2)
|
128
|
-
actionpack (>= 3.0)
|
129
|
-
activesupport (>= 3.0)
|
130
|
-
railties (>= 3.0)
|
131
|
-
rspec-core (~> 3.7.0)
|
132
|
-
rspec-expectations (~> 3.7.0)
|
133
|
-
rspec-mocks (~> 3.7.0)
|
134
|
-
rspec-support (~> 3.7.0)
|
135
|
-
rspec-support (3.7.1)
|
136
|
-
ruby_dep (1.5.0)
|
137
|
-
shellany (0.0.1)
|
138
|
-
sqlite3 (1.3.13)
|
139
|
-
thor (0.20.0)
|
140
|
-
thread_safe (0.3.6)
|
141
|
-
tzinfo (1.2.5)
|
142
|
-
thread_safe (~> 0.1)
|
143
|
-
|
144
|
-
PLATFORMS
|
145
|
-
ruby
|
146
|
-
|
147
|
-
DEPENDENCIES
|
148
|
-
appraisal (~> 2.2.0)
|
149
|
-
bundler (~> 1.16)
|
150
|
-
byebug (~> 9.0)
|
151
|
-
combustion (~> 0.9.1)
|
152
|
-
database_cleaner (~> 1.7.0)
|
153
|
-
factory_bot_rails
|
154
|
-
faker (~> 1.9.1)
|
155
|
-
guard-rspec (~> 4.7.3)
|
156
|
-
quickery!
|
157
|
-
rake (~> 10.0)
|
158
|
-
rspec (~> 3.7.0)
|
159
|
-
rspec-rails (~> 3.7.2)
|
160
|
-
sqlite3 (~> 1.3.13)
|
161
|
-
|
162
|
-
BUNDLED WITH
|
163
|
-
1.16.1
|