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: 22f114dcdcd1b68e603a2e20358ffa6ac3ea4746
4
- data.tar.gz: 9181b1eecda13ef3a1d4c0bfd913c12ea8af5db2
3
+ metadata.gz: 59751865a14101a724e7516baa32731a1945a1b5
4
+ data.tar.gz: 882a57076fa66e64b8e778bc1b5f1637edf298e4
5
5
  SHA512:
6
- metadata.gz: 7a201ac987e6e126744d91b1ba50920cf15706876feecb6fb8c914471bf448f3c512fb240507ff33705daf2e958f3dca18717fff26886ca3710fe83fdaacac07
7
- data.tar.gz: 0cc81351fdb07beb6f7d7c87fbca4ac8741e79c1a523fc5100c05d5e848f6b63f180d226b8b7b21004b99fa804bbfc61665b04b2b099737dfc33a8eaaf9ae122
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
@@ -0,0 +1,7 @@
1
+ module RestPack::Core::Service
2
+ class Tasks
3
+ def self.load_tasks
4
+ load "restpack_core_service/tasks/db.rake"
5
+ end
6
+ end
7
+ end
@@ -1,7 +1,7 @@
1
1
  module RestPack
2
2
  module Core
3
3
  module Service
4
- VERSION = "0.0.2"
4
+ VERSION = "0.0.3"
5
5
  end
6
6
  end
7
7
  end
@@ -6,3 +6,6 @@ require "restpack_core_service/configuration"
6
6
 
7
7
  require "restpack_core_service/models/application"
8
8
  require "restpack_core_service/models/domain"
9
+
10
+ require "restpack_core_service/tasks"
11
+
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.2
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