openproject_api 0.2.0 → 0.2.1

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: 9e768f366dd71718524170e9b4e5610a54aed63c35d86cd19772cd73c5a69e11
4
- data.tar.gz: 5bcedaf082f3648bbeabab546e3b440c2e54dd59ea99b923e8b1b10f9837f50a
3
+ metadata.gz: be8248b3f4c720a4e8461cd7afce744f7c57a37b5f2f0ad41ee54b904f6d610f
4
+ data.tar.gz: ef647ef1e02dd3b51b90ac481e1581b4459a7bea5b4c7d116ef5dc3a44682cfb
5
5
  SHA512:
6
- metadata.gz: c20f19f58e497d47eb2e219f7750a4d080a13c079a36fed2477c6f57a877b9147e034317e3ba62248e67bbd85249f31eed1c962eee5d7622ef40992a5ab3e1ec
7
- data.tar.gz: 50befd7303f7ff119c6019741b01b4b36c5b37e79a4332e2d01ea71bfaad12f26bbac4528312af1eefa582cd812c70abbca2016d59613eb9b0c9df17dc3a8cab
6
+ metadata.gz: e12d3e5e3da8ef0fd8001ca2b48a9befc4372a501b67333dfa0d1806f8496fd203b012a465bed27f2237094686da584260fc20a10e4a8b29d20b882004f2ba85
7
+ data.tar.gz: d5e6b18c00f9fc6e245bc8e2cb808c7ae00ab12ca5408d5c9c7f823cd1d8748f72486abf0b86eaf8aea536292453c2c0a9b315bb31ddd5d8c0ad8d4722037aba
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020-2021 expeehaa
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.adoc ADDED
@@ -0,0 +1,59 @@
1
+ == OpenprojectApi
2
+
3
+ This gem aims to provide at least a low level interface for the OpenProject API.
4
+
5
+ === Installation
6
+
7
+ Add this line to your application’s Gemfile:
8
+
9
+ [source,ruby]
10
+ ----
11
+ gem 'openproject_api'
12
+ ----
13
+
14
+ And then execute:
15
+
16
+ ....
17
+ $ bundle install
18
+ ....
19
+
20
+ Or install it yourself as:
21
+
22
+ ....
23
+ $ gem install openproject_api
24
+ ....
25
+
26
+ === Usage
27
+
28
+ Create a client by passing it an endpoint and an apikey.
29
+
30
+ [source,ruby]
31
+ ----
32
+ client = OpenprojectApi::Client.new(endpoint: 'https://your.openproject.instance.example.com', apikey: 'your-api-key')
33
+
34
+ # Request all workpackages.
35
+ client.work_packages
36
+
37
+ # Request all workpackages created between 2019-10-14 and 2020-10-14.
38
+ client.work_packages(query: {
39
+ filters: [
40
+ {
41
+ createdAt: {
42
+ operator: '<>d',
43
+ values: [
44
+ '2019-10-14T00:00:00Z',
45
+ '2020-10-14T00:00:00Z',
46
+ ],
47
+ },
48
+ },
49
+ ].to_json
50
+ })
51
+ ----
52
+
53
+ === Development
54
+
55
+ After checking out the repo, run `bin/setup` to install dependencies.
56
+ Then, run `rake spec` to run the tests.
57
+ You can also run `bin/console` for an interactive prompt that will allow you to experiment.
58
+
59
+ To install this gem onto your local machine, run `bundle exec rake install`.
@@ -1,5 +1,5 @@
1
- require_relative 'openproject_api/version'
2
- require_relative 'openproject_api/client'
1
+ require 'openproject_api/version'
2
+ require 'openproject_api/client'
3
3
 
4
4
  module OpenprojectApi
5
5
  class Error < StandardError; end
@@ -1,7 +1,8 @@
1
1
  require 'uri'
2
2
  require 'net/https'
3
3
  require 'json'
4
- require_relative 'objectified_hash'
4
+
5
+ require 'openproject_api/objectified_hash'
5
6
 
6
7
  module OpenprojectApi
7
8
  class Api
@@ -1,4 +1,4 @@
1
- require_relative 'api'
1
+ require 'openproject_api/api'
2
2
 
3
3
  module OpenprojectApi
4
4
  class Client < Api
@@ -1,3 +1,3 @@
1
1
  module OpenprojectApi
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,25 +1,80 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openproject_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - expeehaa
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-23 00:00:00.000000000 Z
12
- dependencies: []
13
- description:
11
+ date: 2021-04-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.17'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.17'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '13.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '13.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.13'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.13'
69
+ description:
14
70
  email:
15
71
  - expeehaa@outlook.com
16
72
  executables: []
17
73
  extensions: []
18
74
  extra_rdoc_files: []
19
75
  files:
20
- - Gemfile
21
- - Gemfile.lock
22
- - Rakefile
76
+ - LICENSE
77
+ - README.adoc
23
78
  - lib/openproject_api.rb
24
79
  - lib/openproject_api/api.rb
25
80
  - lib/openproject_api/client.rb
@@ -34,12 +89,12 @@ files:
34
89
  - lib/openproject_api/client/work_packages.rb
35
90
  - lib/openproject_api/objectified_hash.rb
36
91
  - lib/openproject_api/version.rb
37
- - manifest
38
- homepage:
39
- licenses: []
92
+ homepage: https://github.com/expeehaa/openproject_api
93
+ licenses:
94
+ - MIT
40
95
  metadata:
41
96
  allowed_push_host: https://rubygems.org
42
- post_install_message:
97
+ post_install_message:
43
98
  rdoc_options: []
44
99
  require_paths:
45
100
  - lib
@@ -54,8 +109,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
109
  - !ruby/object:Gem::Version
55
110
  version: '0'
56
111
  requirements: []
57
- rubygems_version: 3.0.6
58
- signing_key:
112
+ rubygems_version: 3.0.9
113
+ signing_key:
59
114
  specification_version: 4
60
115
  summary: Ruby interface for the OpenProject API.
61
116
  test_files: []
data/Gemfile DELETED
@@ -1,7 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- gem 'rake', '~> 13.0'
6
- gem 'rspec', '~> 3.0'
7
- gem 'pry'
data/Gemfile.lock DELETED
@@ -1,40 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- openproject_api (0.2.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- coderay (1.1.3)
10
- diff-lcs (1.4.4)
11
- method_source (1.0.0)
12
- pry (0.13.1)
13
- coderay (~> 1.1)
14
- method_source (~> 1.0)
15
- rake (13.0.1)
16
- rspec (3.9.0)
17
- rspec-core (~> 3.9.0)
18
- rspec-expectations (~> 3.9.0)
19
- rspec-mocks (~> 3.9.0)
20
- rspec-core (3.9.3)
21
- rspec-support (~> 3.9.3)
22
- rspec-expectations (3.9.2)
23
- diff-lcs (>= 1.2.0, < 2.0)
24
- rspec-support (~> 3.9.0)
25
- rspec-mocks (3.9.1)
26
- diff-lcs (>= 1.2.0, < 2.0)
27
- rspec-support (~> 3.9.0)
28
- rspec-support (3.9.3)
29
-
30
- PLATFORMS
31
- ruby
32
-
33
- DEPENDENCIES
34
- openproject_api!
35
- pry
36
- rake (~> 13.0)
37
- rspec (~> 3.0)
38
-
39
- BUNDLED WITH
40
- 1.17.3
data/Rakefile DELETED
@@ -1,10 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
7
-
8
- task :update_manifest do
9
- File.write(File.expand_path('manifest', __dir__), Dir['lib/**/*', 'Gemfile', 'Gemfile.lock', 'openproject-api.gemspec', 'Rakefile', 'manifest'].join("\n"))
10
- end
data/manifest DELETED
@@ -1,20 +0,0 @@
1
- lib/openproject_api
2
- lib/openproject_api/client
3
- lib/openproject_api/client/statuses.rb
4
- lib/openproject_api/client/types.rb
5
- lib/openproject_api/client/work_packages.rb
6
- lib/openproject_api/client/users.rb
7
- lib/openproject_api/client/time_entries.rb
8
- lib/openproject_api/client/projects.rb
9
- lib/openproject_api/client/user_preferences.rb
10
- lib/openproject_api/client/root.rb
11
- lib/openproject_api/client/relations.rb
12
- lib/openproject_api/objectified_hash.rb
13
- lib/openproject_api/api.rb
14
- lib/openproject_api/version.rb
15
- lib/openproject_api/client.rb
16
- lib/openproject_api.rb
17
- Gemfile
18
- Gemfile.lock
19
- Rakefile
20
- manifest