iatelier 0.1.3

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