parse-stack 1.4.3 → 1.5.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/Changes.md +52 -39
- data/Gemfile.lock +2 -2
- data/README.md +609 -124
- data/bin/console +0 -9
- data/lib/parse/api/all.rb +3 -0
- data/lib/parse/api/analytics.rb +2 -2
- data/lib/parse/api/apps.rb +15 -17
- data/lib/parse/api/batch.rb +4 -1
- data/lib/parse/api/cloud_functions.rb +2 -0
- data/lib/parse/api/config.rb +14 -2
- data/lib/parse/api/files.rb +6 -3
- data/lib/parse/api/hooks.rb +4 -4
- data/lib/parse/api/objects.rb +14 -11
- data/lib/parse/api/push.rb +4 -2
- data/lib/parse/api/schemas.rb +6 -5
- data/lib/parse/api/sessions.rb +11 -1
- data/lib/parse/api/users.rb +65 -15
- data/lib/parse/client/authentication.rb +4 -2
- data/lib/parse/client/body_builder.rb +11 -3
- data/lib/parse/client/caching.rb +17 -6
- data/lib/parse/client/protocol.rb +14 -8
- data/lib/parse/client/request.rb +4 -1
- data/lib/parse/client/response.rb +59 -6
- data/lib/parse/client.rb +72 -42
- data/lib/parse/model/acl.rb +22 -4
- data/lib/parse/model/associations/belongs_to.rb +22 -10
- data/lib/parse/model/associations/collection_proxy.rb +14 -1
- data/lib/parse/model/associations/has_many.rb +76 -15
- data/lib/parse/model/associations/has_one.rb +69 -0
- data/lib/parse/model/associations/pointer_collection_proxy.rb +13 -6
- data/lib/parse/model/associations/relation_collection_proxy.rb +5 -2
- data/lib/parse/model/bytes.rb +6 -2
- data/lib/parse/model/classes/installation.rb +27 -0
- data/lib/parse/model/classes/role.rb +20 -0
- data/lib/parse/model/classes/session.rb +26 -0
- data/lib/parse/model/classes/user.rb +185 -0
- data/lib/parse/model/core/actions.rb +40 -26
- data/lib/parse/model/core/properties.rb +126 -20
- data/lib/parse/model/core/querying.rb +63 -3
- data/lib/parse/model/core/schema.rb +9 -6
- data/lib/parse/model/date.rb +5 -1
- data/lib/parse/model/file.rb +12 -9
- data/lib/parse/model/geopoint.rb +6 -4
- data/lib/parse/model/model.rb +29 -21
- data/lib/parse/model/object.rb +29 -76
- data/lib/parse/model/pointer.rb +8 -6
- data/lib/parse/model/push.rb +4 -1
- data/lib/parse/query/constraint.rb +3 -0
- data/lib/parse/query/constraints.rb +6 -3
- data/lib/parse/query/operation.rb +3 -0
- data/lib/parse/query/ordering.rb +3 -0
- data/lib/parse/query.rb +85 -38
- data/lib/parse/stack/generators/rails.rb +3 -0
- data/lib/parse/stack/railtie.rb +2 -0
- data/lib/parse/stack/tasks.rb +4 -1
- data/lib/parse/stack/version.rb +4 -1
- data/lib/parse/stack.rb +3 -0
- data/lib/parse/webhooks/payload.rb +14 -8
- data/lib/parse/webhooks/registration.rb +11 -8
- data/lib/parse/webhooks.rb +11 -8
- data/lib/parse-stack.rb +3 -0
- data/parse-stack.gemspec +10 -8
- metadata +16 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c177e1e9c6b4e9f8085501bbfd543e2ea3bb0ef7
|
4
|
+
data.tar.gz: 05c4e9ed7faed5a88fa1940ebfa8427ca48d757d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e416f00adea0682bd133fb766d933f1b86cce8044a6e6656ff07bf1df32e53fc58892f3dc4b8d8981b8d39bf653324eecf6e66cdd314db4a289e794abb1b7fff
|
7
|
+
data.tar.gz: f0d090cb59fb13c03a64dabd57fdfc8d41f6d94db5edb590f4e6141753c975f7e54b2e9277f9c6ff246984e3a095225924bc3b05af64099e6e83f5a86f887fea
|
data/Changes.md
CHANGED
@@ -1,7 +1,39 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
1.
|
4
|
-
|
1
|
+
## Parse-Stack Changelog
|
2
|
+
|
3
|
+
### 1.5.1
|
4
|
+
- BREAKING CHANGE: The default `has_many` implementation is `:query` instead of `:array`.
|
5
|
+
- NEW: Support for `has_one` type of associations.
|
6
|
+
- NEW: `has_many` associations support `Query` implementation as the inverse of `:belongs_to`.
|
7
|
+
- NEW: `has_many` and `has_one` associations support scopes as second parameter.
|
8
|
+
- NEW: Enumerated property types that mimic ActiveRecord::Enum behavior.
|
9
|
+
- NEW: Support for scoped queries similar to ActiveRecord::Scope.
|
10
|
+
- NEW: Support updating Parse config using `set_config` and `update_config`
|
11
|
+
- NEW: Support for user login, logout and sessions.
|
12
|
+
- NEW: Support for signup, including signing up with third-party services.
|
13
|
+
- NEW: Support for linking and unlinking user accounts with third-party services.
|
14
|
+
- NEW: Improved support for Parse session APIs.
|
15
|
+
- NEW: Boolean properties automatically generate a positive query scope for the field.
|
16
|
+
- Added property options for `:scopes`, `:enum`, `:_prefix` and `:_suffix`
|
17
|
+
- FIX: Auto-upgrade did not upgrade core classes.
|
18
|
+
- FIX: Pointer and Relation collection proxies will delay pointer casting until update.
|
19
|
+
- Improves JSON encoding/decoding performance.
|
20
|
+
- Removes throttling of requests.
|
21
|
+
- Turns off cache when using `save_all` method.
|
22
|
+
- Parse::Query supports ActiveModel::Callbacks for `:prepare`.
|
23
|
+
- Subclasses now support a :create callback that is only executed after a new object is successfully saved.
|
24
|
+
- Added alias method :execute! for Parse::Query#fetch! for clarity.
|
25
|
+
- `Parse::Client.session` has been deprecated in favor of `Parse::Client.client`
|
26
|
+
- All Parse-Stack errors that are raised inherit from StandardError.
|
27
|
+
- All :object data types is now cast as ActiveSupport::HashWithIndifferentAccess.
|
28
|
+
- :boolean properties now have a special `?` method to access true/false values.
|
29
|
+
- Adds chaining to Parse::Query#conditions.
|
30
|
+
- Adds alias instance method `Parse::Query#query` to `Parse::Query#conditions`.
|
31
|
+
- `Parse::Object.where` is now an alias to `Parse::Object.query`. You can now use `Parse::Object.where_literal`.
|
32
|
+
- Parse::Query and Parse::CollectionProxy support Enumerable mixin.
|
33
|
+
- Parse::Query#constraints allow you to combine constraints from different queries.
|
34
|
+
- `Parse::Object#validate!` can be used in webhook to throw webhook error on failed validation.
|
35
|
+
|
36
|
+
### 1.4.3
|
5
37
|
- NEW: Support for rails generators: `parse_stack:install` and `parse_stack:model`.
|
6
38
|
- Support Parse::Date with ActiveSupport::TimeWithZone.
|
7
39
|
- :date properties will now raise an error if value was not converted to a Parse::Date.
|
@@ -12,8 +44,7 @@
|
|
12
44
|
- Parse::User before_save callback clears the record ACLs.
|
13
45
|
- Added `anonymous?` instance method to `Parse::User` class.
|
14
46
|
|
15
|
-
1.3.8
|
16
|
-
-----------
|
47
|
+
### 1.3.8
|
17
48
|
- Support for reloading the Parse config data with `Parse.config!`.
|
18
49
|
- The Parse::Request object is now provided in the Parse::Response instance.
|
19
50
|
- The HTTP status code is provided in `http_status` accessor for a Parse::Response.
|
@@ -24,14 +55,13 @@
|
|
24
55
|
- `:exists` and `:null` will raise `ParseConstraintError` if non-boolean values are passed.
|
25
56
|
- NEW: `:id` constraint to allow passing an objectId to a query where we will infer the class.
|
26
57
|
|
27
|
-
1.3.7
|
28
|
-
-----------
|
58
|
+
### 1.3.7
|
29
59
|
- Fixes json_api loading issue between ruby json and active_model_serializers.
|
30
60
|
- Fixes loading active_support core extensions.
|
31
61
|
- Support for passing a `:session_token` as part of a Parse::Query.
|
32
62
|
- Default mime-type for Parse::File instances is `image/jpeg`. You can override the default by setting
|
33
63
|
`Parse::File.default_mime_type`.
|
34
|
-
- Added `Parse.config` for easy access to `Parse::Client.
|
64
|
+
- Added `Parse.config` for easy access to `Parse::Client.client(:default).config`
|
35
65
|
- Support for `Parse.auto_upgrade!` to easily upgrade all schemas.
|
36
66
|
- You can import useful rake tasks by requiring `parse/stack/tasks` in your rake file.
|
37
67
|
- Changes the format in `select` and `reject` queries (see documentation).
|
@@ -44,14 +74,12 @@
|
|
44
74
|
- `:bool` property type has been added as an alias to `:boolean`.
|
45
75
|
- You can turn off formatting field names with `Parse::Query.field_formatter = nil`.
|
46
76
|
|
47
|
-
1.3.1
|
48
|
-
-----------
|
77
|
+
### 1.3.1
|
49
78
|
- Parse::Query now supports `:cache` and `:use_master_key` option. (experimental)
|
50
79
|
- Minimum ruby version set to 1.9.3 (same as ActiveModel 4.2.1)
|
51
80
|
- Support for Rails 5.0+ and Rack 2.0+
|
52
81
|
|
53
|
-
1.3.0
|
54
|
-
-----------
|
82
|
+
### 1.3.0
|
55
83
|
- **IMPORTANT**: __Raising an error no longer sends an error response back to
|
56
84
|
the client in a Webhook trigger. You must now call `error!('...')` instead of
|
57
85
|
calling `raise '...'`.__ The webhook block is now binded to the Parse::Payload
|
@@ -71,15 +99,13 @@ login with Android devices.
|
|
71
99
|
- FIX: Verify Content-Type header field is present for webhooks before checking its value.
|
72
100
|
- FIX: Support `reload!` when using it Padrino.
|
73
101
|
|
74
|
-
1.2.1
|
75
|
-
-----------
|
102
|
+
### 1.2.1
|
76
103
|
- Add active support string dependencies.
|
77
104
|
- Support for handling the `Delete` operation on belongs_to
|
78
105
|
and has_many relationships.
|
79
106
|
- Documentation changes for supported Parse atomic operations.
|
80
107
|
|
81
|
-
1.2
|
82
|
-
-----------
|
108
|
+
### 1.2
|
83
109
|
- Fixes issues with first_or_create.
|
84
110
|
- Fixes issue when singularizing :belongs_to and :has_many property names.
|
85
111
|
- Makes sure time is sent as UTC in queries.
|
@@ -87,33 +113,28 @@ login with Android devices.
|
|
87
113
|
- Webhooks allow for returning empty data sets and `false` from webhook functions.
|
88
114
|
- Minimum version for ActiveModel and ActiveSupport is now 4.2.1
|
89
115
|
|
90
|
-
1.1
|
91
|
-
-----------
|
116
|
+
### 1.1
|
92
117
|
- In Query `join` has been renamed to `matches`.
|
93
118
|
- Not In Query `exclude` has been renamed to `excludes` for consistency.
|
94
119
|
- Parse::Query now has a `:keys` operation to be usd when passing sub-queries to `select` and `matches`
|
95
120
|
- Improves query supporting `select`, `matches`, `matches` and `excludes`.
|
96
121
|
- Regular expression queries for `like` now send regex options
|
97
122
|
|
98
|
-
1.0.10
|
99
|
-
-----------
|
123
|
+
### 1.0.10
|
100
124
|
- Fixes issues with setting default values as dirty when using the builder or before_save hook.
|
101
125
|
- Fixes issues with autofetching pointers when default values are set.
|
102
126
|
|
103
|
-
1.0.8
|
104
|
-
-----------
|
127
|
+
### 1.0.8
|
105
128
|
- Fixes issues when setting a collection proxy property with a collection proxy.
|
106
129
|
- Default array values are now properly casted as collection proxies.
|
107
130
|
- Default booleans values of `false` are now properly set.
|
108
131
|
|
109
|
-
1.0.7
|
110
|
-
-----------
|
132
|
+
### 1.0.7
|
111
133
|
- Fixes issues when copying dates.
|
112
134
|
- Fixes issues with double-arrays.
|
113
135
|
- Fixes issues with mapping columns to atomic operations.
|
114
136
|
|
115
|
-
1.0.6
|
116
|
-
-----------
|
137
|
+
### 1.0.6
|
117
138
|
- Fixes issue when making batch requests with special prefix url.
|
118
139
|
- Adds Parse::ConnectionError custom exception type.
|
119
140
|
- You can call locally registered cloud functions with
|
@@ -124,25 +145,17 @@ will be symbolized - useful for array of strings.
|
|
124
145
|
- Prevent ACLs from causing an autofetch.
|
125
146
|
- Empty strings, arrays and `false` are now working with `:default` option in properties.
|
126
147
|
|
127
|
-
1.0.5
|
128
|
-
-----------
|
148
|
+
### 1.0.5
|
129
149
|
- Defaults are applied on object instantiation.
|
130
150
|
- When applying default values, dirty tracking is called.
|
131
151
|
|
132
|
-
1.0.4
|
133
|
-
-----------
|
152
|
+
### 1.0.4
|
134
153
|
- Fixes minor issue when storing and retrieving objects from the cache.
|
135
154
|
- Support for providing :server_url as a connection option for those migrating hosting
|
136
155
|
their own parse-server.
|
137
156
|
|
138
|
-
1.0.3
|
139
|
-
-----------
|
157
|
+
### 1.0.3
|
140
158
|
- Fixes minor issue when passing `nil` to the class `find` method.
|
141
159
|
|
142
|
-
1.0.2
|
143
|
-
-----------
|
160
|
+
### 1.0.2
|
144
161
|
- Fixes internal issue with `operate_field!` method.
|
145
|
-
|
146
|
-
1.0.1
|
147
|
-
-----------
|
148
|
-
- Initial RubyGems release.
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
parse-stack (1.
|
4
|
+
parse-stack (1.5.1)
|
5
5
|
active_model_serializers (>= 0.9, < 1)
|
6
6
|
activemodel (>= 4.2.1, < 6)
|
7
7
|
activesupport (>= 4.2.1, < 6)
|
@@ -91,7 +91,7 @@ GEM
|
|
91
91
|
method_source
|
92
92
|
rake (>= 0.8.7)
|
93
93
|
thor (>= 0.18.1, < 2.0)
|
94
|
-
rake (11.
|
94
|
+
rake (11.3.0)
|
95
95
|
slop (3.6.0)
|
96
96
|
thor (0.19.1)
|
97
97
|
thread_safe (0.3.5)
|