restpack_core_service 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/db/migrate/20130807103945_create_applications.rb +5 -1
- data/db/migrate/20130807104142_create_domains.rb +5 -1
- data/lib/restpack_core_service/models/application.rb +3 -2
- data/lib/restpack_core_service/models/base.rb +9 -0
- data/lib/restpack_core_service/models/domain.rb +3 -2
- data/lib/restpack_core_service/version.rb +1 -1
- data/lib/restpack_core_service.rb +1 -0
- data/spec/models/application_spec.rb +2 -1
- data/spec/models/domain_spec.rb +2 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0079ea5beff672cf761cf26dd696dc7d9301bf2
|
4
|
+
data.tar.gz: 3d6daa7f407bc0968314d4db0575532debdd20e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdbf81e2a85258b4ac37a4ff9f1ca06aba231c5e389dea47414055e1277a4e3144e96e6107dbec42827a74c63b3e6bb7b9621f1722c4ea797e0ac6c657c6bc2a
|
7
|
+
data.tar.gz: fb5573d6972ed389a731f03a9cd4e04b46c2ee03ab6b2bfe0357253329b4b3152128491d72471d61efe8988da3a717252865a2f49388e0cffded2256513c1773
|
@@ -1,6 +1,10 @@
|
|
1
1
|
class CreateApplications < ActiveRecord::Migration
|
2
|
+
def table_name
|
3
|
+
RestPack::Core::Service.config.prefix_db_table(:applications)
|
4
|
+
end
|
5
|
+
|
2
6
|
def change
|
3
|
-
create_table
|
7
|
+
create_table table_name do |t|
|
4
8
|
t.string :name, :null => false, :limit => 256
|
5
9
|
t.integer :account_id, :null => false
|
6
10
|
|
@@ -1,6 +1,10 @@
|
|
1
1
|
class CreateDomains < ActiveRecord::Migration
|
2
|
+
def table_name
|
3
|
+
RestPack::Core::Service.config.prefix_db_table(:domains)
|
4
|
+
end
|
5
|
+
|
2
6
|
def change
|
3
|
-
create_table
|
7
|
+
create_table table_name do |t|
|
4
8
|
t.string :host, :null => false, :limit => 512
|
5
9
|
t.integer :application_id, :null => false
|
6
10
|
|
@@ -4,6 +4,7 @@ require "active_support/core_ext"
|
|
4
4
|
require "restpack_core_service/version"
|
5
5
|
require "restpack_core_service/configuration"
|
6
6
|
|
7
|
+
require "restpack_core_service/models/base"
|
7
8
|
require "restpack_core_service/models/application"
|
8
9
|
require "restpack_core_service/models/domain"
|
9
10
|
|
@@ -1,6 +1,7 @@
|
|
1
|
-
describe RestPack::Models::Application do
|
1
|
+
describe RestPack::Core::Service::Models::Application do
|
2
2
|
it { should validate_presence_of(:name) }
|
3
3
|
it { should validate_presence_of(:account_id) }
|
4
4
|
it { should ensure_length_of(:name).is_at_most(256) }
|
5
5
|
it { should have_many(:domains) }
|
6
|
+
it { subject.class.table_name.should == 'restpack_applications' }
|
6
7
|
end
|
data/spec/models/domain_spec.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
describe RestPack::Models::Domain do
|
1
|
+
describe RestPack::Core::Service::Models::Domain do
|
2
2
|
it { should validate_presence_of(:host) }
|
3
3
|
it { should ensure_length_of(:host).is_at_most(512) }
|
4
4
|
it { should belong_to(:application) }
|
5
|
+
it { subject.class.table_name.should == 'restpack_domains' }
|
5
6
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gavin Joyce
|
@@ -183,6 +183,7 @@ files:
|
|
183
183
|
- lib/restpack_core_service.rb
|
184
184
|
- lib/restpack_core_service/configuration.rb
|
185
185
|
- lib/restpack_core_service/models/application.rb
|
186
|
+
- lib/restpack_core_service/models/base.rb
|
186
187
|
- lib/restpack_core_service/models/domain.rb
|
187
188
|
- lib/restpack_core_service/tasks.rb
|
188
189
|
- lib/restpack_core_service/tasks/db.rake
|