redmine_extensions 0.1.21 → 0.1.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/redmine_extensions/entity/templates/controller.rb.erb +1 -1
- data/lib/generators/redmine_extensions/entity/templates/controller_spec.rb.erb +3 -3
- data/lib/generators/redmine_extensions/entity/templates/custom_field.rb.erb +7 -7
- data/lib/generators/redmine_extensions/entity/templates/index.api.rsb.erb +5 -5
- data/lib/generators/redmine_extensions/entity/templates/mail_added.html.erb.erb +1 -1
- data/lib/generators/redmine_extensions/entity/templates/mail_added.text.erb.erb +2 -2
- data/lib/generators/redmine_extensions/entity/templates/mail_updated.text.erb.erb +2 -2
- data/lib/generators/redmine_extensions/entity/templates/routes.rb.erb +12 -12
- data/lib/generators/redmine_extensions/plugin/templates/init.rb.erb +3 -4
- data/lib/redmine_extensions/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99c597f9913c0ffc04ec325076ab8ad35091cd3c
|
4
|
+
data.tar.gz: 452764ffbb2580c21cf3fa2b53825f251fd75d64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 208649b38c1944d902bd2385734c1cfbf06270b16827d615ea4832ffaefa552d6c7e05c0e0db396fb3fc6d016be873961fd407a2c62ad8e35021beb14a72f567
|
7
|
+
data.tar.gz: 6ae91032ab6d6edbd54c351cccc6e2db3f0fda795beb63dc58741c0f45a4d4ab01779d2d2de6a5d54726efd005f26deb123b92fa8bbbe2f50dcdcb0480b584b6
|
@@ -147,7 +147,7 @@ class <%= controller_class %>Controller < ApplicationController
|
|
147
147
|
|
148
148
|
def context_menu
|
149
149
|
if @<%= model_name_pluralize_underscored %>.size == 1
|
150
|
-
|
150
|
+
@<%= model_name_underscored %> = @<%= model_name_pluralize_underscored %>.first
|
151
151
|
end
|
152
152
|
|
153
153
|
can_edit = @<%= model_name_pluralize_underscored %>.detect{|c| !c.editable?}.nil?
|
@@ -21,7 +21,7 @@ describe <%= controller_class %>Controller, logged: true do
|
|
21
21
|
end
|
22
22
|
|
23
23
|
it 'show' do
|
24
|
-
get :
|
24
|
+
get :show, {id: <%= model_name_underscored %>}
|
25
25
|
expect(response).to have_http_status(:success)
|
26
26
|
expect(response).to render_template('<%= model_name_pluralize_underscored %>/show')
|
27
27
|
end
|
@@ -53,14 +53,14 @@ describe <%= controller_class %>Controller, logged: true do
|
|
53
53
|
end
|
54
54
|
|
55
55
|
it 'update with invalid' do
|
56
|
-
put :update, {<%= model_name_underscored %>: {
|
56
|
+
put :update, {id: <%= model_name_underscored %>, <%= model_name_underscored %>: {<%= safe_columns.first %>: ''}}
|
57
57
|
expect(response).to have_http_status(:success)
|
58
58
|
expect(assigns[:<%= model_name_underscored %>].valid?).to be false
|
59
59
|
expect(response).to render_template('<%= model_name_pluralize_underscored %>/edit')
|
60
60
|
end
|
61
61
|
|
62
62
|
it 'update with valid' do
|
63
|
-
put :update, {<%= model_name_underscored %>: {
|
63
|
+
put :update, {id: <%= model_name_underscored %>, <%= model_name_underscored %>: {<%= safe_columns.first %>: 'Tralalala'}}
|
64
64
|
expect(response).to have_http_status(:success)
|
65
65
|
expect(assigns[:<%= model_name_underscored %>].valid?).to be true
|
66
66
|
expect(response).to redirect_to(<%= model_name_underscored %>_path(assigns[:<%= model_name_underscored %>]))
|
@@ -1,7 +1,7 @@
|
|
1
|
-
class <%= model_name %>CustomField < CustomField
|
2
|
-
|
3
|
-
def type_name
|
4
|
-
:label_<%= @model_name_pluralize_underscored %>
|
5
|
-
end
|
6
|
-
|
7
|
-
end
|
1
|
+
class <%= model_name %>CustomField < CustomField
|
2
|
+
|
3
|
+
def type_name
|
4
|
+
:label_<%= @model_name_pluralize_underscored %>
|
5
|
+
end
|
6
|
+
|
7
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
api.array :<%= model_name_pluralize_underscored %>, api_meta(total_count: @entity_count, offset: @offset, limit: @limit) do
|
2
|
-
@entities.each do |<%= model_name_underscored %>|
|
3
|
-
render_api_<%= model_name_underscored %>(api, <%= model_name_underscored %>)
|
4
|
-
end
|
5
|
-
end
|
1
|
+
api.array :<%= model_name_pluralize_underscored %>, api_meta(total_count: @entity_count, offset: @offset, limit: @limit) do
|
2
|
+
@entities.each do |<%= model_name_underscored %>|
|
3
|
+
render_api_<%= model_name_underscored %>(api, <%= model_name_underscored %>)
|
4
|
+
end
|
5
|
+
end
|
@@ -1 +1 @@
|
|
1
|
-
<h1><%%= link_to(@<%= model_name_underscored %>.to_s, @<%= model_name_underscored %>_url) %></h1>
|
1
|
+
<h1><%%= link_to(@<%= model_name_underscored %>.to_s, @<%= model_name_underscored %>_url) %></h1>
|
@@ -1,2 +1,2 @@
|
|
1
|
-
<%%= @<%= model_name_underscored %>.to_s %>
|
2
|
-
<%%= @<%= model_name_underscored %>_url %>
|
1
|
+
<%%= @<%= model_name_underscored %>.to_s %>
|
2
|
+
<%%= @<%= model_name_underscored %>_url %>
|
@@ -1,2 +1,2 @@
|
|
1
|
-
<%%= @<%= model_name_underscored %>.to_s %>
|
2
|
-
<%%= @<%= model_name_underscored %>_url %>
|
1
|
+
<%%= @<%= model_name_underscored %>.to_s %>
|
2
|
+
<%%= @<%= model_name_underscored %>_url %>
|
@@ -1,13 +1,13 @@
|
|
1
|
-
<% if project? %>
|
2
|
-
resources :projects do
|
3
|
-
resources :<%= model_name_pluralize_underscored %>
|
4
|
-
end
|
5
|
-
<% end %>
|
6
|
-
resources :<%= model_name_pluralize_underscored %> do
|
7
|
-
collection do
|
8
|
-
get 'autocomplete'
|
9
|
-
get 'bulk_edit'
|
10
|
-
post 'bulk_update'
|
11
|
-
get 'context_menu'
|
12
|
-
end
|
1
|
+
<% if project? %>
|
2
|
+
resources :projects do
|
3
|
+
resources :<%= model_name_pluralize_underscored %>
|
4
|
+
end
|
5
|
+
<% end %>
|
6
|
+
resources :<%= model_name_pluralize_underscored %> do
|
7
|
+
collection do
|
8
|
+
get 'autocomplete'
|
9
|
+
get 'bulk_edit'
|
10
|
+
post 'bulk_update'
|
11
|
+
get 'context_menu'
|
12
|
+
end
|
13
13
|
end
|
@@ -9,8 +9,7 @@ Redmine::Plugin.register :<%= plugin_name_underscored %> do
|
|
9
9
|
settings easy_settings: { }
|
10
10
|
end
|
11
11
|
|
12
|
-
|
13
|
-
easy_extensions = Redmine::Plugin.registered_plugins[:easy_extensions]
|
14
|
-
if easy_extensions.nil? || Gem::Version.new(easy_extensions.version) < Gem::Version.new('2016.03.00')
|
12
|
+
unless Redmine::Plugin.registered_plugins[:easy_extensions]
|
15
13
|
require_relative 'after_init'
|
16
|
-
end
|
14
|
+
end
|
15
|
+
|
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.1.
|
4
|
+
version: 0.1.23
|
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: 2017-04-
|
11
|
+
date: 2017-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -270,7 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
270
270
|
version: '0'
|
271
271
|
requirements: []
|
272
272
|
rubyforge_project:
|
273
|
-
rubygems_version: 2.
|
273
|
+
rubygems_version: 2.6.7
|
274
274
|
signing_key:
|
275
275
|
specification_version: 4
|
276
276
|
summary: Redmine Extensions is set of usefull features for Redmine. Main focus is
|