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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9fd6489749c1fe538fb71cacc6b1bc8192f06a0b
4
- data.tar.gz: 3dd336acea86382c1d481f4e7cfbe6784a3fe39b
3
+ metadata.gz: f9a4053c8698bc3f65ca89715b33590951e9e5e5
4
+ data.tar.gz: ce69b8c81e0edbd65705c65d161dbad23d6feb33
5
5
  SHA512:
6
- metadata.gz: cebdc1d0fe93b3d48f4fc628434d468b9f3e5f4cb20dcd584bbf63e6b0946c78e02246857ae74820bcc477d998bbad2b546581b0b8422f69f15f6c2737b113a6
7
- data.tar.gz: 6283063bdaf06ca3378126ae66d8d2bee2abfc161ade5ab0e287ccc214b2abfac6eca79fd690ef80949653384eede4e91cdecdd5f1f2ecedfa149e95ad5c7c68
6
+ metadata.gz: 524aa853722aa1ad672d6d5eaec91f2efc95730d506098aacf26dac46dc7792868de951135304551afb146b69fe4701e1e71b0d7434e3cbbade50cd703422e2a
7
+ data.tar.gz: 08a594de43b4511df6e7b40b8a245e699eb576a623a13f53850e292b897c809d87ea016d19a6643bf7200c6a46b5488edac5fe1e0ec8715c2b80c56ecd1d27e1
@@ -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'
@@ -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,7 @@
1
+ module Arkaan
2
+ # The campaigns module is holding the logic for some objects related to campaigns.
3
+ # @author Vincent Courtois <courtois.vincent@outlook.com>
4
+ module Campaigns
5
+ autoload :Tag, 'arkaan/campaigns/tag'
6
+ end
7
+ end
@@ -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.2
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-13 00:00:00.000000000 Z
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