phoebus 0.0.4

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1431319dcac3830f13b278567662239e6c9c708f
4
+ data.tar.gz: e7b8d65c9ab094efe6fc263262f4d295ef610872
5
+ SHA512:
6
+ metadata.gz: 63b9f652d9e0ad94399773403f0d06dd4e4e50cb81b5bceef32f284284c22baa1f68a5a8e118c16e5a24f41af277c6e642e79ec103ab67d0dbf4835a9a746836
7
+ data.tar.gz: 80950b023aabb1b4509e69c85f29d4a94ef5a4fe09130a57d80c4c4bf21e773226008a3b0ea768e485b91cf73ba4ad0c8f23d3dd038220b8c079d571d155b0f7
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ .DS_Store
10
+ ._*
data/.gitignore~ ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source "https://rubygems.org" do
2
+ gem 'grpc', '>=1.2'
3
+ gem 'grpc-tools', '>=1.2'
4
+ end
5
+
6
+ # Specify your gem's dependencies in phoebus.gemspec
7
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,60 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ phoebus (0.0.4)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ addressable (2.5.1)
10
+ public_suffix (~> 2.0, >= 2.0.2)
11
+ faraday (0.12.1)
12
+ multipart-post (>= 1.2, < 3)
13
+ google-protobuf (3.3.0)
14
+ googleauth (0.5.1)
15
+ faraday (~> 0.9)
16
+ jwt (~> 1.4)
17
+ logging (~> 2.0)
18
+ memoist (~> 0.12)
19
+ multi_json (~> 1.11)
20
+ os (~> 0.9)
21
+ signet (~> 0.7)
22
+ grpc (1.3.4)
23
+ google-protobuf (~> 3.1)
24
+ googleauth (~> 0.5.1)
25
+ grpc-tools (1.3.4)
26
+ jwt (1.5.6)
27
+ little-plugger (1.1.4)
28
+ logging (2.2.2)
29
+ little-plugger (~> 1.1)
30
+ multi_json (~> 1.10)
31
+ memoist (0.15.0)
32
+ minitest (5.10.2)
33
+ multi_json (1.12.1)
34
+ multipart-post (2.0.0)
35
+ os (0.9.6)
36
+ public_suffix (2.0.5)
37
+ rake (10.5.0)
38
+ redcarpet (3.4.0)
39
+ signet (0.7.3)
40
+ addressable (~> 2.3)
41
+ faraday (~> 0.9)
42
+ jwt (~> 1.5)
43
+ multi_json (~> 1.10)
44
+ tilt (2.0.7)
45
+
46
+ PLATFORMS
47
+ ruby
48
+
49
+ DEPENDENCIES
50
+ bundler (~> 1.15)
51
+ grpc (>= 1.2)!
52
+ grpc-tools (>= 1.2)!
53
+ minitest
54
+ phoebus!
55
+ rake (~> 10.0)
56
+ redcarpet
57
+ tilt
58
+
59
+ BUNDLED WITH
60
+ 1.15.0
data/README.md ADDED
@@ -0,0 +1,264 @@
1
+ - - - - - - - - - - - - - - - - - - - -
2
+ # Phoebus
3
+ - - - - - - - - - - - - - - - - - - - -
4
+
5
+ This is the README for Phoebus, a Ruby 2.2.3 Gem that communicates with Coeus, the content repository for the [Schoolbzz](http://schoolbzz.com) platform, housing parent, faculty, and messaging content for multiple institutions. This gem encapsulates transport functionality and abstracts messaging for use by web front-end and mobile services for [Schoolbzz](http://schoolbzz.com). Brand considerations have driven the following nomenclature mapping, specifically:
6
+
7
+ * Faculty <=> Educators
8
+ * Parent <=> Caregivers
9
+ * Messages <=> Announcements
10
+
11
+ to enable an Educator (faculty) to post Announcements (messages) to Caregivers (parent) within a specific Institution through the [Schoolbzz](http://schoolbzz.com) platform.
12
+
13
+ ## CODICIL ##
14
+
15
+ Started out as [Phoebe](https://en.wikipedia.org/wiki/Phoebe_(mythology)), Titaness of the "bright" intellect and prophecy, consort of [Coeus](https://en.wikipedia.org/wiki/Coeus). Unfortunately, Ruby Gems doesn't include reserved names in their search results
16
+
17
+ * Search: [https://rubygems.org/search?utf8=✓&query=phoebe)](https://rubygems.org/search?utf8=✓&query=phoebe) - should show no gems using this name.
18
+ * Browse: [http://rubygems.org/gems/phoebus](http://rubygems.org/gems/phoebus) - shows this gem name is reserved (as of 0.0.0).
19
+
20
+ So had to create a new project or modify the existing project and substituting 'hoebus' for 'hoebe' was easiest. Turns out that "Phoebus" (bright or brilliant) is the epithet of [Apollo](https://en.wikipedia.org/wiki/Apollo), Coeus' grandson through his daughter [Leto](https://en.wikipedia.org/wiki/Leto).
21
+
22
+
23
+ - - - - - - - - - - - - - - - - - - - -
24
+ ## INITIALIZATION ##
25
+ - - - - - - - - - - - - - - - - - - - -
26
+
27
+ Initializing the environment for creating a gem using rvm, gem, bundler and rake.
28
+
29
+ ###_RVM_###
30
+
31
+ rvm use ruby-2.3.3@phoebus --ruby-version --create
32
+
33
+ ###_GEMS_###
34
+
35
+ gem install bundler
36
+
37
+ ##_BUNDLER_##
38
+
39
+ _bundler - setup_
40
+ cd ~/Sites
41
+ bundle gem phoebus
42
+ cd phoebus
43
+ bundle install
44
+ bundle update
45
+
46
+ ##_FILES AND DIRECTORIES_##
47
+
48
+
49
+ _phoebus.gemspec_
50
+
51
+ _Gemfile_
52
+
53
+ source "https://rubygems.org" do
54
+ gem 'grpc', '>=1.2'
55
+ gem 'grpc-tools', '>=1.2'
56
+ end
57
+
58
+ _Rakefile_
59
+
60
+ require 'bundler'
61
+ require 'rake/testtask'
62
+ Bundler::GemHelper.install_tasks
63
+
64
+ Rake::TestTask.new do |t|
65
+ t.libs << 'test'
66
+ t.pattern = "test/*_test.rb"
67
+ end
68
+
69
+ _lib/phoebus/coeus*_
70
+
71
+ coeus.rb
72
+ coeus_pb.rb
73
+ coeus_services_pb.rb
74
+
75
+ _lib/phoebus.rb_
76
+
77
+ require 'phoebus/coeus'
78
+
79
+ module Phoebus
80
+ def self.ipsum
81
+ "Lorem ipsum dolor sit amet."
82
+ end
83
+ end
84
+
85
+ _lib/version.rb_
86
+ module Phoebus
87
+ VERSION = "0.0.1"
88
+ end
89
+
90
+ mkdir test
91
+
92
+ _test/test_helper.rb_
93
+
94
+ require 'phoebus'
95
+ require 'minitest/unit'
96
+ require 'minitest/autorun'
97
+ require 'minitest/pride'
98
+
99
+
100
+ ## Workflow ##
101
+
102
+ http://bundler.io/v1.12/bundler_workflow.html
103
+
104
+ _gem build OR rake_
105
+ gem build phoebus.gemspec
106
+ gem push phoebus-0.0.2.gem
107
+
108
+ _rake_
109
+ rake -T
110
+ rake build
111
+ rake install
112
+
113
+ _git_
114
+ git add -A
115
+ git commit -a -m "Update 0.0.2"
116
+ git push origin master
117
+
118
+ _test_
119
+ irb -Ilib -rphoebus
120
+ Phoebus.ipsum
121
+
122
+ rake release
123
+
124
+ _upon Gemfile change_
125
+
126
+ bundle install
127
+
128
+ ## GIT ##
129
+
130
+ _login to [bitbucket](http://bitbucket.org) and create repository manually instead of this_
131
+
132
+ git remote add origin git@bitbucket.org:brilliantarc/phoebus.git
133
+
134
+ _commit to bitbucket repository_
135
+
136
+ git init
137
+ git add .
138
+ git add -A
139
+ git commit -a -m "Initialize Phoebus gem to talk to Coeus."
140
+ git push origin master
141
+
142
+ ## ORIGINAL ##
143
+
144
+ _generate gem credentials_
145
+ curl -u brilliantarc https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials; chmod 0600 ~/.gem/credentials
146
+
147
+ ###_Files_###
148
+
149
+ .gitignore
150
+
151
+ # Ignore Mac
152
+ .DS_Store
153
+ ._*
154
+
155
+ lib/phoebus.rb
156
+
157
+ def self.ipsum
158
+ "Lorem ipsum dolor sit amet."
159
+ end
160
+
161
+ phoebus.gemspec
162
+
163
+ _cp coeus/.../ruby/_
164
+ _use require RELATIVE_
165
+
166
+ require_relative
167
+ coeus_pb.rb
168
+ coeus_services_pb.rb
169
+
170
+
171
+ - - - - - - - - - - - - - - - - - - - -
172
+ ## GEM ##
173
+ - - - - - - - - - - - - - - - - - - - -
174
+
175
+
176
+ _edit_
177
+ Gemfile
178
+ bundle update
179
+
180
+ us.rb", "lib/phoebus/coeus.rb", "lib/phoebus/coeus_pb.rb", "lib/phoebus/coeus_services_pb.rb"]
181
+
182
+ _gem OR rake_
183
+ gem build phoebus.gemspec
184
+ gem install phoebus-0.0.2.gem
185
+ rake build
186
+ rake install
187
+
188
+ _test_
189
+ irb -Ilib -rphoebus
190
+ Phoebus.ipsum
191
+
192
+ - - - - - - - - - - - - - - - - - - - -
193
+ # REFERENCES #
194
+ - - - - - - - - - - - - - - - - - - - -
195
+
196
+ [Build Gem](http://guides.rubygems.org/make-your-own-gem/)
197
+
198
+ - - - - - - - - - - - - - - - - - - - -
199
+ # TODOC
200
+ - - - - - - - - - - - - - - - - - - - -
201
+
202
+ * System dependencies
203
+
204
+ * Configuration
205
+
206
+ * Database creation
207
+
208
+ * Database initialization
209
+
210
+ * How to run the test suite
211
+
212
+ * Services (job queues, cache servers, search engines, etc.)
213
+
214
+ * Deployment instructions
215
+
216
+ - - - - - - - - - - - - - - - - - - - -
217
+ # TODO #
218
+ - - - - - - - - - - - - - - - - - - - -
219
+
220
+ git add -A
221
+ gem build phoebus.gemspec
222
+ gem install phoebus-0.0.1.gem
223
+
224
+ git commit -a -m "Phoebus 0.0.1."
225
+ git push origin master
226
+
227
+ gem push phoebus-0.0.1.gem
228
+
229
+
230
+ - - - - - - - - - - - - - - - - - - - -
231
+ # END
232
+ - - - - - - - - - - - - - - - - - - - -
233
+
234
+
235
+
236
+ ## Installation
237
+
238
+ Add this line to your application's Gemfile:
239
+
240
+ ```ruby
241
+ gem 'phoebus'
242
+ ```
243
+
244
+ And then execute:
245
+
246
+ $ bundle
247
+
248
+ Or install it yourself as:
249
+
250
+ $ gem install phoebus
251
+
252
+ ## Usage
253
+
254
+ TODO: Write usage instructions here
255
+
256
+ ## Development
257
+
258
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
259
+
260
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
261
+
262
+ ## Contributing
263
+
264
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/phoebus.
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ require 'bundler'
2
+ require "bundler/gem_tasks"
3
+ require 'rake/testtask'
4
+ Bundler::GemHelper.install_tasks
5
+
6
+ Rake::TestTask.new do |t|
7
+ t.libs << 'test'
8
+ t.pattern = "test/*_test.rb"
9
+ end
10
+
11
+ task :default => :test
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "phoebus"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,3 @@
1
+ require 'grpc'
2
+ require_relative 'coeus_services_pb'
3
+
@@ -0,0 +1,173 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: coeus.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "coeus.Success" do
8
+ optional :ok, :bool, 1
9
+ optional :error, :string, 2
10
+ end
11
+ add_message "coeus.UserQuery" do
12
+ optional :institution, :string, 1
13
+ optional :email, :string, 2
14
+ end
15
+ add_message "coeus.UsersQuery" do
16
+ optional :institution, :string, 1
17
+ repeated :emails, :string, 2
18
+ end
19
+ add_message "coeus.User" do
20
+ optional :id, :string, 1
21
+ optional :institution, :string, 2
22
+ optional :email, :string, 3
23
+ optional :verified, :bool, 4
24
+ optional :created, :string, 5
25
+ optional :role, :string, 6
26
+ optional :disabled, :bool, 7
27
+ optional :components, :message, 8, "coeus.Components"
28
+ end
29
+ add_message "coeus.Components" do
30
+ optional :details, :message, 1, "coeus.Details"
31
+ optional :oauth, :message, 2, "coeus.OAuth"
32
+ optional :local, :message, 3, "coeus.Local"
33
+ end
34
+ add_message "coeus.Details" do
35
+ optional :nickname, :string, 1
36
+ optional :name, :string, 2
37
+ optional :photo, :string, 3
38
+ optional :title, :string, 4
39
+ end
40
+ add_message "coeus.OAuth" do
41
+ optional :provider, :string, 1
42
+ optional :providerID, :string, 2
43
+ end
44
+ add_message "coeus.Local" do
45
+ optional :disabled, :bool, 1
46
+ optional :password, :string, 2
47
+ optional :confirm, :string, 3
48
+ end
49
+ add_message "coeus.Account" do
50
+ optional :email, :string, 1
51
+ optional :password, :string, 2
52
+ optional :institution, :string, 3
53
+ end
54
+ add_message "coeus.JWT" do
55
+ optional :token, :bytes, 1
56
+ end
57
+ add_message "coeus.FirebaseJWT" do
58
+ optional :token, :bytes, 1
59
+ optional :institution, :string, 2
60
+ end
61
+ add_message "coeus.Institution" do
62
+ optional :name, :string, 1
63
+ optional :slug, :string, 2
64
+ optional :description, :string, 3
65
+ optional :logo, :string, 4
66
+ optional :primaryColor, :string, 5
67
+ optional :secondaryColor, :string, 6
68
+ optional :disabled, :bool, 7
69
+ end
70
+ add_message "coeus.Channel" do
71
+ optional :id, :int64, 1
72
+ optional :institution, :string, 2
73
+ optional :name, :string, 3
74
+ optional :slug, :string, 4
75
+ optional :description, :string, 5
76
+ optional :private, :bool, 6
77
+ repeated :links, :message, 7, "coeus.Link"
78
+ repeated :moderators, :message, 8, "coeus.User"
79
+ repeated :followers, :message, 9, "coeus.User"
80
+ end
81
+ add_message "coeus.Link" do
82
+ optional :id, :int64, 1
83
+ optional :label, :string, 2
84
+ optional :url, :string, 3
85
+ end
86
+ add_message "coeus.Links" do
87
+ repeated :links, :message, 1, "coeus.Link"
88
+ end
89
+ add_message "coeus.ChannelLink" do
90
+ optional :slug, :string, 1
91
+ optional :link, :message, 2, "coeus.Link"
92
+ end
93
+ add_message "coeus.Channels" do
94
+ repeated :channels, :message, 1, "coeus.Channel"
95
+ end
96
+ add_message "coeus.ChannelQuery" do
97
+ optional :institution, :string, 1
98
+ optional :slug, :string, 2
99
+ optional :faculty, :string, 3
100
+ end
101
+ add_message "coeus.ChannelMember" do
102
+ optional :slug, :string, 1
103
+ oneof :user_identifier do
104
+ optional :id, :string, 2
105
+ optional :email, :string, 3
106
+ end
107
+ end
108
+ add_message "coeus.Message" do
109
+ optional :id, :int64, 1
110
+ optional :author, :message, 2, "coeus.User"
111
+ optional :channel, :message, 3, "coeus.Channel"
112
+ optional :Posted, :string, 4
113
+ optional :Edited, :string, 5
114
+ optional :editor, :message, 6, "coeus.User"
115
+ optional :body, :string, 7
116
+ optional :private, :bool, 8
117
+ optional :unread, :bool, 9
118
+ end
119
+ add_message "coeus.MessageQuery" do
120
+ optional :id, :string, 1
121
+ end
122
+ add_message "coeus.MessagesQuery" do
123
+ repeated :ids, :string, 1
124
+ end
125
+ add_message "coeus.ChannelMessagesQuery" do
126
+ optional :slug, :string, 1
127
+ optional :last, :int64, 2
128
+ optional :max, :int32, 3
129
+ optional :order, :enum, 4, "coeus.ChannelMessagesQuery.SortOrder"
130
+ optional :direction, :enum, 5, "coeus.ChannelMessagesQuery.Direction"
131
+ optional :query, :string, 6
132
+ end
133
+ add_enum "coeus.ChannelMessagesQuery.SortOrder" do
134
+ value :POSTED, 0
135
+ value :ALPHABETICAL, 1
136
+ end
137
+ add_enum "coeus.ChannelMessagesQuery.Direction" do
138
+ value :ASCENDING, 0
139
+ value :DESCENDING, 1
140
+ end
141
+ add_message "coeus.Messages" do
142
+ repeated :messages, :message, 1, "coeus.Message"
143
+ end
144
+ end
145
+
146
+ module Coeus
147
+ Success = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.Success").msgclass
148
+ UserQuery = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.UserQuery").msgclass
149
+ UsersQuery = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.UsersQuery").msgclass
150
+ User = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.User").msgclass
151
+ Components = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.Components").msgclass
152
+ Details = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.Details").msgclass
153
+ OAuth = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.OAuth").msgclass
154
+ Local = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.Local").msgclass
155
+ Account = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.Account").msgclass
156
+ JWT = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.JWT").msgclass
157
+ FirebaseJWT = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.FirebaseJWT").msgclass
158
+ Institution = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.Institution").msgclass
159
+ Channel = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.Channel").msgclass
160
+ Link = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.Link").msgclass
161
+ Links = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.Links").msgclass
162
+ ChannelLink = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.ChannelLink").msgclass
163
+ Channels = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.Channels").msgclass
164
+ ChannelQuery = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.ChannelQuery").msgclass
165
+ ChannelMember = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.ChannelMember").msgclass
166
+ Message = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.Message").msgclass
167
+ MessageQuery = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.MessageQuery").msgclass
168
+ MessagesQuery = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.MessagesQuery").msgclass
169
+ ChannelMessagesQuery = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.ChannelMessagesQuery").msgclass
170
+ ChannelMessagesQuery::SortOrder = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.ChannelMessagesQuery.SortOrder").enummodule
171
+ ChannelMessagesQuery::Direction = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.ChannelMessagesQuery.Direction").enummodule
172
+ Messages = Google::Protobuf::DescriptorPool.generated_pool.lookup("coeus.Messages").msgclass
173
+ end
@@ -0,0 +1,107 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: coeus.proto for package 'coeus'
3
+
4
+ require 'grpc'
5
+ require_relative 'coeus_pb'
6
+
7
+ module Coeus
8
+ module CoeusService
9
+ class Service
10
+
11
+ include GRPC::GenericService
12
+
13
+ self.marshal_class_method = :encode
14
+ self.unmarshal_class_method = :decode
15
+ self.service_name = 'coeus.CoeusService'
16
+
17
+ # Auth authenticates a user account and returns the Engaged JSON web token for
18
+ # the account.
19
+ rpc :Auth, Account, JWT
20
+ # AuthFirebase authenticates a user account using a Firebase token and returns
21
+ # an Engaged JWT.
22
+ rpc :AuthFirebase, FirebaseJWT, JWT
23
+ # RefreshToken refreshes an Engaged JSON web token. Call this when the token
24
+ # is about to expire.
25
+ rpc :RefreshToken, JWT, JWT
26
+ # CreateUser allows an administrator or Engaged super user to create a new
27
+ # user account. An Engaged super user may create users for any institution,
28
+ # while institutional administrators may only create users for their own
29
+ # institution.
30
+ rpc :CreateUser, User, User
31
+ # DisableUser disables a user account. An administrator may disable a
32
+ # user's email address for an institution, while an Engaged super user may
33
+ # disable any account except another super user account.
34
+ rpc :DisableUser, User, Success
35
+ # UpdateUser expects a user object with updated information as a JSON doc.
36
+ # The user may only update his or her account. Admin may update any account.
37
+ #
38
+ # Does a patch update of institution, email, nickname, full name, title, and
39
+ # photo.
40
+ rpc :UpdateUser, User, Success
41
+ # UserInfo returns details about the current user's account. Admin users may
42
+ # request a user's details by ID or email.
43
+ rpc :UserInfo, UserQuery, User
44
+ # CreateInstitution creates a new institution. If a slug is not provided, one
45
+ # is generated from the name.
46
+ rpc :CreateInstitution, Institution, Institution
47
+ # GetInstitution returns the details about an institution, including name,
48
+ # logo, and colors. Only slug must be provided.
49
+ rpc :GetInstitution, Institution, Institution
50
+ # UpdateInstitution updates an existing institution, identified by the slug.
51
+ # Note you may not modify a slug, just the name and other details of the
52
+ # institution. This will not modify the enabled/disabled state of the
53
+ # institution.
54
+ rpc :UpdateInstitution, Institution, Success
55
+ # DisableInstitution disables access to an institution. Does not delete
56
+ # anything, but prevents anyone from using the channels for an institution.
57
+ rpc :DisableInstitution, Institution, Success
58
+ # EnableInstitution re-enables an institution previously disabled. Does
59
+ # nothing if the institution is already active.
60
+ rpc :EnableInstitution, Institution, Success
61
+ # AddFaculty allows admin users to add faculty members to an institution.
62
+ # Expects "email" addresses in the query string.
63
+ rpc :AddFaculty, UsersQuery, Success
64
+ # RemoveFaculty removes faculty access for a user. This will not delete the
65
+ # user's account, but he or she will no longer be able to act as a faculty
66
+ # member.
67
+ rpc :RemoveFaculty, UsersQuery, Success
68
+ # UpdateUser expects a user object with updated information as a JSON doc.
69
+ # The user may only update his or her account. Admin may update any
70
+ # account.
71
+ #
72
+ # Does a patch update of institution, email, nickname, full name, title,
73
+ # and photo.
74
+ # rpc UpdateUser(User) returns (Success) {}
75
+ #
76
+ # UserInfo returns details about the current user's account. Admin users
77
+ # may request a user's details by ID or email.
78
+ # rpc UserInfo(UserQuery) returns (User) {}
79
+ #
80
+ # CreateChannel creates a new channel for the institution.
81
+ #
82
+ # A few rules apply:
83
+ #
84
+ # * Only faculty members may create, modify, delete, or post to channels
85
+ # * A channel's slug must be unique to the institution
86
+ # * A channel's name must be unique to the institution
87
+ # * If a slug is not provided, one is generated from the name
88
+ #
89
+ # An admin user may declare the institution and add moderators.
90
+ rpc :CreateChannel, Channel, Channel
91
+ # UpdateChannel details of a channel. Only a moderator or and admin may
92
+ # update the channel. Only the name, description, and private setting may
93
+ # be altered.
94
+ rpc :UpdateChannel, Channel, Success
95
+ # GetChannels returns a list of channels for an institution. If a user is
96
+ # indicated, filters on that faculty member.
97
+ rpc :GetChannels, ChannelQuery, Channels
98
+ # GetChannel returns the details of a channel. If the current user is a
99
+ # moderator of the channel, includes a list of the other moderators.
100
+ rpc :GetChannel, ChannelQuery, Channel
101
+ # RemoveChannel removes a channel.
102
+ rpc :RemoveChannel, Channel, Success
103
+ end
104
+
105
+ Stub = Service.rpc_stub_class
106
+ end
107
+ end
@@ -0,0 +1,3 @@
1
+ module Phoebus
2
+ VERSION = "0.0.4"
3
+ end
data/lib/phoebus.rb ADDED
@@ -0,0 +1,17 @@
1
+ require "phoebus/version"
2
+ require 'phoebus/coeus'
3
+
4
+ module Phoebus
5
+
6
+ def self.ipsum
7
+ "Lorem ipsum dolor sit amet."
8
+ end
9
+
10
+ # def self.authenticate
11
+ # # Call the Auth() function from coeus.proto to authenticate an admin user and
12
+ # # get an Engaged JSON web token back for future requests.
13
+ # jwt = client.auth(Coeus::Account.new(email: 'pico303@gmail.com', password: 'hello'))
14
+ # puts "Got admin token: #{jwt.token}"
15
+ # end
16
+ #
17
+ end
data/phoebus.gemspec ADDED
@@ -0,0 +1,31 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "phoebus/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "phoebus"
8
+ spec.version = Phoebus::VERSION
9
+ spec.authors = ["Michael Bauer"]
10
+ spec.email = ["bauer@brilliantarc.com"]
11
+
12
+ spec.summary = %q{Phoebus}
13
+ spec.description = %q{Provides connection to the Coeus server.}
14
+ spec.homepage = 'http://rubygems.org/gems/phoebus'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
+ f.match(%r{^(test|spec|features)/})
18
+ end
19
+ spec.bindir = "exe"
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ["lib"]
22
+
23
+ spec.test_files = Dir.glob("{test,spec,features}/**/*")
24
+
25
+ spec.add_development_dependency "bundler", "~> 1.15"
26
+ spec.add_development_dependency "rake", "~> 10.0"
27
+ spec.add_development_dependency "minitest"
28
+ spec.add_development_dependency 'tilt'
29
+ spec.add_development_dependency 'redcarpet'
30
+
31
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class TestPhoebus< Minitest::Test
4
+ def test_ipsum
5
+ puts Phoebus.ipsum
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ require 'phoebus'
2
+ require 'minitest'
3
+ require 'minitest/autorun'
4
+ require 'minitest/unit'
5
+ require 'minitest/pride'
metadata ADDED
@@ -0,0 +1,131 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: phoebus
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
5
+ platform: ruby
6
+ authors:
7
+ - Michael Bauer
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2017-05-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.15'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.15'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: tilt
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: redcarpet
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: Provides connection to the Coeus server.
84
+ email:
85
+ - bauer@brilliantarc.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".gitignore"
91
+ - ".gitignore~"
92
+ - Gemfile
93
+ - Gemfile.lock
94
+ - README.md
95
+ - Rakefile
96
+ - bin/console
97
+ - bin/setup
98
+ - lib/phoebus.rb
99
+ - lib/phoebus/coeus.rb
100
+ - lib/phoebus/coeus_pb.rb
101
+ - lib/phoebus/coeus_services_pb.rb
102
+ - lib/phoebus/version.rb
103
+ - phoebus.gemspec
104
+ - test/phoebus_test.rb
105
+ - test/test_helper.rb
106
+ homepage: http://rubygems.org/gems/phoebus
107
+ licenses: []
108
+ metadata: {}
109
+ post_install_message:
110
+ rdoc_options: []
111
+ require_paths:
112
+ - lib
113
+ required_ruby_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ required_rubygems_version: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
123
+ requirements: []
124
+ rubyforge_project:
125
+ rubygems_version: 2.6.10
126
+ signing_key:
127
+ specification_version: 4
128
+ summary: Phoebus
129
+ test_files:
130
+ - test/phoebus_test.rb
131
+ - test/test_helper.rb