Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul-malik committed Mar 17, 2017
0 parents commit 853410f
Show file tree
Hide file tree
Showing 74 changed files with 6,186 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .arcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"phabricator.uri" : "https://phabricator.pinadmin.com/",
"repository.callsign": "PMD",
"load": [],
"project.name" : "pinmodel"
}
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Xcode
*.perspective
*.perspectivev3
*.pbxuser
*.xcworkspace
*.mode1
*.mode2v3
*.mode1v3
xcuserdata
Snapshots

# OS X
*.DS_Store

# CocoaPods
Pods
Podfile.lock

# Build Outputs
prepare_commit_log
prepare_commit_result
compile_commands.json

# Code Coverage (gcov)
*.gcno
*.gcda

# Python
*.pyc

# Swift Package Manager
.build
Packages

# Jekyll
docs/.jekyll-metadata
docs/.sass-cache
docs/_site
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0.2
20 changes: 20 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
disabled_rules: # rule identifiers to exclude from running
- function_body_length
- todo
- line_length
- cyclomatic_complexity
included: # paths to include during linting. `--path` is ignored if present.
- Sources
- Tests
- Utility

# parameterized rules can be customized from this configuration file
line_length: 120

# parameterized rules are first parameterized as a warning level, then error level.
type_body_length:
- 300 # warning
- 400 # error

reporter: "xcode" # reporter type (xcode, json, csv, checkstyle, junit, html, emoji)

20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Base image from Swiftenv with Swift version 3.0.1

FROM kylef/swiftenv
MAINTAINER Pinterest
RUN swiftenv install 3.0.1

# Vim config so we have an editor available
RUN apt-get update && \
apt-get install -y --no-install-recommends \
vim clang libicu-dev libcurl4-openssl-dev libssl-dev

# Install plank
COPY . /usr/local/plank
RUN cd /usr/local/plank && swift build -c release

ENV plank_HOME /usr/local/plank
ENV PATH ${plank_HOME}/.build/release:${PATH}

ENTRYPOINT ["plank"]
CMD ["help"]
30 changes: 30 additions & 0 deletions Examples/PDK/board.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"id": "board.json",
"title": "board",
"description" : "Schema definition of Pinterest Board",
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"id" : { "type": "string" },
"name" : { "type": "string" },
"url" : {
"type": "string",
"format": "uri"
},
"description" : { "type": "string" },
"creator": {
"type": "object",
"additionalProperties": { "type": "string" }
},
"created_at" : {
"type": "string",
"format": "date-time"
},
"counts": {
"type": "object",
"additionalProperties": { "type": "integer" }
},
"image": { "$ref": "image.json" }
},
"required": []
}
15 changes: 15 additions & 0 deletions Examples/PDK/image.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"id": "image.json",
"title": "image",
"description" : "Schema definition of Pinterest image",
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"url" : {
"type": "string",
"format": "uri"
},
"width": { "type": "integer" },
"height": { "type": "integer" }
}
}
44 changes: 44 additions & 0 deletions Examples/PDK/pin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"id": "pin.json",
"title": "pin",
"description" : "Schema definition of Pinterest Pin",
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"id" : { "type": "string" },
"link" : {
"type": "string",
"format": "uri"
},
"url" : {
"type": "string",
"format": "uri"
},
"creator": {
"type": "object",
"additionalProperties": { "$ref": "user.json" }
},
"board": { "$ref": "board.json" },
"created_at" : {
"type": "string",
"format": "date-time"
},
"note" : { "type": "string" },
"color" : { "type": "string" },
"counts": {
"type": "object",
"additionalProperties": { "type": "integer" }
},
"media": {
"type": "object",
"additionalProperties": { "type": "string" }
},
"attribution": {
"type": "object",
"additionalProperties": { "type": "string" }
},
"description" : { "type": "string" },
"image": { "$ref": "image.json" }
},
"required": []
}
23 changes: 23 additions & 0 deletions Examples/PDK/user.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"id": "user.json",
"title": "user",
"description" : "Schema definition of Pinterest User",
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"id" : { "type": "string" },
"username" : { "type": "string" },
"first_name" : { "type": "string" },
"last_name" : { "type": "string" },
"bio" : { "type": "string" },
"created_at" : {
"type": "string",
"format": "date-time"
},
"counts": {
"type": "object",
"additionalProperties": { "type": "integer" }
},
"image": { "$ref": "image.json" }
}
}
Empty file added Examples/iOS/.gitkeep
Empty file.
Empty file added Examples/macOS/.gitkeep
Empty file.
Loading

0 comments on commit 853410f

Please sign in to comment.