wco_hosting 0.0.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7b3d2d40541dfe6c51d225f2baaf21a5cf3305a77f927cea036b6e57da949a8a
4
+ data.tar.gz: ffc82a285159f7148363769416c13de00116940d3848ed0eca9f72a1436b1011
5
+ SHA512:
6
+ metadata.gz: a17f609651ebf2f4b0fce6e6460cd86554569161cb978b3aff055bd18ecf638fce3da987d3ad6577726aba197222570e3b6d3cd95b874fdc6bca5ecbdb38cf3c
7
+ data.tar.gz: 97c109c39c09ed65f256e7b72ee872af4cb2afa43ad2b512c438e16b0cf295de39680996563da75085146388243b968a46123c24ed412b3cd22e6181dbdbf4cf
data/README.txt ADDED
File without changes
data/Rakefile ADDED
@@ -0,0 +1,15 @@
1
+ require "bundler/setup"
2
+
3
+ load "rails/tasks/statistics.rake"
4
+
5
+ require "bundler/gem_tasks"
6
+
7
+ require "rake/testtask"
8
+
9
+ Rake::TestTask.new(:test) do |t|
10
+ t.libs << 'test'
11
+ t.pattern = 'test/**/*_test.rb'
12
+ t.verbose = false
13
+ end
14
+
15
+ task default: :test
@@ -0,0 +1 @@
1
+ //= link_directory ../stylesheets/wco_hosting .css
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,25 @@
1
+
2
+ require 'ish_models'
3
+
4
+ class WcoHosting::ApplicationController < ActionController::Base
5
+
6
+ check_authorization
7
+
8
+ def home
9
+ authorize! :index, ::Wco::EmailConversation
10
+ end
11
+
12
+ ##
13
+ ## private
14
+ ##
15
+ private
16
+
17
+ def current_ability
18
+ @current_ability ||= ::WcoHosting::Ability.new(current_user)
19
+ end
20
+
21
+ def current_profile
22
+ @current_profile ||= Wco::Profile.find_by( email: current_user.email )
23
+ end
24
+
25
+ end
@@ -0,0 +1,19 @@
1
+
2
+ class WcoHosting::SessionsController < ApplicationController
3
+
4
+ skip_before_action :verify_authenticity_token, only: :create
5
+
6
+ def new
7
+ render :new
8
+ end
9
+
10
+ def create
11
+ puts! params, '#create'
12
+
13
+ user_info = request.env['omniauth.auth']
14
+ puts! user_info, 'user_info'
15
+
16
+ render json: { status: :ok }
17
+ end
18
+
19
+ end
@@ -0,0 +1,4 @@
1
+ module WcoHosting
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module WcoHosting
2
+ class ApplicationJob < ActiveJob::Base
3
+ end
4
+ end
@@ -0,0 +1,6 @@
1
+ module WcoHosting
2
+ class ApplicationMailer < ActionMailer::Base
3
+ default from: 'from@example.com'
4
+ layout 'mailer'
5
+ end
6
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'cancancan'
4
+
5
+ class WcoHosting::Ability
6
+ include ::CanCan::Ability
7
+
8
+ def initialize(user)
9
+
10
+ if user
11
+
12
+ if [ 'piousbox@gmail.com', 'victor@piousbox.com', 'victor@wasya.co' ].include? user.email
13
+ can :manage, :all
14
+ end
15
+
16
+ end
17
+
18
+ end
19
+ end
@@ -0,0 +1,16 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %meta{content: "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}
5
+ %title Wco Hosting
6
+ = csrf_meta_tags
7
+ = csp_meta_tag
8
+ = stylesheet_link_tag "wco_hosting/application", media: "all"
9
+ %body
10
+ %nav
11
+ %ul
12
+ %li= link_to 'Email Conversations', email_conversations_path
13
+ %li= link_to 'Inbox', email_conversations_in_path('inbox')
14
+ %hr
15
+ = yield
16
+ %hr
@@ -0,0 +1,6 @@
1
+
2
+ %h5 Email Conversations (#{@email_conversations.length})
3
+
4
+ %ul
5
+ - @email_conversations.each do |conv|
6
+ %li= conv.subject
@@ -0,0 +1,4 @@
1
+
2
+ %h5 Welcome home!
3
+
4
+ = current_user.inspect
@@ -0,0 +1,4 @@
1
+
2
+ <%= form_tag('/email/auth/keycloak', method: 'post', data: {turbo: false}) do %>
3
+ <button type='submit'>Login with Keycloak</button>
4
+ <% end %>
@@ -0,0 +1,3 @@
1
+
2
+ Paperclip.options[:log] = false
3
+
data/config/routes.rb ADDED
@@ -0,0 +1,10 @@
1
+
2
+ WcoHosting::Engine.routes.draw do
3
+ root to: '/wco_hosting/application#home'
4
+
5
+ get 'email_conversations/in/:tagname', to: '/wco/email_conversations#index', as: :email_conversations_in
6
+ get 'email_conversations/not-in/:tagname_not', to: '/wco/email_conversations#index', as: :email_conversations_in_not
7
+
8
+ resources :email_conversations
9
+
10
+ end
@@ -0,0 +1,10 @@
1
+
2
+ namespace :wco_hosting do
3
+
4
+ desc "seed"
5
+ task :seed => :environment do
6
+ puts! 'seeding'
7
+ end
8
+
9
+ end
10
+
@@ -0,0 +1,11 @@
1
+
2
+ module Wco
3
+ end
4
+
5
+ module WcoHosting
6
+ end
7
+
8
+ class WcoHosting::Engine < ::Rails::Engine
9
+ isolate_namespace WcoHosting
10
+ isolate_namespace Wco
11
+ end
@@ -0,0 +1,18 @@
1
+
2
+ require 'cancancan'
3
+ require 'haml'
4
+
5
+ require "wco_hosting/engine"
6
+
7
+ ## From: https://github.com/rails/rails/issues/30701
8
+ def logger; Rails.logger; end
9
+
10
+ require 'ish_models'
11
+
12
+ module Wco; end
13
+ module WcoHosting; end
14
+
15
+ def puts! a, b=''
16
+ puts "+++ +++ #{b}:"
17
+ puts a.inspect
18
+ end
metadata ADDED
@@ -0,0 +1,205 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: wco_hosting
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Victor Pudeyev
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-12-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 6.1.7
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 6.1.7
27
+ - !ruby/object:Gem::Dependency
28
+ name: haml
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 6.3.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 6.3.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: cancancan
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 3.5.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 3.5.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: devise
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 4.9.3
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 4.9.3
69
+ - !ruby/object:Gem::Dependency
70
+ name: ish_models
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.1'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.1'
83
+ - !ruby/object:Gem::Dependency
84
+ name: mongoid
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 7.3.0
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 7.3.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: mongoid_paranoia
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 0.6.0
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 0.6.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: mongoid-autoinc
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 6.0.3
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 6.0.3
125
+ - !ruby/object:Gem::Dependency
126
+ name: mongoid-paperclip
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 0.1.0
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 0.1.0
139
+ - !ruby/object:Gem::Dependency
140
+ name: kaminari-mongoid
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: 1.0.1
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: 1.0.1
153
+ description: https://wasya.co
154
+ email:
155
+ - victor@wasya.co
156
+ executables: []
157
+ extensions: []
158
+ extra_rdoc_files: []
159
+ files:
160
+ - README.txt
161
+ - Rakefile
162
+ - app/assets/config/wco_hosting_manifest.js
163
+ - app/assets/stylesheets/wco_hosting/application.css
164
+ - app/controllers/wco_hosting/application_controller.rb
165
+ - app/controllers/wco_hosting/sessions_controller.rb
166
+ - app/helpers/wco_hosting/application_helper.rb
167
+ - app/jobs/wco_hosting/application_job.rb
168
+ - app/mailers/wco_hosting/application_mailer.rb
169
+ - app/models/wco_hosting/ability.rb
170
+ - app/views/layouts/wco_hosting/application.haml
171
+ - app/views/wco/email_conversations/index.haml
172
+ - app/views/wco_hosting/application/home.haml
173
+ - app/views/wco_hosting/sessions/new.html.erb
174
+ - config/initialisers/misc.rb
175
+ - config/routes.rb
176
+ - lib/tasks/wco_hosting_tasks.rake
177
+ - lib/wco_hosting.rb
178
+ - lib/wco_hosting/engine.rb
179
+ homepage: https://wasya.co
180
+ licenses:
181
+ - Proprietary
182
+ metadata:
183
+ homepage_uri: https://wasya.co
184
+ source_code_uri: https://wasya.co
185
+ changelog_uri: https://wasya.co
186
+ post_install_message:
187
+ rdoc_options: []
188
+ require_paths:
189
+ - lib
190
+ required_ruby_version: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ required_rubygems_version: !ruby/object:Gem::Requirement
196
+ requirements:
197
+ - - ">="
198
+ - !ruby/object:Gem::Version
199
+ version: '0'
200
+ requirements: []
201
+ rubygems_version: 3.1.6
202
+ signing_key:
203
+ specification_version: 4
204
+ summary: https://wasya.co
205
+ test_files: []