opentie-core 0.0.3 → 0.0.4

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: 4ca87fe5396394815694efca411754612c8fb1f3
4
- data.tar.gz: 9f7f3449ec017231757085140ea2477cc8242fcc
3
+ metadata.gz: 477ed24cea14be6af67f16259a8e03909771fa21
4
+ data.tar.gz: d22cecd40f6cd4944b7a601519c7bed047d7c62a
5
5
  SHA512:
6
- metadata.gz: f8b018d0d9ca87703c7c7dd0bc4a096b68ca596df14831babafe83b5ecfdcb31851851125aff15a87262068f1a25df9db037979ff6c708c6d5a1d309e417a8f2
7
- data.tar.gz: 5f8d73ffcc826da86933a2331722cc7ebe260b822baab1fdcb2811eefeb0167741f03e2ba857235813388cb5441d20fdbf35b20d4fe966c3f938e6fba144607c
6
+ metadata.gz: 3436d24b08e00f14b3e37648bc13f30ee18cb940060c89b11c742c6182944c8442351621266c6123cd56c2acf88304ba1d10f9dd73c78359a8a984a473b45719
7
+ data.tar.gz: 9ff25aaff9713caf275a122a958228c089623863a7b4562f61856c8db3e94cde8a8bfca103cf0e0beb3f20e2b9806c454a8249934faf7562f2079951a2d982c0
data/lib/opentie/core.rb CHANGED
@@ -2,7 +2,9 @@ require "opentie/core/version"
2
2
  require "opentie/core/group"
3
3
  require "opentie/core/project"
4
4
  require "opentie/core/bureau"
5
+ require "opentie/core/persona"
5
6
  require "opentie/core/request"
7
+ require "opentie/core/message"
6
8
 
7
9
  module Opentie
8
10
  module Core
@@ -0,0 +1,13 @@
1
+ require 'mongoid'
2
+
3
+ module Opentie
4
+ module Core
5
+ class Account
6
+ include Mongoid::Document
7
+
8
+ belongs_to :persona, inverse_of: :accounts
9
+
10
+ field :auth_token, type: Hash
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,25 @@
1
+ require 'mongoid'
2
+ require_relative 'message'
3
+
4
+ module Opentie
5
+ module Core
6
+ class Message
7
+ include Mongoid::Document
8
+
9
+ has_one :persona, as: :from
10
+ has_one :persona, as: :to
11
+
12
+ has_one :message, as: :in_reply_to
13
+ belongs_to :message
14
+
15
+ field :created_at, type: Time
16
+
17
+ field :subject, type: String
18
+ field :body, type: String
19
+
20
+ def get_thread
21
+ Message.find _id: self._id
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,14 @@
1
+ require 'mongoid'
2
+
3
+ module Opentie
4
+ module Core
5
+ class Persona
6
+ include Mongoid::Document
7
+
8
+ has_many :accounts, inverse_of: :persona
9
+ has_many :groups, inverse_of: :persona
10
+
11
+ belongs_to :message
12
+ end
13
+ end
14
+ end
@@ -1,5 +1,5 @@
1
1
  module Opentie
2
2
  module Core
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
data/opentie-core.gemspec CHANGED
@@ -24,4 +24,5 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency "rspec"
25
25
  spec.add_development_dependency "guard"
26
26
  spec.add_development_dependency "guard-rspec"
27
+ spec.add_development_dependency "factory_girl"
27
28
  end
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  require 'bundler/setup'
2
+ require 'factory_girl'
2
3
  require 'opentie/core'
3
4
  require 'rspec'
4
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentie-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - polamjag
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: factory_girl
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
97
111
  description:
98
112
  email:
99
113
  - s@polamjag.info
@@ -109,8 +123,11 @@ files:
109
123
  - Rakefile
110
124
  - circle.yml
111
125
  - lib/opentie/core.rb
126
+ - lib/opentie/core/account.rb
112
127
  - lib/opentie/core/bureau.rb
113
128
  - lib/opentie/core/group.rb
129
+ - lib/opentie/core/message.rb
130
+ - lib/opentie/core/persona.rb
114
131
  - lib/opentie/core/project.rb
115
132
  - lib/opentie/core/request.rb
116
133
  - lib/opentie/core/version.rb