blueprints 0.6.3 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +65 -66
- data/Rakefile +4 -0
- data/VERSION +1 -1
- data/bin/blueprintify +80 -0
- data/blueprints.gemspec +21 -5
- data/lib/blueprints.rb +26 -51
- data/lib/blueprints/{plan.rb → blueprint.rb} +4 -4
- data/lib/blueprints/buildable.rb +2 -2
- data/lib/blueprints/configuration.rb +42 -0
- data/lib/blueprints/convertable.rb +30 -0
- data/lib/blueprints/convertable/fixtures.rb +43 -0
- data/lib/blueprints/database_backends/active_record.rb +44 -85
- data/lib/blueprints/errors.rb +3 -3
- data/lib/blueprints/extensions/deprecated.rb +22 -0
- data/lib/blueprints/extensions/rspec.rb +7 -32
- data/lib/blueprints/extensions/test_unit.rb +9 -18
- data/lib/blueprints/file_context.rb +3 -3
- data/lib/blueprints/helper.rb +7 -5
- data/lib/blueprints/namespace.rb +2 -2
- data/lib/blueprints/root_namespace.rb +13 -9
- data/spec/active_record/blueprints_spec.rb +7 -49
- data/spec/active_record/spec_helper.rb +6 -1
- data/spec/no_db/spec_helper.rb +6 -1
- data/spec/test_all.sh +32 -0
- data/spec/unit/configuration_spec.rb +34 -0
- data/spec/unit/spec_helper.rb +17 -0
- data/test/blueprints_test.rb +7 -49
- data/test/test_helper.rb +6 -2
- metadata +51 -12
- data/lib/blueprints/database_backends/abstract.rb +0 -21
- data/lib/blueprints/database_backends/none.rb +0 -18
@@ -1,21 +0,0 @@
|
|
1
|
-
module Blueprints
|
2
|
-
module DatabaseBackends
|
3
|
-
class Abstract
|
4
|
-
# Method to start transaction. Needs to be implemented in child class.
|
5
|
-
def start_transaction
|
6
|
-
raise NotImplementedError
|
7
|
-
end
|
8
|
-
|
9
|
-
# Method to revert transaction. Needs to be implemented in child class.
|
10
|
-
def revert_transaction
|
11
|
-
raise NotImplementedError
|
12
|
-
end
|
13
|
-
|
14
|
-
# Method to clear tables. Should accept delete policy and list of tables to delete. If list of tables is empty, should
|
15
|
-
# delete all tables. Needs to be implemented in child class.
|
16
|
-
def delete_tables(delete_policy, *args)
|
17
|
-
raise NotImplementedError
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Blueprints
|
2
|
-
module DatabaseBackends
|
3
|
-
# Database backend when no orm is actually used. Can be adapted to work with any kind of data.
|
4
|
-
class None
|
5
|
-
# Dummy method
|
6
|
-
def start_transaction
|
7
|
-
end
|
8
|
-
|
9
|
-
# Dummy method
|
10
|
-
def rollback_transaction
|
11
|
-
end
|
12
|
-
|
13
|
-
# Dummy method
|
14
|
-
def delete_tables(delete_policy, *args)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|