data_pact 0.1.0

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
+ SHA256:
3
+ metadata.gz: d7d5fbe8d5f7764616acdd4a24c9ce62054d9d162c677b7d966582f5b782f8fb
4
+ data.tar.gz: 4f624085741aa5e30ca7faa7f584fb57b5b931de07bb5b2b04f50ccdecf3cf2c
5
+ SHA512:
6
+ metadata.gz: 4798f5347fcdda1ca26a59e76422b140dc516a476acb34173c53f1a906ef3a156375910840c951b67b911ad7dcd3840563cefb261a9791dcf9505f381bbe44a3
7
+ data.tar.gz: 4cfd60032ea0bbfa869288a972014b6122670619eb526a33647ec5d28b71f1d4c27642a4d3bae4b479f69a49a60ec49968cc0ffd796ba9804e04fd7734323cf4
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2023 Benjamin Shyman
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # DataPact
2
+ Short description and motivation.
3
+
4
+ ## Usage
5
+ How to use my plugin.
6
+
7
+ ## Installation
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem "data_pact"
12
+ ```
13
+
14
+ And then execute:
15
+ ```bash
16
+ $ bundle
17
+ ```
18
+
19
+ Or install it yourself as:
20
+ ```bash
21
+ $ gem install data_pact
22
+ ```
23
+
24
+ ## Contributing
25
+ Contribution directions go here.
26
+
27
+ ## License
28
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ require "bundler/setup"
2
+
3
+ APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
4
+ load "rails/tasks/engine.rake"
5
+
6
+ load "rails/tasks/statistics.rake"
7
+
8
+ require "bundler/gem_tasks"
@@ -0,0 +1 @@
1
+ //= link_directory ../stylesheets/data_pact .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,15 @@
1
+ module DataPact
2
+ class ApplicationController < ActionController::Base
3
+ def routes
4
+ @routes = Rails.application.routes.routes.map do |route|
5
+ {
6
+ name: route.name,
7
+ verb: route.verb,
8
+ path: route.path.spec.to_s,
9
+ format: route.defaults[:format],
10
+ controller_action: [route.defaults[:controller], '#', route.defaults[:action]].join,
11
+ }
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,20 @@
1
+ module DataPact
2
+ class SessionDataController < ApplicationController
3
+ def index
4
+ @session_data = session.to_hash
5
+ end
6
+
7
+ def create
8
+ key = params[:session_key]
9
+ value = params[:session_value]
10
+ session[key] = value
11
+ redirect_to session_data_path
12
+ end
13
+
14
+ def destroy
15
+ key = params[:session_key_name]
16
+ session.delete(key)
17
+ redirect_to session_data_path
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,4 @@
1
+ module DataPact
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module DataPact
2
+ class ApplicationJob < ActiveJob::Base
3
+ end
4
+ end
@@ -0,0 +1,6 @@
1
+ module DataPact
2
+ class ApplicationMailer < ActionMailer::Base
3
+ default from: "from@example.com"
4
+ layout "mailer"
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module DataPact
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
+ end
@@ -0,0 +1,13 @@
1
+ <h1>Routes Info</h1>
2
+ <div>
3
+ <% @routes.each do |route| %>
4
+ <div>
5
+ <details>
6
+ <summary>
7
+ <%= route[:path] %>
8
+ </summary>
9
+ <p><%= route[:controller_action] %></p>
10
+ </details>
11
+ </div>
12
+ <% end %>
13
+ </div>
@@ -0,0 +1,14 @@
1
+ <div class="flex flex-col gap-y-2">
2
+ <% @routes.each do |route_data| %>
3
+ <div class="collapse collapse-arrow bg-base-200">
4
+ <input type="radio" name="my-accordion-2" checked="checked"/>
5
+ <div class="collapse-title text-xl font-medium flex items-center justify-between">
6
+ <span><%= route_data.fetch(:name, :controller_action) %></span>
7
+ <span><%= route_data[:path]&.sub('(.:format)', '') %></span>
8
+ </div>
9
+ <div class="collapse-content">
10
+ <p><%= route_data %></p>
11
+ </div>
12
+ </div>
13
+ <% end %>
14
+ </div>
@@ -0,0 +1,69 @@
1
+ <div x-data class="flex flex-col gap-y-2">
2
+ <div class="collapse collapse-arrow bg-base-200">
3
+ <input type="radio" name="my-accordion-2" checked="checked"/>
4
+ <div class="collapse-title text-xl font-medium flex gap-x-3 items-center">
5
+
6
+ <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-square-rounded-plus" width="32" height="32" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3e50" fill="none" stroke-linecap="round" stroke-linejoin="round">
7
+ <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
8
+ <path d="M9 12h6"/>
9
+ <path d="M12 9v6"/>
10
+ <path d="M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z"/>
11
+ </svg>
12
+ <span>Set Session data</span>
13
+ </div>
14
+ <div class="collapse-content">
15
+ <%= form_with url: session_data_path, class: 'flex items-center gap-6' do |f| %>
16
+ <div class="form-control w-full max-w-xs">
17
+ <label class="label">
18
+ <span class="label-text">Set Key</span>
19
+ </label>
20
+ <%= f.text_field :session_key, placeholder: 'Enter session key name', class: 'input input-bordered w-full max-w-xs' %>
21
+ </div>
22
+
23
+ <div class="form-control w-full max-w-xs">
24
+ <label class="label">
25
+ <span class="label-text">Set Value</span>
26
+ </label>
27
+ <%= f.text_field :session_value, placeholder: 'Enter value', class: 'input input-bordered w-full max-w-xs' %>
28
+ </div>
29
+
30
+ <button type="submit" class="mt-8">
31
+ <div class="form-control w-full max-w-xs">
32
+ <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-square-rounded-plus" width="48" height="48" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3e50" fill="none" stroke-linecap="round" stroke-linejoin="round">
33
+ <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
34
+ <path d="M9 12h6"/>
35
+ <path d="M12 9v6"/>
36
+ <path d="M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z"/>
37
+ </svg>
38
+ </div>
39
+ </button>
40
+ <% end %>
41
+ </div>
42
+ </div>
43
+ <% @session_data.each do |session_key, value| %>
44
+ <div class="collapse collapse-arrow bg-base-200">
45
+ <input type="radio" name="my-accordion-2" checked="checked"/>
46
+ <div class="collapse-title text-xl font-medium">
47
+ <%= session_key %>
48
+ </div>
49
+ <div class="collapse-content">
50
+ <div class="flex items-center justify-between">
51
+
52
+ <p><%= value %></p>
53
+ <div>
54
+ <%= button_to session_data_path, method: :delete, params: { session_key_name: session_key } do %>
55
+ <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-trash" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3e50" fill="none" stroke-linecap="round" stroke-linejoin="round">
56
+ <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
57
+ <path d="M4 7l16 0"/>
58
+ <path d="M10 11l0 6"/>
59
+ <path d="M14 11l0 6"/>
60
+ <path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"/>
61
+ <path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"/>
62
+ </svg>
63
+ <% end %>
64
+ </div>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ <% end %>
69
+ </div>
@@ -0,0 +1,291 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Data pact</title>
5
+ <%= csrf_meta_tags %>
6
+ <%= csp_meta_tag %>
7
+
8
+
9
+ <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.12.3/dist/cdn.min.js"></script>
10
+
11
+ <%#= stylesheet_link_tag "data_pact/application", media: "all" %>
12
+ <link href="https://cdn.jsdelivr.net/npm/daisyui@3.5.0/dist/full.css" rel="stylesheet" type="text/css"/>
13
+ <script src="https://cdn.tailwindcss.com"></script>
14
+ </head>
15
+ <body>
16
+
17
+ <div class="h-full w-full">
18
+ <!-- Code block starts -->
19
+ <nav role="navigation" class="md:px-6 lg:px-4 w-full mx-auto hidden md:block bg-white dark:bg-gray-800 shadow-md">
20
+ <div class="container mx-6 justify-between h-20 flex items-center bg-white dark:bg-gray-800 md:items-stretch mx-auto border-b border-gray-200">
21
+ <div class="h-full flex items-center">
22
+ <button role="img" aria-label="logo" class="focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-700 mr-10 flex items-center">
23
+ <img class="dark:bg-white p-1 rounded-full" src="https://tuk-cdn.s3.amazonaws.com/can-uploader/horizontal-navigation-svg1.svg" alt="logo"/>
24
+ </button>
25
+ <ul class="pr-12 md:flex items-center h-full hidden">
26
+ <li>
27
+ <a href="javascript:void(0)" class="focus:outline-none border-b-2 border-transparent font-medium cursor-pointer h-full flex items-center hover:text-indigo-700 text-sm text-gray-800 dark:text-white tracking-normal ">Requests</a>
28
+ </li>
29
+ <li>
30
+ <a href="javascript:void(0)" class="focus:outline-none border-b-2 border-transparent font-medium cursor-pointer h-full flex items-center hover:text-indigo-700 text-sm text-gray-800 dark:text-white mx-6 tracking-normal">Queries</a>
31
+ </li>
32
+ <li>
33
+ <a href="<%= session_data_path %>" class="focus:outline-none border-b-2 border-transparent font-medium cursor-pointer h-full flex items-center hover:text-indigo-700 text-sm text-gray-800 dark:text-white mr-6 tracking-normal">Session
34
+ Data</a>
35
+ </li>
36
+ <li>
37
+ <a href="/datapact/routes" class="focus:outline-none border-b-2 border-transparent font-medium cursor-pointer h-full flex items-center hover:text-indigo-700 text-sm text-gray-800 dark:text-white mr-6 tracking-normal">Routes</a>
38
+ </li>
39
+ <li>
40
+ <a href="javascript:void(0)" class="focus:outline-none border-b-2 border-transparent font-medium cursor-pointer h-full flex items-center hover:text-indigo-700 text-sm text-gray-800 dark:text-white mr-6 tracking-normal">Settings</a>
41
+ </li>
42
+ </ul>
43
+ </div>
44
+ <div class="md:flex items-center justify-end hidden">
45
+ <div class="flex items-center">
46
+ <div class="md:pr-10 lg:pr-0 h-full flex items-center">
47
+ <div class="relative">
48
+ <div class="text-gray-600 dark:text-gray-200 absolute ml-3 inset-0 m-auto lg:w-4 lg:h-4 md:w-6 md:h-6">
49
+ <img class="text-gray-600 dark:text-gray-200 stroke-current icon icon-tabler icon-tabler-search" src="https://tuk-cdn.s3.amazonaws.com/can-uploader/horizontal-navigation-svg2.svg" alt="search"/>
50
+ </div>
51
+ <input class="hidden lg:block border border-gray-200 focus:outline-none focus:border-indigo-700 w-64 rounded text-sm text-gray-800 dark:text-white pl-8 py-2" type="text" placeholder="Search here"/>
52
+ </div>
53
+ </div>
54
+ <div class="h-full flex items-center">
55
+ <button aria-label="show notifications" class="relative focus:outline-none focus:text-indigo-700 hover:text-indigo-700 focus:border-indigo-700 hover:border-indigo-700 mx-5 h-full flex items-center justify-center text-gray-600 dark:text-gray-200 cursor-pointer">
56
+ <svg class="icon icon-tabler icon-tabler-bell" xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
57
+ <path stroke="none" d="M0 0h24v24H0z"/>
58
+ <path d="M10 5a2 2 0 0 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6"/>
59
+ <path d="M9 17v1a3 3 0 0 0 6 0v-1"/>
60
+ </svg>
61
+ <div class="absolute top-0 left-4 mt-0 mr-4 pr-1 pt-1">
62
+ <div class="animate-ping w-2 h-2 rounded-full bg-blue-400"></div>
63
+ </div>
64
+ </button>
65
+ </div>
66
+ <div class="h-full flex items-center">
67
+ <button aria-label="dropdown" class="focus:outline-none focus:text-gray-900 text-gray-800 dark:text-white border-b-2 border-transparent focus:border-gray-800 hover:text-gray-900 w-full flex items-center justify-end relative cursor-pointer" onclick="dropdownHandler(this)">
68
+ <img class="rounded-full h-10 w-10 object-cover" src="https://i.ibb.co/GTLTzZY/Unsplash-Avatars-0000s-0035-azamat-zhanisov-a5s-RFie-A3-BY-unsplash-1.png" alt="Unsplash-Avatars-0000s-0035-azamat-zhanisov-a5s-RFie-A3-BY-unsplash-1" alt="logo"/>
69
+ </button>
70
+ </div>
71
+ </div>
72
+ </div>
73
+ <div class="flex items-center md:hidden">
74
+ <ul class="p-2 border-r bg-white dark:bg-gray-800 absolute rounded top-0 left-0 right-0 shadow mt-16 md:mt-16 hidden">
75
+ <li class="flex md:hidden cursor-pointer text-gray-600 dark:text-gray-200 text-sm leading-3 tracking-normal mt-2 py-2 hover:text-indigo-700 focus:text-indigo-700 focus:outline-none">
76
+ <div class="flex items-center">
77
+ <span class="ml-2 font-bold">Requests</span>
78
+ </div>
79
+ </li>
80
+ <li class="flex md:hidden flex-col cursor-pointer text-gray-600 dark:text-gray-200 text-sm leading-3 tracking-normal py-2 hover:text-indigo-700 focus:text-indigo-700 focus:outline-none flex justify-center">
81
+ <div class="flex items-center">
82
+ <span class="ml-2 font-bold">Queries</span>
83
+ </div>
84
+ </li>
85
+ <li class="flex md:hidden flex-col cursor-pointer text-gray-600 dark:text-gray-200 text-sm leading-3 tracking-normal py-2 hover:text-indigo-700 focus:text-indigo-700 focus:outline-none flex justify-center">
86
+ <div class="flex items-center">
87
+ <span class="ml-2 font-bold">Session Data</span>
88
+ </div>
89
+ </li>
90
+ <li class="border-b border-gray-300 flex md:hidden cursor-pointer text-gray-600 dark:text-gray-200 text-sm leading-3 tracking-normal pt-2 pb-4 hover:text-indigo-700 flex items-center focus:text-indigo-700 focus:outline-none">
91
+ <span class="ml-2 font-bold">Deliverables</span>
92
+ </li>
93
+ <li class="cursor-pointer text-gray-600 dark:text-gray-200 text-sm leading-3 tracking-normal mt-2 py-2 hover:text-indigo-700 flex items-center focus:text-indigo-700 focus:outline-none">
94
+ <div class="flex items-center">
95
+ <div class="w-12 cursor-pointer flex text-sm border-2 border-transparent rounded focus:outline-none focus:border-white transition duration-150 ease-in-out">
96
+ <img class="rounded h-10 w-10 object-cover" src="https://tuk-cdn.s3.amazonaws.com/assets/components/horizontal_navigation/hn_1.png" alt="logo"/>
97
+ </div>
98
+ <p class="text-sm ml-2 cursor-pointer">Jane Doe</p>
99
+ <div class="sm:ml-2 text-gray-800 dark:text-white relative">
100
+ <img class="icon icon-tabler icon-tabler-chevron-down cursor-pointer" src="https://tuk-cdn.s3.amazonaws.com/can-uploader/horizontal-navigation-svg4.svg" alt="chevron down"/>
101
+ </div>
102
+ </div>
103
+ </li>
104
+ <li class="cursor-pointer text-gray-600 dark:text-gray-200 text-sm leading-3 tracking-normal py-2 hover:text-indigo-700 focus:text-indigo-700 focus:outline-none">
105
+ <div class="flex items-center">
106
+ <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="20" height="20" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
107
+ <path stroke="none" d="M0 0h24v24H0z"/>
108
+ <circle cx="12" cy="7" r="4"/>
109
+ <path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"/>
110
+ </svg>
111
+ <span class="ml-2">Profile</span>
112
+ </div>
113
+ </li>
114
+ <li class="cursor-pointer text-gray-600 dark:text-gray-200 text-sm leading-3 tracking-normal mt-2 py-2 hover:text-indigo-700 flex items-center focus:text-indigo-700 focus:outline-none">
115
+ <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-logout" width="20" height="20" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
116
+ <path stroke="none" d="M0 0h24v24H0z"/>
117
+ <path d="M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"/>
118
+ <path d="M7 12h14l-3 -3m0 6l3 -3"/>
119
+ </svg>
120
+ <span class="ml-2">Sign out</span>
121
+ </li>
122
+ </ul>
123
+ </div>
124
+ </div>
125
+
126
+ <!-- Breadcrumbs-->
127
+ <div class="hidden container justify-between h-12 flex items-center bg-white dark:bg-gray-800 md:items-stretch mx-auto">
128
+ <div class="h-full flex items-center">
129
+ <ul class="pr-12 md:flex items-center h-full hidden">
130
+ <li>
131
+ <a href="javascript:void(0)" class="focus:outline-none border-b-2 border-transparent leading-none cursor-pointer h-full flex items-center hover:text-indigo-700 text-sm text-gray-600 dark:text-gray-200 ">Home</a>
132
+ </li>
133
+ <li>
134
+ <img class="mx-4" src="https://tuk-cdn.s3.amazonaws.com/can-uploader/horizontal-navigation-svg3.svg" alt="icon-1"/>
135
+ </li>
136
+ <li>
137
+ <a href="javascript:void(0)" class="focus:outline-none border-b-2 border-transparent leading-none cursor-pointer h-full flex items-center hover:text-indigo-700 text-sm text-gray-600 dark:text-gray-200 ">Resource
138
+ Manager</a>
139
+ </li>
140
+ <li>
141
+ <img class="mx-4" src="https://tuk-cdn.s3.amazonaws.com/can-uploader/horizontal-navigation-svg5.svg" alt="icon2"/>
142
+ </li>
143
+ <li>
144
+ <a href="javascript:void(0)" class="focus:outline-none border-b-2 border-transparent leading-none cursor-pointer h-full flex items-center hover:text-indigo-700 text-sm text-gray-600 dark:text-gray-200 mr-14">Job
145
+ Applications</a>
146
+ </li>
147
+ </ul>
148
+ </div>
149
+ </div>
150
+ </nav>
151
+
152
+ <!-- Navbar -->
153
+ <nav class="md:hidden">
154
+ <div class="w-full shadow-md bg-white dark:bg-gray-800 fixed top-0 z-40">
155
+ <div class="flex md:hidden mx-auto container">
156
+ <div class="border-b py-4 border-gray-200 flex items-stretch justify-between mx-4 items-center w-full">
157
+ <div aria-label="logo" role="img" tabindex="0" class="focus:outline-none">
158
+ <img class="p-1 dark:bg-white rounded-full" src="https://tuk-cdn.s3.amazonaws.com/can-uploader/horizontal-navigation-svg1.svg" alt="logo"/>
159
+ </div>
160
+ <div class="flex md:hidden items-center justify-end">
161
+ <div class="flex items-center">
162
+ <div class="h-full flex items-center">
163
+ <button aria-label="show notifications" class="relative focus:outline-none focus:text-indigo-700 hover:text-indigo-700 focus:border-indigo-700 hover:border-indigo-700 h-full flex items-center justify-center text-gray-600 dark:text-gray-200 cursor-pointer">
164
+ <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-bell" width="28" height="28" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
165
+ <path stroke="none" d="M0 0h24v24H0z"/>
166
+ <path d="M10 5a2 2 0 0 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6"/>
167
+ <path d="M9 17v1a3 3 0 0 0 6 0v-1"/>
168
+ </svg>
169
+ <div class="absolute top-0 left-4 mt-0 mr-4 pr-1 pt-1">
170
+ <div class="animate-ping w-2 h-2 rounded-full bg-blue-400"></div>
171
+ </div>
172
+ </button>
173
+ </div>
174
+ <div class="h-full flex items-center">
175
+ <button aria-label="dropdown" class="focus:outline-none mx-4 focus:text-gray-900 text-gray-800 dark:text-white border-b-2 border-transparent focus:border-gray-800 hover:text-gray-900 w-full flex items-center justify-end relative cursor-pointer" onclick="dropdownHandler(this)">
176
+ <img class="rounded-full h-10 w-10 object-cover" src="https://i.ibb.co/GTLTzZY/Unsplash-Avatars-0000s-0035-azamat-zhanisov-a5s-RFie-A3-BY-unsplash-1.png" alt="Unsplash-Avatars-0000s-0035-azamat-zhanisov-a5s-RFie-A3-BY-unsplash-1" alt="logo"/>
177
+ </button>
178
+ </div>
179
+ <div class="h-full flex items-center">
180
+ <button id="menu" aria-label="open menu" class="focus:outline-none focus:ring-2 focus:ring-gray-700 rounded-md text-gray-800 dark:text-white " onclick="sidebarHandler(true)">
181
+ <img src="https://tuk-cdn.s3.amazonaws.com/can-uploader/horizontal-navigation-svg6.svg" alt="menu"/>
182
+ </button>
183
+ </div>
184
+ </div>
185
+ </div>
186
+ </div>
187
+ </div>
188
+ <div class="container sm:px-6 px-4 justify-between h-12 flex items-center bg-white dark:bg-gray-800 md:items-stretch mx-auto">
189
+ <div class="h-full flex items-center">
190
+ <ul class="flex items-center h-full md:hidden">
191
+ <li>
192
+ <a href="javascript:void(0)" class="focus:outline-none border-b-2 border-transparent leading-none cursor-pointer h-full flex items-center hover:text-indigo-700 text-sm text-gray-600 dark:text-gray-200 ">Home</a>
193
+ </li>
194
+ <img class="mx-2" src="https://tuk-cdn.s3.amazonaws.com/can-uploader/horizontal-navigation-svg7.svg" alt="icon-4"/>
195
+ <li>
196
+ <a href="javascript:void(0)" class="focus:outline-none border-b-2 border-transparent leading-none cursor-pointer h-full flex items-center hover:text-indigo-700 text-sm text-gray-600 dark:text-gray-200 ">Resource
197
+ Manager</a>
198
+ </li>
199
+ <img class="mx-2" src="https://tuk-cdn.s3.amazonaws.com/can-uploader/horizontal-navigation-svg8.svg" alt="icon-5"/>
200
+ <li>
201
+ <a href="javascript:void(0)" class="focus:outline-none border-b-2 border-transparent leading-none cursor-pointer h-full flex items-center hover:text-indigo-700 text-sm text-gray-600 dark:text-gray-200 mr-4">Job
202
+ Applications</a>
203
+ </li>
204
+ </ul>
205
+ </div>
206
+ </div>
207
+ </div>
208
+ <!--Mobile responsive sidebar-->
209
+ <div class="absolute w-full h-full transform -translate-x-full z-40 transition duration-700 sm:hidden" id="mobile-nav">
210
+ <div class="w-full h-full shadow-lg z-40 fixed overflow-y-auto z-40 top-0 bg-white dark:bg-gray-800 flex-col justify-between xl:hidden pb-4 transition duration-500 ease-in-out">
211
+ <div class="px-5 h-full">
212
+ <div class="flex flex-col justify-between h-full w-full">
213
+ <div>
214
+ <div class="mt-6 flex w-full items-center justify-between">
215
+ <div class="border-b border-gray-200 pb-8 flex items-center justify-between w-full">
216
+ <div class="md:pr-10 lg:pr-0 h-full flex items-center w-full">
217
+ <div class="relative w-full">
218
+ <div class="text-gray-800 dark:text-white absolute ml-3 inset-0 m-auto w-4 h-4">
219
+ <img src="https://tuk-cdn.s3.amazonaws.com/can-uploader/horizontal-navigation-svg2.svg" alt="search"/>
220
+ </div>
221
+ <input class="md:hidden border border-gray-300 focus:outline-none focus:border-indigo-700 w-full rounded text-sm text-gray-800 dark:text-white pl-8 py-2" type="text" placeholder="Search here"/>
222
+ </div>
223
+ </div>
224
+ <button id="cross" aria-label="close menu" class="focus:outline-none focus:ring-2 rounded-md text-gray-800 dark:text-white pl-8" onclick="sidebarHandler(false)">
225
+ <img class="dark:bg-white p-1" src="https://tuk-cdn.s3.amazonaws.com/can-uploader/horizontal-navigation-svg9.svg" alt="cross"/>
226
+ </button>
227
+ </div>
228
+ </div>
229
+ <ul class="">
230
+ <li>
231
+ <a class="cursor-pointer">
232
+ <div class="text-gray-800 dark:text-white pt-10">
233
+ <div class="flex items-center">
234
+ <p tabindex="0" class="focus:outline-none text-gray-800 dark:text-white text-sm font-medium">Routes</p>
235
+ </div>
236
+ </div>
237
+ </a>
238
+ </li>
239
+ <li>
240
+ <a href='/session_data' class="cursor-pointer">
241
+ <div class="text-gray-800 dark:text-white pt-8">
242
+ <div class="flex items-center justify-between">
243
+ <div class="flex items-center">
244
+ <p tabindex="0" class="focus:outline-none text-gray-800 dark:text-white text-sm font-medium">Session
245
+ Dataa</p>
246
+ </div>
247
+ </div>
248
+ </div>
249
+ </a>
250
+ </li>
251
+ <li>
252
+ <a class="cursor-pointer">
253
+ <div class="text-gray-800 dark:text-white pt-8">
254
+ <div class="flex items-center">
255
+ <p tabindex="0" class="focus:outline-none text-gray-800 dark:text-white text-sm font-medium">Requests</p>
256
+ </div>
257
+ </div>
258
+ </a>
259
+ </li>
260
+ <li class="text-gray-800 dark:text-white pt-8 cursor-pointer">
261
+ <div class="flex items-center justify-between">
262
+ <div class="w-6 h-6 md:w-8 md:h-8 text-gray-800 dark:text-white ">
263
+ <p tabindex="0" class="focus:outline-none text-gray-800 dark:text-white text-sm font-medium">Queries</p>
264
+ </div>
265
+ </div>
266
+ </li>
267
+ <li class="text-gray-800 dark:text-white pt-8 cursor-pointer">
268
+ <div class="flex items-center justify-between">
269
+ <div class="w-6 h-6 md:w-8 md:h-8 text-gray-800 dark:text-white ">
270
+ <p tabindex="0" class="focus:outline-none text-gray-800 dark:text-white text-sm font-medium">Settings</p>
271
+ </div>
272
+ </div>
273
+ </li>
274
+ </ul>
275
+ </div>
276
+ </div>
277
+ </div>
278
+ </div>
279
+ </div>
280
+ </nav>
281
+ <!-- Sidebar ends -->
282
+
283
+ <!-- Code block ends -->
284
+ <div class="my-3 mx-6">
285
+ <%= yield %>
286
+ </div>
287
+ </div>
288
+
289
+
290
+ </body>
291
+ </html>
data/config/routes.rb ADDED
@@ -0,0 +1,9 @@
1
+ DataPact::Engine.routes.draw do
2
+ get 'index', to: 'application#index'
3
+ resources :session_data, only: [:index, :create] do
4
+ delete :destroy, on: :collection
5
+ end
6
+ get 'routes', to: 'application#routes'
7
+ root to: 'application#index'
8
+
9
+ end
@@ -0,0 +1,5 @@
1
+ module DataPact
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace DataPact
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module DataPact
2
+ VERSION = "0.1.0"
3
+ end
data/lib/data_pact.rb ADDED
@@ -0,0 +1,12 @@
1
+ require "data_pact/version"
2
+ require "data_pact/engine"
3
+
4
+ module DataPact
5
+ class << self
6
+ attr_accessor :s3_client
7
+ end
8
+
9
+ def self.configure
10
+ yield self
11
+ end
12
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :data_pact do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,91 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: data_pact
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Benjamin Shyman
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-08-02 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.1
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.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: aws-sdk-s3
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description:
42
+ email:
43
+ - bshyman@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - MIT-LICENSE
49
+ - README.md
50
+ - Rakefile
51
+ - app/assets/config/data_pact_manifest.js
52
+ - app/assets/stylesheets/data_pact/application.css
53
+ - app/controllers/data_pact/application_controller.rb
54
+ - app/controllers/data_pact/session_data_controller.rb
55
+ - app/helpers/data_pact/application_helper.rb
56
+ - app/jobs/data_pact/application_job.rb
57
+ - app/mailers/data_pact/application_mailer.rb
58
+ - app/models/data_pact/application_record.rb
59
+ - app/views/application/index.html.erb
60
+ - app/views/data_pact/application/routes.html.erb
61
+ - app/views/data_pact/session_data/index.html.erb
62
+ - app/views/layouts/data_pact/application.html.erb
63
+ - config/routes.rb
64
+ - lib/data_pact.rb
65
+ - lib/data_pact/engine.rb
66
+ - lib/data_pact/version.rb
67
+ - lib/tasks/data_pact_tasks.rake
68
+ homepage:
69
+ licenses:
70
+ - MIT
71
+ metadata: {}
72
+ post_install_message:
73
+ rdoc_options: []
74
+ require_paths:
75
+ - lib
76
+ required_ruby_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ required_rubygems_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ requirements: []
87
+ rubygems_version: 3.2.15
88
+ signing_key:
89
+ specification_version: 4
90
+ summary: Data contracts between front and back end software development teams.
91
+ test_files: []