restpack_service 0.0.65 → 0.0.66

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: 49137a729f5b2c815e7ee9c104520ec36fa6266e
4
- data.tar.gz: 86451cffa96faae3785f3464827f553bf3511600
3
+ metadata.gz: a4c6887953f49be4ac1c823e8ab1013f24c091d0
4
+ data.tar.gz: 476bdb5760d520ccb0f4c559b180803e662fb3c1
5
5
  SHA512:
6
- metadata.gz: 578bdc4ee648100800538dff93e47cc7b46f5f67a1eebdb73d4bc25f0ae974e9b9b230384a980fbb964023c13aa84f77b7f1c2cc475c4aa4e0312c7fb56e3a71
7
- data.tar.gz: 2644f5878ce6e1484c317b3482f5f2a219a3dc8f13d302787348285414027a808ea5922cbd55490117419bf552e8abaae92bc8e2b930a0a657e66018e2c44316
6
+ metadata.gz: 060b25a84745edbacdb58919af7454205ebd3957073405c5d0e201e871a727e0b959950ca7b617f15e901b6a22e66eed4de76db231b023efdb3beebe9defc2c6
7
+ data.tar.gz: 8936359b98ab968b71fdae6417b2bf576404f1f3af1687b995481db494fa0c6732d4ee3696a0e257a373f3ae077ddc08a39d7ff69394296359c2f1224ab1cba3
@@ -56,6 +56,14 @@ module RestPack
56
56
  add_error key, key, message
57
57
  end
58
58
 
59
+ def Serializer
60
+ self.class.const_get(:Serializer)
61
+ end
62
+
63
+ def Model
64
+ self.class.const_get(:Model)
65
+ end
66
+
59
67
  def self.inherited(command)
60
68
  namespaces = command.to_s.split('::') # eg. GroupService::Commands::Group::Create
61
69
 
@@ -1,5 +1,5 @@
1
1
  module RestPack
2
2
  module Service
3
- VERSION = "0.0.65"
3
+ VERSION = "0.0.66"
4
4
  end
5
5
  end
data/spec/command_spec.rb CHANGED
@@ -8,12 +8,17 @@ describe RestPack::Command do
8
8
  end
9
9
 
10
10
  it 'defines aliases' do
11
- command = TextService::Commands::Text::Reverse
11
+ Command = TextService::Commands::Text::Reverse
12
+ command = Command.new
12
13
 
13
- expect(command::Model).to eq(TextService::Models::Text)
14
- expect(command::Serializer).to eq(TextService::Serializers::Text)
15
- expect(command::Commands).to eq(TextService::Commands)
16
- expect(command::Models).to eq(TextService::Models)
14
+ expect(Command::Model).to eq(TextService::Models::Text)
15
+ expect(command.Model).to eq(TextService::Models::Text)
16
+
17
+ expect(Command::Serializer).to eq(TextService::Serializers::Text)
18
+ expect(command.Serializer).to eq(TextService::Serializers::Text)
19
+
20
+ expect(Command::Commands).to eq(TextService::Commands)
21
+ expect(Command::Models).to eq(TextService::Models)
17
22
  end
18
23
  end
19
24
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restpack_service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.65
4
+ version: 0.0.66
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin Joyce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-09 00:00:00.000000000 Z
11
+ date: 2014-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mutations