redmine_api_helper 0.1.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of redmine_api_helper might be problematic. Click here for more details.

Files changed (36) hide show
  1. checksums.yaml +7 -0
  2. data/.gitattributes +2 -0
  3. data/.gitignore +9 -0
  4. data/CODE_OF_CONDUCT.md +74 -0
  5. data/Gemfile +6 -0
  6. data/LICENSE +339 -0
  7. data/README.md +30 -0
  8. data/Rakefile +2 -0
  9. data/bin/console +14 -0
  10. data/bin/setup +8 -0
  11. data/lib/redmine_api_helper.rb +44 -0
  12. data/lib/redmine_api_helper/api_helper.rb +310 -0
  13. data/lib/redmine_api_helper/args_helper.rb +96 -0
  14. data/lib/redmine_api_helper/attachments_api_helper.rb +52 -0
  15. data/lib/redmine_api_helper/define_api_helpers.rb +78 -0
  16. data/lib/redmine_api_helper/document_categories_api_helper.rb +38 -0
  17. data/lib/redmine_api_helper/groups_api_helper.rb +80 -0
  18. data/lib/redmine_api_helper/helpers.rb +48 -0
  19. data/lib/redmine_api_helper/issue_priorities_api_helper.rb +38 -0
  20. data/lib/redmine_api_helper/issue_relations_api_helper.rb +66 -0
  21. data/lib/redmine_api_helper/issue_statuses_api_helper.rb +36 -0
  22. data/lib/redmine_api_helper/issues_api_helper.rb +124 -0
  23. data/lib/redmine_api_helper/my_account_api_helper.rb +45 -0
  24. data/lib/redmine_api_helper/news_api_helper.rb +73 -0
  25. data/lib/redmine_api_helper/project_memberships_api_helper.rb +77 -0
  26. data/lib/redmine_api_helper/projects_api_helper.rb +73 -0
  27. data/lib/redmine_api_helper/roles_api_helper.rb +52 -0
  28. data/lib/redmine_api_helper/search_api_helper.rb +38 -0
  29. data/lib/redmine_api_helper/time_entries_api_helper.rb +73 -0
  30. data/lib/redmine_api_helper/time_entry_activities_api_helper.rb +38 -0
  31. data/lib/redmine_api_helper/trackers_api_helper.rb +38 -0
  32. data/lib/redmine_api_helper/users_api_helper.rb +73 -0
  33. data/lib/redmine_api_helper/version.rb +24 -0
  34. data/lib/redmine_api_helper/wiki_pages_api_helper.rb +66 -0
  35. data/redmine_api_helper.gemspec +33 -0
  36. metadata +96 -0
@@ -0,0 +1,38 @@
1
+ ##
2
+ # aids creating fiddles for redmine_scripting_engine
3
+ #
4
+ # Copyright © 2021 Stephan Wenzel <stephan.wenzel@drwpatent.de>
5
+ #
6
+ # This program is free software; you can redistribute it and/or
7
+ # modify it under the terms of the GNU General Public License
8
+ # as published by the Free Software Foundation; either version 2
9
+ # of the License, or (at your option) any later version.
10
+ #
11
+ # This program is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU General Public License
17
+ # along with this program; if not, write to the Free Software
18
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
+ #
20
+ module RedmineAPIHelper
21
+ module SearchAPIHelper
22
+
23
+ ########################################################################################
24
+ # reads my_account_url from args
25
+ ########################################################################################
26
+ def search_url(**params)
27
+ url_path(args.urls.Home, "search", params)
28
+ end #def
29
+
30
+ ########################################################################################
31
+ # list_search result, corresponds to controller#index
32
+ ########################################################################################
33
+ def list_search(**params)
34
+ jget(:url => search_url, :params => params).results
35
+ end #def
36
+
37
+ end #module
38
+ end #module
@@ -0,0 +1,73 @@
1
+ ##
2
+ # aids creating fiddles for redmine_scripting_engine
3
+ #
4
+ # Copyright © 2021 Stephan Wenzel <stephan.wenzel@drwpatent.de>
5
+ #
6
+ # This program is free software; you can redistribute it and/or
7
+ # modify it under the terms of the GNU General Public License
8
+ # as published by the Free Software Foundation; either version 2
9
+ # of the License, or (at your option) any later version.
10
+ #
11
+ # This program is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU General Public License
17
+ # along with this program; if not, write to the Free Software
18
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
+ #
20
+ module RedmineAPIHelper
21
+ module TimeEntriesAPIHelper
22
+
23
+ ########################################################################################
24
+ # reads time_entries_url from args
25
+ ########################################################################################
26
+ def time_entries_url(**params)
27
+ url_path(args.urls.Home, "time_entries", params)
28
+ end #def
29
+
30
+ ########################################################################################
31
+ # creates a time_entry_url
32
+ ########################################################################################
33
+ def time_entry_url(id, **params)
34
+ url_path(time_entries_url, id, params)
35
+ end #def
36
+
37
+ ########################################################################################
38
+ # lists time_entries, corresponds to controller#index
39
+ ########################################################################################
40
+ def list_time_entries(**params)
41
+ list_objects(:time_entries, params)
42
+ end #def
43
+
44
+ ########################################################################################
45
+ # reads time_entry having id, corresponds to controller#show
46
+ ########################################################################################
47
+ def read_time_entry(id, **params)
48
+ read_object(:time_entry, id, params)
49
+ end #def
50
+
51
+ ########################################################################################
52
+ # creates a new time_entry with params, corresponds to controller#create
53
+ ########################################################################################
54
+ def create_time_entry(**params)
55
+ create_object(:time_entry, params)
56
+ end #def
57
+
58
+ ########################################################################################
59
+ # updates an existing time_entry with params, corresponds to controller#update
60
+ ########################################################################################
61
+ def update_time_entry(id, **params)
62
+ update_object(:time_entry, id, params)
63
+ end #def
64
+
65
+ ########################################################################################
66
+ # deletes an existing time_entry with params, corresponds to controller#destroy
67
+ ########################################################################################
68
+ def destroy_time_entry(id, **params)
69
+ destroy_object(:time_entry, id, params)
70
+ end #def
71
+
72
+ end #module
73
+ end #module
@@ -0,0 +1,38 @@
1
+ ##
2
+ # aids creating fiddles for redmine_scripting_engine
3
+ #
4
+ # Copyright © 2021 Stephan Wenzel <stephan.wenzel@drwpatent.de>
5
+ #
6
+ # This program is free software; you can redistribute it and/or
7
+ # modify it under the terms of the GNU General Public License
8
+ # as published by the Free Software Foundation; either version 2
9
+ # of the License, or (at your option) any later version.
10
+ #
11
+ # This program is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU General Public License
17
+ # along with this program; if not, write to the Free Software
18
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
+ #
20
+ module RedmineAPIHelper
21
+ module TimeEntryActivitiesAPIHelper
22
+
23
+ ########################################################################################
24
+ # reads time_entry_activities_url from args
25
+ ########################################################################################
26
+ def time_entry_activities_url(**params)
27
+ url_path(args.urls.Home, "enumerations", "time_entry_activities", params)
28
+ end #def
29
+
30
+ ########################################################################################
31
+ # lists time_entries, corresponds to controller#index
32
+ ########################################################################################
33
+ def list_time_entry_activities(**params)
34
+ list_objects(:time_entry_activities, params)
35
+ end #def
36
+
37
+ end #module
38
+ end #module
@@ -0,0 +1,38 @@
1
+ ##
2
+ # aids creating fiddles for redmine_scripting_engine
3
+ #
4
+ # Copyright © 2021 Stephan Wenzel <stephan.wenzel@drwpatent.de>
5
+ #
6
+ # This program is free software; you can redistribute it and/or
7
+ # modify it under the terms of the GNU General Public License
8
+ # as published by the Free Software Foundation; either version 2
9
+ # of the License, or (at your option) any later version.
10
+ #
11
+ # This program is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU General Public License
17
+ # along with this program; if not, write to the Free Software
18
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
+ #
20
+ module RedmineAPIHelper
21
+ module TrackersAPIHelper
22
+
23
+ ########################################################################################
24
+ # reads trackers_url from args
25
+ ########################################################################################
26
+ def trackers_url(**params)
27
+ url_path(args.urls.Home, "trackers", params)
28
+ end #def
29
+
30
+ ########################################################################################
31
+ # lists trackers, corresponds to controller#index
32
+ ########################################################################################
33
+ def list_trackers(**params)
34
+ list_objects(:tracker, params)
35
+ end #def
36
+
37
+ end #module
38
+ end #module
@@ -0,0 +1,73 @@
1
+ ##
2
+ # aids creating fiddles for redmine_scripting_engine
3
+ #
4
+ # Copyright © 2021 Stephan Wenzel <stephan.wenzel@drwpatent.de>
5
+ #
6
+ # This program is free software; you can redistribute it and/or
7
+ # modify it under the terms of the GNU General Public License
8
+ # as published by the Free Software Foundation; either version 2
9
+ # of the License, or (at your option) any later version.
10
+ #
11
+ # This program is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU General Public License
17
+ # along with this program; if not, write to the Free Software
18
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
+ #
20
+ module RedmineAPIHelper
21
+ module UsersAPIHelper
22
+
23
+ ########################################################################################
24
+ # reads users_url from args
25
+ ########################################################################################
26
+ def users_url(**params)
27
+ url_path(args.urls.Home, "users", params)
28
+ end #def
29
+
30
+ ########################################################################################
31
+ # crerate user_url
32
+ ########################################################################################
33
+ def user_url(id, **params)
34
+ url_path(users_url, id, **params)
35
+ end #def
36
+
37
+ ########################################################################################
38
+ # lists users, corresponds to controller#index
39
+ ########################################################################################
40
+ def list_users(**params)
41
+ list_objects(:users, params)
42
+ end #def
43
+
44
+ ########################################################################################
45
+ # reads user having id, corresponds to controller#show
46
+ ########################################################################################
47
+ def read_user(id, **params)
48
+ read_object(:user, id, params)
49
+ end #def
50
+
51
+ ########################################################################################
52
+ # creates a new user with params, corresponds to controller#create
53
+ ########################################################################################
54
+ def create_user(**params)
55
+ create_object(:user, params)
56
+ end #def
57
+
58
+ ########################################################################################
59
+ # updates an existing user with params, corresponds to controller#update
60
+ ########################################################################################
61
+ def update_user(id, **params)
62
+ update_object(:user, id, params)
63
+ end #def
64
+
65
+ ########################################################################################
66
+ # deletes an existing user with params, corresponds to controller#destroy
67
+ ########################################################################################
68
+ def destroy_user(id, **params)
69
+ destroy_object(:user, id, params)
70
+ end #def
71
+
72
+ end #module
73
+ end #module
@@ -0,0 +1,24 @@
1
+ # encoding: utf-8
2
+ #
3
+ # aids creating fiddles for redmine_scripting_engine
4
+ #
5
+ # Copyright © 2021 Stephan Wenzel <stephan.wenzel@drwpatent.de>
6
+ #
7
+ # This program is free software; you can redistribute it and/or
8
+ # modify it under the terms of the GNU General Public License
9
+ # as published by the Free Software Foundation; either version 2
10
+ # of the License, or (at your option) any later version.
11
+ #
12
+ # This program is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU General Public License
18
+ # along with this program; if not, write to the Free Software
19
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
+ #
21
+
22
+ module RedmineAPIHelper
23
+ VERSION = "0.1.3"
24
+ end
@@ -0,0 +1,66 @@
1
+ ##
2
+ # aids creating fiddles for redmine_scripting_engine
3
+ #
4
+ # Copyright © 2021 Stephan Wenzel <stephan.wenzel@drwpatent.de>
5
+ #
6
+ # This program is free software; you can redistribute it and/or
7
+ # modify it under the terms of the GNU General Public License
8
+ # as published by the Free Software Foundation; either version 2
9
+ # of the License, or (at your option) any later version.
10
+ #
11
+ # This program is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU General Public License
17
+ # along with this program; if not, write to the Free Software
18
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
+ #
20
+ module RedmineAPIHelper
21
+ module WikiPagesAPIHelper
22
+
23
+ ########################################################################################
24
+ # reads wiki_pages_url from args
25
+ ########################################################################################
26
+ def project_wiki_pages_url(project_id, **params)
27
+ url_path(project_url(project_id), "wiki", params)
28
+ end #def
29
+
30
+ ########################################################################################
31
+ # creates wiki_page_url
32
+ ########################################################################################
33
+ def project_wiki_page_url(project_id, id, **params)
34
+ url_path(project_wiki_pages_url(project_id), id, params)
35
+ end #def
36
+
37
+ ########################################################################################
38
+ # lists wiki_pages, corresponds to controller#index
39
+ ########################################################################################
40
+ def list_project_wiki_pages(project_id, **params)
41
+ jget(:url => url_path(project_wiki_pages_url(project_id), "index"), :params => params )
42
+ end #def
43
+
44
+ ########################################################################################
45
+ # reads wiki_page having id, corresponds to controller#show
46
+ ########################################################################################
47
+ def read_project_wiki_page(project_id, title, **params)
48
+ jget(:url => url_path(project_wiki_pages_url(project_id), title), :params => params ).wiki_page
49
+ end #def
50
+
51
+ ########################################################################################
52
+ # updates or creates an existing wiki_page with params, corresponds to controller#update
53
+ ########################################################################################
54
+ def create_or_update_project_wiki_page(project_id, title, **params)
55
+ jput({:wiki_page => params}, :url => url_path(project_wiki_pages_url(project_id), title))
56
+ end #def
57
+
58
+ ########################################################################################
59
+ # deletes an existing wiki_page with params, corresponds to controller#destroy
60
+ ########################################################################################
61
+ def destroy_project_wiki_page(project_id, id, **params)
62
+ jdel(:url => url_path(project_wiki_pages_url(project_id), id), :params => params )
63
+ end #def
64
+
65
+ end #module
66
+ end #module
@@ -0,0 +1,33 @@
1
+ require_relative 'lib/redmine_api_helper/version'
2
+
3
+ Gem::Specification.new do |spec|
4
+
5
+ spec.name = "redmine_api_helper"
6
+ spec.version = RedmineAPIHelper::VERSION
7
+ spec.authors = ["Stephan Wenzel"]
8
+ spec.email = ["stephan.wenzel@drwpatent.de"]
9
+ spec.license = 'GPL-2.0'
10
+
11
+ spec.summary = %q{redmine_api_helper aids creating fiddles for redmine_scripting_engine}
12
+ spec.description = %q{redmine_api_helper contains methods to ease handling Redmine API calls}
13
+ spec.homepage = "https://github.com/HugoHasenbein/redmine_api_helper"
14
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
15
+
16
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
17
+
18
+ spec.metadata["homepage_uri"] = spec.homepage
19
+ spec.metadata["source_code_uri"] = "https://github.com/HugoHasenbein/redmine_api_helper"
20
+ spec.metadata["changelog_uri"] = "https://github.com/HugoHasenbein/redmine_api_helper/Changelog.md"
21
+
22
+ # Specify which files should be added to the gem when it is released.
23
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
25
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }.reject{ |f| f.match(%r{\.gem\z})}
26
+ end
27
+
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+
32
+ spec.add_runtime_dependency 'deep_try', '~> 0'
33
+ end
metadata ADDED
@@ -0,0 +1,96 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: redmine_api_helper
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.3
5
+ platform: ruby
6
+ authors:
7
+ - Stephan Wenzel
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-07-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: deep_try
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: redmine_api_helper contains methods to ease handling Redmine API calls
28
+ email:
29
+ - stephan.wenzel@drwpatent.de
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".gitattributes"
35
+ - ".gitignore"
36
+ - CODE_OF_CONDUCT.md
37
+ - Gemfile
38
+ - LICENSE
39
+ - README.md
40
+ - Rakefile
41
+ - bin/console
42
+ - bin/setup
43
+ - lib/redmine_api_helper.rb
44
+ - lib/redmine_api_helper/api_helper.rb
45
+ - lib/redmine_api_helper/args_helper.rb
46
+ - lib/redmine_api_helper/attachments_api_helper.rb
47
+ - lib/redmine_api_helper/define_api_helpers.rb
48
+ - lib/redmine_api_helper/document_categories_api_helper.rb
49
+ - lib/redmine_api_helper/groups_api_helper.rb
50
+ - lib/redmine_api_helper/helpers.rb
51
+ - lib/redmine_api_helper/issue_priorities_api_helper.rb
52
+ - lib/redmine_api_helper/issue_relations_api_helper.rb
53
+ - lib/redmine_api_helper/issue_statuses_api_helper.rb
54
+ - lib/redmine_api_helper/issues_api_helper.rb
55
+ - lib/redmine_api_helper/my_account_api_helper.rb
56
+ - lib/redmine_api_helper/news_api_helper.rb
57
+ - lib/redmine_api_helper/project_memberships_api_helper.rb
58
+ - lib/redmine_api_helper/projects_api_helper.rb
59
+ - lib/redmine_api_helper/roles_api_helper.rb
60
+ - lib/redmine_api_helper/search_api_helper.rb
61
+ - lib/redmine_api_helper/time_entries_api_helper.rb
62
+ - lib/redmine_api_helper/time_entry_activities_api_helper.rb
63
+ - lib/redmine_api_helper/trackers_api_helper.rb
64
+ - lib/redmine_api_helper/users_api_helper.rb
65
+ - lib/redmine_api_helper/version.rb
66
+ - lib/redmine_api_helper/wiki_pages_api_helper.rb
67
+ - redmine_api_helper.gemspec
68
+ homepage: https://github.com/HugoHasenbein/redmine_api_helper
69
+ licenses:
70
+ - GPL-2.0
71
+ metadata:
72
+ allowed_push_host: https://rubygems.org
73
+ homepage_uri: https://github.com/HugoHasenbein/redmine_api_helper
74
+ source_code_uri: https://github.com/HugoHasenbein/redmine_api_helper
75
+ changelog_uri: https://github.com/HugoHasenbein/redmine_api_helper/Changelog.md
76
+ post_install_message:
77
+ rdoc_options: []
78
+ require_paths:
79
+ - lib
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: 2.3.0
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ requirements: []
91
+ rubyforge_project:
92
+ rubygems_version: 2.6.14
93
+ signing_key:
94
+ specification_version: 4
95
+ summary: redmine_api_helper aids creating fiddles for redmine_scripting_engine
96
+ test_files: []