comptroller 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,14 @@ module Comptroller
5
5
  collection_path '/duxware_errors'
6
6
  include_root_in_json true
7
7
 
8
+ attributes :error_message, :created_at, :external_id
9
+
10
+ def self.count
11
+ get_raw(:count) do |parsed_data, response|
12
+ parsed_data[:data][:count]
13
+ end
14
+ end
15
+
8
16
  def eql?(other)
9
17
  id.eql? other.id
10
18
  end
@@ -1,3 +1,3 @@
1
1
  module Comptroller
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -88,6 +88,10 @@ Mimic.mimic(:port => Comptroller::Configuration::PORT) do
88
88
  [ 200, {}, deleted_practice.to_json ]
89
89
  end
90
90
 
91
+ get '/duxware_errors/count' do
92
+ [ 200, {}, { :count => 1 }.to_json ]
93
+ end
94
+
91
95
  get '/duxware_errors' do
92
96
  [ 200, {}, DataManager.claim_errors.values.to_json ]
93
97
  end
@@ -16,5 +16,9 @@ module Comptroller
16
16
  error = ClaimError.save_existing(1, :message_body => 'foo bar')
17
17
  expect(ClaimError.find(1).message_body).to eql('foo bar')
18
18
  end
19
+
20
+ it 'defines count' do
21
+ expect(ClaimError.count).to eql(1)
22
+ end
19
23
  end
20
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comptroller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-05 00:00:00.000000000 Z
12
+ date: 2013-08-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: her