parsecom 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -11,7 +11,14 @@ the library.
11
11
 
12
12
  ```ruby
13
13
  require 'parsecom'
14
- Parse.credentials application_id:'YOUR APPID', api_key:'YOUR APIKEY'
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.object_id}", values.to_json do |resp_body|
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.object_id}" do |resp_body|
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
@@ -28,6 +28,7 @@ module Parse
28
28
  : "classes/#{@parse_class_name}"
29
29
  @parse_client.call_api :get, "#{endpoint}?#{to_params}", nil, &block
30
30
  end
31
+ alias run invoke
31
32
 
32
33
  def limit val=nil
33
34
  if val
data/lib/parse/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Parse
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
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.3
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: