Sha256: a3e264ac59f8f4ccae158acd237739c07a091595d1f6a4f2b3fff60ae31e2079

Contents?: true

Size: 323 Bytes

Versions: 31

Compression:

Stored size: 323 Bytes

Contents

Server.api :reset do |params,user|
  Store.db.flushdb
  app_klass = Object.const_get(camelize(APP_NAME))
  if app_klass.singleton_methods.include?("initializer")
    app_klass.send :initializer, Rhosync.base_directory
  end
  # restoring previous token value after flushdb
  user.token = params[:api_token]
  "DB reset"
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
rhosync-2.1.18.beta2 lib/rhosync/api/reset.rb
rhosync-2.1.18.beta1 lib/rhosync/api/reset.rb
rhosync-2.1.17 lib/rhosync/api/reset.rb
rhosync-2.1.17.beta7 lib/rhosync/api/reset.rb
rhosync-2.1.17.beta6 lib/rhosync/api/reset.rb
rhosync-2.1.17.beta5 lib/rhosync/api/reset.rb
rhosync-2.1.17.beta4 lib/rhosync/api/reset.rb
rhosync-2.1.17.beta3 lib/rhosync/api/reset.rb
rhosync-2.1.17.beta2 lib/rhosync/api/reset.rb
rhosync-2.1.17.beta1 lib/rhosync/api/reset.rb
rhosync-2.1.16 lib/rhosync/api/reset.rb
rhosync-2.1.15 lib/rhosync/api/reset.rb
rhosync-2.1.14 lib/rhosync/api/reset.rb
rhosync-2.1.13 lib/rhosync/api/reset.rb
rhosync-2.1.12 lib/rhosync/api/reset.rb
rhosync-2.1.11 lib/rhosync/api/reset.rb
rhosync-2.1.10 lib/rhosync/api/reset.rb
rhosync-2.1.7 lib/rhosync/api/reset.rb
rhosync-2.1.6 lib/rhosync/api/reset.rb
rhosync-2.1.3 lib/rhosync/api/reset.rb