Skip to content

Commit 004c002

Browse files
committed
Support for ActiveModel 6.0
1 parent 57b5a96 commit 004c002

File tree

8 files changed

+91
-50
lines changed

8 files changed

+91
-50
lines changed

.travis.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
language: ruby
22
rvm:
3-
- 2.3.7
4-
- 2.4.4
5-
- 2.6.0
6-
before_install: gem install bundler
3+
- 2.6
4+
- 2.7
5+
before_install:
6+
- yes | gem update --system --force
7+
- gem install bundler

Changes.md

+56-18
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
## Parse-Stack Changelog
22

3+
### 1.9.0
4+
5+
- Support for ActiveModel and ActiveSupport 6.0.
6+
- Fixes `as_json` tests related to changes.
7+
- Support for Faraday 1.0 and FaradayMiddleware 1.0
8+
- Minimum Ruby version is now `>= 2.5.0`
9+
310
### 1.8.0
11+
412
- NEW: Support for Parse Server [full text search](https://github.com/modernistik/parse-stack#full-text-search-constraint) with the `text_search` operator. Related to [Issue#46](https://github.com/modernistik/parse-stack/issues/46).
513
- NEW: Support for `:distinct` aggregation query. Finds the distinct values for a specified field across a single collection or view and returns the results in an array.
614
For example, `User.distinct(:city, :created_at.after => 3.days.ago)` to return an array of unique city names for which records were created in the last 3 days.
715

816
### 1.7.4
17+
918
- NEW: Added `parse_object` extension to Hash classes to more easily call
1019
Parse::Object.build in `map` loops with symbol to proc.
1120
- CHANGED: Renamed `hyperdrive_config!` to `Parse::Hyperdrive.config!`
@@ -23,11 +32,13 @@
2332
- FIXED: Fixes issues with double '/' in update URI paths.
2433

2534
### 1.7.3
35+
2636
- CHANGED: Moved to using preferred ENV variable names based on parse-server cli.
2737
- CHANGED: Default url is now http://localhost:1337/parse
2838
- NEW: Added method `hyperdrive_config!` to apply remote ENV from remote JSON url.
2939

3040
### 1.7.2
41+
3142
- NEW: `Parse::Model.autosave_on_create` has been removed in favor of `first_or_create!`.
3243
- NEW: Webhook Triggers and Functions now have a `wlog` method, similar to `puts`, but allows easier tracing of
3344
single requests in a multi-request threaded environment. (See Parse::Webhooks::Payload)
@@ -51,8 +62,8 @@
5162
- [PR#39](https://github.com/modernistik/parse-stack/pull/39): Allow Moneta::Expires
5263
as cache object to allow for non-native expiring caches by [GrahamW](https://github.com/GrahamW)
5364

54-
5565
### 1.7.1
66+
5667
- NEW: `:timezone` datatype that maps to `Parse::TimeZone` (which mimics `ActiveSupport::TimeZone`)
5768
- NEW: Installation `:time_zone` field is now a `Parse::TimeZone` instance.
5869
- Any properties named `time_zone` or `timezone` with a string data type set will be converted to use `Parse::TimeZone` as the data class.
@@ -71,13 +82,15 @@
7182
- Parse::Installation now has a `has_one` association to Session through `:session`
7283

7384
### 1.7.0
85+
7486
- NEW: You can use `set_default_acl` to set default ACLs for your subclasses.
7587
- NEW: Support for `withinPolygon` query constraint.
7688
- Refactoring of the default ACL system and deprecation of `Parse::Object.acl`
7789
- Parse::ACL.everyone returns an ACL instance with public read and writes.
7890
- Documentation updates.
7991

8092
### 1.6.12
93+
8194
- NEW: Parse.use_shortnames! to utilize shorter class methods. (optional)
8295
- NEW: parse-console supports `--url` option to load config from JSON url.
8396
- FIXES: Issue #27 where core classes could not be auto-upgraded if they were missing.
@@ -88,10 +101,11 @@
88101
- Parse::Query will raise an exception if a non-nil value is passed to `:session` that
89102
does not provide a valid session token string.
90103
- `save` and `destroy` will raise an exception if a non-nil `session` argument is passed
91-
that does not provide a valid session token string.
104+
that does not provide a valid session token string.
92105
- Additional documentation changes and tests.
93106

94107
### 1.6.11
108+
95109
- NEW: Parse::Object#sig method to get quick information about an instance.
96110
- FIX: Typo fix when using Array#objectIds.
97111
- FIX: Passing server url in parse-console without the `-s` option when using IRB.
@@ -101,24 +115,27 @@
101115
- parse-console supports `--config-sample` to generate a sample configuration file.
102116

103117
### 1.6.7
118+
104119
- Default SERVER_URL changed to http://localhost:1337/parse
105120
- NEW: Command line tool `parse-console` to do interactive Parse development with parse-stack.
106121
- REMOVED: Deprecated parse.com specific APIs under the `/apps/` path.
107122

108123
### 1.6.5
124+
109125
- Client handles HTTP Status 429 (RetryLimitExceeded)
110126
- Role class does not automatically set default ACLs for Roles. You can restore
111-
previous behavior by using `before_save :apply_default_acls`.
127+
previous behavior by using `before_save :apply_default_acls`.
112128
- Fixed minor issue to Parse::User.signup when merging username into response.
113129
- NEW: Adds Parse::Product core class.
114130
- NEW: Rake task to list registered webhooks. `rake parse:webhooks:list`
115131
- Experimental support for beforeFind and afterFind - though webhook support not
116-
yet fully available in open source Parse Server.
132+
yet fully available in open source Parse Server.
117133
- Removes HTTPS requirement on webhooks.
118134
- FIXES: Issue with WEBHOOK_KEY not being properly validated when set.
119135
- beforeSaves now return empty hash instead of true on noop changes.
120136

121137
### 1.6.4
138+
122139
- Fixes #20: All temporary headers values are strings.
123140
- Reduced cache storage consumption by only storing response body and headers.
124141
- Increased maximum cache content length size to 1.25 MB.
@@ -128,14 +145,16 @@ yet fully available in open source Parse Server.
128145
- Updated test to validate against MT6.
129146

130147
### 1.6.1
148+
131149
- NEW: Batch requests are now parallelized.
132150
- `skip` in queries no longer capped to 10,000.
133-
- `limit` in queries no longer capped at 1000.
151+
- `limit` in queries no longer capped at 1000.
134152
- `all()` queries can now return as many results as possible.
135153
- NEW: `each()` method on Parse::Object subclasses to iterate
136154
over all records in the colleciton.
137155

138156
### 1.6.0
157+
139158
- NEW: Auto generate models based on your remote schema.
140159
- The default server url is now 'http://localhost:1337/parse'.
141160
- Improves thread-safety of Webhooks middleware.
@@ -159,11 +178,13 @@ yet fully available in open source Parse Server.
159178
- All Parse errors inherit from Parse::Error.
160179

161180
### 1.5.3
181+
162182
- Several fixes and performance improvements.
163183
- Major revisions to documentation.
164184
- Support for increment! and decrement! for Integer and Float properties.
165185

166186
### 1.5.2
187+
167188
- FIXES #16: Constraints to `count` were not properly handled.
168189
- FIXES #15: Incorrect call to `request_password_reset`.
169190
- FIXES #14: Typos
@@ -179,6 +200,7 @@ yet fully available in open source Parse Server.
179200
- All constraint subclasses are under the Constraint namespace.
180201

181202
### 1.5.1
203+
182204
- BREAKING CHANGE: The default `has_many` implementation is `:query` instead of `:array`.
183205
- NEW: Support for `has_one` type of associations.
184206
- NEW: `has_many` associations support `Query` implementation as the inverse of `:belongs_to`.
@@ -212,6 +234,7 @@ yet fully available in open source Parse Server.
212234
- `Parse::Object#validate!` can be used in webhook to throw webhook error on failed validation.
213235

214236
### 1.4.3
237+
215238
- NEW: Support for rails generators: `parse_stack:install` and `parse_stack:model`.
216239
- Support Parse::Date with ActiveSupport::TimeWithZone.
217240
- :date properties will now raise an error if value was not converted to a Parse::Date.
@@ -223,6 +246,7 @@ yet fully available in open source Parse Server.
223246
- Added `anonymous?` instance method to `Parse::User` class.
224247

225248
### 1.3.8
249+
226250
- Support for reloading the Parse config data with `Parse.config!`.
227251
- The Parse::Request object is now provided in the Parse::Response instance.
228252
- The HTTP status code is provided in `http_status` accessor for a Parse::Response.
@@ -234,11 +258,12 @@ yet fully available in open source Parse Server.
234258
- NEW: `:id` constraint to allow passing an objectId to a query where we will infer the class.
235259

236260
### 1.3.7
261+
237262
- Fixes json_api loading issue between ruby json and active_model_serializers.
238263
- Fixes loading active_support core extensions.
239264
- Support for passing a `:session_token` as part of a Parse::Query.
240265
- Default mime-type for Parse::File instances is `image/jpeg`. You can override the default by setting
241-
`Parse::File.default_mime_type`.
266+
`Parse::File.default_mime_type`.
242267
- Added `Parse.config` for easy access to `Parse::Client.client(:default).config`
243268
- Support for `Parse.auto_upgrade!` to easily upgrade all schemas.
244269
- You can import useful rake tasks by requiring `parse/stack/tasks` in your rake file.
@@ -253,37 +278,41 @@ yet fully available in open source Parse Server.
253278
- You can turn off formatting field names with `Parse::Query.field_formatter = nil`.
254279

255280
### 1.3.1
281+
256282
- Parse::Query now supports `:cache` and `:use_master_key` option. (experimental)
257283
- Minimum ruby version set to 1.9.3 (same as ActiveModel 4.2.1)
258284
- Support for Rails 5.0+ and Rack 2.0+
259285

260286
### 1.3.0
261-
- **IMPORTANT**: __Raising an error no longer sends an error response back to
262-
the client in a Webhook trigger. You must now call `error!('...')` instead of
263-
calling `raise '...'`.__ The webhook block is now binded to the Parse::Webhooks::Payload
264-
instance, removing the need to pass `payload` object; use the instance methods directly.
265-
See updated README.md for more details.
287+
288+
- **IMPORTANT**: **Raising an error no longer sends an error response back to
289+
the client in a Webhook trigger. You must now call `error!('...')` instead of
290+
calling `raise '...'`.** The webhook block is now binded to the Parse::Webhooks::Payload
291+
instance, removing the need to pass `payload` object; use the instance methods directly.
292+
See updated README.md for more details.
266293
- **Parse-Stack will throw new exceptions** depending on the error code returned by Parse. These
267-
are of type AuthenticationError, TimeoutError, ProtocolError, ServerError, ConnectionError and RequestLimitExceededError.
294+
are of type AuthenticationError, TimeoutError, ProtocolError, ServerError, ConnectionError and RequestLimitExceededError.
268295
- `nil` and Delete operations for `:integers` and `:booleans` are no longer typecast.
269296
- Added aliases `before`, `on_or_before`, `after` and `on_or_after` to help with
270-
comparing non-integer fields such as dates. These map to `lt`,`lte`, `gt` and `gte`.
297+
comparing non-integer fields such as dates. These map to `lt`,`lte`, `gt` and `gte`.
271298
- Schema API return true is no changes were made to the table on `auto_upgrade!` (success)
272299
- Parse::Middleware::Caching no longer caches 404 and 410 responses; and responses
273-
with content lengths less than 20 bytes.
300+
with content lengths less than 20 bytes.
274301
- FIX: Parse::Payload when applying auth_data in Webhooks. This fixes handing Facebook
275-
login with Android devices.
302+
login with Android devices.
276303
- New method `save!` to raise an exception if the save fails.
277304
- FIX: Verify Content-Type header field is present for webhooks before checking its value.
278305
- FIX: Support `reload!` when using it Padrino.
279306

280307
### 1.2.1
308+
281309
- Add active support string dependencies.
282310
- Support for handling the `Delete` operation on belongs_to
283311
and has_many relationships.
284312
- Documentation changes for supported Parse atomic operations.
285313

286314
### 1.2
315+
287316
- Fixes issues with first_or_create.
288317
- Fixes issue when singularizing :belongs_to and :has_many property names.
289318
- Makes sure time is sent as UTC in queries.
@@ -292,48 +321,57 @@ login with Android devices.
292321
- Minimum version for ActiveModel and ActiveSupport is now 4.2.1
293322

294323
### 1.1
324+
295325
- In Query `join` has been renamed to `matches`.
296326
- Not In Query `exclude` has been renamed to `excludes` for consistency.
297327
- Parse::Query now has a `:keys` operation to be usd when passing sub-queries to `select` and `matches`
298328
- Improves query supporting `select`, `matches`, `matches` and `excludes`.
299329
- Regular expression queries for `like` now send regex options
300330

301331
### 1.0.10
332+
302333
- Fixes issues with setting default values as dirty when using the builder or before_save hook.
303334
- Fixes issues with autofetching pointers when default values are set.
304335

305336
### 1.0.8
337+
306338
- Fixes issues when setting a collection proxy property with a collection proxy.
307339
- Default array values are now properly casted as collection proxies.
308340
- Default booleans values of `false` are now properly set.
309341

310342
### 1.0.7
343+
311344
- Fixes issues when copying dates.
312345
- Fixes issues with double-arrays.
313346
- Fixes issues with mapping columns to atomic operations.
314347

315348
### 1.0.6
349+
316350
- Fixes issue when making batch requests with special prefix url.
317351
- Adds Parse::ConnectionError custom exception type.
318352
- You can call locally registered cloud functions with
319-
Parse::Webhooks.run_function(:functionName, params) without going through the
320-
entire Parse API network stack.
353+
Parse::Webhooks.run_function(:functionName, params) without going through the
354+
entire Parse API network stack.
321355
- `:symbolize => true` now works for `:array` data types. All items in the collection
322-
will be symbolized - useful for array of strings.
356+
will be symbolized - useful for array of strings.
323357
- Prevent ACLs from causing an autofetch.
324358
- Empty strings, arrays and `false` are now working with `:default` option in properties.
325359

326360
### 1.0.5
361+
327362
- Defaults are applied on object instantiation.
328363
- When applying default values, dirty tracking is called.
329364

330365
### 1.0.4
366+
331367
- Fixes minor issue when storing and retrieving objects from the cache.
332368
- Support for providing :server_url as a connection option for those migrating hosting
333369
their own parse-server.
334370

335371
### 1.0.3
372+
336373
- Fixes minor issue when passing `nil` to the class `find` method.
337374

338375
### 1.0.2
376+
339377
- Fixes internal issue with `operate_field!` method.

Gemfile.lock

+20-18
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,45 @@
11
PATH
22
remote: .
33
specs:
4-
parse-stack (1.8.1)
4+
parse-stack (1.9.0)
55
active_model_serializers (>= 0.9, < 1)
6-
activemodel (>= 4.2.1, < 6)
7-
activesupport (>= 4.2.1, < 7)
8-
faraday (>= 0.8, < 1)
9-
faraday_middleware (>= 0.9, < 1)
6+
activemodel (>= 5, < 7)
7+
activesupport (>= 5, < 7)
8+
faraday (>= 0.8, < 2)
9+
faraday_middleware (>= 0.9, < 2)
1010
moneta (< 2)
1111
parallel (>= 1.6, < 2)
1212
rack (>= 2.0.6, < 3)
1313

1414
GEM
1515
remote: https://rubygems.org/
1616
specs:
17-
actionpack (5.2.4.2)
18-
actionview (= 5.2.4.2)
19-
activesupport (= 5.2.4.2)
17+
actionpack (6.0.2.2)
18+
actionview (= 6.0.2.2)
19+
activesupport (= 6.0.2.2)
2020
rack (~> 2.0, >= 2.0.8)
2121
rack-test (>= 0.6.3)
2222
rails-dom-testing (~> 2.0)
23-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
24-
actionview (5.2.4.2)
25-
activesupport (= 5.2.4.2)
23+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
24+
actionview (6.0.2.2)
25+
activesupport (= 6.0.2.2)
2626
builder (~> 3.1)
2727
erubi (~> 1.4)
2828
rails-dom-testing (~> 2.0)
29-
rails-html-sanitizer (~> 1.0, >= 1.0.3)
29+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
3030
active_model_serializers (0.10.10)
3131
actionpack (>= 4.1, < 6.1)
3232
activemodel (>= 4.1, < 6.1)
3333
case_transform (>= 0.2)
3434
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
35-
activemodel (5.2.4.2)
36-
activesupport (= 5.2.4.2)
37-
activesupport (5.2.4.2)
35+
activemodel (6.0.2.2)
36+
activesupport (= 6.0.2.2)
37+
activesupport (6.0.2.2)
3838
concurrent-ruby (~> 1.0, >= 1.0.2)
3939
i18n (>= 0.7, < 2)
4040
minitest (~> 5.1)
4141
tzinfo (~> 1.1)
42+
zeitwerk (~> 2.2)
4243
ast (2.4.0)
4344
backport (1.1.2)
4445
benchmark (0.1.0)
@@ -57,10 +58,10 @@ GEM
5758
e2mmap (0.1.0)
5859
erubi (1.9.0)
5960
eventmachine (1.2.7)
60-
faraday (0.17.3)
61+
faraday (1.0.1)
6162
multipart-post (>= 1.2, < 3)
62-
faraday_middleware (0.14.0)
63-
faraday (>= 0.7.4, < 1.0)
63+
faraday_middleware (1.0.0)
64+
faraday (~> 1.0)
6465
i18n (1.8.2)
6566
concurrent-ruby (~> 1.0)
6667
jaro_winkler (1.5.4)
@@ -136,6 +137,7 @@ GEM
136137
thread_safe (~> 0.1)
137138
unicode-display_width (1.7.0)
138139
yard (0.9.25)
140+
zeitwerk (2.3.0)
139141

140142
PLATFORMS
141143
ruby

lib/parse/stack/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ module Parse
66
# The Parse Server SDK for Ruby
77
module Stack
88
# The current version.
9-
VERSION = "1.8.1"
9+
VERSION = "1.9.0"
1010
end
1111
end

0 commit comments

Comments
 (0)