monday_ruby 0.3.0 → 0.4.0
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/CHANGELOG.md +6 -0
- data/CONTRIBUTING.md +25 -0
- data/docs/configuration.md +1 -1
- data/lib/monday/resources/workspace.rb +43 -0
- data/lib/monday/resources.rb +2 -0
- data/lib/monday/util.rb +2 -1
- data/lib/monday/version.rb +1 -1
- data/monday_ruby.gemspec +2 -2
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f0e71a61ef39a418ca03c8151a357e3623f9c4a030c74cee613e4cefc8d684a
|
4
|
+
data.tar.gz: 2ab39c2856f63b1e72a9395630c43b92fd589b1790954b36791ed105f6e52362
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65ad4b3eec9937e42fe5a2a811f7ccdc2caf3c17e4b38ede2b10a7be148519ec6a7e75d5b272fb86c33667be7309b2c51858f7e97563f147ca1f35d9adca1ac9
|
7
|
+
data.tar.gz: 41c14a6bd4c846d25701a19a7dadb775e379ac2a45b1967b3d97025301dfb1ccdbc5983c4efa6d78769f9daedfb9d3a9773fa976140816017d97308f128b4814
|
data/CHANGELOG.md
CHANGED
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
Thanks for taking the time to contribute!
|
4
|
+
|
5
|
+
The following is a set of guidelines for contributing to `monday_ruby`. These are mostly guidelines, not rules. Use your best judgment, and feel to propose changes to this document in a pull request.
|
6
|
+
|
7
|
+
## Your first code contribution
|
8
|
+
|
9
|
+
Unsure where to begin contributing? You can start by looking through `good first issue` and `help wanted` issues.
|
10
|
+
|
11
|
+
### Pull request
|
12
|
+
|
13
|
+
Please follow these steps to have your contribution considered:
|
14
|
+
|
15
|
+
1. Follow the [pull request template](PULL_REQUEST_TEMPLATE.md).
|
16
|
+
2. Follow the [commit guidelines](#commit-message-guidelines).
|
17
|
+
3. After you submit your pull request, verify that all the status checks are passing.
|
18
|
+
|
19
|
+
## Commit message guidelines
|
20
|
+
|
21
|
+
* Use present tense ("Add feature" not "Added feature")
|
22
|
+
* Use the imperative mood ("Move file to..." not "Moves file to...")
|
23
|
+
* Limit the first line to 70 characters or less.
|
24
|
+
* Reference issues and pull requests after the first line.
|
25
|
+
* Try to follow [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/)
|
data/docs/configuration.md
CHANGED
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Monday
|
4
|
+
module Resources
|
5
|
+
# Represents Monday.com's workspace resource.
|
6
|
+
module Workspace
|
7
|
+
DEFAULT_SELECT = %w[id name description].freeze
|
8
|
+
|
9
|
+
# Retrieves all the workspaces.
|
10
|
+
#
|
11
|
+
# Allows filtering workspaces using the args option.
|
12
|
+
# Allows customizing the values to retrieve using the select option.
|
13
|
+
# By default, ID, name and description fields are retrieved.
|
14
|
+
def workspaces(args: {}, select: DEFAULT_SELECT)
|
15
|
+
query = "query { workspaces(#{Util.format_args(args)}) {#{Util.format_select(select)}}}"
|
16
|
+
|
17
|
+
make_request(query)
|
18
|
+
end
|
19
|
+
|
20
|
+
# Creates a new workspaces.
|
21
|
+
#
|
22
|
+
# Allows customizing creating a workspace using the args option.
|
23
|
+
# Allows customizing the values to retrieve using the select option.
|
24
|
+
# By default, ID, name and description fields are retrieved.
|
25
|
+
def create_workspace(args: {}, select: DEFAULT_SELECT)
|
26
|
+
query = "mutation { create_workspace(#{Util.format_args(args)}) {#{Util.format_select(select)}}}"
|
27
|
+
|
28
|
+
make_request(query)
|
29
|
+
end
|
30
|
+
|
31
|
+
# Deletes a workspace.
|
32
|
+
#
|
33
|
+
# Requires workspace_id to delete the workspace.
|
34
|
+
# Allows customizing the values to retrieve using the select option.
|
35
|
+
# By default, returns the ID of the workspace deleted.
|
36
|
+
def delete_workspace(workspace_id, select: ["id"])
|
37
|
+
query = "mutation { delete_workspace(workspace_id: #{workspace_id}) {#{Util.format_select(select)}}}"
|
38
|
+
|
39
|
+
make_request(query)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
data/lib/monday/resources.rb
CHANGED
@@ -6,6 +6,7 @@ require_relative "resources/board"
|
|
6
6
|
require_relative "resources/board_view"
|
7
7
|
require_relative "resources/column"
|
8
8
|
require_relative "resources/item"
|
9
|
+
require_relative "resources/workspace"
|
9
10
|
|
10
11
|
module Monday
|
11
12
|
module Resources
|
@@ -15,5 +16,6 @@ module Monday
|
|
15
16
|
include BoardView
|
16
17
|
include Column
|
17
18
|
include Item
|
19
|
+
include Workspace
|
18
20
|
end
|
19
21
|
end
|
data/lib/monday/util.rb
CHANGED
@@ -51,7 +51,8 @@ module Monday
|
|
51
51
|
"ItemsLimitationException" => [InvalidRequestError, 400],
|
52
52
|
"ItemNameTooLongException" => [InvalidRequestError, 400],
|
53
53
|
"ColumnValueException" => [InvalidRequestError, 400],
|
54
|
-
"CorrectedValueException" => [InvalidRequestError, 400]
|
54
|
+
"CorrectedValueException" => [InvalidRequestError, 400],
|
55
|
+
"InvalidWorkspaceIdException" => [InvalidRequestError, 400]
|
55
56
|
}[error_code] || [Error, 400]
|
56
57
|
end
|
57
58
|
|
data/lib/monday/version.rb
CHANGED
data/monday_ruby.gemspec
CHANGED
@@ -8,8 +8,8 @@ repository = "https://github.com/sanifhimani/monday_ruby"
|
|
8
8
|
Gem::Specification.new do |spec|
|
9
9
|
spec.name = "monday_ruby"
|
10
10
|
spec.version = version
|
11
|
-
spec.authors = ["Sanif Himani"]
|
12
|
-
spec.email = ["sanifhimani92@gmail.com"]
|
11
|
+
spec.authors = ["Sanif Himani", "Wes Hays"]
|
12
|
+
spec.email = ["sanifhimani92@gmail.com", "weshays@gmail.com"]
|
13
13
|
|
14
14
|
spec.summary = "Ruby bindings to use the monday.com API"
|
15
15
|
spec.description = "A Gem to easily interact with monday.com API using native Ruby"
|
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: monday_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sanif Himani
|
8
|
+
- Wes Hays
|
8
9
|
autorequire:
|
9
10
|
bindir: exe
|
10
11
|
cert_chain: []
|
11
|
-
date: 2023-
|
12
|
+
date: 2023-09-18 00:00:00.000000000 Z
|
12
13
|
dependencies: []
|
13
14
|
description: A Gem to easily interact with monday.com API using native Ruby
|
14
15
|
email:
|
15
16
|
- sanifhimani92@gmail.com
|
17
|
+
- weshays@gmail.com
|
16
18
|
executables: []
|
17
19
|
extensions: []
|
18
20
|
extra_rdoc_files: []
|
@@ -23,6 +25,7 @@ files:
|
|
23
25
|
- ".vscode/settings.json"
|
24
26
|
- CHANGELOG.md
|
25
27
|
- CODE_OF_CONDUCT.md
|
28
|
+
- CONTRIBUTING.md
|
26
29
|
- LICENSE
|
27
30
|
- README.md
|
28
31
|
- Rakefile
|
@@ -76,6 +79,7 @@ files:
|
|
76
79
|
- lib/monday/resources/board_view.rb
|
77
80
|
- lib/monday/resources/column.rb
|
78
81
|
- lib/monday/resources/item.rb
|
82
|
+
- lib/monday/resources/workspace.rb
|
79
83
|
- lib/monday/response.rb
|
80
84
|
- lib/monday/util.rb
|
81
85
|
- lib/monday/version.rb
|
@@ -87,7 +91,7 @@ licenses:
|
|
87
91
|
metadata:
|
88
92
|
homepage_uri: https://github.com/sanifhimani/monday_ruby
|
89
93
|
documentation_uri: https://monday-ruby.gitbook.io/docs/
|
90
|
-
changelog_uri: https://github.com/sanifhimani/monday_ruby/blob/v0.
|
94
|
+
changelog_uri: https://github.com/sanifhimani/monday_ruby/blob/v0.4.0/CHANGELOG.md
|
91
95
|
rubygems_mfa_required: 'true'
|
92
96
|
post_install_message:
|
93
97
|
rdoc_options: []
|
@@ -104,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
108
|
- !ruby/object:Gem::Version
|
105
109
|
version: '0'
|
106
110
|
requirements: []
|
107
|
-
rubygems_version: 3.4.
|
111
|
+
rubygems_version: 3.4.19
|
108
112
|
signing_key:
|
109
113
|
specification_version: 4
|
110
114
|
summary: Ruby bindings to use the monday.com API
|