Module: TentD

Defined in:
lib/tentd.rb,
lib/tentd/api.rb,
lib/tentd/model.rb,
lib/tentd/version.rb,
lib/tentd/api/apps.rb,
lib/tentd/api/posts.rb,
lib/tentd/model/app.rb,
lib/tentd/tent_type.rb,
lib/tentd/api/groups.rb,
lib/tentd/json_patch.rb,
lib/tentd/model/post.rb,
lib/tentd/model/user.rb,
lib/tentd/api/profile.rb,
lib/tentd/model/group.rb,
lib/tentd/tent_version.rb,
lib/tentd/api/followers.rb,
lib/tentd/model/mention.rb,
lib/tentd/notifications.rb,
lib/tentd/api/followings.rb,
lib/tentd/api/middleware.rb,
lib/tentd/model/follower.rb,
lib/tentd/api/user_lookup.rb,
lib/tentd/model/following.rb,
lib/tentd/api/authorizable.rb,
lib/tentd/model/permission.rb,
lib/tentd/api/authorization.rb,
lib/tentd/model/permissible.rb,
lib/tentd/model/user_scoped.rb,
lib/tentd/model/post_version.rb,
lib/tentd/model/profile_info.rb,
lib/tentd/model/serializable.rb,
lib/tentd/api/core_profile_data.rb,
lib/tentd/model/post_attachment.rb,
lib/tentd/model/type_properties.rb,
lib/tentd/notifications/sidekiq.rb,
lib/tentd/model/random_public_id.rb,
lib/tentd/model/app_authorization.rb,
lib/tentd/api/authentication_lookup.rb,
lib/tentd/api/router/extract_params.rb,
lib/tentd/notifications/girl_friday.rb,
lib/tentd/api/router/caching_headers.rb,
lib/tentd/api/authentication_finalize.rb,
lib/tentd/api/router/serialize_response.rb,
lib/tentd/api/authentication_verification.rb,
lib/tentd/model/notification_subscription.rb,
lib/tentd/api/router.rb

Defined Under Namespace

Modules: Model Classes: API, JsonPatch, Notifications, TentType, TentVersion

Constant Summary collapse

VERSION =
'0.0.1'

Class Method Summary collapse

Class Method Details

.faraday_adapterObject



22
23
24
# File 'lib/tentd.rb', line 22

def self.faraday_adapter
  @faraday_adapter
end

.faraday_adapter=(a) ⇒ Object



26
27
28
# File 'lib/tentd.rb', line 26

def self.faraday_adapter=(a)
  @faraday_adapter = a
end

.new(options = {}) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/tentd.rb', line 11

def self.new(options={})
  if options[:database] || ENV['DATABASE_URL']
    DataMapper.setup(:default, options[:database] || ENV['DATABASE_URL'])
  end

  require "tentd/notifications/#{options[:job_backend] || 'girl_friday'}"

  @faraday_adapter = options[:faraday_adapter]
  API.new
end