youtrack_on_rails 0.0.8 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/youtrack_on_rails/requests.rb +2 -0
- data/lib/youtrack_on_rails/requests/base.rb +1 -1
- data/lib/youtrack_on_rails/requests/get_custom_field.rb +9 -0
- data/lib/youtrack_on_rails/requests/get_version_bundle.rb +9 -0
- data/lib/youtrack_on_rails/responses.rb +4 -0
- data/lib/youtrack_on_rails/responses/collection_response.rb +0 -4
- data/lib/youtrack_on_rails/responses/enumeration_response.rb +17 -0
- data/lib/youtrack_on_rails/responses/get_custom_field.rb +14 -0
- data/lib/youtrack_on_rails/responses/get_version_bundle.rb +11 -0
- data/lib/youtrack_on_rails/responses/resource_response.rb +19 -0
- data/lib/youtrack_on_rails/version.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTA0ZTFjNmM5MWMwZDk3ZTk4OGE3ZGZhZGIwOGE0YmQxZTU0NTIxZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTg2ZjVjNzU2ODNiOTc1ZThlZDY1YjZmOGU4OTA3Nzk5OGJkNzI5YQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWIwMmQxZWY2NDQ2ODUzMWQyMjIxYWVkZWFmNTU3YzBhZTRmYzA0OTQ2YmZi
|
10
|
+
ZjhhODdjMTBkOTIwNjU1MGJkOTZkZWQ0YzYwZmMyMjJjYjAyMzkzY2U0MGNm
|
11
|
+
NGY0NDBlYzZkZDA5YmU2NzcxNTE1NmYzMWYxYmY4MTcwNjM4ZjU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDg5MGJlNzVmMzczODQwZWQ1M2UwZWI1YjliNmY0ZjU3NjliMGU0MWUyYzFm
|
14
|
+
NDU3NmFhZjZkYzdlNzI1NjZmMzhlZDA5NDgwMTc2OTY5YTgxYWQyNjc2Zjk1
|
15
|
+
ZGZjZjIxNTVkY2ViODIyZTM3ZjYyMmZiNDVmNzJmM2UzMWQ4NGQ=
|
@@ -6,6 +6,8 @@ module YoutrackOnRails
|
|
6
6
|
autoload :Post, 'youtrack_on_rails/requests/post'
|
7
7
|
autoload :Put, 'youtrack_on_rails/requests/put'
|
8
8
|
|
9
|
+
autoload :GetVersionBundle, 'youtrack_on_rails/requests/get_version_bundle'
|
10
|
+
autoload :GetCustomField, 'youtrack_on_rails/requests/get_custom_field'
|
9
11
|
autoload :ApplyCommand, 'youtrack_on_rails/requests/apply_command'
|
10
12
|
autoload :CreateIssue, 'youtrack_on_rails/requests/create_issue'
|
11
13
|
autoload :ListProjects, 'youtrack_on_rails/requests/list_projects'
|
@@ -48,7 +48,7 @@ module YoutrackOnRails
|
|
48
48
|
|
49
49
|
def endpoint_uri
|
50
50
|
@endpoint_uri ||= (connection_uri.path + processed_url).tap do |_endpoint_uri|
|
51
|
-
_endpoint_uri << "?#{encoded_params}" if http_method == 'get'
|
51
|
+
_endpoint_uri << "?#{encoded_params}" if http_method == 'get' && encoded_params.present?
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
@@ -2,9 +2,13 @@ module YoutrackOnRails
|
|
2
2
|
module Responses
|
3
3
|
autoload :Base, 'youtrack_on_rails/responses/base'
|
4
4
|
|
5
|
+
autoload :EnumerationResponse, 'youtrack_on_rails/responses/enumeration_response'
|
6
|
+
autoload :ResourceResponse, 'youtrack_on_rails/responses/resource_response'
|
5
7
|
autoload :SimpleResponse, 'youtrack_on_rails/responses/simple_response'
|
6
8
|
autoload :CollectionResponse, 'youtrack_on_rails/responses/collection_response'
|
7
9
|
|
10
|
+
autoload :GetVersionBundle, 'youtrack_on_rails/responses/get_version_bundle'
|
11
|
+
autoload :GetCustomField, 'youtrack_on_rails/responses/get_custom_field'
|
8
12
|
autoload :ApplyCommand, 'youtrack_on_rails/responses/apply_command'
|
9
13
|
autoload :CreateIssue, 'youtrack_on_rails/responses/create_issue'
|
10
14
|
autoload :ListProjects, 'youtrack_on_rails/responses/list_projects'
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module YoutrackOnRails
|
2
|
+
module Responses
|
3
|
+
class EnumerationResponse < CollectionResponse
|
4
|
+
def process(&block)
|
5
|
+
super do |hash, enumeration_node|
|
6
|
+
hash['value'] = enumeration_node.text
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def xpath
|
13
|
+
"//#{enumeration_name}"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module YoutrackOnRails
|
2
|
+
module Responses
|
3
|
+
class GetCustomField < ResourceResponse
|
4
|
+
def process
|
5
|
+
super do |hash, issue_node|
|
6
|
+
attributes = issue_node.xpath('param').map { |field| field['name'] }
|
7
|
+
attributes.each_with_object(hash) do |attribute, _hash|
|
8
|
+
_hash[attribute.downcase] = issue_node.xpath("param[@name='#{attribute}']").first['value']
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module YoutrackOnRails
|
2
|
+
module Responses
|
3
|
+
class ResourceResponse < CollectionResponse
|
4
|
+
def process(&block)
|
5
|
+
super.first
|
6
|
+
end
|
7
|
+
|
8
|
+
private
|
9
|
+
|
10
|
+
def resource_name
|
11
|
+
'projectCustomField'
|
12
|
+
end
|
13
|
+
|
14
|
+
def xpath
|
15
|
+
"//#{resource_name}"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: youtrack_on_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- stevo
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-02-
|
12
|
+
date: 2014-02-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -53,6 +53,8 @@ files:
|
|
53
53
|
- lib/youtrack_on_rails/requests/base.rb
|
54
54
|
- lib/youtrack_on_rails/requests/create_issue.rb
|
55
55
|
- lib/youtrack_on_rails/requests/get.rb
|
56
|
+
- lib/youtrack_on_rails/requests/get_custom_field.rb
|
57
|
+
- lib/youtrack_on_rails/requests/get_version_bundle.rb
|
56
58
|
- lib/youtrack_on_rails/requests/list_issues.rb
|
57
59
|
- lib/youtrack_on_rails/requests/list_projects.rb
|
58
60
|
- lib/youtrack_on_rails/requests/post.rb
|
@@ -63,8 +65,12 @@ files:
|
|
63
65
|
- lib/youtrack_on_rails/responses/base.rb
|
64
66
|
- lib/youtrack_on_rails/responses/collection_response.rb
|
65
67
|
- lib/youtrack_on_rails/responses/create_issue.rb
|
68
|
+
- lib/youtrack_on_rails/responses/enumeration_response.rb
|
69
|
+
- lib/youtrack_on_rails/responses/get_custom_field.rb
|
70
|
+
- lib/youtrack_on_rails/responses/get_version_bundle.rb
|
66
71
|
- lib/youtrack_on_rails/responses/list_issues.rb
|
67
72
|
- lib/youtrack_on_rails/responses/list_projects.rb
|
73
|
+
- lib/youtrack_on_rails/responses/resource_response.rb
|
68
74
|
- lib/youtrack_on_rails/responses/sign_in.rb
|
69
75
|
- lib/youtrack_on_rails/responses/simple_response.rb
|
70
76
|
- lib/youtrack_on_rails/version.rb
|