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 +4 -4
- data/billit_representers.gemspec +2 -2
- data/lib/billit_representers/models/paperwork_collection.rb +6 -0
- data/lib/billit_representers/representers/paperwork_collection_model_representer.rb +30 -0
- data/lib/billit_representers/representers/paperwork_collection_representer.rb +13 -0
- data/lib/billit_representers/representers/paperwork_representer.rb +9 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 808d6c7f685ec2e3d5355d6db80275f0f4194ac7
|
4
|
+
data.tar.gz: 01b3ed9eab4454799490e9012e55c7ab9c591817
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b0fca8a04999851a3b09e985a3a24b21fe1b4c922189646431621fd434aa4d57905b4120da9233600f98498f4e7397d9b9e6b1bbefb7e01e30f79dc3fbd48f0
|
7
|
+
data.tar.gz: 8bafffb3e0a689205a6ec09a43e67b2938a1f3f3cf13200cca1c88499dce20a6935c151d9fa864622b999c58d2a58adaf0da172876320962f237afdb3661cfe3
|
data/billit_representers.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.name = 'billit_representers'
|
3
|
-
gem.version = '0.8.
|
4
|
-
gem.date = '2014-02-
|
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,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
|
|
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.
|
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-
|
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
|