arkaan 1.2.13 → 1.3.0
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.
- checksums.yaml +4 -4
- data/lib/arkaan/campaigns.rb +1 -0
- data/lib/arkaan/campaigns/file.rb +20 -0
- data/lib/arkaan/campaigns/invitation.rb +4 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f2e4fd6566216dd4bc532d36c16c0bfc2af3879
|
4
|
+
data.tar.gz: fe0cc0a6b1a32e76eb8f77af001c80e21402aec7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2495d4bd6c2b7187afeb06020ed31c397ad072523ff61d693952cd4c17ad9586cca12372b3f46b555e6d5168b7baa989280e542cc67257987742fe1e6f341909
|
7
|
+
data.tar.gz: fbf03545f56d27cc2812424cbac42cb2581faced47284561683e5826aff215cab84a499d33e2d8823f6ecff489ed0c1409e2708fd6ab13ecf45598c226ecb436
|
data/lib/arkaan/campaigns.rb
CHANGED
@@ -2,6 +2,7 @@ module Arkaan
|
|
2
2
|
# The campaigns module is holding the logic for some objects related to campaigns.
|
3
3
|
# @author Vincent Courtois <courtois.vincent@outlook.com>
|
4
4
|
module Campaigns
|
5
|
+
autoload :File , 'arkaan/campaigns/file'
|
5
6
|
autoload :Invitation, 'arkaan/campaigns/invitation'
|
6
7
|
autoload :Message , 'arkaan/campaigns/message'
|
7
8
|
autoload :Tag , 'arkaan/campaigns/tag'
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Arkaan
|
2
|
+
module Campaigns
|
3
|
+
# Representation of a file, allowing us to retrieve it on AWS by its filename and linked campaign ID.
|
4
|
+
# @author Vincent Courtois <courtois.vincent@outlook.com>
|
5
|
+
class File
|
6
|
+
include Mongoid::Document
|
7
|
+
include Mongoid::Timestamps
|
8
|
+
|
9
|
+
# @!attribute [rw] filename
|
10
|
+
# @return [String] the name of the file, corresponding to the AWS name.
|
11
|
+
field :filename, type: String
|
12
|
+
|
13
|
+
# @!attribute [rw] invitation
|
14
|
+
# @return [Arkaan::Campaigns::Invitation] the link to the user creator of the file and the campaign it's created in.
|
15
|
+
embedded_in :invitation, class_name: 'Arkaan::Campaigns::Invitation', inverse_of: :files
|
16
|
+
|
17
|
+
validates 'filename', presence: {message: 'required'}
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -17,6 +17,10 @@ module Arkaan
|
|
17
17
|
# @!attribute [rw] campaign
|
18
18
|
# @return [Arkaan::Campaign] the campaign the invitation has been made in.
|
19
19
|
belongs_to :campaign, class_name: 'Arkaan::Campaign', inverse_of: :invitations
|
20
|
+
|
21
|
+
# @!attribute [rw] files
|
22
|
+
# @return [Array<Arkaan::Campaigns::File>] the files uploaded in this campaign by the usere linked to this invitation.
|
23
|
+
embeds_many :files, class_name: 'Arkaan::Campaigns::File', inverse_of: :invitation
|
20
24
|
end
|
21
25
|
end
|
22
26
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arkaan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vincent Courtois
|
@@ -260,6 +260,7 @@ files:
|
|
260
260
|
- lib/arkaan/authentication/session.rb
|
261
261
|
- lib/arkaan/campaign.rb
|
262
262
|
- lib/arkaan/campaigns.rb
|
263
|
+
- lib/arkaan/campaigns/file.rb
|
263
264
|
- lib/arkaan/campaigns/invitation.rb
|
264
265
|
- lib/arkaan/campaigns/message.rb
|
265
266
|
- lib/arkaan/campaigns/tag.rb
|