parse-stack 1.6.9 → 1.6.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changes.md +6 -3
- data/Gemfile.lock +29 -33
- data/README.md +10 -7
- data/bin/parse-console +47 -7
- data/lib/parse/client/batch.rb +1 -0
- data/lib/parse/stack.rb +1 -1
- data/lib/parse/stack/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e8c593e13180e83fb349eff383cab24f11e70e6
|
4
|
+
data.tar.gz: 3e97c6ab5b0d7ef055f67553541178734d815fd6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed75d26379dd431857a469010d2497121c44bff4520076d72906164491dcee17e1a54b047a1c9ed8d2f9d8bc4eb482cd10d5414bf551d40f89a2961a253e8b99
|
7
|
+
data.tar.gz: bcf0da08fd9a257b8ae6c6d9bda80e83de4ec5172b9bb0d6733ce3a3b0152a263bd5cae95d909d5a4a9a197a248af744ab0af64e273e1bb47892e8c45773ac52
|
data/Changes.md
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
## Parse-Stack Changelog
|
2
2
|
|
3
|
-
### 1.6.
|
3
|
+
### 1.6.11
|
4
4
|
- NEW: Parse::Object#sig method to get quick information about an instance.
|
5
|
-
-
|
6
|
-
-
|
5
|
+
- FIX: Typo fix when using Array#objectIds.
|
6
|
+
- FIX: Passing server url in parse-console without the `-s` option when using IRB.
|
7
|
+
- Exceptions will not be raised on property redefinitions, only warning messages.
|
7
8
|
- Additional tests.
|
9
|
+
- Short name classes are generated when using parse-console. Ex. Parse::User -> User
|
10
|
+
- parse-console supports `--config-sample` to generate a sample configuration file.
|
8
11
|
|
9
12
|
### 1.6.7
|
10
13
|
- Default SERVER_URL changed to http://localhost:1337/parse
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
parse-stack (1.6.
|
4
|
+
parse-stack (1.6.11)
|
5
5
|
active_model_serializers (>= 0.9, < 1)
|
6
6
|
activemodel (>= 4.2.1, < 6)
|
7
7
|
activesupport (>= 4.2.1, < 6)
|
@@ -14,54 +14,50 @@ PATH
|
|
14
14
|
GEM
|
15
15
|
remote: https://rubygems.org/
|
16
16
|
specs:
|
17
|
-
actionpack (5.0
|
18
|
-
actionview (= 5.0
|
19
|
-
activesupport (= 5.0
|
17
|
+
actionpack (5.1.0)
|
18
|
+
actionview (= 5.1.0)
|
19
|
+
activesupport (= 5.1.0)
|
20
20
|
rack (~> 2.0)
|
21
21
|
rack-test (~> 0.6.3)
|
22
22
|
rails-dom-testing (~> 2.0)
|
23
23
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
24
|
-
actionview (5.0
|
25
|
-
activesupport (= 5.0
|
24
|
+
actionview (5.1.0)
|
25
|
+
activesupport (= 5.1.0)
|
26
26
|
builder (~> 3.1)
|
27
|
-
|
27
|
+
erubi (~> 1.4)
|
28
28
|
rails-dom-testing (~> 2.0)
|
29
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.
|
30
|
-
active_model_serializers (0.10.
|
29
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
30
|
+
active_model_serializers (0.10.6)
|
31
31
|
actionpack (>= 4.1, < 6)
|
32
32
|
activemodel (>= 4.1, < 6)
|
33
33
|
case_transform (>= 0.2)
|
34
|
-
jsonapi (
|
35
|
-
activemodel (5.0
|
36
|
-
activesupport (= 5.0
|
37
|
-
activesupport (5.0
|
34
|
+
jsonapi-renderer (>= 0.1.1.beta1, < 0.2)
|
35
|
+
activemodel (5.1.0)
|
36
|
+
activesupport (= 5.1.0)
|
37
|
+
activesupport (5.1.0)
|
38
38
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
39
39
|
i18n (~> 0.7)
|
40
40
|
minitest (~> 5.1)
|
41
41
|
tzinfo (~> 1.1)
|
42
42
|
binding_of_caller (0.7.2)
|
43
43
|
debug_inspector (>= 0.0.1)
|
44
|
-
builder (3.2.
|
44
|
+
builder (3.2.3)
|
45
45
|
byebug (9.0.6)
|
46
46
|
case_transform (0.2)
|
47
47
|
activesupport
|
48
48
|
coderay (1.1.1)
|
49
|
-
concurrent-ruby (1.0.
|
49
|
+
concurrent-ruby (1.0.5)
|
50
50
|
daemons (1.2.4)
|
51
51
|
debug_inspector (0.0.2)
|
52
|
-
dotenv (2.
|
53
|
-
|
54
|
-
eventmachine (1.2.
|
55
|
-
faraday (0.
|
52
|
+
dotenv (2.2.1)
|
53
|
+
erubi (1.6.0)
|
54
|
+
eventmachine (1.2.3)
|
55
|
+
faraday (0.12.1)
|
56
56
|
multipart-post (>= 1.2, < 3)
|
57
|
-
faraday_middleware (0.
|
57
|
+
faraday_middleware (0.11.0.1)
|
58
58
|
faraday (>= 0.7.4, < 1.0)
|
59
|
-
i18n (0.
|
60
|
-
jsonapi (0.1.
|
61
|
-
jsonapi-parser (= 0.1.1.beta3)
|
62
|
-
jsonapi-renderer (= 0.1.1.beta1)
|
63
|
-
jsonapi-parser (0.1.1.beta3)
|
64
|
-
jsonapi-renderer (0.1.1.beta1)
|
59
|
+
i18n (0.8.1)
|
60
|
+
jsonapi-renderer (0.1.2)
|
65
61
|
loofah (2.0.3)
|
66
62
|
nokogiri (>= 1.5.9)
|
67
63
|
method_source (0.8.2)
|
@@ -69,9 +65,9 @@ GEM
|
|
69
65
|
minitest (5.10.1)
|
70
66
|
moneta (0.8.1)
|
71
67
|
multipart-post (2.0.0)
|
72
|
-
nokogiri (1.7.
|
68
|
+
nokogiri (1.7.1)
|
73
69
|
mini_portile2 (~> 2.1.0)
|
74
|
-
parallel (1.
|
70
|
+
parallel (1.11.1)
|
75
71
|
pry (0.10.4)
|
76
72
|
coderay (~> 1.1.0)
|
77
73
|
method_source (~> 0.8.1)
|
@@ -91,16 +87,16 @@ GEM
|
|
91
87
|
loofah (~> 2.0)
|
92
88
|
rake (12.0.0)
|
93
89
|
redcarpet (3.4.0)
|
94
|
-
redis (3.3.
|
90
|
+
redis (3.3.3)
|
95
91
|
slop (3.6.0)
|
96
92
|
thin (1.7.0)
|
97
93
|
daemons (~> 1.0, >= 1.0.9)
|
98
94
|
eventmachine (~> 1.0, >= 1.0.4)
|
99
95
|
rack (>= 1, < 3)
|
100
|
-
thread_safe (0.3.
|
101
|
-
tzinfo (1.2.
|
96
|
+
thread_safe (0.3.6)
|
97
|
+
tzinfo (1.2.3)
|
102
98
|
thread_safe (~> 0.1)
|
103
|
-
yard (0.9.
|
99
|
+
yard (0.9.9)
|
104
100
|
|
105
101
|
PLATFORMS
|
106
102
|
ruby
|
@@ -120,4 +116,4 @@ DEPENDENCIES
|
|
120
116
|
yard
|
121
117
|
|
122
118
|
BUNDLED WITH
|
123
|
-
1.13.
|
119
|
+
1.13.7
|
data/README.md
CHANGED
@@ -11,16 +11,15 @@ Below is a [quick start guide](https://github.com/modernistik/parse-stack#overvi
|
|
11
11
|
2. Custom Classes and Relations: https://youtu.be/tfSesotfU7w
|
12
12
|
3. Working with Existing Schemas: https://youtu.be/EJGPT7YWyXA
|
13
13
|
|
14
|
-
### Parse File Migration Tool
|
15
|
-
**If you are looking for a tool to migrate your hosted Parse Files to an Amazon S3 bucket, see our [Parse File Migration tool here](https://github.com/modernistik/parse-file-migration). This should be done before January 28th, 2017**
|
16
|
-
|
17
14
|
### Code Status
|
18
|
-
[![Gitter](https://badges.gitter.im/modernistik/parse-stack.svg)](https://gitter.im/modernistik/parse-stack?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
19
15
|
[![Gem Version](https://img.shields.io/gem/v/parse-stack.svg)](https://github.com/modernistik/parse-stack)
|
20
16
|
[![Downloads](https://img.shields.io/gem/dt/parse-stack.svg)](https://rubygems.org/gems/parse-stack)
|
21
17
|
[![Build Status](https://travis-ci.org/modernistik/parse-stack.svg?branch=master)](https://travis-ci.org/modernistik/parse-stack)
|
22
18
|
[![API Reference](http://img.shields.io/badge/api-docs-blue.svg)](http://www.rubydoc.info/github/modernistik/parse-stack)
|
23
19
|
|
20
|
+
### Questions?
|
21
|
+
[![Gitter](https://badges.gitter.im/modernistik/parse-stack.svg)](https://gitter.im/modernistik/parse-stack?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
22
|
+
|
24
23
|
## Installation
|
25
24
|
|
26
25
|
Add this line to your application's Gemfile:
|
@@ -45,12 +44,16 @@ Parse-Stack comes with support for Rails by adding additional rake tasks and gen
|
|
45
44
|
|
46
45
|
For a more details on the rails integration see [Parse-Stack Rails Example](https://github.com/modernistik/parse-stack-rails-example).
|
47
46
|
|
48
|
-
### Interactive Command Line
|
49
|
-
You can also used the bundled `parse-console` command line to connect and interact with your Parse Server and its data in an
|
47
|
+
### Interactive Command Line Playground
|
48
|
+
You can also used the bundled `parse-console` command line to connect and interact with your Parse Server and its data in an IRB-like console. This is useful for trying concepts and debugging as it will automatically connect to your Parse Server, and if provided the master key, automatically generate all the models entities.
|
50
49
|
|
51
50
|
```bash
|
52
51
|
$ parse-console -h # see all options
|
53
|
-
$ parse-console -a
|
52
|
+
$ parse-console -v -a myAppId -m myMasterKey http://localhost:1337/parse
|
53
|
+
Server : http://localhost:1337/parse
|
54
|
+
App Id : myAppId
|
55
|
+
Master : true
|
56
|
+
2.4.0 > Parse::User.first
|
54
57
|
```
|
55
58
|
|
56
59
|
## Overview
|
data/bin/parse-console
CHANGED
@@ -2,6 +2,17 @@
|
|
2
2
|
|
3
3
|
require 'optparse'
|
4
4
|
require 'json'
|
5
|
+
DEFAULT_CONFIG_FILE = 'config.json'
|
6
|
+
DEFAULT_CONFIG_CONTENTS = {
|
7
|
+
"apps": [{
|
8
|
+
"serverURL": "http://localhost:1337/parse",
|
9
|
+
"appId": "myAppId",
|
10
|
+
"masterKey": "myMasterKey",
|
11
|
+
"restAPIKey": "myRestAPIKey",
|
12
|
+
"javascriptKey": "myJavascriptKey",
|
13
|
+
"appName": "Parse Server App"
|
14
|
+
}]
|
15
|
+
}.freeze
|
5
16
|
|
6
17
|
opts = { verbose: false, pry: false }
|
7
18
|
opt_parser = OptionParser.new do |o|
|
@@ -9,8 +20,11 @@ opt_parser = OptionParser.new do |o|
|
|
9
20
|
o.banner = "Usage: #{File.basename($0)} [options] SERVER_URL"
|
10
21
|
o.separator ""
|
11
22
|
o.separator "Example:"
|
12
|
-
o.separator "#{File.basename($0)} -a APP_ID -
|
13
|
-
o.separator "#{File.basename($0)} -
|
23
|
+
o.separator "#{File.basename($0)} -a APP_ID -m MASTER_KEY https://your-parse-server-url"
|
24
|
+
o.separator "#{File.basename($0)} -c ./config.json"
|
25
|
+
o.separator ""
|
26
|
+
o.separator "If you use the -m option, parse-console will automatically"
|
27
|
+
o.separator "import your schema as ruby models."
|
14
28
|
o.separator ""
|
15
29
|
o.separator "Options"
|
16
30
|
o.on('-a APP_ID', '--appId APP_ID', 'Parse App ID (required)') { |a| opts[:app_id] = a }
|
@@ -24,8 +38,23 @@ opt_parser = OptionParser.new do |o|
|
|
24
38
|
puts "Parse Stack : #{Parse::Stack::VERSION}"
|
25
39
|
exit 1
|
26
40
|
end
|
27
|
-
o.on('
|
41
|
+
o.on('--config-sample', "Create a sample config file to use. See --config.") do
|
42
|
+
contents = JSON.pretty_generate(DEFAULT_CONFIG_CONTENTS)
|
43
|
+
File.open(DEFAULT_CONFIG_FILE, 'w') { |f| f.write(contents) }
|
44
|
+
puts "Created #{DEFAULT_CONFIG_FILE} : \n"
|
45
|
+
puts contents
|
46
|
+
puts "Edit #{DEFAULT_CONFIG_FILE} with your information and run: \n"
|
47
|
+
puts "\n\tparse-console -c ./#{DEFAULT_CONFIG_FILE}\n\n"
|
48
|
+
exit 1
|
49
|
+
end
|
50
|
+
o.on('-c','--config CONFIG_JSON', "Load config from a parse-dashboard.json compatible file.") do |filepath|
|
51
|
+
unless File.exists?(filepath)
|
52
|
+
$stderr.puts "File #{filepath} does not exist."
|
53
|
+
exit 1
|
54
|
+
end
|
55
|
+
|
28
56
|
begin
|
57
|
+
puts "Loading config: #{filepath}"
|
29
58
|
file = File.read(filepath)
|
30
59
|
config = JSON.parse file
|
31
60
|
app = config["apps"].is_a?(Array) ? config["apps"].first : config["apps"]
|
@@ -34,7 +63,7 @@ opt_parser = OptionParser.new do |o|
|
|
34
63
|
opts[:api_key] ||= app["restAPIKey"]
|
35
64
|
opts[:master_key] ||= app["masterKey"]
|
36
65
|
rescue Exception => e
|
37
|
-
$stderr.puts "Error: Incompatible JSON format for #{filepath}"
|
66
|
+
$stderr.puts "Error: Incompatible JSON format for #{filepath} (#{e})"
|
38
67
|
exit 1
|
39
68
|
end
|
40
69
|
|
@@ -42,7 +71,7 @@ opt_parser = OptionParser.new do |o|
|
|
42
71
|
end
|
43
72
|
opt_parser.parse!
|
44
73
|
|
45
|
-
opts[:server_url] ||= ARGV
|
74
|
+
opts[:server_url] ||= ARGV.shift || 'http://localhost:1337/parse'
|
46
75
|
|
47
76
|
if opts[:app_id].nil?
|
48
77
|
$stderr.puts "Error: Option --app_id missing\n"
|
@@ -67,9 +96,20 @@ puts "Server : #{Parse.client.server_url}"
|
|
67
96
|
puts "App Id : #{Parse.client.app_id}"
|
68
97
|
puts "Master : #{opts[:master_key].present?}"
|
69
98
|
|
70
|
-
|
71
|
-
puts "
|
99
|
+
if opts[:master_key].present?
|
100
|
+
puts "Schema : imported"
|
101
|
+
Parse.auto_generate_models!.each do |model|
|
102
|
+
puts "Generated #{model}" if opts[:verbose]
|
103
|
+
end
|
104
|
+
else
|
105
|
+
puts "Schema : skipped (requires master key)"
|
72
106
|
end
|
107
|
+
# Create shortnames
|
108
|
+
User = Parse::User
|
109
|
+
Installation = Parse::Installation
|
110
|
+
Session = Parse::Session
|
111
|
+
Role = Parse::Role
|
112
|
+
Product = Parse::Product
|
73
113
|
|
74
114
|
if opts[:pry]
|
75
115
|
require "pry"
|
data/lib/parse/client/batch.rb
CHANGED
data/lib/parse/stack.rb
CHANGED
data/lib/parse/stack/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parse-stack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anthony Persaud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|