iatelier 0.1.5 → 0.1.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5f8c102c3c10412717173ac935773e623cf64fcb3e6b2f1111f2e0cea21fa87
4
- data.tar.gz: 6fa02e028df6daf95c6a0c4d338ba003ce3ea1a34dd4bbdde0245166a83f627e
3
+ metadata.gz: f0e8db6642cda13915c19c3f0c2ef0424523383fa3f85750ff6e4684db10d42a
4
+ data.tar.gz: bbe1ab1dbbb7c11e2ad1cfc1817e5184ee64c4fb88389f19eee50dbde45d8418
5
5
  SHA512:
6
- metadata.gz: bc87fd98484f7456ab374314caf8a2049f2ea80ca44ca38e8218ee9cbbed3dda804189f91a72b6b5cc9c9eb6c6b915c1fb4b93aeefa4b5620105ee746f50c770
7
- data.tar.gz: f40888980dea6ca904b3560055345c33bd2a77a5b5b0e6090fa7050bb02841fc2505890cb8b24e9247648f1778543862d5a4d9d5f66f50ff1c6417775610207e
6
+ metadata.gz: 974d112146ac83a2b29b5a3b092cc23d7fc6bfd8b2c893d9dc82ea7f562c6c072e994bd1c18f4a2ed534d33043141f5907bfd9f4ac5c40d2feb94579004f8e35
7
+ data.tar.gz: 5ebbe1e3f4c286761e857447f3f38e59bf23b6f9f132618fd63dc7dcb5d939f01b02ef077f399f754635c1c4bb2adeb48cd2bb5ad4770183627ef8158677e96d
@@ -1,3 +1,3 @@
1
1
  module Iatelier
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.7"
3
3
  end
data/lib/iatelier.rb CHANGED
@@ -10,6 +10,12 @@ require 'hanami/helpers'
10
10
  require 'hanami/assets'
11
11
  # require 'rack'
12
12
 
13
+ require 'active_support/inflector'
14
+ Dir[File.join(__dir__, 'iatelier/models/', '*.rb')].each { |file| require file }
15
+ Dir[File.join(__dir__, 'iatelier/models/dimensions', '*.rb')].each { |file| require file }
16
+ #require 'gem'
17
+ #Gem.find_files('iatelier/models/dimensions').each {|file| require file }
18
+
13
19
  module Iatelier
14
20
  class Application < Hanami::Application
15
21
  configure do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iatelier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Captain Husayn Pinguin
@@ -103,7 +103,6 @@ files:
103
103
  - lib/iatelier.rb
104
104
  - lib/iatelier/Users/captainhusaynpinguin/Documents/ruby/iatelier/public/assets/js/analog.js
105
105
  - lib/iatelier/Users/captainhusaynpinguin/Documents/ruby/iatelier/public/assets/js/selectize.js
106
- - lib/iatelier/application.rb
107
106
  - lib/iatelier/assets/favicon.ico
108
107
  - lib/iatelier/assets/images/.gitkeep
109
108
  - lib/iatelier/assets/javascripts/iatelier-analog.js
@@ -1,320 +0,0 @@
1
- require 'hanami/helpers'
2
- require 'hanami/assets'
3
-
4
- require 'active_support/inflector'
5
- Dir[File.dirname(__FILE__) + '/models/*.rb'].each {|file| require file }
6
- Dir[File.dirname(__FILE__) + '/models/dimensions/*.rb'].each {|file| require file }
7
-
8
- module Iatelier
9
- class Application < Hanami::Application
10
- configure do
11
- ##
12
- # BASIC
13
- #
14
-
15
- # Define the root path of this application.
16
- # All paths specified in this configuration are relative to path below.
17
- #
18
- root __dir__
19
-
20
- # Relative load paths where this application will recursively load the
21
- # code.
22
- #
23
- # When you add new directories, remember to add them here.
24
- #
25
- load_paths << [
26
- 'controllers',
27
- 'views'
28
- ]
29
-
30
- # Handle exceptions with HTTP statuses (true) or don't catch them (false).
31
- # Defaults to true.
32
- # See: http://www.rubydoc.info/gems/hanami-controller/#Exceptions_management
33
- #
34
- # handle_exceptions true
35
-
36
- ##
37
- # HTTP
38
- #
39
-
40
- # Routes definitions for this application
41
- # See: http://www.rubydoc.info/gems/hanami-router#Usage
42
- #
43
- routes 'config/routes'
44
-
45
- # URI scheme used by the routing system to generate absolute URLs
46
- # Defaults to "http"
47
- #
48
- # scheme 'https'
49
-
50
- # URI host used by the routing system to generate absolute URLs
51
- # Defaults to "localhost"
52
- #
53
- # host 'example.org'
54
-
55
- # URI port used by the routing system to generate absolute URLs
56
- # Argument: An object coercible to integer, defaults to 80 if the scheme
57
- # is http and 443 if it's https
58
- #
59
- # This should only be configured if app listens to non-standard ports
60
- #
61
- # port 443
62
-
63
- # Enable cookies
64
- # Argument: boolean to toggle the feature
65
- # A Hash with options
66
- #
67
- # Options:
68
- # :domain - The domain (String - nil by default, not required)
69
- # :path - Restrict cookies to a relative URI
70
- # (String - nil by default)
71
- # :max_age - Cookies expiration expressed in seconds
72
- # (Integer - nil by default)
73
- # :secure - Restrict cookies to secure connections
74
- # (Boolean - Automatically true when using HTTPS)
75
- # See #scheme and #ssl?
76
- # :httponly - Prevent JavaScript access (Boolean - true by default)
77
- #
78
- # cookies true
79
- # or
80
- # cookies max_age: 300
81
-
82
- # Enable sessions
83
- # Argument: Symbol the Rack session adapter
84
- # A Hash with options
85
- #
86
- # See: http://www.rubydoc.info/gems/rack/Rack/Session/Cookie
87
- #
88
- # sessions :cookie, secret: ENV['ATELIER_SESSIONS_SECRET']
89
-
90
- # Configure Rack middleware for this application
91
- #
92
- # middleware.use Rack::Protection
93
- middleware.use Rack::Auth::Basic, 'Welcome' do |username, password|
94
- username == 'ScrappyNobody' && password == 'Fenster7'
95
- end
96
-
97
- # Default format for the requests that don't specify an HTTP_ACCEPT header
98
- # Argument: A symbol representation of a mime type, defaults to :html
99
- #
100
- # default_request_format :html
101
-
102
- # Default format for responses that don't consider the request format
103
- # Argument: A symbol representation of a mime type, defaults to :html
104
- #
105
- # default_response_format :html
106
-
107
- ##
108
- # TEMPLATES
109
- #
110
-
111
- # The layout to be used by all views
112
- #
113
- layout :application # It will load Iatelier::Views::ApplicationLayout
114
-
115
- # The relative path to templates
116
- #
117
- templates 'templates'
118
-
119
- ##
120
- # ASSETS
121
- #
122
- assets do
123
- # JavaScript compressor
124
- #
125
- # Supported engines:
126
- #
127
- # * :builtin
128
- # * :uglifier
129
- # * :yui
130
- # * :closure
131
- #
132
- # See: https://guides.hanamirb.org/assets/compressors
133
- #
134
- # In order to skip JavaScript compression comment the following line
135
- javascript_compressor :builtin
136
-
137
- # Stylesheet compressor
138
- #
139
- # Supported engines:
140
- #
141
- # * :builtin
142
- # * :yui
143
- # * :sass
144
- #
145
- # See: https://guides.hanamirb.org/assets/compressors
146
- #
147
- # In order to skip stylesheet compression comment the following line
148
- stylesheet_compressor :builtin
149
-
150
- # Specify sources for assets
151
- #
152
- sources << [
153
- 'assets'
154
- ]
155
- end
156
-
157
- ##
158
- # SECURITY
159
- #
160
-
161
- # X-Frame-Options is a HTTP header supported by modern browsers.
162
- # It determines if a web page can or cannot be included via <frame> and
163
- # <iframe> tags by untrusted domains.
164
- #
165
- # Web applications can send this header to prevent Clickjacking attacks.
166
- #
167
- # Read more at:
168
- #
169
- # * https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options
170
- # * https://www.owasp.org/index.php/Clickjacking
171
- #
172
- security.x_frame_options 'DENY'
173
-
174
- # X-Content-Type-Options prevents browsers from interpreting files as
175
- # something else than declared by the content type in the HTTP headers.
176
- #
177
- # Read more at:
178
- #
179
- # * https://www.owasp.org/index.php/OWASP_Secure_Headers_Project#X-Content-Type-Options
180
- # * https://msdn.microsoft.com/en-us/library/gg622941%28v=vs.85%29.aspx
181
- # * https://blogs.msdn.microsoft.com/ie/2008/09/02/ie8-security-part-vi-beta-2-update
182
- #
183
- security.x_content_type_options 'nosniff'
184
-
185
- # X-XSS-Protection is a HTTP header to determine the behavior of the
186
- # browser in case an XSS attack is detected.
187
- #
188
- # Read more at:
189
- #
190
- # * https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)
191
- # * https://www.owasp.org/index.php/OWASP_Secure_Headers_Project#X-XSS-Protection
192
- #
193
- security.x_xss_protection '1; mode=block'
194
-
195
- # Content-Security-Policy (CSP) is a HTTP header supported by modern
196
- # browsers. It determines trusted sources of execution for dynamic
197
- # contents (JavaScript) or other web related assets: stylesheets, images,
198
- # fonts, plugins, etc.
199
- #
200
- # Web applications can send this header to mitigate Cross Site Scripting
201
- # (XSS) attacks.
202
- #
203
- # The default value allows images, scripts, AJAX, fonts and CSS from the
204
- # same origin, and does not allow any other resources to load (eg object,
205
- # frame, media, etc).
206
- #
207
- # Inline JavaScript is NOT allowed. To enable it, please use:
208
- # "script-src 'unsafe-inline'".
209
- #
210
- # Content Security Policy introduction:
211
- #
212
- # * http://www.html5rocks.com/en/tutorials/security/content-security-policy/
213
- # * https://www.owasp.org/index.php/Content_Security_Policy
214
- # * https://www.owasp.org/index.php/Cross-site_Scripting_%28XSS%29
215
- #
216
- # Inline and eval JavaScript risks:
217
- #
218
- # * http://www.html5rocks.com/en/tutorials/security/content-security-policy/#inline-code-considered-harmful
219
- # * http://www.html5rocks.com/en/tutorials/security/content-security-policy/#eval-too
220
- #
221
- # Content Security Policy usage:
222
- #
223
- # * http://content-security-policy.com/
224
- # * https://developer.mozilla.org/en-US/docs/Web/Security/CSP/Using_Content_Security_Policy
225
- #
226
- # Content Security Policy references:
227
- #
228
- # * https://developer.mozilla.org/en-US/docs/Web/Security/CSP/CSP_policy_directives
229
- #
230
- security.content_security_policy %{
231
- form-action 'self';
232
- frame-ancestors 'self';
233
- base-uri 'self';
234
- default-src 'none';
235
- script-src 'self';
236
- connect-src 'self';
237
- img-src 'self' https: data:;
238
- style-src 'self' 'unsafe-inline' https:;
239
- font-src 'self';
240
- object-src 'none';
241
- plugin-types application/pdf;
242
- child-src 'self';
243
- frame-src 'self';
244
- media-src 'self'
245
- }
246
-
247
- ##
248
- # FRAMEWORKS
249
- #
250
-
251
- # Configure the code that will yield each time Iatelier::Action is included
252
- # This is useful for sharing common functionality
253
- #
254
- # See: http://www.rubydoc.info/gems/hanami-controller#Configuration
255
- controller.prepare do
256
- # include MyAuthentication # included in all the actions
257
- # before :authenticate! # run an authentication before callback
258
- end
259
-
260
- # Configure the code that will yield each time Iatelier::View is included
261
- # This is useful for sharing common functionality
262
- #
263
- # See: http://www.rubydoc.info/gems/hanami-view#Configuration
264
- view.prepare do
265
- include Hanami::Helpers
266
- include Iatelier::Assets::Helpers
267
- end
268
- end
269
-
270
- ##
271
- # DEVELOPMENT
272
- #
273
- configure :development do
274
- # Don't handle exceptions, render the stack trace
275
- handle_exceptions false
276
- end
277
-
278
- ##
279
- # TEST
280
- #
281
- configure :test do
282
- # Don't handle exceptions, render the stack trace
283
- handle_exceptions false
284
- end
285
-
286
- ##
287
- # PRODUCTION
288
- #
289
- configure :production do
290
- # scheme 'https'
291
- # host 'example.org'
292
- # port 443
293
-
294
- assets do
295
- # Don't compile static assets in production mode (eg. Sass, ES6)
296
- #
297
- # See: http://www.rubydoc.info/gems/hanami-assets#Configuration
298
- compile false
299
-
300
- # Use fingerprint file name for asset paths
301
- #
302
- # See: https://guides.hanamirb.org/assets/overview
303
- fingerprint true
304
-
305
- # Content Delivery Network (CDN)
306
- #
307
- # See: https://guides.hanamirb.org/assets/content-delivery-network
308
- #
309
- # scheme 'https'
310
- # host 'cdn.example.org'
311
- # port 443
312
-
313
- # Subresource Integrity
314
- #
315
- # See: https://guides.hanamirb.org/assets/content-delivery-network/#subresource-integrity
316
- subresource_integrity :sha256
317
- end
318
- end
319
- end
320
- end