arkaan 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arkaan.rb +1 -0
- data/lib/arkaan/campaign.rb +3 -0
- data/lib/arkaan/campaigns.rb +7 -0
- data/lib/arkaan/campaigns/tag.rb +21 -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: f9a4053c8698bc3f65ca89715b33590951e9e5e5
|
4
|
+
data.tar.gz: ce69b8c81e0edbd65705c65d161dbad23d6feb33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 524aa853722aa1ad672d6d5eaec91f2efc95730d506098aacf26dac46dc7792868de951135304551afb146b69fe4701e1e71b0d7434e3cbbade50cd703422e2a
|
7
|
+
data.tar.gz: 08a594de43b4511df6e7b40b8a245e699eb576a623a13f53850e292b897c809d87ea016d19a6643bf7200c6a46b5488edac5fe1e0ec8715c2b80c56ecd1d27e1
|
data/lib/arkaan.rb
CHANGED
@@ -9,6 +9,7 @@ module Arkaan
|
|
9
9
|
autoload :Account , 'arkaan/account'
|
10
10
|
autoload :Authentication, 'arkaan/authentication'
|
11
11
|
autoload :Campaign , 'arkaan/campaign'
|
12
|
+
autoload :Campaigns , 'arkaan/campaigns'
|
12
13
|
autoload :Concerns , 'arkaan/concerns'
|
13
14
|
autoload :Monitoring , 'arkaan/monitoring'
|
14
15
|
autoload :OAuth , 'arkaan/oauth'
|
data/lib/arkaan/campaign.rb
CHANGED
@@ -14,6 +14,9 @@ module Arkaan
|
|
14
14
|
# @!attribute [rw] is_private
|
15
15
|
# @return [Boolean] TRUE if the campaign can be joined only by being invited by the creator, FALSE if it's publicly displayed and accessible.
|
16
16
|
field :is_private, type: Boolean, default: true
|
17
|
+
# @!attribute [rw] tags
|
18
|
+
# @return [Array<String>] an array of tags describing characteristics of this campaign.
|
19
|
+
field :tags, type: Array, default: []
|
17
20
|
|
18
21
|
# @!attribute [rw] creator
|
19
22
|
# @return [Arkaan::Campaign] the account creating the campaign, and considered "game master".
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Arkaan
|
2
|
+
module Campaigns
|
3
|
+
# A campaign tag is a string describing a characteristic of the campaign it's in.
|
4
|
+
# @author Vincent Courtois <courtois.vincent@outlook.com>
|
5
|
+
class Tag
|
6
|
+
include Mongoid::Document
|
7
|
+
include Mongoid::Timestamps
|
8
|
+
|
9
|
+
# @!attribute [rw] content
|
10
|
+
# @return [String] the string content of the tag, describing a characteristic.
|
11
|
+
field :content, type: String
|
12
|
+
# @!attribute [rw] count
|
13
|
+
# @return [Integer] the number of campaigns this tag is in, avoiding a join.
|
14
|
+
field :count, type: Integer, default: 1
|
15
|
+
|
16
|
+
validates :content,
|
17
|
+
presence: {message: 'campaign.tag.content.blank'},
|
18
|
+
uniqueness: {message: 'campaign.tag.content.uniq'}
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arkaan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vincent Courtois
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -189,6 +189,8 @@ files:
|
|
189
189
|
- lib/arkaan/authentication.rb
|
190
190
|
- lib/arkaan/authentication/session.rb
|
191
191
|
- lib/arkaan/campaign.rb
|
192
|
+
- lib/arkaan/campaigns.rb
|
193
|
+
- lib/arkaan/campaigns/tag.rb
|
192
194
|
- lib/arkaan/concerns.rb
|
193
195
|
- lib/arkaan/concerns/activable.rb
|
194
196
|
- lib/arkaan/concerns/diagnosticable.rb
|