easyqa_api 0.0.4 → 0.0.5
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/.gitignore +0 -1
- data/.rubocop.yml +11 -0
- data/Gemfile +2 -0
- data/README.md +19 -0
- data/easyqa_api.gemspec +1 -0
- data/lib/easyqa_api/configuration.rb +1 -1
- data/lib/easyqa_api/items/issue.rb +3 -4
- data/lib/easyqa_api/items/issue_attachment.rb +2 -2
- data/lib/easyqa_api/items/organization.rb +1 -1
- data/lib/easyqa_api/items/project.rb +1 -1
- data/lib/easyqa_api/items/role.rb +5 -3
- data/lib/easyqa_api/items/status.rb +1 -1
- data/lib/easyqa_api/items/test_case.rb +1 -1
- data/lib/easyqa_api/items/test_module.rb +2 -2
- data/lib/easyqa_api/items/test_object.rb +1 -1
- data/lib/easyqa_api/items/test_plan.rb +2 -2
- data/lib/easyqa_api/items/test_run.rb +1 -2
- data/lib/easyqa_api/items/test_run_result.rb +1 -1
- data/lib/easyqa_api/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5144f63d0e4405f99b15b689f365bc227b5d2708
|
4
|
+
data.tar.gz: 27ec842293c95309b5e90d118695fa28cd6b474e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84261ce16589bb0dfbcd6ebf48a838b10eaa5a64d546c9df43c11d59395eb15bed2d08dc43c6b928e027ff751ed6412714a55cdfd1f1efe9b1a9b0d68fba95ab
|
7
|
+
data.tar.gz: d44187b627b3b40d8779b94613bcc47199b26e2312d52d689124ee32a0870cba01d2a8e258df31a8df623ea4f986c1658ac76bf9ba9921740c65575e9d1ef57a
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -19,6 +19,25 @@ Or install it yourself as:
|
|
19
19
|
$ gem install easyqa_api
|
20
20
|
|
21
21
|
## Usage
|
22
|
+
Login user on EasyQA
|
23
|
+
```ruby
|
24
|
+
user = EasyqaApi::User.new(email: 'test@gmail.com', password: '1234567890')
|
25
|
+
```
|
26
|
+
|
27
|
+
And now you can do any action with easyqa_api. For example:
|
28
|
+
```ruby
|
29
|
+
organization = EasyqaApi::Organization.create({ title: 'Test', description: 'Test' }, user)
|
30
|
+
```
|
31
|
+
|
32
|
+
If you do not want to always point of the user during any action in easyqa_api - set it as default
|
33
|
+
```ruby
|
34
|
+
user.set_default!
|
35
|
+
```
|
36
|
+
|
37
|
+
And now:
|
38
|
+
```ruby
|
39
|
+
organization = EasyqaApi::Organization.create(title: 'Test', description: 'Test')
|
40
|
+
```
|
22
41
|
|
23
42
|
Link to documentation
|
24
43
|
http://www.rubydoc.info/gems/easyqa_api/0.0.3/
|
data/easyqa_api.gemspec
CHANGED
@@ -53,8 +53,7 @@ module EasyqaApi
|
|
53
53
|
req.body = {
|
54
54
|
token: attrs[:project_token],
|
55
55
|
auth_token: user.auth_token
|
56
|
-
}.merge(attrs.except(:project_token, :attachments))
|
57
|
-
.merge(retrieve_attachments(attrs[:attachments]))
|
56
|
+
}.merge(attrs.except(:project_token, :attachments)).merge(retrieve_attachments(attrs[:attachments] || []))
|
58
57
|
end
|
59
58
|
end
|
60
59
|
|
@@ -63,7 +62,7 @@ module EasyqaApi
|
|
63
62
|
def show(attrs = {}, user = @@default_user)
|
64
63
|
attrs = { id: @id, project_token: @project_token }.merge(attrs)
|
65
64
|
attrs[:id] = "pid#{attrs.delete(:id_in_project)}" if attrs[:id_in_project]
|
66
|
-
@attributes = send_request("issues/#{id}", :get) do |req|
|
65
|
+
@attributes = send_request("issues/#{attrs[:id]}", :get) do |req|
|
67
66
|
req.params = {
|
68
67
|
token: attrs[:project_token],
|
69
68
|
auth_token: user.auth_token
|
@@ -92,7 +91,7 @@ module EasyqaApi
|
|
92
91
|
attrs = { id: @id, project_token: @project_token }.merge(attrs)
|
93
92
|
attrs[:id] = "pid#{attrs.delete(:id_in_project)}" if attrs[:id_in_project]
|
94
93
|
@attributes = send_request("issues/#{attrs[:id]}", :delete) do |req|
|
95
|
-
req.
|
94
|
+
req.body = {
|
96
95
|
token: attrs[:project_token],
|
97
96
|
auth_token: user.auth_token
|
98
97
|
}
|
@@ -21,7 +21,7 @@ module EasyqaApi
|
|
21
21
|
req.body = {
|
22
22
|
token: attrs[:project_token],
|
23
23
|
auth_token: user.auth_token
|
24
|
-
}.merge(attrs.except(:project_token))
|
24
|
+
}.merge(attrs.except(:project_token, :issue_id))
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
@@ -30,7 +30,7 @@ module EasyqaApi
|
|
30
30
|
def delete(attrs = {}, user = @@default_user)
|
31
31
|
attrs = { id: @id, project_token: @project_token }.merge(attrs)
|
32
32
|
@attributes = send_request("attachments/#{attrs[:id]}", :delete) do |req|
|
33
|
-
req.
|
33
|
+
req.body = {
|
34
34
|
token: attrs[:project_token],
|
35
35
|
auth_token: user.auth_token
|
36
36
|
}
|
@@ -37,10 +37,12 @@ module EasyqaApi
|
|
37
37
|
# @option attrs [Fixnum] :user_id user id on EasyQA website.
|
38
38
|
# @option attrs [String] :project_token Project token on EasyQA. Add this option if you want create project role
|
39
39
|
def create(attrs, user = @@default_user)
|
40
|
-
@attributes = send_request(
|
40
|
+
@attributes = send_request(
|
41
|
+
"organizations/#{attrs[:organization_id] || attrs['organization_id']}/roles", :post
|
42
|
+
) do |req|
|
41
43
|
req.body = {
|
42
44
|
auth_token: user.auth_token
|
43
|
-
}.merge(attrs.except(:organization_id))
|
45
|
+
}.merge(attrs.except(:organization_id, 'organization_id'))
|
44
46
|
end
|
45
47
|
end
|
46
48
|
|
@@ -70,7 +72,7 @@ module EasyqaApi
|
|
70
72
|
# @macro role_without_attrs
|
71
73
|
def delete(id = @id, user = @@default_user)
|
72
74
|
@attributes = send_request("roles/#{id}", :delete) do |req|
|
73
|
-
req.
|
75
|
+
req.body = {
|
74
76
|
auth_token: user.auth_token
|
75
77
|
}
|
76
78
|
end
|
@@ -72,7 +72,7 @@ module EasyqaApi
|
|
72
72
|
# @macro status_without_attributes
|
73
73
|
def delete(project_token = @project_token, id = @id, user = @@default_user)
|
74
74
|
@attributes = send_request("statuses/#{id}", :delete) do |req|
|
75
|
-
req.
|
75
|
+
req.body = {
|
76
76
|
token: project_token,
|
77
77
|
auth_token: user.auth_token
|
78
78
|
}
|
@@ -84,7 +84,7 @@ module EasyqaApi
|
|
84
84
|
# @!macro test_case_without_attrs
|
85
85
|
def delete(project_token = @project_token, id = @id, user = @@default_user)
|
86
86
|
@attributes = send_request("test_cases/#{id}", :delete) do |req|
|
87
|
-
req.
|
87
|
+
req.body = {
|
88
88
|
token: project_token,
|
89
89
|
auth_token: user.auth_token
|
90
90
|
}
|
@@ -69,7 +69,7 @@ module EasyqaApi
|
|
69
69
|
attrs = { id: @id, project_token: @project_token }.merge(attrs)
|
70
70
|
@attributes = send_request("test_modules/#{attrs[:id]}", :put) do |req|
|
71
71
|
req.body = {
|
72
|
-
test_module: attrs.except(:project_token),
|
72
|
+
test_module: attrs.except(:project_token, :id),
|
73
73
|
token: attrs[:project_token],
|
74
74
|
auth_token: user.auth_token
|
75
75
|
}
|
@@ -80,7 +80,7 @@ module EasyqaApi
|
|
80
80
|
# @!macro test_module_without_attrs
|
81
81
|
def delete(project_token = @project_token, id = @id, user = @@default_user)
|
82
82
|
@attributes = send_request("test_modules/#{id}", :delete) do |req|
|
83
|
-
req.
|
83
|
+
req.body = {
|
84
84
|
token: project_token,
|
85
85
|
auth_token: user.auth_token
|
86
86
|
}
|
@@ -53,7 +53,7 @@ module EasyqaApi
|
|
53
53
|
# @macro test_object_params
|
54
54
|
def delete(project_token = @project_token, id = @id, user = @@default_user)
|
55
55
|
@attributes = send_request("test_objects/#{id}", :delete) do |req|
|
56
|
-
req.
|
56
|
+
req.body = {
|
57
57
|
token: project_token,
|
58
58
|
auth_token: user.auth_token
|
59
59
|
}
|
@@ -62,7 +62,7 @@ module EasyqaApi
|
|
62
62
|
attrs = { id: @id, project_token: @project_token }.merge(attrs)
|
63
63
|
@attributes = send_request("test_plans/#{attrs[:id]}", :put) do |req|
|
64
64
|
req.body = {
|
65
|
-
test_plan: attrs.except(:project_token),
|
65
|
+
test_plan: attrs.except(:project_token, :id),
|
66
66
|
token: attrs[:project_token],
|
67
67
|
auth_token: user.auth_token
|
68
68
|
}
|
@@ -73,7 +73,7 @@ module EasyqaApi
|
|
73
73
|
# @macro test_plan_without_attrs
|
74
74
|
def delete(project_token = @project_token, id = @id, user = @@default_user)
|
75
75
|
@attributes = send_request("test_plans/#{id}", :delete) do |req|
|
76
|
-
req.
|
76
|
+
req.body = {
|
77
77
|
token: project_token,
|
78
78
|
auth_token: user.auth_token
|
79
79
|
}
|
@@ -4,7 +4,6 @@
|
|
4
4
|
# * :project_token (String) [@project_token] Project token on EasyQA
|
5
5
|
# * :title (String) test run title on EasyQA website
|
6
6
|
# * :assigner_id (Fixnum) test run assigner id on EasyQA website
|
7
|
-
# * :test_plan_id (Fixnum) test plan id on EasyQA website
|
8
7
|
# * :description (String) test run description on EasyQA website
|
9
8
|
# * :test_run_result_attributes (Array<Hash>) attributes of test run results.
|
10
9
|
# * :test_plan_id (Fixnum) id of test plan
|
@@ -82,7 +81,7 @@ module EasyqaApi
|
|
82
81
|
# @!macro test_run_without_attrs
|
83
82
|
def delete(project_token = @project_token, id = @id, user = @@default_user)
|
84
83
|
@attributes = send_request("test_runs/#{id}", :delete) do |req|
|
85
|
-
req.
|
84
|
+
req.body = {
|
86
85
|
token: project_token,
|
87
86
|
auth_token: user.auth_token
|
88
87
|
}
|
@@ -57,7 +57,7 @@ module EasyqaApi
|
|
57
57
|
# @macro test_run_results_without_attrs
|
58
58
|
def delete(project_token = @project_token, id = @id, user = @@default_user)
|
59
59
|
@attributes = send_request("test_run_results/#{id}", :delete) do |req|
|
60
|
-
req.
|
60
|
+
req.body = {
|
61
61
|
token: project_token,
|
62
62
|
auth_token: user.auth_token
|
63
63
|
}
|
data/lib/easyqa_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easyqa_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thinkmobiles
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -109,6 +109,7 @@ extra_rdoc_files: []
|
|
109
109
|
files:
|
110
110
|
- ".gitignore"
|
111
111
|
- ".rspec"
|
112
|
+
- ".rubocop.yml"
|
112
113
|
- ".travis.yml"
|
113
114
|
- CODE_OF_CONDUCT.md
|
114
115
|
- Gemfile
|