egov_utils 0.2.10 → 0.2.11
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 +4 -4
- data/app/controllers/egov_utils/redmine/issues_controller.rb +15 -0
- data/app/views/egov_utils/redmine/issues/index.html.haml +5 -0
- data/config/locales/cs.yml +1 -0
- data/config/routes.rb +3 -0
- data/lib/egov_utils/redmine/issue.rb +34 -0
- data/lib/egov_utils/settings.rb +3 -0
- data/lib/egov_utils/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2899be5e361f84f804ca797e2642f1c1a2dd2fafb77611b0ddc31de6196b576
|
4
|
+
data.tar.gz: 25af2ecd3c28f8e8891f499749c49d760fa8cdd227856cc7bccc494e7aa8fd50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/config/locales/cs.yml
CHANGED
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
|
data/lib/egov_utils/settings.rb
CHANGED
data/lib/egov_utils/version.rb
CHANGED
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.
|
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-
|
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.
|
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
|