restpack_core_service 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59751865a14101a724e7516baa32731a1945a1b5
|
4
|
+
data.tar.gz: 882a57076fa66e64b8e778bc1b5f1637edf298e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19e07a281795fce937509cc7255c13538e59d520d90044279281114ddcf2dfea1fc2915b33e1ea0f6d65385efef9fc53d22f8cd42cb2e57d2355169c459ff771
|
7
|
+
data.tar.gz: cfc2397c3885d3bef36be70f90029e2b8efdb857ca086953228edaaa909599091bf490f12c5629b16001187643be1e7f3cae30ee94dfd4f62847e9ae0f9ded97
|
@@ -0,0 +1,39 @@
|
|
1
|
+
namespace :restpack do
|
2
|
+
desc "Run any outstanding RestPack migrations"
|
3
|
+
task :migrate do
|
4
|
+
Rake::Task["restpack:activity:migrate"].invoke
|
5
|
+
end
|
6
|
+
|
7
|
+
desc "List RestPack configuration"
|
8
|
+
task :configuration do
|
9
|
+
Rake::Task["restpack:activity:configuration"].invoke
|
10
|
+
end
|
11
|
+
|
12
|
+
namespace :core do
|
13
|
+
desc "Run any outstanding RestPack::Core migrations"
|
14
|
+
task :migrate => ["connection"] do
|
15
|
+
source_migrations_path = File.dirname(__FILE__) + "/../../../db/migrate"
|
16
|
+
target_migrations_path = "db/migrate"
|
17
|
+
|
18
|
+
ActiveRecord::Migration.verbose = true
|
19
|
+
ActiveRecord::Migrator.migrate(source_migrations_path)
|
20
|
+
|
21
|
+
if File.directory?(target_migrations_path)
|
22
|
+
FileUtils.cp_r(Dir["#{source_migrations_path}/*"], target_migrations_path)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
task :connection do
|
27
|
+
config = YAML.load(IO.read('config/database.yml'))
|
28
|
+
environment = ENV['RAILS_ENV'] || ENV['DB'] || 'development'
|
29
|
+
ActiveRecord::Base.establish_connection config[environment]
|
30
|
+
end
|
31
|
+
|
32
|
+
desc "List RestPack::Core::Service configuration"
|
33
|
+
task :configuration do
|
34
|
+
p "RestPack::Core::Service Configuration"
|
35
|
+
p "--------------------------------"
|
36
|
+
p "database_table_prefix: #{RestPack::Core::Service.config.db_table_prefix}"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restpack_core_service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gavin Joyce
|
@@ -184,6 +184,8 @@ files:
|
|
184
184
|
- lib/restpack_core_service/configuration.rb
|
185
185
|
- lib/restpack_core_service/models/application.rb
|
186
186
|
- lib/restpack_core_service/models/domain.rb
|
187
|
+
- lib/restpack_core_service/tasks.rb
|
188
|
+
- lib/restpack_core_service/tasks/db.rake
|
187
189
|
- lib/restpack_core_service/version.rb
|
188
190
|
- restpack_core_service.gemspec
|
189
191
|
- spec/configuration_spec.rb
|