forked from DrTom/rails_pg-tasks
-
Notifications
You must be signed in to change notification settings - Fork 0
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
8 changed files
with
151 additions
and
87 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# This configuration was generated by `rubocop --auto-gen-config` | ||
# on 2015-01-27 15:35:54 +0100 using RuboCop version 0.28.0. | ||
# The point is for the user to remove these configuration records | ||
# one by one as the offenses are removed from the code base. | ||
# Note that changes in the inspected code, or installation of new | ||
# versions of RuboCop, may require this file to be generated again. | ||
|
||
# Offense count: 1 | ||
Lint/RescueException: | ||
Enabled: false | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: AllowURI, URISchemes. | ||
Metrics/LineLength: | ||
Max: 85 | ||
|
||
# Offense count: 5 | ||
Style/Documentation: | ||
Enabled: false | ||
|
||
# Offense count: 4 | ||
# Cop supports --auto-correct. | ||
# Configuration parameters: EnforcedStyle, SupportedStyles. | ||
Style/SignalException: | ||
Enabled: false | ||
|
||
# Offense count: 1 | ||
# Cop supports --auto-correct. | ||
Style/SpecialGlobalVars: | ||
Enabled: false | ||
|
||
# Offense count: 4 | ||
Style/UnlessElse: | ||
Enabled: false |
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 |
---|---|---|
|
@@ -14,6 +14,4 @@ RDoc::Task.new(:rdoc) do |rdoc| | |
rdoc.rdoc_files.include('lib/**/*.rb') | ||
end | ||
|
||
|
||
Bundler::GemHelper.install_tasks | ||
|
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
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,11 +1,11 @@ | ||
#-- | ||
# Copyright (c) 2015 Thomas Schank | ||
# | ||
# Released to the public under the terms of the MIT license. | ||
# See MIT-LICENSE. | ||
# Released to the public under the terms of the MIT license. | ||
# See MIT-LICENSE. | ||
# | ||
#++ | ||
|
||
module PgTasks | ||
VERSION = "1.0.1" | ||
VERSION = '1.0.1' | ||
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,45 +1,37 @@ | ||
#-- | ||
# Copyright (c) 2015 Thomas Schank | ||
# | ||
# Released to the public under the terms of the MIT license. | ||
# See MIT-LICENSE. | ||
# Released to the public under the terms of the MIT license. | ||
# See MIT-LICENSE. | ||
# | ||
#++ | ||
|
||
require 'pg_tasks' | ||
|
||
namespace :db do | ||
|
||
namespace :pg do | ||
|
||
task truncate_tables: [:environment, :load_config] do | ||
PgTasks.truncate_tables | ||
end | ||
|
||
namespace :data do | ||
|
||
task dump: [:environment, :load_config] do | ||
PgTasks.data_dump ENV['FILE'] | ||
end | ||
|
||
task restore: [:environment, :load_config] do | ||
PgTasks.data_restore ENV['FILE'] | ||
end | ||
|
||
end | ||
|
||
namespace :structure_and_data do | ||
|
||
task dump: [:environment, :load_config] do | ||
PgTasks.structure_and_data_dump ENV['FILE'] | ||
end | ||
|
||
task restore: [:environment, :load_config] do | ||
PgTasks.structure_and_data_restore ENV['FILE'] | ||
end | ||
|
||
end | ||
|
||
end | ||
|
||
end |
Oops, something went wrong.