parsecom 0.0.3 → 0.0.4
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.
- data/README.md +17 -1
- data/lib/parse/client.rb +2 -2
- data/lib/parse/query.rb +1 -0
- data/lib/parse/version.rb +1 -1
- data/parsecom.gemspec +1 -0
- metadata +3 -2
data/README.md
CHANGED
@@ -11,7 +11,14 @@ the library.
|
|
11
11
|
|
12
12
|
```ruby
|
13
13
|
require 'parsecom'
|
14
|
-
Parse.credentials application_id
|
14
|
+
Parse.credentials :application_id => 'YOUR APPID', :api_key => 'YOUR APIKEY'
|
15
|
+
```
|
16
|
+
|
17
|
+
If you have some plan to use the master_key, please set it.
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
Parse.credentials :application_id => 'YOUR APPID', :api_key => 'YOUR APIKEY',
|
21
|
+
:master_key => 'YOUR MASTER KEY'
|
15
22
|
```
|
16
23
|
|
17
24
|
### Declaring Parse Classes
|
@@ -137,3 +144,12 @@ user = Parse::User.sign_up 'YOUR USERNAME', 'YOUR PASSWORD'
|
|
137
144
|
```ruby
|
138
145
|
user = Parse::User.log_in 'YOUR USERNAME', 'YOUR PASSWORD'
|
139
146
|
```
|
147
|
+
|
148
|
+
### Security
|
149
|
+
|
150
|
+
If you add an exclamation mark, "!" after the method name, the method is executed by using the master key.
|
151
|
+
|
152
|
+
```ruby
|
153
|
+
class_a = ClassA.new :columnA => 'Hello, parse.com'
|
154
|
+
class_a.save!
|
155
|
+
```
|
data/lib/parse/client.rb
CHANGED
@@ -125,13 +125,13 @@ module Parse
|
|
125
125
|
end
|
126
126
|
|
127
127
|
def update parse_object, values
|
128
|
-
call_api :put, "classes/#{parse_object.parse_class_name}/#{parse_object.
|
128
|
+
call_api :put, "classes/#{parse_object.parse_class_name}/#{parse_object.obj_id}", values.to_json do |resp_body|
|
129
129
|
resp_body
|
130
130
|
end
|
131
131
|
end
|
132
132
|
|
133
133
|
def delete parse_object
|
134
|
-
call_api :delete, "classes/#{parse_object.parse_class_name}/#{parse_object.
|
134
|
+
call_api :delete, "classes/#{parse_object.parse_class_name}/#{parse_object.obj_id}" do |resp_body|
|
135
135
|
resp_body
|
136
136
|
end
|
137
137
|
end
|
data/lib/parse/query.rb
CHANGED
data/lib/parse/version.rb
CHANGED
data/parsecom.gemspec
CHANGED
@@ -11,6 +11,7 @@ Gem::Specification.new do |gem|
|
|
11
11
|
gem.description = %q{Pure Ruby version of parse.com client. This library allows you to access straightforwardly to parse.com REST API.}
|
12
12
|
gem.summary = %q{Pure Ruby version of parse.com client}
|
13
13
|
gem.homepage = "https://github.com/technohippy/parsecom"
|
14
|
+
gem.license = "MIT"
|
14
15
|
|
15
16
|
gem.files = `git ls-files`.split($/)
|
16
17
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parsecom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -58,7 +58,8 @@ files:
|
|
58
58
|
- spec/parse_user_spec.rb
|
59
59
|
- spec/spec_helper.rb
|
60
60
|
homepage: https://github.com/technohippy/parsecom
|
61
|
-
licenses:
|
61
|
+
licenses:
|
62
|
+
- MIT
|
62
63
|
post_install_message:
|
63
64
|
rdoc_options: []
|
64
65
|
require_paths:
|