redmine_extensions 0.6.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -32
  3. data/Rakefile +0 -8
  4. data/app/assets/javascripts/redmine_extensions/blocking.js +0 -3
  5. data/app/assets/javascripts/redmine_extensions/blocking_namespace.js +1 -2
  6. data/app/assets/javascripts/redmine_extensions/redmine_extensions.js +1 -33
  7. data/config/routes.rb +0 -7
  8. data/lib/redmine_extensions/easy_settings.rb +5 -5
  9. data/lib/redmine_extensions/engine.rb +12 -32
  10. data/lib/redmine_extensions/hooks.rb +6 -35
  11. data/lib/redmine_extensions/version.rb +1 -1
  12. data/lib/redmine_extensions.rb +5 -2
  13. data/spec/spec_helper.rb +10 -2
  14. metadata +3 -76
  15. data/app/assets/javascripts/redmine_extensions/blocking_render.js +0 -137
  16. data/app/assets/javascripts/redmine_extensions/blocking_schedule.js +0 -280
  17. data/app/assets/javascripts/redmine_extensions/event_bus.js +0 -61
  18. data/app/assets/stylesheets/redmine_extensions/application.css +0 -15
  19. data/lib/generators/redmine_extensions/entity/USAGE +0 -11
  20. data/lib/generators/redmine_extensions/entity/entity_generator.rb +0 -418
  21. data/lib/generators/redmine_extensions/entity/templates/_form.html.erb.erb +0 -51
  22. data/lib/generators/redmine_extensions/entity/templates/_list.html.erb.erb +0 -70
  23. data/lib/generators/redmine_extensions/entity/templates/_sidebar.html.erb.erb +0 -9
  24. data/lib/generators/redmine_extensions/entity/templates/app/models/%model_name_underscored%_query.rb.tt +0 -42
  25. data/lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_%model_name_underscored%.api.rsb.tt +0 -18
  26. data/lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_form.html.erb.tt +0 -62
  27. data/lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/edit.html.erb.tt +0 -8
  28. data/lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/new.html.erb.tt +0 -8
  29. data/lib/generators/redmine_extensions/entity/templates/context_menu.html.erb.erb +0 -20
  30. data/lib/generators/redmine_extensions/entity/templates/controller.rb.erb +0 -208
  31. data/lib/generators/redmine_extensions/entity/templates/custom_field.rb.erb +0 -11
  32. data/lib/generators/redmine_extensions/entity/templates/easy_query.rb.erb +0 -37
  33. data/lib/generators/redmine_extensions/entity/templates/edit.html.erb.erb +0 -19
  34. data/lib/generators/redmine_extensions/entity/templates/edit.js.erb.erb +0 -18
  35. data/lib/generators/redmine_extensions/entity/templates/en.yml.erb +0 -16
  36. data/lib/generators/redmine_extensions/entity/templates/entity_attribute_helper_patch.rb.erb +0 -10
  37. data/lib/generators/redmine_extensions/entity/templates/helper.rb.erb +0 -3
  38. data/lib/generators/redmine_extensions/entity/templates/hooks.rb.erb +0 -5
  39. data/lib/generators/redmine_extensions/entity/templates/index.api.rsb.erb +0 -3
  40. data/lib/generators/redmine_extensions/entity/templates/index.html.erb.erb +0 -30
  41. data/lib/generators/redmine_extensions/entity/templates/index.js.erb.erb +0 -12
  42. data/lib/generators/redmine_extensions/entity/templates/mail_added.html.erb.erb +0 -1
  43. data/lib/generators/redmine_extensions/entity/templates/mail_added.text.erb.erb +0 -2
  44. data/lib/generators/redmine_extensions/entity/templates/mail_updated.html.erb.erb +0 -1
  45. data/lib/generators/redmine_extensions/entity/templates/mail_updated.text.erb.erb +0 -2
  46. data/lib/generators/redmine_extensions/entity/templates/mailer.rb.erb +0 -41
  47. data/lib/generators/redmine_extensions/entity/templates/migration.rb.erb +0 -16
  48. data/lib/generators/redmine_extensions/entity/templates/model.rb.erb +0 -143
  49. data/lib/generators/redmine_extensions/entity/templates/new.html.erb.erb +0 -19
  50. data/lib/generators/redmine_extensions/entity/templates/new.js.erb.erb +0 -18
  51. data/lib/generators/redmine_extensions/entity/templates/query.rb.erb +0 -67
  52. data/lib/generators/redmine_extensions/entity/templates/routes.rb.erb +0 -15
  53. data/lib/generators/redmine_extensions/entity/templates/show.api.rsb.erb +0 -1
  54. data/lib/generators/redmine_extensions/entity/templates/show.html.erb.erb +0 -50
  55. data/lib/generators/redmine_extensions/entity/templates/show.js.erb.erb +0 -12
  56. data/lib/generators/redmine_extensions/entity/templates/spec/controllers/%model_name_underscored%_controller_spec.rb.tt +0 -94
  57. data/lib/generators/redmine_extensions/entity/templates/spec/factories.rb.erb +0 -11
  58. data/lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt +0 -19
  59. data/lib/generators/redmine_extensions/plugin/USAGE +0 -13
  60. data/lib/generators/redmine_extensions/plugin/plugin_generator.rb +0 -74
  61. data/lib/generators/redmine_extensions/plugin/templates/Gemfile.erb +0 -1
  62. data/lib/generators/redmine_extensions/plugin/templates/after_init.rb.erb +0 -23
  63. data/lib/generators/redmine_extensions/plugin/templates/en.yml.erb +0 -3
  64. data/lib/generators/redmine_extensions/plugin/templates/gitkeep.erb +0 -0
  65. data/lib/generators/redmine_extensions/plugin/templates/hooks.rb.erb +0 -5
  66. data/lib/generators/redmine_extensions/plugin/templates/init.rb.erb +0 -20
  67. data/lib/generators/redmine_extensions/plugin/templates/internals.rb.erb +0 -4
  68. data/lib/generators/redmine_extensions/plugin/templates/issue_patch.example.erb +0 -30
  69. data/lib/generators/redmine_extensions/plugin/templates/issues_controller_patch.example.erb +0 -30
  70. data/lib/generators/redmine_extensions/plugin/templates/issues_helper_patch.example.erb +0 -30
  71. data/lib/generators/redmine_extensions/plugin/templates/javascript.js +0 -1
  72. data/lib/generators/redmine_extensions/plugin/templates/routes.rb.erb +0 -0
  73. data/lib/generators/redmine_extensions/plugin/templates/stylesheet.css +0 -3
  74. data/lib/redmine_extensions/core_ext/date_range.rb +0 -152
  75. data/lib/redmine_extensions/core_ext/object.rb +0 -19
  76. data/lib/redmine_extensions/core_ext/string.rb +0 -5
  77. data/lib/redmine_extensions/core_ext.rb +0 -3
  78. data/lib/redmine_extensions/deprecator.rb +0 -11
  79. data/lib/redmine_extensions/migration.rb +0 -9
  80. data/lib/redmine_extensions/patch_manager.rb +0 -440
  81. data/lib/redmine_extensions/rails_patches/route_set_generator_patch.rb +0 -10
  82. data/lib/redmine_extensions/redmine_patches/controllers/application_controller_patch.rb +0 -65
  83. data/lib/redmine_extensions/redmine_patches/models/custom_field_patch.rb +0 -11
  84. data/lib/redmine_extensions/redmine_patches/models/project_patch.rb +0 -10
  85. data/lib/tasks/redmine_extensions_tasks.rake +0 -4
  86. data/spec/init_rails.rb +0 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 34d238a1cb1834e5e411e1d09c9d8899f697e33ab273de095515831a3bc0261e
4
- data.tar.gz: 27266391a47412629626f1b1c3e273324380b69dd0b8d7303f6800408665b4c5
3
+ metadata.gz: db2b763f3499a1153f144dc525f6b394c95ddeb198a8e014e581878f4eed9823
4
+ data.tar.gz: e2bc5958760257c6fd6284bd361e4855c7e00b01a4533af7726fbab4fe92a5b3
5
5
  SHA512:
6
- metadata.gz: 03a793ac13f928df39fcb333415173de7754df9f86e43fa0225134122f489d9669bec00a46be55f07f9842689caec190dff9a1456ad04d8e2a076c0334bc03c3
7
- data.tar.gz: bba5883ea1a29258eeee87ac2016e7880026a659ee3fa89b93bfc48ebb3da54e4ee6c370c759284abfcb0fe123b42c3559264a026a630f5c57c28ffdc789a226
6
+ metadata.gz: c135cc0580a2a2ce55e1a48a3372d668c48c182f7b3b70b7262442187e37cfb215dfb9c1c1cb54f19376fa8bb0111c5a2c7bb5942694aa2a2451562790fed97c
7
+ data.tar.gz: 7ee97bf3548bd702d38c928e5c6e89cb85fa9341ee64ab1c6937a910745de55819fba5f32c7a173205081ff6dc436021cd7479d0050107b7e6c33a48e7225463
data/README.md CHANGED
@@ -9,43 +9,24 @@
9
9
 
10
10
  ⚠️ This gem currently not working with Redmine at all.
11
11
 
12
- ---
13
- This gem provides an extended funcionality for a Redmine project
14
-
15
- ## Provided functionalities
16
- * EasySetting - per project settings
17
- * Redmine Plugin Generator
18
- * Redmine Entity Generator
19
-
20
- ## Redmine Plugin Generator
21
-
22
- Description:
23
- The plugin generator creates stubs for a new Redmine plugin.
24
- Plugin is prepared for use in Redmine and Easy Redmine as well.
25
- You can use --customer flag to generate a special plugin if you can make just a few changes to code. Backup this plugin before Redmine or Easy Redmine upgrade and move back for keep you changes.
12
+ ⚠ Only for v13
26
13
 
27
- Example:
28
- rails g redmine_extensions:plugin NameOfNewPlugin
29
- create plugins/name_of_new_plugin/app/controllers
30
- ...
14
+ ## Requirements
15
+ * Easy Redmine or Easy Project `v13`
16
+ * all requirements of Easy Redmine (ruby 3.1.2+ ...)
31
17
 
32
- Help:
33
- rails g redmine_extensions:plugin --help
34
-
35
-
36
- ## Redmine Entity Generator
18
+ ---
37
19
 
38
- Description:
39
- The entity generator creates new entity for Redmine plugin.
40
- New entity is prepared for use in Redmine and Easy Redmine as well.
20
+ This gem provides an extended functionality for a Easy Redmine project
41
21
 
42
- Example:
43
- rails g redmine_extensions:entity NameOfNewPlugin Post
44
- create plugins/name_of_new_plugin/app/controllers
45
- ...
22
+ ## Provided functionalities
23
+ * EasySetting - per project settings
24
+ * Easy Query outputs - define base for List and Tiles outputs
25
+ * jQuery AutoComplete with multiple values
26
+ * several helpers for views (see `redmine_extensions/app/helpers`)
46
27
 
47
- Help:
48
- rails g redmine_extensions:entity --help
28
+ ## Important
29
+ Development team plan remove this gem from Easy Redmine in future. All relevant functionalities will be moved to Easy Redmine core.
49
30
 
50
31
  ## Licence
51
32
  This is published under GPL-2 license.
data/Rakefile CHANGED
@@ -15,11 +15,3 @@ load 'rails/tasks/engine.rake'
15
15
  load 'rails/tasks/statistics.rake'
16
16
 
17
17
  Bundler::GemHelper.install_tasks
18
-
19
- namespace :redmine_extensions do
20
- task :generate_test_plugin do
21
- require_relative 'spec/init_rails'
22
- require RedmineExtensions::Engine.root.join('spec', 'support', 'plugin_generator').to_s
23
- PluginGenerator.generate_test_plugin!
24
- end
25
- end
@@ -2,10 +2,7 @@
2
2
  * code, that cannot be delayed after window.onload or deferred
3
3
  */
4
4
  //= require ./blocking_namespace
5
- // require ./event_bus
6
- //= require ./blocking_schedule
7
5
  //= require ./blocking_module
8
6
  //= require ./blocking_polyfill
9
- //= require ./blocking_render
10
7
  //= require ./blocking_utils
11
8
  //= require ./blocking_dynamic_loading
@@ -1,5 +1,4 @@
1
1
  window.EASY = window.EASY || {};
2
2
  window.EasyGem = window.EasyGem || {};
3
- window.EasyGem.test = window.EasyGem.test || {};
4
3
  window.EASY.asyncModules = window.EASY.asyncModules || {};
5
- window.EASY.asyncModules.states = window.EASY.asyncModules.states || {};
4
+ window.EASY.asyncModules.states = window.EASY.asyncModules.states || {};
@@ -1,35 +1,3 @@
1
- window.REDMINE_EXTENSIONS = {
2
-
3
- toggleDiv: function (el_or_id) {
4
- var el;
5
- if (typeof(el_or_id) === 'string') {
6
- el = $('#' + el_or_id);
7
- } else {
8
- el = el_or_id;
9
- }
10
-
11
- el.toggleClass('collapsed').slideToggle('fast');
12
- },
13
-
14
- toggleDivAndChangeOpen: function (toggleElementId, changeOpenElement) {
15
- REDMINE_EXTENSIONS.toggleDiv(toggleElementId);
16
- $(changeOpenElement).toggleClass('open');
17
- },
18
-
19
- toggleFilterButtons: function (elButtonsID, elFilter1ID, elFilter2ID) {
20
- var elButtons = $('#' + elButtonsID);
21
- var elFilter1 = $('#' + elFilter1ID);
22
- var elFilter2 = $('#' + elFilter2ID);
23
-
24
- if (elFilter1.hasClass('collapsed') && elFilter2.hasClass('collapsed')) {
25
- elButtons.slideUp('slow');
26
- } else {
27
- elButtons.slideDown('slow');
28
- }
29
- }
30
-
31
- };
32
-
33
1
  window.showFlashMessage = (function (type, message, delay) {
34
2
  var $content = $("#content");
35
3
  $content.find(".flash").remove();
@@ -209,7 +177,7 @@ EasyGem.schedule.require(function () {
209
177
  });
210
178
  }
211
179
 
212
- $("<button type='button'>&nbsp;</button>")
180
+ $("<button type='button'></button>")
213
181
  .attr("tabIndex", -1)
214
182
  .insertAfter(that.element)
215
183
  .button({
data/config/routes.rb CHANGED
@@ -1,11 +1,4 @@
1
- # Engine routes
2
- RedmineExtensions::Engine.routes.draw do
3
- resources :easy_settings, except: :destroy
4
- end
5
-
6
1
  # Redmine routes
7
2
  Rails.application.routes.draw do
8
- mount RedmineExtensions::Engine => '/redmine_extensions'
9
-
10
3
  resources :easy_settings, except: :destroy
11
4
  end
@@ -1,8 +1,8 @@
1
1
  module EasySettings
2
2
  end
3
3
 
4
- require_relative './easy_settings/key'
5
- require_relative './easy_settings/key_dsl'
6
- require_relative './easy_settings/mapper'
7
- require_relative './easy_settings/form_model'
8
- require_relative './easy_settings/params_wrapper'
4
+ require_relative 'easy_settings/key'
5
+ require_relative 'easy_settings/key_dsl'
6
+ require_relative 'easy_settings/mapper'
7
+ require_relative 'easy_settings/form_model'
8
+ require_relative 'easy_settings/params_wrapper'
@@ -1,19 +1,9 @@
1
1
  require 'active_support/dependencies'
2
- require_relative './patch_manager'
3
- require_relative './redmine_patches/controllers/application_controller_patch'
4
- require_relative './redmine_patches/models/project_patch'
5
- require_relative './redmine_patches/models/custom_field_patch'
6
2
 
7
- require_relative './query_output'
3
+ require_relative 'query_output'
8
4
 
9
5
  module RedmineExtensions
10
6
  class Engine < ::Rails::Engine
11
- config.generators do |g|
12
- g.test_framework :rspec, fixture: false
13
- g.fixture_replacement :factory_girl, dir: 'spec/factories'
14
- g.assets false
15
- g.helper false
16
- end
17
7
 
18
8
  config.autoload_paths << config.root.join('lib')
19
9
  config.eager_load_paths << config.root.join('app', 'models', 'easy_queries')
@@ -26,37 +16,30 @@ module RedmineExtensions
26
16
  end
27
17
 
28
18
  # config.to_prepare goes after Reloader.to_prepare
29
- RedmineExtensions::Reloader.to_prepare do
19
+ ActiveSupport::Reloader.to_prepare do
30
20
  RedmineExtensions::QueryOutput.register_output RedmineExtensions::QueryOutputs::ListOutput
31
21
  RedmineExtensions::QueryOutput.register_output RedmineExtensions::QueryOutputs::TilesOutput
32
- # RedmineExtensions::BasePresenter.register 'RedmineExtensions::EasyQueryPresenter', 'EasyQuery'
33
- # ApplicationController.send :include, RedmineExtensions::RailsPatches::ControllerQueryHelpers
34
22
  ApplicationController.include RedmineExtensions::RenderingHelper
35
23
  end
36
24
 
37
- initializer 'redmine_extensions.initialize' do |_app|
38
- ActionDispatch::Routing::RouteSet::Generator.prepend RedmineExtensions::RailsPatches::RouteSetGeneratorPatch
39
- end
40
-
41
25
  initializer 'redmine_extensions.append_migrations' do |app|
42
26
  unless app.root.to_s.match root.to_s
43
27
  config.paths['db/migrate'].expanded.each do |expanded_path|
44
28
  app.config.paths['db/migrate'] << expanded_path
45
29
  end
46
30
  end
47
- if true
48
- js_dir = app.root.join('public', 'javascripts', 'redmine_extensions')
49
- FileUtils.mkdir(js_dir) unless File.directory?(js_dir)
50
- Dir.glob(root.join('app', 'assets', 'javascripts', 'redmine_extensions', '*.js')) do |js_file|
51
- FileUtils.cp(js_file, app.root.join('public', 'javascripts', 'redmine_extensions'))
52
- rescue StandardError
53
- end
31
+ js_dir = app.root.join('public', 'javascripts', 'redmine_extensions')
32
+ FileUtils.mkdir_p(js_dir)
33
+ Dir.glob(root.join('app', 'assets', 'javascripts', 'redmine_extensions', '*.js')) do |js_file|
34
+ FileUtils.cp(js_file, app.root.join('public', 'javascripts', 'redmine_extensions'))
35
+ rescue StandardError
36
+ # ignore
54
37
  end
55
38
  end
56
39
 
57
40
  # include helpers
58
41
  initializer 'redmine_extensions.rails_patching', before: :load_config_initializers do |_app|
59
- ActiveSupport.on_load(Rails::VERSION::MAJOR >= 5 ? :action_controller_base : :action_controller) do
42
+ ActiveSupport.on_load(:action_controller_base) do
60
43
  helper RedmineExtensions::ApplicationHelper
61
44
  # helper RedmineExtensions::EasyQueryHelper
62
45
  end
@@ -68,12 +51,9 @@ module RedmineExtensions
68
51
  end
69
52
  end
70
53
 
71
- initializer 'redmine_extensions.initialize_easy_plugins', after: :load_config_initializers do
72
- require_relative './hooks'
73
-
74
- ActiveSupport.run_load_hooks(:easyproject, self) unless Redmine::Plugin.installed?(:easy_extensions)
75
-
76
- require_relative './easy_entity_formatters/easy_entity_formatter'
54
+ ActiveSupport::Reloader.to_prepare do
55
+ require_relative 'hooks'
56
+ require_relative 'easy_entity_formatters/easy_entity_formatter'
77
57
  end
78
58
 
79
59
  end
@@ -1,42 +1,13 @@
1
1
  module RedmineExtensions
2
2
  class Hooks < Redmine::Hook::ViewListener
3
3
 
4
- if defined?(EasyExtensions)
5
- if EasyExtensions.try(:deferred_js)
6
-
7
- ### DEFERRED JAVASCRIPTS ###
8
- def easy_extensions_blocking_javascripts_hook(context = {})
9
- context[:template].require_asset('redmine_extensions/blocking')
10
- end
11
-
12
- def easy_extensions_javascripts_hook(context = {})
13
- context[:template].require_asset('redmine_extensions/application')
14
- end
15
- else
16
- ### JAVASCRIPTS IN HEADER ###
17
- def easy_extensions_javascripts_hook(context = {})
18
- context[:template].require_asset('redmine_extensions/blocking')
19
- context[:template].require_asset('redmine_extensions/application')
20
- end
21
- end
22
- else
23
- ### JAVASCRIPTS IN REDMINE ###
24
- def view_layouts_base_html_head(context = {})
25
- ## BLOCKING ##
26
- javascript_include_tag('redmine_extensions/blocking_namespace') +
27
- javascript_include_tag('redmine_extensions/blocking_schedule') +
28
- javascript_include_tag('redmine_extensions/blocking_module') +
29
- javascript_include_tag('redmine_extensions/blocking_polyfill') +
30
- javascript_include_tag('redmine_extensions/blocking_render') +
31
- javascript_include_tag('redmine_extensions/blocking_utils') +
32
- javascript_include_tag('redmine_extensions/blocking_dynamic_loading') +
4
+ ### DEFERRED JAVASCRIPTS ###
5
+ def easy_extensions_blocking_javascripts_hook(context = {})
6
+ context[:template].require_asset('redmine_extensions/blocking')
7
+ end
33
8
 
34
- ## DEFERRED ##
35
- javascript_include_tag('redmine_extensions/easy_togglers') +
36
- javascript_include_tag('redmine_extensions/jquery.entityarray') +
37
- javascript_include_tag('redmine_extensions/render_polyfill') +
38
- javascript_include_tag('redmine_extensions/redmine_extensions')
39
- end
9
+ def easy_extensions_javascripts_hook(context = {})
10
+ context[:template].require_asset('redmine_extensions/application')
40
11
  end
41
12
 
42
13
  end
@@ -1,5 +1,5 @@
1
1
  module RedmineExtensions
2
2
 
3
- VERSION = '0.6.3'
3
+ VERSION = '1.1.0'
4
4
 
5
5
  end
@@ -1,2 +1,5 @@
1
- require_relative "./redmine_extensions/engine"
2
- require_relative './redmine_extensions/core_ext'
1
+ require_relative "redmine_extensions/engine"
2
+
3
+ module RedmineExtensions
4
+ # Your code goes here...
5
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,2 +1,10 @@
1
- require_relative 'init_rails'
2
- require Rails.root.join('plugins/easyproject/easy_plugins/easy_extensions/test/spec/spec_helper')
1
+ # require Rails.root.join('plugins/easyproject/easy_plugins/easy_extensions/test/spec/spec_helper')
2
+ require 'bundler'
3
+
4
+ spec = Bundler.load.specs.find { |s| s.name.to_s == 'ryspec' }
5
+
6
+ if !spec
7
+ abort('Gem ryspec was not found. Please add it and run bundle install again.')
8
+ end
9
+
10
+ require File.join(spec.full_gem_path, 'spec/spec_helper')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redmine_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Easy Software Ltd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-02 00:00:00.000000000 Z
11
+ date: 2023-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -41,15 +41,11 @@ files:
41
41
  - app/assets/javascripts/redmine_extensions/blocking_module.js
42
42
  - app/assets/javascripts/redmine_extensions/blocking_namespace.js
43
43
  - app/assets/javascripts/redmine_extensions/blocking_polyfill.js
44
- - app/assets/javascripts/redmine_extensions/blocking_render.js
45
- - app/assets/javascripts/redmine_extensions/blocking_schedule.js
46
44
  - app/assets/javascripts/redmine_extensions/blocking_utils.js
47
45
  - app/assets/javascripts/redmine_extensions/easy_togglers.js
48
- - app/assets/javascripts/redmine_extensions/event_bus.js
49
46
  - app/assets/javascripts/redmine_extensions/jquery.entityarray.js
50
47
  - app/assets/javascripts/redmine_extensions/redmine_extensions.js
51
48
  - app/assets/javascripts/redmine_extensions/render_polyfill.js
52
- - app/assets/stylesheets/redmine_extensions/application.css
53
49
  - app/controllers/easy_settings_controller.rb
54
50
  - app/helpers/redmine_extensions/application_helper.rb
55
51
  - app/helpers/redmine_extensions/rendering_helper.rb
@@ -79,67 +75,7 @@ files:
79
75
  - db/migrate/20150705172511_create_easy_settings.rb
80
76
  - db/migrate/20160519161300_create_entity_assignments.rb
81
77
  - db/migrate/20190206121100_remove_foreign_key_from_easy_settings.rb
82
- - lib/generators/redmine_extensions/entity/USAGE
83
- - lib/generators/redmine_extensions/entity/entity_generator.rb
84
- - lib/generators/redmine_extensions/entity/templates/_form.html.erb.erb
85
- - lib/generators/redmine_extensions/entity/templates/_list.html.erb.erb
86
- - lib/generators/redmine_extensions/entity/templates/_sidebar.html.erb.erb
87
- - lib/generators/redmine_extensions/entity/templates/app/models/%model_name_underscored%_query.rb.tt
88
- - lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_%model_name_underscored%.api.rsb.tt
89
- - lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_form.html.erb.tt
90
- - lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/edit.html.erb.tt
91
- - lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/new.html.erb.tt
92
- - lib/generators/redmine_extensions/entity/templates/context_menu.html.erb.erb
93
- - lib/generators/redmine_extensions/entity/templates/controller.rb.erb
94
- - lib/generators/redmine_extensions/entity/templates/custom_field.rb.erb
95
- - lib/generators/redmine_extensions/entity/templates/easy_query.rb.erb
96
- - lib/generators/redmine_extensions/entity/templates/edit.html.erb.erb
97
- - lib/generators/redmine_extensions/entity/templates/edit.js.erb.erb
98
- - lib/generators/redmine_extensions/entity/templates/en.yml.erb
99
- - lib/generators/redmine_extensions/entity/templates/entity_attribute_helper_patch.rb.erb
100
- - lib/generators/redmine_extensions/entity/templates/helper.rb.erb
101
- - lib/generators/redmine_extensions/entity/templates/hooks.rb.erb
102
- - lib/generators/redmine_extensions/entity/templates/index.api.rsb.erb
103
- - lib/generators/redmine_extensions/entity/templates/index.html.erb.erb
104
- - lib/generators/redmine_extensions/entity/templates/index.js.erb.erb
105
- - lib/generators/redmine_extensions/entity/templates/mail_added.html.erb.erb
106
- - lib/generators/redmine_extensions/entity/templates/mail_added.text.erb.erb
107
- - lib/generators/redmine_extensions/entity/templates/mail_updated.html.erb.erb
108
- - lib/generators/redmine_extensions/entity/templates/mail_updated.text.erb.erb
109
- - lib/generators/redmine_extensions/entity/templates/mailer.rb.erb
110
- - lib/generators/redmine_extensions/entity/templates/migration.rb.erb
111
- - lib/generators/redmine_extensions/entity/templates/model.rb.erb
112
- - lib/generators/redmine_extensions/entity/templates/new.html.erb.erb
113
- - lib/generators/redmine_extensions/entity/templates/new.js.erb.erb
114
- - lib/generators/redmine_extensions/entity/templates/query.rb.erb
115
- - lib/generators/redmine_extensions/entity/templates/routes.rb.erb
116
- - lib/generators/redmine_extensions/entity/templates/show.api.rsb.erb
117
- - lib/generators/redmine_extensions/entity/templates/show.html.erb.erb
118
- - lib/generators/redmine_extensions/entity/templates/show.js.erb.erb
119
- - lib/generators/redmine_extensions/entity/templates/spec/controllers/%model_name_underscored%_controller_spec.rb.tt
120
- - lib/generators/redmine_extensions/entity/templates/spec/factories.rb.erb
121
- - lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
122
- - lib/generators/redmine_extensions/plugin/USAGE
123
- - lib/generators/redmine_extensions/plugin/plugin_generator.rb
124
- - lib/generators/redmine_extensions/plugin/templates/Gemfile.erb
125
- - lib/generators/redmine_extensions/plugin/templates/after_init.rb.erb
126
- - lib/generators/redmine_extensions/plugin/templates/en.yml.erb
127
- - lib/generators/redmine_extensions/plugin/templates/gitkeep.erb
128
- - lib/generators/redmine_extensions/plugin/templates/hooks.rb.erb
129
- - lib/generators/redmine_extensions/plugin/templates/init.rb.erb
130
- - lib/generators/redmine_extensions/plugin/templates/internals.rb.erb
131
- - lib/generators/redmine_extensions/plugin/templates/issue_patch.example.erb
132
- - lib/generators/redmine_extensions/plugin/templates/issues_controller_patch.example.erb
133
- - lib/generators/redmine_extensions/plugin/templates/issues_helper_patch.example.erb
134
- - lib/generators/redmine_extensions/plugin/templates/javascript.js
135
- - lib/generators/redmine_extensions/plugin/templates/routes.rb.erb
136
- - lib/generators/redmine_extensions/plugin/templates/stylesheet.css
137
78
  - lib/redmine_extensions.rb
138
- - lib/redmine_extensions/core_ext.rb
139
- - lib/redmine_extensions/core_ext/date_range.rb
140
- - lib/redmine_extensions/core_ext/object.rb
141
- - lib/redmine_extensions/core_ext/string.rb
142
- - lib/redmine_extensions/deprecator.rb
143
79
  - lib/redmine_extensions/easy_entity_formatters/easy_entity_formatter.rb
144
80
  - lib/redmine_extensions/easy_form_builder.rb
145
81
  - lib/redmine_extensions/easy_query_helpers/outputs.rb
@@ -152,22 +88,14 @@ files:
152
88
  - lib/redmine_extensions/engine.rb
153
89
  - lib/redmine_extensions/export/easy_other_formats_builder.rb
154
90
  - lib/redmine_extensions/hooks.rb
155
- - lib/redmine_extensions/migration.rb
156
- - lib/redmine_extensions/patch_manager.rb
157
91
  - lib/redmine_extensions/query_output.rb
158
92
  - lib/redmine_extensions/query_outputs/list_output.rb
159
93
  - lib/redmine_extensions/query_outputs/tiles_output.rb
160
94
  - lib/redmine_extensions/rails_patches/active_record.rb
161
95
  - lib/redmine_extensions/rails_patches/form_builder_patch.rb
162
- - lib/redmine_extensions/rails_patches/route_set_generator_patch.rb
163
- - lib/redmine_extensions/redmine_patches/controllers/application_controller_patch.rb
164
- - lib/redmine_extensions/redmine_patches/models/custom_field_patch.rb
165
- - lib/redmine_extensions/redmine_patches/models/project_patch.rb
166
96
  - lib/redmine_extensions/tags/autocomplete_field.rb
167
97
  - lib/redmine_extensions/version.rb
168
- - lib/tasks/redmine_extensions_tasks.rake
169
98
  - spec/factories/easy_settings.rb
170
- - spec/init_rails.rb
171
99
  - spec/models/easy_setting_spec.rb
172
100
  - spec/presenters/easy_settings/params_wrapper_spec.rb
173
101
  - spec/spec_helper.rb
@@ -183,7 +111,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
183
111
  requirements:
184
112
  - - ">="
185
113
  - !ruby/object:Gem::Version
186
- version: '2.7'
114
+ version: '3.1'
187
115
  required_rubygems_version: !ruby/object:Gem::Requirement
188
116
  requirements:
189
117
  - - ">="
@@ -197,7 +125,6 @@ summary: Redmine Extensions is set of useful features for Redmine. Main focus is
197
125
  development helpers, but many users can find it helpfull
198
126
  test_files:
199
127
  - spec/factories/easy_settings.rb
200
- - spec/init_rails.rb
201
128
  - spec/models/easy_setting_spec.rb
202
129
  - spec/presenters/easy_settings/params_wrapper_spec.rb
203
130
  - spec/spec_helper.rb
@@ -1,137 +0,0 @@
1
- (function () {
2
- /**
3
- * @callback RenderFunction
4
- */
5
- // noinspection JSMismatchedCollectionQueryUpdate
6
- /**
7
- * @type {Array.<{body:RenderFunction,ctx:Object}>}
8
- */
9
- var readQueue = [];
10
- // noinspection JSMismatchedCollectionQueryUpdate
11
- /**
12
- * @type {Array.<{body:RenderFunction,ctx:Object,value:*}>}
13
- */
14
- var renderQueue = [];
15
- var renderPhase = false;
16
- var lastTime = 0.0;
17
- /**
18
- * Wrapper for safe execution of [body] function only in read phase to prevent force-redraws.
19
- * @example
20
- * // fill storage with values from DOM
21
- * var storage = {};
22
- * EasyGem.read(function(){
23
- * this.offset = $element.offset();
24
- * this.scrollTop = $(window).scrollTop();
25
- * }, storage);
26
- * @param {RenderFunction} body
27
- * @param {Object} [context]
28
- */
29
- EasyGem.read = function (body, context) {
30
- if (renderPhase) {
31
- readQueue.push({body: body, ctx: context});
32
- } else {
33
- body.call(context);
34
- }
35
- };
36
- /**
37
- * Wrapper for safe execution of [body] function only in render phase to prevent force-redraws.
38
- * @example
39
- * var left = $element.css("left");
40
- * EasyGem.render(function(){
41
- * $element.css({left: (left + 5) + "px"});
42
- * });
43
- * @param {RenderFunction} body - obtain execution time as first parameter
44
- * @param {Object} [context]
45
- */
46
- EasyGem.render = function (body, context) {
47
- if (renderPhase) {
48
- body.call(context, lastTime);
49
- } else {
50
- renderQueue.push({body: body, ctx: context});
51
- }
52
- };
53
- /**
54
- * Complex and most-safe wrapper for DOM-manipulation code
55
- * Execute [read] and [render] function only in proper phases.
56
- * @example
57
- * // prevents layout thrashing
58
- * $table.find("td.first_column").each(function() {
59
- * EasyGem.readAndRender(function() {
60
- * return this.width();
61
- * }, function(width, time) {
62
- * this.next().width(width);
63
- * }, $(this));
64
- * });
65
- * @param {RenderFunction} read
66
- * @param {RenderFunction} render - function(readResult, time) callback
67
- * @param {Object} [context]
68
- */
69
- EasyGem.readAndRender = function (read, render, context) {
70
- if (renderPhase) {
71
- readQueue.push({
72
- body: function () {
73
- var value = read.call(context);
74
- renderQueue.push({body: render, ctx: context, value: value});
75
- }, ctx: context
76
- });
77
- } else {
78
- var value = read.call(context);
79
- renderQueue.push({body: render, ctx: context, value: value});
80
- }
81
- };
82
- EasyGem.schedule.main(function () {
83
- var loop = function (time) {
84
- renderPhase = true;
85
- lastTime=time;
86
-
87
- setTimeout(function () {
88
- renderPhase = false;
89
- if (readQueue.length) {
90
- var queue = readQueue;
91
- readQueue = [];
92
- for (i = 0; i < queue.length; i++) {
93
- var pack = queue[i];
94
- pack.body.call(pack.ctx);
95
- }
96
- }
97
- }, 0);
98
- if (renderQueue.length) {
99
- var queue = renderQueue;
100
- renderQueue = [];
101
- for (var i = 0; i < queue.length; i++) {
102
- var pack = queue[i];
103
- pack.body.call(pack.ctx, pack.value, time);
104
- }
105
- renderQueue = [];
106
- }
107
- requestAnimationFrame(loop);
108
- };
109
- requestAnimationFrame(loop);
110
- });
111
- EasyGem.test.render = {
112
- getPhase: function () {
113
- return renderPhase ? "render" : "read";
114
- }
115
- // ,
116
- // test1: function () {
117
- // console.log("Phase "+this.getPhase());
118
- // EasyGem.render(function (time) {
119
- // console.assert(this.getPhase() === "render", "Phase should be render, not ", this.getPhase());
120
- // console.assert(typeof time === "number", "Time ", time, " should be number, not ", typeof time);
121
- // console.log("render done");
122
- // }, this);
123
- // EasyGem.read(function () {
124
- // console.assert(this.getPhase() === "read", "Phase should be read, not ", this.getPhase());
125
- // console.log("read done");
126
- // }, this);
127
- // EasyGem.readAndRender(function () {
128
- // console.assert(this.getPhase() === "read", "Phase should be read, not ", this.getPhase());
129
- // return 562;
130
- // }, function (time, value) {
131
- // console.assert(this.getPhase() === "render", "Phase should be render, not ", this.getPhase());
132
- // console.assert(value === 562, "Value should be 562, not ", value);
133
- // console.log("readAndRender done");
134
- // }, this)
135
- // }
136
- };
137
- })();