wcc-contentful 0.3.0 → 1.0.0.pre.rc2
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 +5 -5
- data/.rspec +1 -1
- data/Guardfile +43 -0
- data/README.md +161 -11
- data/Rakefile +3 -6
- data/app/controllers/wcc/contentful/webhook_controller.rb +25 -24
- data/app/jobs/wcc/contentful/webhook_enable_job.rb +36 -2
- data/bin/console +4 -3
- data/bin/rails +2 -0
- data/config/routes.rb +1 -1
- data/doc +1 -0
- data/lib/tasks/download_schema.rake +12 -0
- data/lib/wcc/contentful.rb +69 -45
- data/lib/wcc/contentful/active_record_shim.rb +72 -0
- data/lib/wcc/contentful/configuration.rb +177 -46
- data/lib/wcc/contentful/content_type_indexer.rb +14 -0
- data/lib/wcc/contentful/downloads_schema.rb +112 -0
- data/lib/wcc/contentful/engine.rb +33 -14
- data/lib/wcc/contentful/event.rb +171 -0
- data/lib/wcc/contentful/events.rb +41 -0
- data/lib/wcc/contentful/exceptions.rb +3 -33
- data/lib/wcc/contentful/indexed_representation.rb +2 -2
- data/lib/wcc/contentful/instrumentation.rb +31 -0
- data/lib/wcc/contentful/link.rb +28 -0
- data/lib/wcc/contentful/link_visitor.rb +122 -0
- data/lib/wcc/contentful/middleware.rb +7 -0
- data/lib/wcc/contentful/middleware/store.rb +158 -0
- data/lib/wcc/contentful/middleware/store/caching_middleware.rb +114 -0
- data/lib/wcc/contentful/model.rb +37 -4
- data/lib/wcc/contentful/model_builder.rb +1 -0
- data/lib/wcc/contentful/model_methods.rb +40 -15
- data/lib/wcc/contentful/model_singleton_methods.rb +47 -30
- data/lib/wcc/contentful/rake.rb +4 -0
- data/lib/wcc/contentful/rspec.rb +46 -0
- data/lib/wcc/contentful/services.rb +61 -27
- data/lib/wcc/contentful/simple_client.rb +81 -25
- data/lib/wcc/contentful/simple_client/management.rb +43 -10
- data/lib/wcc/contentful/simple_client/response.rb +61 -22
- data/lib/wcc/contentful/simple_client/typhoeus_adapter.rb +17 -17
- data/lib/wcc/contentful/store.rb +7 -66
- data/lib/wcc/contentful/store/README.md +85 -0
- data/lib/wcc/contentful/store/base.rb +34 -119
- data/lib/wcc/contentful/store/cdn_adapter.rb +71 -12
- data/lib/wcc/contentful/store/factory.rb +186 -0
- data/lib/wcc/contentful/store/instrumentation.rb +55 -0
- data/lib/wcc/contentful/store/interface.rb +82 -0
- data/lib/wcc/contentful/store/memory_store.rb +27 -24
- data/lib/wcc/contentful/store/postgres_store.rb +268 -101
- data/lib/wcc/contentful/store/postgres_store/schema_1.sql +73 -0
- data/lib/wcc/contentful/store/postgres_store/schema_2.sql +21 -0
- data/lib/wcc/contentful/store/query.rb +246 -0
- data/lib/wcc/contentful/store/query/interface.rb +63 -0
- data/lib/wcc/contentful/store/rspec_examples.rb +48 -0
- data/lib/wcc/contentful/store/rspec_examples/basic_store.rb +629 -0
- data/lib/wcc/contentful/store/rspec_examples/include_param.rb +283 -0
- data/lib/wcc/contentful/store/rspec_examples/nested_queries.rb +342 -0
- data/lib/wcc/contentful/sync_engine.rb +181 -0
- data/lib/wcc/contentful/test.rb +7 -0
- data/lib/wcc/contentful/test/attributes.rb +56 -0
- data/lib/wcc/contentful/test/double.rb +76 -0
- data/lib/wcc/contentful/test/factory.rb +101 -0
- data/lib/wcc/contentful/version.rb +1 -1
- data/wcc-contentful.gemspec +28 -14
- metadata +248 -152
- data/.circleci/config.yml +0 -51
- data/.gitignore +0 -26
- data/.rubocop.yml +0 -242
- data/.rubocop_todo.yml +0 -19
- data/.travis.yml +0 -5
- data/CHANGELOG.md +0 -180
- data/CODE_OF_CONDUCT.md +0 -74
- data/Gemfile +0 -8
- data/LICENSE.txt +0 -21
- data/app/jobs/wcc/contentful/delayed_sync_job.rb +0 -63
- data/lib/generators/wcc/USAGE +0 -24
- data/lib/generators/wcc/model_generator.rb +0 -90
- data/lib/generators/wcc/templates/.keep +0 -0
- data/lib/generators/wcc/templates/Procfile +0 -3
- data/lib/generators/wcc/templates/contentful_shell_wrapper +0 -385
- data/lib/generators/wcc/templates/menu/generated_add_menus.ts +0 -192
- data/lib/generators/wcc/templates/menu/models/menu.rb +0 -23
- data/lib/generators/wcc/templates/menu/models/menu_button.rb +0 -23
- data/lib/generators/wcc/templates/page/generated_add_pages.ts +0 -50
- data/lib/generators/wcc/templates/page/models/page.rb +0 -23
- data/lib/generators/wcc/templates/release +0 -9
- data/lib/generators/wcc/templates/wcc_contentful.rb +0 -17
- data/lib/wcc/contentful/client_ext.rb +0 -28
- data/lib/wcc/contentful/graphql.rb +0 -14
- data/lib/wcc/contentful/graphql/builder.rb +0 -177
- data/lib/wcc/contentful/graphql/types.rb +0 -54
- data/lib/wcc/contentful/model/dropdown_menu.rb +0 -7
- data/lib/wcc/contentful/model/menu.rb +0 -6
- data/lib/wcc/contentful/model/menu_button.rb +0 -16
- data/lib/wcc/contentful/model/page.rb +0 -8
- data/lib/wcc/contentful/model/redirect.rb +0 -19
- data/lib/wcc/contentful/model_validators.rb +0 -121
- data/lib/wcc/contentful/model_validators/dsl.rb +0 -166
- data/lib/wcc/contentful/simple_client/http_adapter.rb +0 -24
- data/lib/wcc/contentful/store/lazy_cache_store.rb +0 -161
data/.circleci/config.yml
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
version: 2
|
2
|
-
jobs:
|
3
|
-
build:
|
4
|
-
docker:
|
5
|
-
- image: circleci/ruby:2.3.3-node
|
6
|
-
environment:
|
7
|
-
RAILS_ENV: test
|
8
|
-
POSTGRES_CONNECTION: postgresql://ubuntu:@127.0.0.1:5432/circle_ruby_test
|
9
|
-
- image: postgres:10
|
10
|
-
environment:
|
11
|
-
- POSTGRES_USER: ubuntu
|
12
|
-
- POSTGRES_DB: circle_ruby_test
|
13
|
-
steps:
|
14
|
-
- checkout
|
15
|
-
# Restore bundle cache
|
16
|
-
- restore_cache:
|
17
|
-
key: rails-{{ checksum "wcc-contentful.gemspec" }}
|
18
|
-
|
19
|
-
# Bundle install dependencies
|
20
|
-
- run: bundle install --path /tmp/vendor/bundle
|
21
|
-
|
22
|
-
# Store bundle cache
|
23
|
-
- save_cache:
|
24
|
-
key: rails-{{ checksum "wcc-contentful.gemspec" }}
|
25
|
-
paths:
|
26
|
-
- /tmp/vendor/bundle
|
27
|
-
|
28
|
-
# run Danger
|
29
|
-
# - type: shell
|
30
|
-
# command: |
|
31
|
-
# bundle exec danger
|
32
|
-
|
33
|
-
# run rubocop
|
34
|
-
- type: shell
|
35
|
-
command: |
|
36
|
-
bundle exec rubocop
|
37
|
-
|
38
|
-
# Run rspec in parallel
|
39
|
-
- type: shell
|
40
|
-
command: |
|
41
|
-
bundle exec rspec --profile 10 \
|
42
|
-
--format RspecJunitFormatter \
|
43
|
-
--out test_results/rspec.xml \
|
44
|
-
--format documentation \
|
45
|
-
--order rand \
|
46
|
-
$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
|
47
|
-
|
48
|
-
# Save test results for timing analysis
|
49
|
-
- store_test_results:
|
50
|
-
path: test_results
|
51
|
-
|
data/.gitignore
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
/.bundle/
|
2
|
-
/.yardoc
|
3
|
-
/_yardoc/
|
4
|
-
/coverage/
|
5
|
-
/doc/
|
6
|
-
/pkg/
|
7
|
-
/spec/reports/
|
8
|
-
/tmp/
|
9
|
-
|
10
|
-
# rspec failure tracking
|
11
|
-
.rspec_status
|
12
|
-
|
13
|
-
Gemfile.lock
|
14
|
-
|
15
|
-
# exports and error logs from contentful
|
16
|
-
contentful-export*
|
17
|
-
contentful-*-error-log-*
|
18
|
-
|
19
|
-
# User local env
|
20
|
-
.envrc
|
21
|
-
.env*
|
22
|
-
|
23
|
-
node_modules
|
24
|
-
|
25
|
-
log/
|
26
|
-
tmp/
|
data/.rubocop.yml
DELETED
@@ -1,242 +0,0 @@
|
|
1
|
-
inherit_from: .rubocop_todo.yml
|
2
|
-
|
3
|
-
AllCops:
|
4
|
-
DisplayCopNames: true
|
5
|
-
TargetRubyVersion: 2.3
|
6
|
-
Exclude:
|
7
|
-
# generated by rails/binstubs
|
8
|
-
- 'bin/**/*'
|
9
|
-
|
10
|
-
# auto generated by rails
|
11
|
-
|
12
|
-
# Config files
|
13
|
-
- 'Guardfile'
|
14
|
-
- 'Dangerfile'
|
15
|
-
|
16
|
-
# 3rd party
|
17
|
-
- 'vendor/**/*'
|
18
|
-
|
19
|
-
# generator templates
|
20
|
-
- '**/templates/**/*'
|
21
|
-
- 'tmp/**/*'
|
22
|
-
|
23
|
-
# dummy app for testing
|
24
|
-
- 'spec/dummy/**/*'
|
25
|
-
|
26
|
-
Style/Documentation:
|
27
|
-
Enabled: false
|
28
|
-
|
29
|
-
Style/BlockDelimiters:
|
30
|
-
Exclude:
|
31
|
-
# we like the `let(:foo) {}` syntax in specs
|
32
|
-
- 'spec/**/*.rb'
|
33
|
-
|
34
|
-
Style/ClassAndModuleChildren:
|
35
|
-
EnforcedStyle: compact
|
36
|
-
Exclude:
|
37
|
-
- 'lib/wcc/contentful/version.rb'
|
38
|
-
# Generators need to define the "Wcc" module so it doesnt get underscored.
|
39
|
-
- 'lib/generators/**/*.rb'
|
40
|
-
|
41
|
-
Style/FormatStringToken:
|
42
|
-
EnforcedStyle: template
|
43
|
-
|
44
|
-
Metrics/BlockLength:
|
45
|
-
Exclude:
|
46
|
-
# config files where we expect long blocks
|
47
|
-
- 'danger-wcc.gemspec'
|
48
|
-
# spec files that might have a big describe
|
49
|
-
- 'spec/**/*.rb'
|
50
|
-
# dsl files https://stackoverflow.com/a/41187163
|
51
|
-
|
52
|
-
Metrics/CyclomaticComplexity:
|
53
|
-
Enabled: false
|
54
|
-
|
55
|
-
Metrics/AbcSize:
|
56
|
-
Enabled: false
|
57
|
-
|
58
|
-
Metrics/PerceivedComplexity:
|
59
|
-
Enabled: false
|
60
|
-
|
61
|
-
Metrics/BlockLength:
|
62
|
-
Enabled: false
|
63
|
-
|
64
|
-
Metrics/MethodLength:
|
65
|
-
Enabled: false
|
66
|
-
|
67
|
-
Metrics/ClassLength:
|
68
|
-
Enabled: false
|
69
|
-
|
70
|
-
Metrics/ModuleLength:
|
71
|
-
Enabled: false
|
72
|
-
|
73
|
-
Performance/UnfreezeString:
|
74
|
-
Exclude:
|
75
|
-
- 'spec/**/*.rb'
|
76
|
-
|
77
|
-
Style/BracesAroundHashParameters:
|
78
|
-
Enabled: false
|
79
|
-
|
80
|
-
Lint/AssignmentInCondition:
|
81
|
-
Enabled: false
|
82
|
-
|
83
|
-
Lint/AmbiguousBlockAssociation:
|
84
|
-
Exclude:
|
85
|
-
- 'spec/generators/**/*.rb'
|
86
|
-
|
87
|
-
Style/EmptyMethod:
|
88
|
-
EnforcedStyle: expanded
|
89
|
-
|
90
|
-
Style/Alias:
|
91
|
-
EnforcedStyle: prefer_alias_method
|
92
|
-
|
93
|
-
Style/NumericPredicate:
|
94
|
-
EnforcedStyle: comparison
|
95
|
-
|
96
|
-
Style/RegexpLiteral:
|
97
|
-
Enabled: false
|
98
|
-
|
99
|
-
Style/ModuleFunction:
|
100
|
-
EnforcedStyle: extend_self
|
101
|
-
|
102
|
-
# Danger uses the 'fail' keyword for reporting errors
|
103
|
-
Style/SignalException:
|
104
|
-
Enabled: false
|
105
|
-
|
106
|
-
Layout/AlignParameters:
|
107
|
-
EnforcedStyle: with_fixed_indentation
|
108
|
-
|
109
|
-
Layout/IndentHash:
|
110
|
-
EnforcedStyle: consistent
|
111
|
-
|
112
|
-
Layout/AlignHash:
|
113
|
-
# allow coder to get around alignment rules by explicitly defining the hash param
|
114
|
-
EnforcedLastArgumentHashStyle: ignore_explicit
|
115
|
-
|
116
|
-
Layout/MultilineMethodCallIndentation:
|
117
|
-
EnforcedStyle: indented
|
118
|
-
|
119
|
-
Layout/MultilineOperationIndentation:
|
120
|
-
EnforcedStyle: indented
|
121
|
-
|
122
|
-
|
123
|
-
# These are all the cops that are disabled in the default configuration.
|
124
|
-
|
125
|
-
Layout/FirstArrayElementLineBreak:
|
126
|
-
Description: >-
|
127
|
-
Checks for a line break before the first element in a
|
128
|
-
multi-line array.
|
129
|
-
Enabled: true
|
130
|
-
|
131
|
-
Layout/FirstHashElementLineBreak:
|
132
|
-
Description: >-
|
133
|
-
Checks for a line break before the first element in a
|
134
|
-
multi-line hash.
|
135
|
-
Enabled: true
|
136
|
-
|
137
|
-
Layout/FirstMethodArgumentLineBreak:
|
138
|
-
Description: >-
|
139
|
-
Checks for a line break before the first argument in a
|
140
|
-
multi-line method call.
|
141
|
-
Enabled: false
|
142
|
-
|
143
|
-
Layout/FirstMethodParameterLineBreak:
|
144
|
-
Description: >-
|
145
|
-
Checks for a line break before the first parameter in a
|
146
|
-
multi-line method parameter definition.
|
147
|
-
Enabled: true
|
148
|
-
|
149
|
-
Layout/MultilineAssignmentLayout:
|
150
|
-
Description: 'Check for a newline after the assignment operator in multi-line assignments.'
|
151
|
-
StyleGuide: '#indent-conditional-assignment'
|
152
|
-
Enabled: true
|
153
|
-
|
154
|
-
Lint/MissingCopEnableDirective:
|
155
|
-
Exclude:
|
156
|
-
- 'spec/fixtures/**/*'
|
157
|
-
|
158
|
-
Style/AutoResourceCleanup:
|
159
|
-
Description: 'Suggests the usage of an auto resource cleanup version of a method (if available).'
|
160
|
-
Enabled: true
|
161
|
-
|
162
|
-
Style/CollectionMethods:
|
163
|
-
Description: 'Preferred collection methods.'
|
164
|
-
StyleGuide: '#map-find-select-reduce-size'
|
165
|
-
Enabled: true
|
166
|
-
|
167
|
-
Style/Copyright:
|
168
|
-
Description: 'Include a copyright notice in each file before any code.'
|
169
|
-
Enabled: false
|
170
|
-
|
171
|
-
Style/DocumentationMethod:
|
172
|
-
Description: 'Public methods.'
|
173
|
-
Enabled: false
|
174
|
-
Exclude:
|
175
|
-
- 'spec/**/*'
|
176
|
-
- 'test/**/*'
|
177
|
-
|
178
|
-
Style/ImplicitRuntimeError:
|
179
|
-
Description: >-
|
180
|
-
Use `raise` or `fail` with an explicit exception class and
|
181
|
-
message, rather than just a message.
|
182
|
-
Enabled: true
|
183
|
-
|
184
|
-
Style/InlineComment:
|
185
|
-
Description: 'Avoid trailing inline comments.'
|
186
|
-
Enabled: true
|
187
|
-
|
188
|
-
|
189
|
-
Style/Lambda:
|
190
|
-
EnforcedStyle: literal
|
191
|
-
|
192
|
-
Style/MethodCallWithArgsParentheses:
|
193
|
-
Description: 'Use parentheses for method calls with arguments.'
|
194
|
-
StyleGuide: '#method-invocation-parens'
|
195
|
-
Enabled: false
|
196
|
-
|
197
|
-
Style/MethodCalledOnDoEndBlock:
|
198
|
-
Description: 'Avoid chaining a method call on a do...end block.'
|
199
|
-
StyleGuide: '#single-line-blocks'
|
200
|
-
Enabled: true
|
201
|
-
Exclude:
|
202
|
-
- 'spec/**/*'
|
203
|
-
|
204
|
-
Style/MissingElse:
|
205
|
-
Description: >-
|
206
|
-
Require if/case expressions to have an else branches.
|
207
|
-
If enabled, it is recommended that
|
208
|
-
Style/UnlessElse and Style/EmptyElse be enabled.
|
209
|
-
This will conflict with Style/EmptyElse if
|
210
|
-
Style/EmptyElse is configured to style "both"
|
211
|
-
Enabled: false
|
212
|
-
EnforcedStyle: both
|
213
|
-
SupportedStyles:
|
214
|
-
# if - warn when an if expression is missing an else branch
|
215
|
-
# case - warn when a case expression is missing an else branch
|
216
|
-
# both - warn when an if or case expression is missing an else branch
|
217
|
-
- if
|
218
|
-
- case
|
219
|
-
- both
|
220
|
-
|
221
|
-
Style/OptionHash:
|
222
|
-
Description: "Don't use option hashes when you can use keyword arguments."
|
223
|
-
Enabled: false
|
224
|
-
|
225
|
-
Style/ReturnNil:
|
226
|
-
Description: 'Use return instead of return nil.'
|
227
|
-
Enabled: true
|
228
|
-
|
229
|
-
Style/Send:
|
230
|
-
Description: 'Prefer `Object#__send__` or `Object#public_send` to `send`, as `send` may overlap with existing methods.'
|
231
|
-
StyleGuide: '#prefer-public-send'
|
232
|
-
Enabled: true
|
233
|
-
Exclude:
|
234
|
-
- 'spec/**/*'
|
235
|
-
|
236
|
-
Style/StringMethods:
|
237
|
-
Description: 'Checks if configured preferred methods are used over non-preferred.'
|
238
|
-
Enabled: false
|
239
|
-
|
240
|
-
Style/SingleLineBlockParams:
|
241
|
-
Description: 'Enforces the names of some block params.'
|
242
|
-
Enabled: false
|
data/.rubocop_todo.yml
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on 2018-05-14 17:45:40 -0500 using RuboCop version 0.56.0.
|
4
|
-
# The point is for the user to remove these configuration records
|
5
|
-
# one by one as the offenses are removed from the code base.
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
8
|
-
|
9
|
-
# Offense count: 1
|
10
|
-
# Cop supports --auto-correct.
|
11
|
-
Layout/ClosingParenthesisIndentation:
|
12
|
-
Exclude:
|
13
|
-
- 'lib/wcc/contentful/store/postgres_store.rb'
|
14
|
-
|
15
|
-
# Offense count: 239
|
16
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
17
|
-
# URISchemes: http, https
|
18
|
-
Metrics/LineLength:
|
19
|
-
Max: 104
|
data/.travis.yml
DELETED
data/CHANGELOG.md
DELETED
@@ -1,180 +0,0 @@
|
|
1
|
-
# v0.3.0
|
2
|
-
|
3
|
-
* Now neccesary to require the engine in a Gemfile when using in Rails:
|
4
|
-
|
5
|
-
`gem 'wcc-contentful', require: 'wcc/contentful/rails'`
|
6
|
-
|
7
|
-
* The gem can be configured to point to a non-master environment with the following configuration parameter:
|
8
|
-
|
9
|
-
`config.environment = 'my_environment'`
|
10
|
-
|
11
|
-
* When a model is not found in contentful, `Model.find_by` returns `nil` rather than raising an error.
|
12
|
-
|
13
|
-
* #78 lazy sync store fix @gburgett merged 2018-09-25
|
14
|
-
Fixes an error found on staging, handling broken links together with cached data
|
15
|
-
|
16
|
-
refs https://github.com/watermarkchurch/watermarkresources.com/pull/262
|
17
|
-
|
18
|
-
* #77 fix json blob array to h @gburgett merged 2018-09-20
|
19
|
-
* Handle case of to_h on a json array
|
20
|
-
|
21
|
-
* #76 Remove date parsing @gburgett merged 2018-09-20
|
22
|
-
|
23
|
-
|
24
|
-
* #75 Wmresources 465 fix to h @gburgett merged 2018-09-20
|
25
|
-
* `to_h` now invokes the defined attribute readers on the model class in order to get fields.
|
26
|
-
* `to_h` no longer includes raw data deeper than the currently resolved depth on the model.
|
27
|
-
|
28
|
-
refs https://github.com/watermarkchurch/watermarkresources.com/issues/465
|
29
|
-
|
30
|
-
* #65 Allow using lazy_sync on non-master environment @gburgett merged 2018-09-20
|
31
|
-
refs https://github.com/watermarkchurch/watermarkresources.com/pull/262
|
32
|
-
|
33
|
-
* #73 Removed old validation that prevented environments when using sync stores @reidcooper merged 2018-09-08
|
34
|
-
|
35
|
-
|
36
|
-
* #72 Pass arguments correctly to DelayedSyncJob in sync_later! @chasetopher merged 2018-08-17
|
37
|
-
In `DelayedSyncJob#sync_later!`, the String `up_to_id` is being passed to the job instead of a Hash.
|
38
|
-
|
39
|
-
Included a failing spec.
|
40
|
-
|
41
|
-
* #68 environments in client ext @gburgett merged 2018-08-14
|
42
|
-
* Rewrite URLs to point to configured environment
|
43
|
-
|
44
|
-
* #63 Fix Delayed Sync Job when an JSON parse error is thrown when fetching the sync:token @reidcooper merged 2018-08-06
|
45
|
-
Issue: https://github.com/watermarkchurch/wcc-contentful/issues/62
|
46
|
-
|
47
|
-
* #66 Support for side-by-side Contentful gem @reidcooper merged 2018-08-06
|
48
|
-
https://github.com/watermarkchurch/wcc-contentful/issues/57
|
49
|
-
|
50
|
-
* #64 Fix Syntax Issue where Postgress requires parameters listed in function name, effects only pre version 10 @reidcooper merged 2018-08-06
|
51
|
-
I am running into issues when running my specs on SemaphoreCI.
|
52
|
-
|
53
|
-
There supported version of Postgres is 9.6.6, https://semaphoreci.com/docs/supported-stack.html
|
54
|
-
|
55
|
-
According to this [Stackoverflow post](https://stackoverflow.com/questions/30782925/postgresql-how-to-drop-function-if-exists-without-specifying-parameters), Postgres 10 does not require the parameters listed when trying to drop a function.
|
56
|
-
|
57
|
-
However, for the sake of compatibility, I would like to add the parameters to the drop function.
|
58
|
-
|
59
|
-
|
60
|
-
* #58 Connection Options supported for Postgres store @reidcooper merged 2018-07-19
|
61
|
-
|
62
|
-
|
63
|
-
* #59 fix for .first method on postgress store resulting in invalid tuple number 0 @CollinSchneider merged 2018-07-17
|
64
|
-
When using the Postgres data store, calling `find_by(some_field: "some-field-that-does-not-exist")` results in an `<ArgumentError: invalid tuple number 0>` due to the `.first` method not returning in time if `result.num_tuples.zero?` as it is designed in the other methods such as `find`, `delete`, `set`
|
65
|
-
|
66
|
-
* #54 Several minor fixes in support of watermark resources @gburgett merged 2018-07-13
|
67
|
-
* Additional specs proving the correctness of the circular reference detection
|
68
|
-
* Improve mime type registration to appropriately classify Contentful mime-types as an alias of application/json
|
69
|
-
|
70
|
-
refs https://github.com/watermarkchurch/watermarkresources.com/issues/217
|
71
|
-
|
72
|
-
* #53 Add option to ignore circular references @gburgett merged 2018-06-28
|
73
|
-
Model#resolve now accepts additional options to determine how to handle circular references.
|
74
|
-
|
75
|
-
Valid values are `:raise` and `:ignore`. On a circular reference, the former will raise an error while the latter will leave the link un-resolved.
|
76
|
-
|
77
|
-
* #51 Doc @gburgett merged 2018-06-27
|
78
|
-
Fix some documentation for YARD format and connect it to rubydoc.info
|
79
|
-
|
80
|
-
* #50 Resource helpers @gburgett merged 2018-06-22
|
81
|
-
Some additional utility methods on models related to this: https://zube.io/watermarkchurch/development/c/2304 (https://github.com/watermarkchurch/watermarkresources.com/issues/41)
|
82
|
-
|
83
|
-
Features:
|
84
|
-
* `resolve` now makes use of the Include param added in #47 in order to resolve to the given depth in the most efficient way possible
|
85
|
-
* A new method `resolved?` was added to model objects which checks whether links have been resolved to a given depth
|
86
|
-
* Every model now keeps track of the context that was given when it was found via `find` or `find_by` and exposes this on `sys.context`
|
87
|
-
* The context exposes a new field `sys.context.backlinks` which is an array of the parent models from which this model was resolved.
|
88
|
-
Example:
|
89
|
-
```
|
90
|
-
pry(main)> page = c.main_navigation.items[0].link
|
91
|
-
=> #<Page:0x00007ff2366e61f0>
|
92
|
-
pry(main)> page.sys.context.backlinks
|
93
|
-
=> [#<MenuButton:0x00007ff22d907de8>, #<Menu:0x00007ff22d3ac218>, #<SiteConfig:0x00007ff23404b388>]
|
94
|
-
```
|
95
|
-
* Model links now expose the ID of the linked entry via `#{field.name}_id`, similar to ActiveRecord's representation of foreign key columns
|
96
|
-
|
97
|
-
Bug Fixes:
|
98
|
-
* Model implementation auto-loading no longer suppresses NameErrors within the model class defs
|
99
|
-
* WebhookEnableJob is now only dropped in production
|
100
|
-
* `to_h` now returns a hash with string keys, so the resulting hash representation is more similar to json
|
101
|
-
|
102
|
-
Documentation:
|
103
|
-
* Much RDoc, very wow
|
104
|
-
* Readme.md now includes examples for using the store and client layers of the API via the new `Services` singleton.
|
105
|
-
* Convenience methods were added to the CDNAdapter to make it more consistent with other store implementations for the `eq` query
|
106
|
-
|
107
|
-
* #49 Algolia integration @gburgett merged 2018-06-07
|
108
|
-
Minor changes necessary to enable https://github.com/watermarkchurch/watermarkresources.com/pull/142
|
109
|
-
|
110
|
-
* #47 Resolve links via include param in contentful query @gburgett merged 2018-06-07
|
111
|
-
Hooks up the [Include query param](https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/links/retrieval-of-linked-items) to `Model.find_by`, and automatically resolves links that are given in the query response by the `includes` array.
|
112
|
-
|
113
|
-
fixes #38
|
114
|
-
|
115
|
-
* #46 Facilitate attaching jobs to be run whenever a webhook is received @gburgett merged 2018-06-05
|
116
|
-
The gem can now be configured with additional jobs to be run whenever the mounted engine receives a webhook at `/webhooks/receive`. If the job is an ActiveJob class, then `perform_later` will be called with the raw event JSON as it's only parameter. Otherwise if the job responds to `call`, it will be immediately invoked with the raw event JSON.
|
117
|
-
|
118
|
-
Syntax:
|
119
|
-
```ruby
|
120
|
-
# initializers/wcc_contentful.rb
|
121
|
-
WCC::Contentful.configure do |config|
|
122
|
-
# ...
|
123
|
-
config.webhook_jobs << MyJobClass
|
124
|
-
config.webhook_jobs << ->(event) { ... }
|
125
|
-
end
|
126
|
-
```
|
127
|
-
|
128
|
-
The gem now automatically configures a webhook to point to the correct URL on the app, if given a `management_token` and `app_url`.
|
129
|
-
|
130
|
-
fixes #39
|
131
|
-
|
132
|
-
* #43 Model name collisions @gburgett merged 2018-05-24
|
133
|
-
The Model registry no longer attempts to instantiate an applications' ActiveRecord model classes as though they were Contentful model classes. This allows the app to define an ActiveRecord model, ex. `Menu`, that collides with a content type in their space. They will refer to the ActiveRecord model by it's non-namespaced name, and the content type by it's namespaced name ex. `WCC::Contentful::Model::Menu`.
|
134
|
-
|
135
|
-
* #36 Provide a standard way to dump a model object to json @gburgett merged 2018-05-16
|
136
|
-
* Adds a recursive resolve method
|
137
|
-
* Overrides standard to_json so that the JSON dump will have fields resolved properly
|
138
|
-
|
139
|
-
* #34 Menu updates @gburgett merged 2018-05-09
|
140
|
-
Improvements to wcc-contentful gem to facilitate https://github.com/watermarkchurch/watermarkresources.com/issues/56
|
141
|
-
|
142
|
-
* #32 adds ability to nest CDN query conditions @jpowell merged 2018-05-07
|
143
|
-
closes #30
|
144
|
-
|
145
|
-
* #33 Raise ArgumentError if client uses preview without proper configuration @rorJeremy merged 2018-05-02
|
146
|
-
Right now, if a user makes a 'find_by' call to the preview api using the gem without having first configured the gem with a contentful preview token, you'll get a 500 NoMethodError that says you can't use find_by on Nil. This PR just raises an error for that scenario that explains the situation a little more clear.
|
147
|
-
|
148
|
-
# v0.2.2
|
149
|
-
|
150
|
-
* Add preview_client for doing contentful calls to their preview api
|
151
|
-
* 'find_by' can now receive a preview param set to a boolean value
|
152
|
-
* Can configure your preview_api by passing a preview_token to configure block
|
153
|
-
* The Redirect model provides a 'href' method that will give you the url it points to
|
154
|
-
|
155
|
-
# v0.2.0
|
156
|
-
|
157
|
-
* Application models can be registered to be instantiated for a given content type
|
158
|
-
* New 'lazy sync' delivery method acts as a cache that is kept up to date by the sync API
|
159
|
-
* 'eager sync' is now hooked up to a webhook which can be mounted to receive publish events
|
160
|
-
* Major changes to configuration methods
|
161
|
-
|
162
|
-
# v0.1.0
|
163
|
-
|
164
|
-
* Models are built dynamically from downloading the content_types via Contentful CDN
|
165
|
-
* 'Menu' and 'MenuItem' are defined and their structures are enforced via validation
|
166
|
-
* A GraphQL schema can optionally be generated to execute queries against Contentful
|
167
|
-
|
168
|
-
## v0.0.3
|
169
|
-
|
170
|
-
* Can now fetch Redirect models via slug, regardless of slug lettercase (uppercase or lowercase).
|
171
|
-
|
172
|
-
## v0.0.2
|
173
|
-
|
174
|
-
* Will now return nil if the Redirect model's pageReference does not include a url
|
175
|
-
* Add test coverage for the Configuration class
|
176
|
-
* Add tests for the valid_page_reference? method
|
177
|
-
|
178
|
-
## v0.0.1
|
179
|
-
|
180
|
-
* initial release
|