egov_utils 0.2.10 → 0.2.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 58ff751d46cc886c5f297b1f76a80224491a7a3f69c4a113482b58a8d2d430c4
4
- data.tar.gz: 567655c43e2ffd665f577fca56032f87ba55cc957cbc5ce5f39145d5ad0c58df
3
+ metadata.gz: f2899be5e361f84f804ca797e2642f1c1a2dd2fafb77611b0ddc31de6196b576
4
+ data.tar.gz: 25af2ecd3c28f8e8891f499749c49d760fa8cdd227856cc7bccc494e7aa8fd50
5
5
  SHA512:
6
- metadata.gz: 7d24c4f7ae5188724b82eacdb57bf1d4a6875630acca3f994e1065022ed4b07e2d808c259dab576c1afb98cadb884839f7e8aef950e3d190b3643885dbd38645
7
- data.tar.gz: b392d25023229cfbc3b56dd432b66a8dfe56a725f1ee99210aa8fa8e6b69733f8a006752466c2afa3be018e57a893ce1303852749d2a7decbeb137e42954c37b
6
+ metadata.gz: f0b3c160f69bec1b24c52b901bb6cbe72ab3bf6e8d8f9776d9c27c2df5133a4be6b7305e6254a199e82c471ed1f9bd5359decf8790b18fc848f9ebff81c5d688
7
+ data.tar.gz: 00f4ce960b807c0ad20a4300bf56cddcfeafde992ae599918e51729ae5033185714205d0f46ad093054b83ca9f7fafe4c1ca34709b738bbd63ff7e3869c294cd
@@ -0,0 +1,15 @@
1
+ module EgovUtils
2
+ module Redmine
3
+ class IssuesController < ApplicationController
4
+
5
+ def index
6
+ require_dependency 'egov_utils/redmine/issue'
7
+ @issues = EgovUtils::Redmine::Issue.all
8
+ respond_to do |format|
9
+ format.html
10
+ end
11
+ end
12
+
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,5 @@
1
+ - @issues.group_by{|i| i.tracker}.each do |tracker, issues|
2
+ %h4= tracker.name + '('+t('label_done')+')'
3
+ %ul
4
+ - issues.each do |issue|
5
+ %li= issue.subject
@@ -52,6 +52,7 @@ cs:
52
52
  label_delete: Smazat
53
53
  label_ok: OK
54
54
  label_actions: Akce
55
+ label_done: hotovo
55
56
  label_add_group_member: Přidat uživatele
56
57
 
57
58
  text_born_on_at: "Narozen %{date} v %{place}"
data/config/routes.rb CHANGED
@@ -29,5 +29,8 @@ EgovUtils::Engine.routes.draw do
29
29
  get '/address/validate_ruian' => 'addresses#validate_ruian', as: :validate_ruian
30
30
  get '/organizations/district_courts' => 'organizations#district_courts', as: :district_courts_organizations
31
31
 
32
+ namespace :redmine do
33
+ resources :issues, only: :index
34
+ end
32
35
 
33
36
  end
@@ -0,0 +1,34 @@
1
+ require 'active_resource'
2
+
3
+ module EgovUtils
4
+ module Redmine
5
+
6
+ def self.config
7
+ EgovUtils::Settings.redmine
8
+ end
9
+
10
+ def self.configured?
11
+ config['url'] && config['project_id']
12
+ end
13
+
14
+ class Issue < ActiveResource::Base
15
+ self.site = EgovUtils::Redmine.config['url']
16
+ self.ssl_options = {verify_mode: OpenSSL::SSL::VERIFY_NONE}
17
+
18
+ headers["X-Redmine-API-Key"] = EgovUtils::Redmine.config['api_key'] if EgovUtils::Redmine.config['api_key']
19
+
20
+ def self.collection_path(prefix_options = {},query_options=nil)
21
+ super
22
+ query_options[:query_id] ||= EgovUtils::Redmine.config['query_id'] if EgovUtils::Redmine.config['query_id']
23
+ prefix_options[:project_id] ||= EgovUtils::Redmine.config['project_id']
24
+ "/projects/#{prefix_options[:project_id]}/#{collection_name}.#{format.extension}#{query_string(query_options)}"
25
+ end
26
+
27
+ def self.instantiate_collection(collection, original_params = {}, prefix_options = {})
28
+ collection = collection[collection_name] if collection[collection_name].is_a?(Array)
29
+ super(collection, original_params, prefix_options)
30
+ end
31
+ end
32
+
33
+ end
34
+ end
@@ -19,4 +19,7 @@ module EgovUtils
19
19
 
20
20
  Settings['allow_register'] ||= false
21
21
 
22
+ Settings['redmine'] ||= Settingslogic.new({})
23
+ Settings['redmine']['enabled'] ||= false
24
+
22
25
  end
@@ -1,3 +1,3 @@
1
1
  module EgovUtils
2
- VERSION = '0.2.10'
2
+ VERSION = '0.2.11'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: egov_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ondřej Ezr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-16 00:00:00.000000000 Z
11
+ date: 2018-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -395,6 +395,7 @@ files:
395
395
  - app/controllers/egov_utils/organizations_controller.rb
396
396
  - app/controllers/egov_utils/passwords_controller.rb
397
397
  - app/controllers/egov_utils/people_controller.rb
398
+ - app/controllers/egov_utils/redmine/issues_controller.rb
398
399
  - app/controllers/egov_utils/roles_controller.rb
399
400
  - app/controllers/egov_utils/sessions_controller.rb
400
401
  - app/controllers/egov_utils/users_controller.rb
@@ -438,6 +439,7 @@ files:
438
439
  - app/views/egov_utils/passwords/edit.html.haml
439
440
  - app/views/egov_utils/passwords/new.html.haml
440
441
  - app/views/egov_utils/people/_form.html.haml
442
+ - app/views/egov_utils/redmine/issues/index.html.haml
441
443
  - app/views/egov_utils/roles/index.html.haml
442
444
  - app/views/egov_utils/sessions/new.html.haml
443
445
  - app/views/egov_utils/user_mailer/account_information.html.erb
@@ -489,6 +491,7 @@ files:
489
491
  - lib/egov_utils/helpers/form_helper.rb
490
492
  - lib/egov_utils/helpers/tags/datetime_field_patch.rb
491
493
  - lib/egov_utils/helpers/tags/fileuid_field.rb
494
+ - lib/egov_utils/redmine/issue.rb
492
495
  - lib/egov_utils/routes/admin_constraint.rb
493
496
  - lib/egov_utils/settings.rb
494
497
  - lib/egov_utils/test_utils/controller_helpers.rb
@@ -620,7 +623,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
620
623
  version: '0'
621
624
  requirements: []
622
625
  rubyforge_project:
623
- rubygems_version: 2.7.5
626
+ rubygems_version: 2.7.6
624
627
  signing_key:
625
628
  specification_version: 4
626
629
  summary: The eGoverment utilities is set of functionalities to support basic eGoverment