redmine_extensions 0.4.0.beta → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 186ecf1e1604893d9fda643e2b589dbada90b4319c0da5d7a5c2c0f3c53eb176
4
- data.tar.gz: f956c9668a5926ba5012902dfb2a1c88d2dd020f7ea06428310e3ef3963e9cff
3
+ metadata.gz: 26bbeb8c2b93c294bde61f90004dd11a480b4d62173766c1ddd9a4c85e178403
4
+ data.tar.gz: 32804e9510e066af05280773b2836f37ee2d695a42059829b01cb4c08a1cf422
5
5
  SHA512:
6
- metadata.gz: ac84a447270e5d19538c99c5fc6d4dcd95ac936de8645c179ebd497d27d09ff65f2def4d24ee5f1b80aa9ac4d78289feca73edfe1242ac94d4a136e03dd50804
7
- data.tar.gz: ca999dfd768ba7df0f23f45f5508136eeebd4b09fdef1a92383ec26d0c4d6e3d950252b420913e804eafde49498b00e55122773f490dfce1bb4b53a6de8ea7a4
6
+ metadata.gz: 1e59712ed94dbf732cc9814ce98c004ce7c02d52300c4c11200f333749eb061252fe9144f802a7899030ff6a14a2d1dcab778b7146a4f89257a4aa1b5f435a72
7
+ data.tar.gz: b0adc375f4fa3bb67be5d1bdc89a88f3fcd2877b79e8a929af917f898252fdfcefa37be273bd9c91bfaf746b74b19d4dc5322d3e06ca93f02daca24e439d312d
@@ -1,3 +1,5 @@
1
1
  window.EASY = window.EASY || {};
2
2
  window.EasyGem = window.EasyGem || {};
3
- window.EasyGem.test = window.EasyGem.test || {};
3
+ window.EasyGem.test = window.EasyGem.test || {};
4
+ window.EASY.asyncModules = window.EASY.asyncModules || {};
5
+ window.EASY.asyncModules.states = window.EASY.asyncModules.states || {};
@@ -123,6 +123,22 @@ module RedmineExtensions
123
123
  content_tag(:script, javascript_cdata_section(content), html_options)
124
124
  end
125
125
 
126
+ def require_javascript_tag(content_or_options_with_block = nil, html_options = {}, &block)
127
+ content =
128
+ if block_given?
129
+ html_options = content_or_options_with_block if content_or_options_with_block.is_a?(Hash)
130
+ capture(&block)
131
+ else
132
+ content_or_options_with_block
133
+ end
134
+ html_options.reverse_merge!(type: 'application/javascript')
135
+ html_options[:data] ||= { container: '' }
136
+ html_options[:data][:container].slice!("#module_inside_")
137
+ content = "EasyGem.schedule.require(function(){#{content}}, function(){ return EASY.asyncModules.states['#{html_options[:data][:container]}']});"
138
+
139
+ javascript_tag content.html_safe, html_options
140
+ end
141
+
126
142
  def get_jasmine_tags
127
143
  tags = params[:jasmine]
128
144
  return [] if tags == 'true'
@@ -21,7 +21,7 @@ module EasySettings
21
21
  Key
22
22
  end
23
23
 
24
- key_class.new(name, options)
24
+ key_class.new(name, **options)
25
25
  end
26
26
 
27
27
  def initialize(name, **options)
@@ -17,7 +17,7 @@ module EasySettings
17
17
  end
18
18
 
19
19
  EasySetting.mapper_clear_caches
20
- @all_keys[name] = EasySettings::Key.init(name, options)
20
+ @all_keys[name] = EasySettings::Key.init(name, **options)
21
21
  end
22
22
  alias_method :add_key, :key
23
23
 
@@ -1,3 +1,3 @@
1
1
  module RedmineExtensions
2
- VERSION = '0.4.0.beta'
2
+ VERSION = '0.4.0'
3
3
  end
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.4.0.beta
4
+ version: 0.4.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: 2021-01-14 00:00:00.000000000 Z
11
+ date: 2021-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -207,9 +207,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
207
207
  version: '2.5'
208
208
  required_rubygems_version: !ruby/object:Gem::Requirement
209
209
  requirements:
210
- - - ">"
210
+ - - ">="
211
211
  - !ruby/object:Gem::Version
212
- version: 1.3.1
212
+ version: '0'
213
213
  requirements: []
214
214
  rubygems_version: 3.0.8
215
215
  signing_key: