restpack_core_service 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -1
  3. data/db/migrate/{20130807103945_create_applications.rb → 20130807103946_create_applications.rb} +1 -1
  4. data/db/migrate/{20130808135549_create_domains.rb → 20130808135550_create_domains.rb} +1 -1
  5. data/lib/restpack_core_service.rb +2 -22
  6. data/lib/restpack_core_service/commands/application/create.rb +14 -0
  7. data/lib/restpack_core_service/commands/application/get.rb +8 -0
  8. data/lib/restpack_core_service/commands/application/list.rb +13 -0
  9. data/lib/restpack_core_service/{services → commands}/application/verify_api_token.rb +2 -2
  10. data/lib/restpack_core_service/{services → commands}/domain/by_identifier.rb +4 -4
  11. data/lib/restpack_core_service/commands/domain/create.rb +14 -0
  12. data/lib/restpack_core_service/commands/domain/get.rb +8 -0
  13. data/lib/restpack_core_service/commands/domain/list.rb +13 -0
  14. data/lib/restpack_core_service/commands/domain/update.rb +48 -0
  15. data/lib/restpack_core_service/models/application.rb +2 -2
  16. data/lib/restpack_core_service/models/domain.rb +3 -3
  17. data/lib/restpack_core_service/serializers/application.rb +13 -0
  18. data/lib/restpack_core_service/serializers/domain.rb +14 -0
  19. data/lib/restpack_core_service/{tasks.rb → tasks/tasks.rb} +0 -0
  20. data/lib/restpack_core_service/version.rb +1 -1
  21. data/restpack_core_service.gemspec +0 -4
  22. data/spec/commands/application/create_spec.rb +7 -0
  23. data/spec/commands/application/get_spec.rb +28 -0
  24. data/spec/commands/application/list_spec.rb +32 -0
  25. data/spec/{services → commands}/application/verify_api_token_spec.rb +2 -2
  26. data/spec/{services → commands}/domain/by_identifier_spec.rb +5 -5
  27. data/spec/commands/domain/create_spec.rb +8 -0
  28. data/spec/factories/api_application_factory.rb +8 -0
  29. data/spec/factories/api_domain_factory.rb +8 -0
  30. data/spec/factories/application_factory.rb +1 -1
  31. data/spec/factories/domain_factory.rb +1 -1
  32. data/spec/models/application_spec.rb +1 -2
  33. data/spec/models/domain_spec.rb +2 -3
  34. data/spec/spec_helper.rb +1 -0
  35. metadata +32 -70
  36. data/lib/restpack_core_service/serializers/application_serializer.rb +0 -10
  37. data/lib/restpack_core_service/serializers/domain_serializer.rb +0 -13
  38. data/lib/restpack_core_service/services.rb +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 504634bab2bf42ecded107859f2945e18a0df86f
4
- data.tar.gz: d8d5fedf8d9dce3edc41bc5d3cf6bbce4e254be7
3
+ metadata.gz: 06476cdc6cf44f1be4d5bed3842b47576a802fc0
4
+ data.tar.gz: 8b2ab8a320a733eeeefbdc986ec727eda16d2198
5
5
  SHA512:
6
- metadata.gz: d8bd5796073fbd62000fe529561a636508aaa2039561e04cd86c46fcff8bc00dbc54446bf087ea0805edc11c9acaa44f3381f9e72bb21eb4b5e168ec841b9f4a
7
- data.tar.gz: bc2c6b127ba0757ea07d0ed3006ecb3db2613f3e55551ea9b7f28bd6b46a1d39939ea15d4d0126074279d6e272d0ff19c4859f6c267798acda098b10d6063f40
6
+ metadata.gz: 72eb8670eef9a691df897d040545d216fed30ccd84552c6c59740cc51422cbd38a39da05e2dabeb84eb4fd7c628f5b78a17f2b9133844f625470fcae4bf2278c
7
+ data.tar.gz: 68d41507f4540fb4ba203aa987af9407f880df300cfedbf05b677a392f36a70d2a4267c3588bfa24dc71ac70eba15070e3da66960f8bf9493e0aa60d0aebc934
data/Gemfile CHANGED
@@ -1,4 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in restpack_core_service.gemspec
4
3
  gemspec
@@ -1,6 +1,6 @@
1
1
  class CreateApplications < ActiveRecord::Migration
2
2
  def change
3
- create_table :restpack_applications do |t|
3
+ create_table :restpack_core_applications do |t|
4
4
  t.string :name, :null => false, :limit => 256
5
5
  t.string :api_token, :null => false, :limit => 512
6
6
  t.integer :account_id, :null => false
@@ -1,6 +1,6 @@
1
1
  class CreateDomains < ActiveRecord::Migration
2
2
  def change
3
- create_table :restpack_domains do |t|
3
+ create_table :restpack_core_domains do |t|
4
4
  t.string :identifier, :null => false, :limit => 215
5
5
  t.integer :application_id, :null => false
6
6
  t.boolean :is_verified, :null => false, :default => false
@@ -1,23 +1,3 @@
1
- require "active_record"
2
- require "restpack_service"
3
- require "restpack_serializer"
1
+ require 'restpack_service'
4
2
 
5
- require "active_support/core_ext"
6
-
7
- require "restpack_core_service/version"
8
- require "restpack_core_service/configuration"
9
-
10
- require "restpack_core_service/models/application"
11
- require "restpack_core_service/models/domain"
12
-
13
- require "restpack_core_service/serializers/application_serializer"
14
- require "restpack_core_service/serializers/domain_serializer"
15
-
16
- require "restpack_core_service/services"
17
- require "restpack_core_service/tasks"
18
-
19
- module Core
20
- Models = RestPack::Core::Service::Models
21
- Commands = RestPack::Core::Service::Commands
22
- Serializers = RestPack::Core::Service::Serializers
23
- end
3
+ RestPack::Service::Loader.load 'restpack_core_service', 'Core'
@@ -0,0 +1,14 @@
1
+ module Commands::Core::Application
2
+ class Create < RestPack::Service::Commands::Create
3
+ required do
4
+ array :applications do
5
+ hash do
6
+ required do
7
+ integer :account_id
8
+ string :name
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,8 @@
1
+ module Commands::Core::Application
2
+ class Get < RestPack::Service::Commands::Get
3
+ required do
4
+ integer :id
5
+ integer :account_id
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,13 @@
1
+ module Commands::Core::Application
2
+ class List < RestPack::Service::Commands::List
3
+ required do
4
+ integer :account_id
5
+ end
6
+
7
+ optional do
8
+ integer :page
9
+ integer :page_size
10
+ string :include
11
+ end
12
+ end
13
+ end
@@ -1,4 +1,4 @@
1
- module RestPack::Core::Service::Commands::Application
1
+ module Commands::Core::Application
2
2
  class VerifyApiToken < RestPack::Service::Command
3
3
  required do
4
4
  integer :id
@@ -6,7 +6,7 @@ module RestPack::Core::Service::Commands::Application
6
6
  end
7
7
 
8
8
  def execute
9
- application = Core::Models::Application.find_by_id_and_api_token(
9
+ application = Models::Core::Application.find_by_id_and_api_token(
10
10
  inputs[:id],
11
11
  inputs[:api_token]
12
12
  )
@@ -1,13 +1,13 @@
1
1
  require 'public_suffix'
2
2
 
3
- module RestPack::Core::Service::Commands::Domain
3
+ module Commands::Core::Domain
4
4
  class ByIdentifier < RestPack::Service::Command
5
5
  required do
6
6
  string :identifier
7
7
  end
8
8
 
9
9
  optional do
10
- string :includes
10
+ string :include
11
11
  end
12
12
 
13
13
  def execute
@@ -17,9 +17,9 @@ module RestPack::Core::Service::Commands::Domain
17
17
  ]
18
18
 
19
19
  identifiers.reject(&:nil?).each do |identifier|
20
- result = Core::Serializers::DomainSerializer.resource(
20
+ result = Serializers::Core::Domain.resource(
21
21
  inputs,
22
- Core::Models::Domain.where(identifier: identifier)
22
+ Models::Core::Domain.where(identifier: identifier)
23
23
  )
24
24
 
25
25
  if result[:domains].any?
@@ -0,0 +1,14 @@
1
+ module Commands::Core::Domain
2
+ class Create < RestPack::Service::Commands::Create
3
+ required do
4
+ array :domains do
5
+ hash do
6
+ required do
7
+ integer :application_id
8
+ string :identifier
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,8 @@
1
+ module Commands::Core::Domain
2
+ class Get < RestPack::Service::Commands::Get
3
+ required do
4
+ integer :id
5
+ integer :application_id
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,13 @@
1
+ module Commands::Core::Domain
2
+ class List < RestPack::Service::Commands::List
3
+ required do
4
+ integer :application_id
5
+ end
6
+
7
+ optional do
8
+ integer :page
9
+ integer :page_size
10
+ string :include
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,48 @@
1
+ module Commands::Core::Domain
2
+ class Update < RestPack::Service::Command
3
+ required do
4
+ array :domains do
5
+ hash do
6
+ required do
7
+ integer :id
8
+ integer :application_id
9
+ end
10
+
11
+ optional do
12
+ array :oauth_providers do
13
+ hash do
14
+ required do
15
+ string :identifier
16
+ string :key
17
+ string :secret
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+
26
+ def execute
27
+ #TODO: GJ: wrap in transaction
28
+ result = {
29
+ domains: []
30
+ }
31
+
32
+ inputs[:domains].each do |domain_inputs|
33
+ domain = Models::Core::Domain.find_by_id_and_application_id(
34
+ domain_inputs[:id], domain_inputs[:application_id]
35
+ )
36
+
37
+ if domain
38
+ domain.update_attributes(domain_inputs)
39
+ result[:domains] << Serializers::Core::Domain.as_json(domain)
40
+ else
41
+ status :not_found
42
+ end
43
+ end
44
+
45
+ return result
46
+ end
47
+ end
48
+ end
@@ -1,6 +1,6 @@
1
- module RestPack::Core::Service::Models
1
+ module Models::Core
2
2
  class Application < ActiveRecord::Base
3
- self.table_name = :restpack_applications
3
+ self.table_name = :restpack_core_applications
4
4
  attr_accessible :name, :account_id
5
5
 
6
6
  validates_presence_of :name, :account_id
@@ -1,6 +1,6 @@
1
- module RestPack::Core::Service::Models
1
+ module Models::Core
2
2
  class Domain < ActiveRecord::Base
3
- self.table_name = :restpack_domains
3
+ self.table_name = :restpack_core_domains
4
4
  attr_accessible :identifier, :application_id, :is_verified, :session_secret, :oauth_providers
5
5
 
6
6
  validates_presence_of :identifier, :application_id
@@ -9,7 +9,7 @@ module RestPack::Core::Service::Models
9
9
  belongs_to :application
10
10
 
11
11
  before_save -> {
12
- self.oauth_providers ||= {}
12
+ self.oauth_providers ||= []
13
13
  self.session_secret ||= SecureRandom.hex(16)
14
14
  }
15
15
  end
@@ -0,0 +1,13 @@
1
+ module Serializers::Core
2
+ class Application
3
+ include RestPack::Serializer
4
+
5
+ self.model_class = Models::Core::Application
6
+ self.key = :applications
7
+
8
+ attributes :id, :name, :account_id
9
+
10
+ can_include :domains
11
+ can_filter_by :account_id
12
+ end
13
+ end
@@ -0,0 +1,14 @@
1
+ module Serializers::Core
2
+ class Domain
3
+ include RestPack::Serializer
4
+
5
+ self.model_class = Models::Core::Domain
6
+ self.key = :domains
7
+
8
+ attributes :id, :identifier, :application_id, :is_verified,
9
+ :session_secret, :oauth_providers
10
+
11
+ can_include :applications
12
+ can_filter_by :application_id
13
+ end
14
+ end
@@ -1,7 +1,7 @@
1
1
  module RestPack
2
2
  module Core
3
3
  module Service
4
- VERSION = "0.0.11"
4
+ VERSION = "0.0.12"
5
5
  end
6
6
  end
7
7
  end
@@ -19,11 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency "restpack_service"
22
- spec.add_dependency "restpack_serializer"
23
- spec.add_dependency "restpack_gem"
24
22
  spec.add_dependency "public_suffix", "~> 1.3.1"
25
- spec.add_dependency "sinatra", "~> 1.4.3"
26
- spec.add_dependency "pg", "~> 0.16"
27
23
 
28
24
  spec.add_development_dependency "bundler", "~> 1.3"
29
25
  spec.add_development_dependency "database_cleaner", "~> 1.0.1"
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ describe Commands::Core::Application::Create do
4
+ it_acts_as_create_command(:core, :application)
5
+
6
+ pending 'validate command inputs'
7
+ end
@@ -0,0 +1,28 @@
1
+ require 'spec_helper'
2
+
3
+ describe Commands::Core::Application::Get do
4
+ is_required :id, :account_id
5
+
6
+ let(:response) { subject.class.run(params) }
7
+ let(:params) { {} }
8
+
9
+ before do
10
+ @application = create(:application)
11
+ end
12
+
13
+ context 'with valid params' do
14
+ let(:params) { {
15
+ id: @application.id,
16
+ account_id: @application.account_id
17
+ } }
18
+
19
+ it 'is valid' do
20
+ response.success?.should == true
21
+ end
22
+
23
+ it 'return the application' do
24
+ response.result[:applications].length.should == 1
25
+ response.result[:applications].first[:id].should == @application.id.to_s
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,32 @@
1
+ require 'spec_helper'
2
+
3
+ describe Commands::Core::Application::List do
4
+ is_required :account_id
5
+ is_optional :page, :page_size
6
+
7
+ before do
8
+ @applications = create_list(:application, 5)
9
+ end
10
+
11
+ context 'listing' do
12
+ let(:response) { subject.class.run(params) }
13
+
14
+ context 'by :account_id' do
15
+ before { create_list(:application, 3, account_id: 142857) }
16
+
17
+ context 'valid' do
18
+ let(:params) { { account_id: 142857 } }
19
+ it 'returns correct applications' do
20
+ response.result[:meta][:applications][:count].should == 3
21
+ end
22
+ end
23
+
24
+ context 'invalid' do
25
+ let(:params) { { account_id: 999999 } }
26
+ it 'returns no applications' do
27
+ response.result[:meta][:applications][:count].should == 0
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -1,6 +1,6 @@
1
- require_relative '../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
- describe Core::Commands::Application::VerifyApiToken do
3
+ describe Commands::Core::Application::VerifyApiToken do
4
4
  is_required :id, :api_token
5
5
 
6
6
  let(:response) { subject.class.run(params) }
@@ -1,8 +1,8 @@
1
- require_relative '../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
- describe Core::Commands::Domain::ByIdentifier do
3
+ describe Commands::Core::Domain::ByIdentifier do
4
4
  is_required :identifier
5
- is_optional :includes
5
+ is_optional :include
6
6
 
7
7
  let(:response) { subject.class.run(params) }
8
8
 
@@ -13,7 +13,7 @@ describe Core::Commands::Domain::ByIdentifier do
13
13
  context 'with valid params' do
14
14
  let(:params) { {
15
15
  identifier: @domain.identifier,
16
- includes: 'applications'
16
+ include: 'applications'
17
17
  } }
18
18
 
19
19
  it 'is valid' do
@@ -33,7 +33,7 @@ describe Core::Commands::Domain::ByIdentifier do
33
33
  context 'with subdomain in identifier' do
34
34
  let(:params) { {
35
35
  identifier: "www.#{@domain.identifier}",
36
- includes: 'applications'
36
+ include: 'applications'
37
37
  } }
38
38
 
39
39
  it 'is valid' do
@@ -0,0 +1,8 @@
1
+ require 'spec_helper'
2
+
3
+ describe Commands::Core::Domain::Create do
4
+ it_acts_as_create_command(:core, :domain)
5
+
6
+ pending 'validate command inputs'
7
+ pending 'test invalid domain formats ("hostname", "no spaces", ip addresses...)'
8
+ end
@@ -0,0 +1,8 @@
1
+ FactoryGirl.define do
2
+ factory :api_application, class: Hash do
3
+ sequence(:name) {|n| "Application ##{n}" }
4
+ sequence(:account_id)
5
+
6
+ initialize_with { attributes }
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ FactoryGirl.define do
2
+ factory :api_domain, class: Hash do
3
+ sequence(:identifier) {|n| "domain_#{n}.com" }
4
+ sequence(:application_id)
5
+
6
+ initialize_with { attributes }
7
+ end
8
+ end
@@ -1,5 +1,5 @@
1
1
  FactoryGirl.define do
2
- factory :application, :class => Core::Models::Application do
2
+ factory :application, :class => Models::Core::Application do
3
3
  sequence(:name) {|n| "Application ##{n}" }
4
4
  sequence(:account_id)
5
5
  end
@@ -1,5 +1,5 @@
1
1
  FactoryGirl.define do
2
- factory :domain, :class => Core::Models::Domain do
2
+ factory :domain, :class => Models::Core::Domain do
3
3
  application
4
4
  sequence(:identifier) {|n| "domain_#{n}.com" }
5
5
  end
@@ -1,9 +1,8 @@
1
- describe RestPack::Core::Service::Models::Application do
1
+ describe Models::Core::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' }
7
6
 
8
7
  context "default values" do
9
8
  it "has a random api_token" do
@@ -1,9 +1,8 @@
1
- describe RestPack::Core::Service::Models::Domain do
1
+ describe Models::Core::Domain do
2
2
  it { should validate_presence_of(:identifier) }
3
3
  it { should validate_presence_of(:application_id) }
4
4
  it { should ensure_length_of(:identifier).is_at_most(512) }
5
5
  it { should belong_to(:application) }
6
- it { subject.class.table_name.should == 'restpack_domains' }
7
6
 
8
7
  context "default values" do
9
8
  it "has a random session_secret" do
@@ -15,7 +14,7 @@ describe RestPack::Core::Service::Models::Domain do
15
14
  end
16
15
 
17
16
  it "has empty oauth_providers as default" do
18
- create(:domain).oauth_providers.should == {}
17
+ create(:domain).oauth_providers.should == []
19
18
  end
20
19
 
21
20
  it "is not verified" do
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'rspec'
1
2
  require 'restpack_service/support/spec_helper'
2
3
  require 'restpack_core_service'
3
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restpack_core_service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin Joyce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-16 00:00:00.000000000 Z
11
+ date: 2013-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: restpack_service
@@ -24,34 +24,6 @@ dependencies:
24
24
  - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: restpack_serializer
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - '>='
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - '>='
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: restpack_gem
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '>='
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
27
  - !ruby/object:Gem::Dependency
56
28
  name: public_suffix
57
29
  requirement: !ruby/object:Gem::Requirement
@@ -66,34 +38,6 @@ dependencies:
66
38
  - - ~>
67
39
  - !ruby/object:Gem::Version
68
40
  version: 1.3.1
69
- - !ruby/object:Gem::Dependency
70
- name: sinatra
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ~>
74
- - !ruby/object:Gem::Version
75
- version: 1.4.3
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ~>
81
- - !ruby/object:Gem::Version
82
- version: 1.4.3
83
- - !ruby/object:Gem::Dependency
84
- name: pg
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ~>
88
- - !ruby/object:Gem::Version
89
- version: '0.16'
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ~>
95
- - !ruby/object:Gem::Version
96
- version: '0.16'
97
41
  - !ruby/object:Gem::Dependency
98
42
  name: bundler
99
43
  requirement: !ruby/object:Gem::Requirement
@@ -207,28 +151,40 @@ files:
207
151
  - README.md
208
152
  - Rakefile
209
153
  - config/database.yml
210
- - db/migrate/20130807103945_create_applications.rb
211
- - db/migrate/20130808135549_create_domains.rb
154
+ - db/migrate/20130807103946_create_applications.rb
155
+ - db/migrate/20130808135550_create_domains.rb
212
156
  - lib/restpack_core_service.rb
157
+ - lib/restpack_core_service/commands/application/create.rb
158
+ - lib/restpack_core_service/commands/application/get.rb
159
+ - lib/restpack_core_service/commands/application/list.rb
160
+ - lib/restpack_core_service/commands/application/verify_api_token.rb
161
+ - lib/restpack_core_service/commands/domain/by_identifier.rb
162
+ - lib/restpack_core_service/commands/domain/create.rb
163
+ - lib/restpack_core_service/commands/domain/get.rb
164
+ - lib/restpack_core_service/commands/domain/list.rb
165
+ - lib/restpack_core_service/commands/domain/update.rb
213
166
  - lib/restpack_core_service/configuration.rb
214
167
  - lib/restpack_core_service/models/application.rb
215
168
  - lib/restpack_core_service/models/domain.rb
216
- - lib/restpack_core_service/serializers/application_serializer.rb
217
- - lib/restpack_core_service/serializers/domain_serializer.rb
218
- - lib/restpack_core_service/services.rb
219
- - lib/restpack_core_service/services/application/verify_api_token.rb
220
- - lib/restpack_core_service/services/domain/by_identifier.rb
221
- - lib/restpack_core_service/tasks.rb
169
+ - lib/restpack_core_service/serializers/application.rb
170
+ - lib/restpack_core_service/serializers/domain.rb
222
171
  - lib/restpack_core_service/tasks/db.rake
172
+ - lib/restpack_core_service/tasks/tasks.rb
223
173
  - lib/restpack_core_service/version.rb
224
174
  - restpack_core_service.gemspec
175
+ - spec/commands/application/create_spec.rb
176
+ - spec/commands/application/get_spec.rb
177
+ - spec/commands/application/list_spec.rb
178
+ - spec/commands/application/verify_api_token_spec.rb
179
+ - spec/commands/domain/by_identifier_spec.rb
180
+ - spec/commands/domain/create_spec.rb
225
181
  - spec/configuration_spec.rb
182
+ - spec/factories/api_application_factory.rb
183
+ - spec/factories/api_domain_factory.rb
226
184
  - spec/factories/application_factory.rb
227
185
  - spec/factories/domain_factory.rb
228
186
  - spec/models/application_spec.rb
229
187
  - spec/models/domain_spec.rb
230
- - spec/services/application/verify_api_token_spec.rb
231
- - spec/services/domain/by_identifier_spec.rb
232
188
  - spec/spec_helper.rb
233
189
  homepage: https://github.com/RestPack
234
190
  licenses:
@@ -255,11 +211,17 @@ signing_key:
255
211
  specification_version: 4
256
212
  summary: Applications, Domains and Configurations
257
213
  test_files:
214
+ - spec/commands/application/create_spec.rb
215
+ - spec/commands/application/get_spec.rb
216
+ - spec/commands/application/list_spec.rb
217
+ - spec/commands/application/verify_api_token_spec.rb
218
+ - spec/commands/domain/by_identifier_spec.rb
219
+ - spec/commands/domain/create_spec.rb
258
220
  - spec/configuration_spec.rb
221
+ - spec/factories/api_application_factory.rb
222
+ - spec/factories/api_domain_factory.rb
259
223
  - spec/factories/application_factory.rb
260
224
  - spec/factories/domain_factory.rb
261
225
  - spec/models/application_spec.rb
262
226
  - spec/models/domain_spec.rb
263
- - spec/services/application/verify_api_token_spec.rb
264
- - spec/services/domain/by_identifier_spec.rb
265
227
  - spec/spec_helper.rb
@@ -1,10 +0,0 @@
1
- module RestPack::Core::Service::Serializers
2
- class ApplicationSerializer
3
- include RestPack::Serializer
4
-
5
- self.model_class = RestPack::Core::Service::Models::Application
6
- self.key = :applications
7
-
8
- attributes :id, :name, :account_id
9
- end
10
- end
@@ -1,13 +0,0 @@
1
- module RestPack::Core::Service::Serializers
2
- class DomainSerializer
3
- include RestPack::Serializer
4
-
5
- self.model_class = RestPack::Core::Service::Models::Domain
6
- self.key = :domains
7
-
8
- attributes :id, :identifier, :application_id, :is_verified, :session_secret,
9
- :oauth_providers
10
-
11
- can_include :applications
12
- end
13
- end
@@ -1,6 +0,0 @@
1
- module RestPack::Core::Service::Commands
2
-
3
- end
4
-
5
- require "restpack_core_service/services/application/verify_api_token"
6
- require "restpack_core_service/services/domain/by_identifier"