This repository has been archived by the owner on Feb 16, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
78 changed files
with
345 additions
and
345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
guard 'rspec', :version => 2 do | ||
watch(%r{^spec/.+_spec\.rb$}) | ||
watch(%r{^lib/tent-server/(.+)\.rb$}) { |m| "spec/unit/#{m[1]}_spec.rb" } | ||
watch(%r{^lib/tentd/(.+)\.rb$}) { |m| "spec/unit/#{m[1]}_spec.rb" } | ||
watch(%r{^lib/[^/]+\.rb$}) { "spec" } | ||
watch(%r{spec/(spec_helper|support/).*\.rb}) { "spec" } | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
require 'tentd/version' | ||
require 'tent-client' | ||
|
||
module TentD | ||
autoload :API, 'tentd/api' | ||
autoload :Action, 'tentd/action' | ||
autoload :JsonPatch, 'tentd/json_patch' | ||
autoload :TentVersion, 'tentd/tent_version' | ||
autoload :RackRequest, 'tentd/rack_request' | ||
|
||
def self.new(options={}) | ||
DataMapper.setup(:default, options[:database] || ENV['DATABASE_URL']) | ||
API.new | ||
end | ||
end | ||
|
||
require 'tentd/model' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
module TentD | ||
class API | ||
PER_PAGE = 50 | ||
MAX_PER_PAGE = 200 | ||
MEDIA_TYPE = 'application/vnd.tent.v0+json' | ||
|
||
autoload :Apps, 'tentd/api/apps' | ||
autoload :Posts, 'tentd/api/posts' | ||
autoload :Groups, 'tentd/api/groups' | ||
autoload :Profile, 'tentd/api/profile' | ||
autoload :Followers, 'tentd/api/followers' | ||
autoload :Followings, 'tentd/api/followings' | ||
autoload :CoreProfileData, 'tentd/api/core_profile_data' | ||
autoload :AuthenticationLookup, 'tentd/api/authentication_lookup' | ||
autoload :AuthenticationVerification, 'tentd/api/authentication_verification' | ||
autoload :AuthenticationFinalize, 'tentd/api/authentication_finalize' | ||
autoload :Authorization, 'tentd/api/authorization' | ||
autoload :Authorizable, 'tentd/api/authorizable' | ||
autoload :Router, 'tentd/api/router' | ||
autoload :Middleware, 'tentd/api/middleware' | ||
include Router | ||
|
||
mount Apps | ||
mount Posts | ||
mount Groups | ||
mount Profile | ||
mount Followers | ||
mount Followings | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module TentServer | ||
module TentD | ||
class API | ||
class Apps | ||
include Router | ||
|
2 changes: 1 addition & 1 deletion
2
...ent-server/api/authentication_finalize.rb → lib/tentd/api/authentication_finalize.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module TentServer | ||
module TentD | ||
class API | ||
class AuthenticationFinalize < Middleware | ||
def action(env) | ||
|
8 changes: 4 additions & 4 deletions
8
lib/tent-server/api/authentication_lookup.rb → lib/tentd/api/authentication_lookup.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...server/api/authentication_verification.rb → lib/tentd/api/authentication_verification.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
lib/tent-server/api/authorizable.rb → lib/tentd/api/authorizable.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module TentServer | ||
module TentD | ||
class API | ||
module Authorizable | ||
class Error < StandardError | ||
|
2 changes: 1 addition & 1 deletion
2
lib/tent-server/api/authorization.rb → lib/tentd/api/authorization.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module TentServer | ||
module TentD | ||
class API | ||
class Authorization < Middleware | ||
def action(env) | ||
|
2 changes: 1 addition & 1 deletion
2
lib/tent-server/api/core_profile_data.rb → lib/tentd/api/core_profile_data.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module TentServer | ||
module TentD | ||
class API | ||
class Followers | ||
include Router | ||
|
2 changes: 1 addition & 1 deletion
2
lib/tent-server/api/followings.rb → lib/tentd/api/followings.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module TentServer | ||
module TentD | ||
class API | ||
class Followings | ||
include Router | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module TentServer | ||
module TentD | ||
class API | ||
class Groups | ||
include Router | ||
|
2 changes: 1 addition & 1 deletion
2
lib/tent-server/api/middleware.rb → lib/tentd/api/middleware.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
require 'hashie' | ||
|
||
module TentServer | ||
module TentD | ||
class API | ||
class Middleware | ||
include Authorizable | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module TentServer | ||
module TentD | ||
class API | ||
class Profile | ||
include Router | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tent-server/api/router/caching_headers.rb → lib/tentd/api/router/caching_headers.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
require 'time' | ||
|
||
module TentServer | ||
module TentD | ||
class API | ||
module Router | ||
class CachingHeaders | ||
|
2 changes: 1 addition & 1 deletion
2
lib/tent-server/api/router/extract_params.rb → lib/tentd/api/router/extract_params.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module TentServer | ||
module TentD | ||
class API | ||
module Router | ||
class ExtractParams | ||
|
2 changes: 1 addition & 1 deletion
2
...t-server/api/router/serialize_response.rb → lib/tentd/api/router/serialize_response.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
require 'json' | ||
|
||
module TentServer | ||
module TentD | ||
class API | ||
module Router | ||
class SerializeResponse | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module TentServer | ||
module TentD | ||
class JsonPatch | ||
OPERATIONS = %w( add remove replace move copy test ) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
require 'data_mapper' | ||
require 'dm-ar-finders' | ||
require 'tentd/datamapper/array_property' | ||
require 'tentd/datamapper/binary_string_property' | ||
require 'tentd/datamapper/query' | ||
|
||
module TentD | ||
module Model | ||
require 'tentd/model/permissible' | ||
require 'tentd/model/random_public_id' | ||
require 'tentd/model/post' | ||
require 'tentd/model/post_attachment' | ||
require 'tentd/model/follower' | ||
require 'tentd/model/following' | ||
require 'tentd/model/app' | ||
require 'tentd/model/app_authorization' | ||
require 'tentd/model/notification_subscription' | ||
require 'tentd/model/profile_info' | ||
require 'tentd/model/group' | ||
require 'tentd/model/permission' | ||
end | ||
end | ||
|
||
DataMapper.finalize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.