billit_representers 0.8.1 → 0.8.2

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: 8fd4cb6dbe206eb61401b96c3df3919800643e0c
4
- data.tar.gz: 5672ddcc87b5583e5f0dca3113dee3dbe95e7e30
3
+ metadata.gz: 808d6c7f685ec2e3d5355d6db80275f0f4194ac7
4
+ data.tar.gz: 01b3ed9eab4454799490e9012e55c7ab9c591817
5
5
  SHA512:
6
- metadata.gz: da05af7db016258339d028d8dbd6a26e1a784176be92c488431d5e6b089cccfc8115e5c0606ef45427754cd44f325b63bd4c74207176b438d7b7c338067d9797
7
- data.tar.gz: 0f4d142049d509cca38a6d8101c5331d3c1ee97c1c766dcb8bee32718fc8bcda949c11889a482411ca6a2e31892b5454b7bd4fbc237cb4d79c8404555a50c485
6
+ metadata.gz: 4b0fca8a04999851a3b09e985a3a24b21fe1b4c922189646431621fd434aa4d57905b4120da9233600f98498f4e7397d9b9e6b1bbefb7e01e30f79dc3fbd48f0
7
+ data.tar.gz: 8bafffb3e0a689205a6ec09a43e67b2938a1f3f3cf13200cca1c88499dce20a6935c151d9fa864622b999c58d2a58adaf0da172876320962f237afdb3661cfe3
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'billit_representers'
3
- gem.version = '0.8.1'
4
- gem.date = '2014-02-03'
3
+ gem.version = '0.8.2'
4
+ gem.date = '2014-02-04'
5
5
  gem.summary = "Representers for the bill-it module of the Poplus project."
6
6
  gem.description = "Representers for the bill-it module of the Poplus project. These provide object-like access to remote data, using Resource-Oriented Architectures in Ruby (ROAR)."
7
7
  gem.authors = ["Marcel Augsburger"]
@@ -0,0 +1,6 @@
1
+ require 'billit_representers/representers/paperwork_collection_model_representer'
2
+ module Billit
3
+ class PaperworkCollection
4
+ include Billit::PaperworkCollectionModelRepresenter
5
+ end
6
+ end
@@ -0,0 +1,30 @@
1
+ require 'roar/representer/json'
2
+ require 'billit_representers/representers/paperwork_representer'
3
+ require 'billit_representers/models/paperwork'
4
+
5
+ module Billit
6
+ module PaperworkCollectionModelRepresenter
7
+ # include Roar::Representer
8
+ include Roar::Representer::JSON
9
+ include Roar::Representer::Feature::Hypermedia
10
+
11
+ module Initializer
12
+ def initialize
13
+ extend Billit::PaperworkCollectionModelRepresenter
14
+ extend Roar::Representer::Feature::Client
15
+ super
16
+ end
17
+ end
18
+
19
+ def self.included(klass)
20
+ klass.send :prepend, Initializer
21
+ klass.send :include, Roar::Representer::Feature::HttpVerbs
22
+ end
23
+
24
+ collection :paperworks, :extend => Billit::PaperworkRepresenter, :class => Billit::Paperwork
25
+
26
+ def paperworks
27
+ collect
28
+ end
29
+ end
30
+ end
@@ -6,6 +6,19 @@ module Billit
6
6
  # include Roar::Representer
7
7
  include Roar::Representer::JSON
8
8
  include Roar::Representer::Feature::Hypermedia
9
+
10
+ module Initializer
11
+ def initialize
12
+ extend Billit::PaperworkCollectionRepresenter
13
+ extend Roar::Representer::Feature::Client
14
+ super
15
+ end
16
+ end
17
+
18
+ def self.included(klass)
19
+ klass.send :prepend, Initializer
20
+ klass.send :include, Roar::Representer::Feature::HttpVerbs
21
+ end
9
22
 
10
23
  collection :paperworks, :extend => PaperworkRepresenter, :class => Paperwork
11
24
 
@@ -30,6 +30,15 @@ module Billit
30
30
  property :session
31
31
  property :stage
32
32
  property :updated_at
33
+ property :bill_uid
34
+
35
+ link :self do
36
+ paperwork_url(self.id)
37
+ end
38
+
39
+ link :bill do
40
+ bill_url(bill_uid)
41
+ end
33
42
 
34
43
  end
35
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: billit_representers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcel Augsburger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-03 00:00:00.000000000 Z
11
+ date: 2014-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: roar
@@ -69,6 +69,7 @@ files:
69
69
  - lib/billit_representers/models/directive.rb
70
70
  - lib/billit_representers/models/document.rb
71
71
  - lib/billit_representers/models/paperwork.rb
72
+ - lib/billit_representers/models/paperwork_collection.rb
72
73
  - lib/billit_representers/models/priority.rb
73
74
  - lib/billit_representers/models/remark.rb
74
75
  - lib/billit_representers/models/report.rb
@@ -78,6 +79,7 @@ files:
78
79
  - lib/billit_representers/representers/bill_representer.rb
79
80
  - lib/billit_representers/representers/directive_representer.rb
80
81
  - lib/billit_representers/representers/document_representer.rb
82
+ - lib/billit_representers/representers/paperwork_collection_model_representer.rb
81
83
  - lib/billit_representers/representers/paperwork_collection_representer.rb
82
84
  - lib/billit_representers/representers/paperwork_representer.rb
83
85
  - lib/billit_representers/representers/priority_representer.rb