Sha256: c32482e56475839a8d3ec4cb7c8572fcbe0916eb38b2e0e7771a78bea0fe94e8

Contents?: true

Size: 905 Bytes

Versions: 5

Compression:

Stored size: 905 Bytes

Contents

# typically config/initializers/HyperMesh.rb
# or you can do a similar setup in your tests (see this gem's specs)
require 'pusher'
require 'pusher-fake'
# The app_id, key, and secret need to be assigned directly to Pusher
# so PusherFake will work.
Pusher.app_id = "MY_TEST_ID"      # you use the real or fake values
Pusher.key =    "MY_TEST_KEY"
Pusher.secret = "MY_TEST_SECRET"
# The next line actually starts the pusher-fake server (see the Pusher-Fake readme for details.)
require 'pusher-fake/support/base' # if using pusher with rspec change this to pusher-fake/support/rspec
# now copy over the credentials, and merge with PusherFake's config details
HyperMesh.configuration do |config|
  config.transport = :pusher
  config.channel_prefix = "HyperMesh"
  config.opts = {
    app_id: Pusher.app_id,
    key: Pusher.key,
    secret: Pusher.secret
  }.merge(PusherFake.configuration.web_options)
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
hyper-mesh-0.6.0 examples/pusher-fake/config/initializers/hyper_mesh.rb
hyper-mesh-0.5.4 examples/pusher-fake/config/initializers/hyper_mesh.rb
hyper-mesh-0.5.3 examples/pusher-fake/config/initializers/hyper_mesh.rb
hyper-mesh-0.5.2 examples/pusher-fake/config/initializers/hyper_mesh.rb
hyper-mesh-0.5.1 examples/pusher-fake/config/initializers/hyper_mesh.rb