lato_core 1.1.1 → 1.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 (83) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +0 -12
  3. data/app/controllers/lato_core/api/v1/api_controller.rb +2 -3
  4. data/app/controllers/lato_core/application_controller.rb +1 -1
  5. data/app/controllers/lato_core/back/authentication_controller.rb +12 -11
  6. data/app/controllers/lato_core/back/back_controller.rb +13 -19
  7. data/app/controllers/lato_core/back/superusers_controller.rb +123 -148
  8. data/app/mailers/lato_core/application_mailer.rb +3 -4
  9. data/app/mailers/lato_core/superusers_mailer.rb +5 -7
  10. data/app/models/lato_core/superuser.rb +27 -19
  11. data/app/views/lato_core/back/authentication/login.html.erb +12 -9
  12. data/app/views/lato_core/back/authentication/password_edit.html.erb +9 -14
  13. data/app/views/lato_core/back/authentication/password_forget.html.erb +26 -27
  14. data/app/views/lato_core/back/back/home.html.erb +5 -5
  15. data/app/views/lato_core/back/superusers/edit.html.erb +12 -3
  16. data/app/views/lato_core/back/superusers/index.html.erb +23 -13
  17. data/app/views/lato_core/back/superusers/new.html.erb +12 -3
  18. data/app/views/lato_core/back/superusers/shared/_form.html.erb +3 -6
  19. data/config/config.yml +1 -1
  20. data/config/example.yml +3 -3
  21. data/config/initializers/init.rb +4 -5
  22. data/{test/dummy/log/test.log → config/initializers/lists.rb} +0 -0
  23. data/config/initializers/ram.rb +1 -37
  24. data/config/routes.rb +4 -5
  25. data/lib/lato_core.rb +2 -6
  26. data/lib/lato_core/engine.rb +6 -6
  27. data/lib/lato_core/interface.rb +12 -15
  28. data/lib/lato_core/interface/authentication.rb +19 -27
  29. data/lib/lato_core/interface/cache.rb +17 -23
  30. data/lib/lato_core/interface/communication.rb +68 -85
  31. data/lib/lato_core/interface/languages.rb +38 -47
  32. data/lib/lato_core/interface/navigation.rb +79 -93
  33. data/lib/lato_core/interface/session.rb +47 -61
  34. data/lib/lato_core/interface/superusers.rb +113 -122
  35. data/lib/tasks/lato_core_tasks.rake +2 -5
  36. metadata +4 -99
  37. data/test/controllers/lato_core/api/v1/api_controller_test.rb +0 -9
  38. data/test/controllers/lato_core/application_controller_test.rb +0 -9
  39. data/test/controllers/lato_core/back/authentication_controller_test.rb +0 -13
  40. data/test/controllers/lato_core/back/back_controller_test.rb +0 -9
  41. data/test/controllers/lato_core/back/session_controller_test.rb +0 -13
  42. data/test/controllers/lato_core/back/superusers_controller_test.rb +0 -13
  43. data/test/dummy/README.rdoc +0 -28
  44. data/test/dummy/Rakefile +0 -6
  45. data/test/dummy/app/assets/javascripts/application.js +0 -13
  46. data/test/dummy/app/assets/stylesheets/application.css +0 -15
  47. data/test/dummy/app/controllers/application_controller.rb +0 -5
  48. data/test/dummy/app/helpers/application_helper.rb +0 -2
  49. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  50. data/test/dummy/bin/bundle +0 -3
  51. data/test/dummy/bin/rails +0 -4
  52. data/test/dummy/bin/rake +0 -4
  53. data/test/dummy/bin/setup +0 -29
  54. data/test/dummy/config.ru +0 -4
  55. data/test/dummy/config/application.rb +0 -25
  56. data/test/dummy/config/boot.rb +0 -5
  57. data/test/dummy/config/database.yml +0 -25
  58. data/test/dummy/config/environment.rb +0 -5
  59. data/test/dummy/config/environments/development.rb +0 -41
  60. data/test/dummy/config/environments/production.rb +0 -79
  61. data/test/dummy/config/environments/test.rb +0 -42
  62. data/test/dummy/config/initializers/assets.rb +0 -11
  63. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  64. data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
  65. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  66. data/test/dummy/config/initializers/inflections.rb +0 -16
  67. data/test/dummy/config/initializers/mime_types.rb +0 -4
  68. data/test/dummy/config/initializers/session_store.rb +0 -3
  69. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  70. data/test/dummy/config/locales/en.yml +0 -23
  71. data/test/dummy/config/routes.rb +0 -4
  72. data/test/dummy/config/secrets.yml +0 -22
  73. data/test/dummy/public/404.html +0 -67
  74. data/test/dummy/public/422.html +0 -67
  75. data/test/dummy/public/500.html +0 -66
  76. data/test/dummy/public/favicon.ico +0 -0
  77. data/test/fixtures/lato_core/superusers.yml +0 -11
  78. data/test/integration/navigation_test.rb +0 -8
  79. data/test/lato_core_test.rb +0 -7
  80. data/test/mailers/lato_core/lato_core_mailer_test.rb +0 -9
  81. data/test/mailers/previews/lato_core/lato_core_mailer_preview.rb +0 -6
  82. data/test/models/lato_core/superuser_test.rb +0 -9
  83. data/test/test_helper.rb +0 -21
@@ -1,11 +1,8 @@
1
- include LatoCore::Interface
1
+ include LatoCore
2
2
 
3
- # Task che genera il file di configurazione di Lato nella cache
4
- # dell'applicazione principale
3
+ # Initialize module on project
5
4
  desc 'Create config.yml file for Lato configuration'
6
5
  task :lato_core_initialize do
7
- # determino la directory di cache
8
6
  directory = core_getCacheDirectory
9
7
  FileUtils.cp "#{LatoCore::Engine.root}/config/example.yml", "#{Rails.root}/config/lato/config.yml"
10
-
11
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lato_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregorio Galante, Antonio Dal Cin, Riccardo Zanutta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-27 00:00:00.000000000 Z
11
+ date: 2016-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -70,6 +70,7 @@ files:
70
70
  - config/config.yml
71
71
  - config/example.yml
72
72
  - config/initializers/init.rb
73
+ - config/initializers/lists.rb
73
74
  - config/initializers/ram.rb
74
75
  - config/routes.rb
75
76
  - db/migrate/20160224181217_create_lato_core_superusers.rb
@@ -84,54 +85,6 @@ files:
84
85
  - lib/lato_core/interface/session.rb
85
86
  - lib/lato_core/interface/superusers.rb
86
87
  - lib/tasks/lato_core_tasks.rake
87
- - test/controllers/lato_core/api/v1/api_controller_test.rb
88
- - test/controllers/lato_core/application_controller_test.rb
89
- - test/controllers/lato_core/back/authentication_controller_test.rb
90
- - test/controllers/lato_core/back/back_controller_test.rb
91
- - test/controllers/lato_core/back/session_controller_test.rb
92
- - test/controllers/lato_core/back/superusers_controller_test.rb
93
- - test/dummy/README.rdoc
94
- - test/dummy/Rakefile
95
- - test/dummy/app/assets/javascripts/application.js
96
- - test/dummy/app/assets/stylesheets/application.css
97
- - test/dummy/app/controllers/application_controller.rb
98
- - test/dummy/app/helpers/application_helper.rb
99
- - test/dummy/app/views/layouts/application.html.erb
100
- - test/dummy/bin/bundle
101
- - test/dummy/bin/rails
102
- - test/dummy/bin/rake
103
- - test/dummy/bin/setup
104
- - test/dummy/config.ru
105
- - test/dummy/config/application.rb
106
- - test/dummy/config/boot.rb
107
- - test/dummy/config/database.yml
108
- - test/dummy/config/environment.rb
109
- - test/dummy/config/environments/development.rb
110
- - test/dummy/config/environments/production.rb
111
- - test/dummy/config/environments/test.rb
112
- - test/dummy/config/initializers/assets.rb
113
- - test/dummy/config/initializers/backtrace_silencers.rb
114
- - test/dummy/config/initializers/cookies_serializer.rb
115
- - test/dummy/config/initializers/filter_parameter_logging.rb
116
- - test/dummy/config/initializers/inflections.rb
117
- - test/dummy/config/initializers/mime_types.rb
118
- - test/dummy/config/initializers/session_store.rb
119
- - test/dummy/config/initializers/wrap_parameters.rb
120
- - test/dummy/config/locales/en.yml
121
- - test/dummy/config/routes.rb
122
- - test/dummy/config/secrets.yml
123
- - test/dummy/log/test.log
124
- - test/dummy/public/404.html
125
- - test/dummy/public/422.html
126
- - test/dummy/public/500.html
127
- - test/dummy/public/favicon.ico
128
- - test/fixtures/lato_core/superusers.yml
129
- - test/integration/navigation_test.rb
130
- - test/lato_core_test.rb
131
- - test/mailers/lato_core/lato_core_mailer_test.rb
132
- - test/mailers/previews/lato_core/lato_core_mailer_preview.rb
133
- - test/models/lato_core/superuser_test.rb
134
- - test/test_helper.rb
135
88
  homepage: https://github.com/LatoTeam/lato_core
136
89
  licenses:
137
90
  - MIT
@@ -156,52 +109,4 @@ rubygems_version: 2.5.1
156
109
  signing_key:
157
110
  specification_version: 4
158
111
  summary: Lato module for basic functions
159
- test_files:
160
- - test/controllers/lato_core/api/v1/api_controller_test.rb
161
- - test/controllers/lato_core/application_controller_test.rb
162
- - test/controllers/lato_core/back/authentication_controller_test.rb
163
- - test/controllers/lato_core/back/back_controller_test.rb
164
- - test/controllers/lato_core/back/session_controller_test.rb
165
- - test/controllers/lato_core/back/superusers_controller_test.rb
166
- - test/dummy/app/assets/javascripts/application.js
167
- - test/dummy/app/assets/stylesheets/application.css
168
- - test/dummy/app/controllers/application_controller.rb
169
- - test/dummy/app/helpers/application_helper.rb
170
- - test/dummy/app/views/layouts/application.html.erb
171
- - test/dummy/bin/bundle
172
- - test/dummy/bin/rails
173
- - test/dummy/bin/rake
174
- - test/dummy/bin/setup
175
- - test/dummy/config/application.rb
176
- - test/dummy/config/boot.rb
177
- - test/dummy/config/database.yml
178
- - test/dummy/config/environment.rb
179
- - test/dummy/config/environments/development.rb
180
- - test/dummy/config/environments/production.rb
181
- - test/dummy/config/environments/test.rb
182
- - test/dummy/config/initializers/assets.rb
183
- - test/dummy/config/initializers/backtrace_silencers.rb
184
- - test/dummy/config/initializers/cookies_serializer.rb
185
- - test/dummy/config/initializers/filter_parameter_logging.rb
186
- - test/dummy/config/initializers/inflections.rb
187
- - test/dummy/config/initializers/mime_types.rb
188
- - test/dummy/config/initializers/session_store.rb
189
- - test/dummy/config/initializers/wrap_parameters.rb
190
- - test/dummy/config/locales/en.yml
191
- - test/dummy/config/routes.rb
192
- - test/dummy/config/secrets.yml
193
- - test/dummy/config.ru
194
- - test/dummy/log/test.log
195
- - test/dummy/public/404.html
196
- - test/dummy/public/422.html
197
- - test/dummy/public/500.html
198
- - test/dummy/public/favicon.ico
199
- - test/dummy/Rakefile
200
- - test/dummy/README.rdoc
201
- - test/fixtures/lato_core/superusers.yml
202
- - test/integration/navigation_test.rb
203
- - test/lato_core_test.rb
204
- - test/mailers/lato_core/lato_core_mailer_test.rb
205
- - test/mailers/previews/lato_core/lato_core_mailer_preview.rb
206
- - test/models/lato_core/superuser_test.rb
207
- - test/test_helper.rb
112
+ test_files: []
@@ -1,9 +0,0 @@
1
- require 'test_helper'
2
-
3
- module LatoCore
4
- class Api::V1::ApiControllerTest < ApplicationControllerTest
5
- # test "the truth" do
6
- # assert true
7
- # end
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- require 'test_helper'
2
-
3
- module LatoCore
4
- class ApplicationControllerTest < ActionController::TestCase
5
- # test "the truth" do
6
- # assert true
7
- # end
8
- end
9
- end
@@ -1,13 +0,0 @@
1
- require 'test_helper'
2
-
3
- module LatoCore
4
- class Back::AuthenticationControllerTest < ActionController::TestCase
5
- setup do
6
- @routes = Engine.routes
7
- end
8
-
9
- # test "the truth" do
10
- # assert true
11
- # end
12
- end
13
- end
@@ -1,9 +0,0 @@
1
- require 'test_helper'
2
-
3
- module LatoCore
4
- class Back::BackControllerTest < ApplicationControllerTest
5
- # test "the truth" do
6
- # assert true
7
- # end
8
- end
9
- end
@@ -1,13 +0,0 @@
1
- require 'test_helper'
2
-
3
- module LatoCore
4
- class Back::SessionControllerTest < ActionController::TestCase
5
- setup do
6
- @routes = Engine.routes
7
- end
8
-
9
- # test "the truth" do
10
- # assert true
11
- # end
12
- end
13
- end
@@ -1,13 +0,0 @@
1
- require 'test_helper'
2
-
3
- module LatoCore
4
- class Back::SuperusersControllerTest < ActionController::TestCase
5
- setup do
6
- @routes = Engine.routes
7
- end
8
-
9
- # test "the truth" do
10
- # assert true
11
- # end
12
- end
13
- end
@@ -1,28 +0,0 @@
1
- == README
2
-
3
- This README would normally document whatever steps are necessary to get the
4
- application up and running.
5
-
6
- Things you may want to cover:
7
-
8
- * Ruby version
9
-
10
- * System dependencies
11
-
12
- * Configuration
13
-
14
- * Database creation
15
-
16
- * Database initialization
17
-
18
- * How to run the test suite
19
-
20
- * Services (job queues, cache servers, search engines, etc.)
21
-
22
- * Deployment instructions
23
-
24
- * ...
25
-
26
-
27
- Please feel free to use a different markup language if you do not plan to run
28
- <tt>rake doc:app</tt>.
data/test/dummy/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
-
4
- require File.expand_path('../config/application', __FILE__)
5
-
6
- Rails.application.load_tasks
@@ -1,13 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
9
- //
10
- // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require_tree .
@@ -1,15 +0,0 @@
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 styles
10
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
- * file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
@@ -1,5 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- # Prevent CSRF attacks by raising an exception.
3
- # For APIs, you may want to use :null_session instead.
4
- protect_from_forgery with: :exception
5
- end
@@ -1,2 +0,0 @@
1
- module ApplicationHelper
2
- end
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Dummy</title>
5
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
- <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%= yield %>
12
-
13
- </body>
14
- </html>
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
- load Gem.bin_path('bundler', 'bundle')
data/test/dummy/bin/rails DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../../config/application', __FILE__)
3
- require_relative '../config/boot'
4
- require 'rails/commands'
data/test/dummy/bin/rake DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require_relative '../config/boot'
3
- require 'rake'
4
- Rake.application.run
data/test/dummy/bin/setup DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require 'pathname'
3
-
4
- # path to your application root.
5
- APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
-
7
- Dir.chdir APP_ROOT do
8
- # This script is a starting point to setup your application.
9
- # Add necessary setup steps to this file:
10
-
11
- puts "== Installing dependencies =="
12
- system "gem install bundler --conservative"
13
- system "bundle check || bundle install"
14
-
15
- # puts "\n== Copying sample files =="
16
- # unless File.exist?("config/database.yml")
17
- # system "cp config/database.yml.sample config/database.yml"
18
- # end
19
-
20
- puts "\n== Preparing database =="
21
- system "bin/rake db:setup"
22
-
23
- puts "\n== Removing old logs and tempfiles =="
24
- system "rm -f log/*"
25
- system "rm -rf tmp/cache"
26
-
27
- puts "\n== Restarting application server =="
28
- system "touch tmp/restart.txt"
29
- end
data/test/dummy/config.ru DELETED
@@ -1,4 +0,0 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require ::File.expand_path('../config/environment', __FILE__)
4
- run Rails.application
@@ -1,25 +0,0 @@
1
- require File.expand_path('../boot', __FILE__)
2
-
3
- require 'rails/all'
4
-
5
- Bundler.require(*Rails.groups)
6
- require "lato_core"
7
-
8
- module Dummy
9
- class Application < Rails::Application
10
- # Settings in config/environments/* take precedence over those specified here.
11
- # Application configuration should go into files in config/initializers
12
- # -- all .rb files in that directory are automatically loaded.
13
-
14
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
15
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
16
- # config.time_zone = 'Central Time (US & Canada)'
17
-
18
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
- # config.i18n.default_locale = :de
21
-
22
- # Do not swallow errors in after_commit/after_rollback callbacks.
23
- config.active_record.raise_in_transactional_callbacks = true
24
- end
25
- end
@@ -1,5 +0,0 @@
1
- # Set up gems listed in the Gemfile.
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
-
4
- require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
- $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -1,25 +0,0 @@
1
- # SQLite version 3.x
2
- # gem install sqlite3
3
- #
4
- # Ensure the SQLite 3 gem is defined in your Gemfile
5
- # gem 'sqlite3'
6
- #
7
- default: &default
8
- adapter: sqlite3
9
- pool: 5
10
- timeout: 5000
11
-
12
- development:
13
- <<: *default
14
- database: db/development.sqlite3
15
-
16
- # Warning: The database defined as "test" will be erased and
17
- # re-generated from your development database when you run "rake".
18
- # Do not set this db to the same as development or production.
19
- test:
20
- <<: *default
21
- database: db/test.sqlite3
22
-
23
- production:
24
- <<: *default
25
- database: db/production.sqlite3
@@ -1,5 +0,0 @@
1
- # Load the Rails application.
2
- require File.expand_path('../application', __FILE__)
3
-
4
- # Initialize the Rails application.
5
- Rails.application.initialize!