WatersOfOblivion-burn 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/app/models/burn/crash.rb +16 -0
- data/lib/routing_extension.rb +4 -1
- data/rails/init.rb +0 -3
- metadata +1 -1
@@ -1,5 +1,21 @@
|
|
1
1
|
module Burn
|
2
2
|
# A simple RESTful XML interface to the Crash server
|
3
3
|
class Crash < ActiveResource::Base
|
4
|
+
# Registers this application with the server. If it is already registered,
|
5
|
+
# updates the server with the given schedule.
|
6
|
+
def self.register
|
7
|
+
end
|
8
|
+
|
9
|
+
# Force a backup of this application
|
10
|
+
def backup
|
11
|
+
end
|
12
|
+
|
13
|
+
# Force a restore of this application
|
14
|
+
def restore
|
15
|
+
end
|
16
|
+
|
17
|
+
# Update the schedule of this application
|
18
|
+
def schedule
|
19
|
+
end
|
4
20
|
end
|
5
21
|
end
|
data/lib/routing_extension.rb
CHANGED
@@ -2,9 +2,12 @@ module Burn
|
|
2
2
|
# Adds two simple routes for fetching backups and restoring from backups
|
3
3
|
#
|
4
4
|
# ActionController::Routing::Routes.draw do |map|
|
5
|
+
# # Creates both the backup and restore routes
|
6
|
+
# map.burn
|
7
|
+
#
|
8
|
+
# # You can create them individually if you need to.
|
5
9
|
# map.burn_backup # Creates the backup route 'GET /burn/backup'
|
6
10
|
# map.burn_restore # Creates the restore route 'POST /burn/restore'
|
7
|
-
# map.burn # Creates both of the above routes
|
8
11
|
# end
|
9
12
|
module RoutingExtension
|
10
13
|
def burn_backup
|
data/rails/init.rb
CHANGED
@@ -6,9 +6,6 @@ require File.join('burn', 'burn_controller')
|
|
6
6
|
# Load the routing extension
|
7
7
|
require File.join(File.dirname(__FILE__), '..', 'lib', 'routing_extension')
|
8
8
|
ActionController::Routing::RouteSet::Mapper.send :include, Burn::RoutingExtension
|
9
|
-
ActionController::Routing::Routes.draw do |map|
|
10
|
-
map.burn
|
11
|
-
end
|
12
9
|
|
13
10
|
# Load the initializer
|
14
11
|
require File.join(File.dirname(__FILE__), '..', 'lib', 'initializer')
|