easy-resources 0.7.5 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +60 -0
- data/README.md +1 -1
- data/lib/easy/resource.rb +10 -7
- data/lib/easy/resources.rb +7 -0
- data/lib/easy/resources/redmine/custom_field.rb +36 -0
- data/lib/easy/resources/redmine/easy_attendance.rb +12 -0
- data/lib/easy/resources/redmine/easy_contact.rb +0 -1
- data/lib/easy/resources/redmine/easy_crm_case.rb +0 -1
- data/lib/easy/resources/redmine/easy_server.rb +19 -1
- data/lib/easy/resources/redmine/easy_web_application.rb +14 -2
- data/lib/easy/resources/redmine/easy_web_application_activity.rb +0 -1
- data/lib/easy/resources/redmine/easy_web_hook.rb +0 -1
- data/lib/easy/resources/redmine/errors.rb +20 -0
- data/lib/easy/resources/redmine/issue.rb +0 -1
- data/lib/easy/resources/redmine/project.rb +0 -1
- data/lib/easy/resources/redmine/redmine_base.rb +13 -3
- data/lib/easy/resources/redmine/time_entry.rb +14 -0
- data/lib/easy/resources/redmine/user.rb +0 -1
- data/lib/easy/resources/spec_helper.rb +2 -2
- data/lib/easy/resources/version.rb +3 -1
- data/spec/easy_resources_spec.rb +0 -3
- data/spec/fixtures/files/custom_field/bool.xml +4 -0
- data/spec/fixtures/files/custom_field/date.xml +4 -0
- data/spec/fixtures/files/custom_field/datetime.xml +5 -0
- data/spec/fixtures/files/custom_field/float.xml +4 -0
- data/spec/fixtures/files/custom_field/int.xml +4 -0
- data/spec/fixtures/files/custom_field/string.xml +4 -0
- data/spec/fixtures/files/easy_attendance/show.xml +1 -0
- data/spec/fixtures/files/easy_web_application/show.xml +8 -0
- data/spec/fixtures/files/easy_web_hook/index.xml +26 -0
- data/spec/fixtures/files/easy_web_hook/show.xml +11 -0
- data/spec/fixtures/files/time_entry/invalid_update.xml +4 -0
- data/spec/fixtures/files/time_entry/show.xml +24 -0
- data/spec/models/easy-resources/redmine/custom_field_spec.rb +31 -0
- data/spec/models/easy-resources/redmine/easy_attendance_spec.rb +13 -0
- data/spec/models/easy-resources/redmine/easy_contact_spec.rb +0 -1
- data/spec/models/easy-resources/redmine/easy_crm_case_spec.rb +0 -2
- data/spec/models/easy-resources/redmine/easy_server_spec.rb +15 -0
- data/spec/models/easy-resources/redmine/easy_web_application_activity_spec.rb +0 -1
- data/spec/models/easy-resources/redmine/easy_web_application_spec.rb +13 -3
- data/spec/models/easy-resources/redmine/easy_web_hook_spec.rb +9 -0
- data/spec/models/easy-resources/redmine/errors_spec.rb +14 -0
- data/spec/models/easy-resources/redmine/issue_spec.rb +0 -2
- data/spec/models/easy-resources/redmine/project_spec.rb +0 -2
- data/spec/models/easy-resources/redmine/redmine_base_spec.rb +0 -2
- data/spec/models/easy-resources/redmine/time_entry_spec.rb +13 -0
- data/spec/models/easy-resources/redmine/user_spec.rb +0 -2
- data/spec/models/easy-resources/resource_spec.rb +2 -2
- data/spec/spec_helper.rb +4 -4
- data/spec/support/active_resource.rb +3 -3
- data/spec/support/redmine_active_resource.rb +3 -3
- metadata +91 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92eda89013e1a2ec9408d3bdcf01887646a4873974e1e0ff5688ce588872e3d6
|
4
|
+
data.tar.gz: 8ff8f00de0fe5691eba2b604413a21592d6feb57ea7c8818233319c843369412
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d6e022176f9f63387bf93f72d335e6c7cfe8fd3859d7d6fe41cbb10fcf9b650fa8342c98ce7eaf6366c4e0991fd5e24eaf10356e35477323c1bfa39ff907210
|
7
|
+
data.tar.gz: e3ca719a309508ee046b4a98aaf0a15ece961bf2c08bf0f1c1ddb5b5664f190b07f75964bd5bceea98b35d2c78a40ecf3e7af0d4f93ae50c4ba3c45c898b9c59
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
|
+
|
7
|
+
## [Unreleased]
|
8
|
+
## [0.9.0] - 2021-06-08
|
9
|
+
### Added
|
10
|
+
- CustomField resource
|
11
|
+
- rubocop linter
|
12
|
+
- improve gemspec metadata
|
13
|
+
### Changed
|
14
|
+
- dummy upgrade to rails 6
|
15
|
+
- update dev dependencies
|
16
|
+
|
17
|
+
## [0.8.2] - 2021-03-05
|
18
|
+
### Added
|
19
|
+
- ruby 3 compatibility
|
20
|
+
|
21
|
+
## [0.8.1] - 2020-06-08
|
22
|
+
### Fixed
|
23
|
+
- Retrieve (Easy)Redmine total entities from response if headers missing
|
24
|
+
- Validation error messages parser from XML
|
25
|
+
|
26
|
+
## [0.8.0] - 2020-04-28
|
27
|
+
### Added
|
28
|
+
- TimeEntry
|
29
|
+
- EasyAttendance
|
30
|
+
## [0.7.5] - 2020-03-06
|
31
|
+
### Added
|
32
|
+
- EasyServer `status` alias for `server_status`
|
33
|
+
## [0.7.5] - 2020-01-17
|
34
|
+
### Added
|
35
|
+
- aasm_event into EasyWebApplication scheme
|
36
|
+
- notes into EasyWebApplication scheme
|
37
|
+
## [0.7.4] - 2019-09-02
|
38
|
+
### Added
|
39
|
+
- Easy Web Application add belongs_to Issue
|
40
|
+
## [0.7.2] - 2019-08-29
|
41
|
+
### Added
|
42
|
+
- Easy Web Hook model
|
43
|
+
## [0.7.1] - 2019-07-11
|
44
|
+
### Added
|
45
|
+
- configuration from Oauth2 token
|
46
|
+
### Fixed
|
47
|
+
- api_key is changed to class_attribute
|
48
|
+
## [0.6.3] - 2019-07-08
|
49
|
+
### Fixed
|
50
|
+
- cached headers
|
51
|
+
## [0.6.2] - 2019-05-14
|
52
|
+
### Added
|
53
|
+
- alias url in server resource
|
54
|
+
## [0.6.1] - 2019-04-03
|
55
|
+
### Added
|
56
|
+
- this file
|
57
|
+
- User resource in Redmine
|
58
|
+
- 100% code coverage :)
|
59
|
+
### Changed
|
60
|
+
- README
|
data/README.md
CHANGED
data/lib/easy/resource.rb
CHANGED
@@ -2,26 +2,29 @@ module Easy
|
|
2
2
|
class Resource < ActiveResource::Base
|
3
3
|
|
4
4
|
def self.configure(conf)
|
5
|
-
|
5
|
+
case conf
|
6
|
+
when ::Hash
|
6
7
|
if conf[:url].present? && conf[:token].present?
|
7
8
|
configure_bearer(conf[:url], conf[:token])
|
8
9
|
elsif conf[:url].present?
|
9
10
|
self.site = conf[:url]
|
10
11
|
end
|
11
|
-
|
12
|
+
when ::OAuth2::AccessToken
|
12
13
|
configure_bearer(conf.client.site, conf.token)
|
14
|
+
else
|
15
|
+
# do nothing, unknown configuration
|
13
16
|
end
|
14
17
|
end
|
15
18
|
|
16
19
|
def self.configure_bearer(url, token)
|
17
|
-
self.site
|
18
|
-
|
19
|
-
|
20
|
+
self.site = url
|
21
|
+
connection.auth_type = :bearer
|
22
|
+
connection.bearer_token = token
|
20
23
|
end
|
21
24
|
|
22
25
|
def becomes(entity_class)
|
23
|
-
model
|
24
|
-
model.attributes =
|
26
|
+
model = entity_class.new
|
27
|
+
model.attributes = attributes
|
25
28
|
model
|
26
29
|
end
|
27
30
|
|
data/lib/easy/resources.rb
CHANGED
@@ -4,12 +4,17 @@ require "activeresource-response"
|
|
4
4
|
require "easy/resources/railtie"
|
5
5
|
|
6
6
|
module Easy
|
7
|
+
|
7
8
|
autoload :Resource, "easy/resource"
|
8
9
|
|
9
10
|
module Resources
|
10
11
|
module Redmine
|
11
12
|
|
13
|
+
autoload :Errors, "easy/resources/redmine/errors"
|
14
|
+
|
15
|
+
autoload :CustomField, "easy/resources/redmine/custom_field"
|
12
16
|
autoload :RedmineBase, "easy/resources/redmine/redmine_base"
|
17
|
+
autoload :EasyAttendance, "easy/resources/redmine/easy_attendance"
|
13
18
|
autoload :EasyContact, "easy/resources/redmine/easy_contact"
|
14
19
|
autoload :EasyCrmCase, "easy/resources/redmine/easy_crm_case"
|
15
20
|
autoload :EasyServer, "easy/resources/redmine/easy_server"
|
@@ -19,7 +24,9 @@ module Easy
|
|
19
24
|
autoload :Issue, "easy/resources/redmine/issue"
|
20
25
|
autoload :Project, "easy/resources/redmine/project"
|
21
26
|
autoload :User, "easy/resources/redmine/user"
|
27
|
+
autoload :TimeEntry, "easy/resources/redmine/time_entry"
|
22
28
|
|
23
29
|
end
|
24
30
|
end
|
31
|
+
|
25
32
|
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Easy
|
2
|
+
module Resources
|
3
|
+
module Redmine
|
4
|
+
class CustomField < RedmineBase
|
5
|
+
self.element_name = 'custom_field'
|
6
|
+
|
7
|
+
self.schema = {
|
8
|
+
id: :integer,
|
9
|
+
name: :string,
|
10
|
+
internal_name: :string,
|
11
|
+
value: :string,
|
12
|
+
field_format: :string,
|
13
|
+
}
|
14
|
+
|
15
|
+
# @return formatted value based on **field_format**
|
16
|
+
def cast_value
|
17
|
+
case field_format
|
18
|
+
when "bool"
|
19
|
+
value.to_s =~ /1|true/i ? true : false
|
20
|
+
when "float", "amount"
|
21
|
+
value.to_f
|
22
|
+
when "int"
|
23
|
+
value.to_i
|
24
|
+
when "date"
|
25
|
+
Date.parse value
|
26
|
+
when "datetime"
|
27
|
+
DateTime.parse value
|
28
|
+
else
|
29
|
+
value
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -2,15 +2,33 @@ module Easy
|
|
2
2
|
module Resources
|
3
3
|
module Redmine
|
4
4
|
class EasyServer < RedmineBase
|
5
|
-
|
6
5
|
self.element_name = 'easy_server'
|
7
6
|
|
8
7
|
has_many :easy_web_applications, class_name: 'Easy::Resources::Redmine::EasyWebApplication'
|
9
8
|
|
9
|
+
self.schema = {
|
10
|
+
host_name: :string,
|
11
|
+
server_type: :string,
|
12
|
+
server_status: :string
|
13
|
+
}
|
14
|
+
|
15
|
+
# Alias for +host_name+ attribute
|
16
|
+
# @return [String]
|
10
17
|
def url
|
11
18
|
host_name
|
12
19
|
end
|
13
20
|
|
21
|
+
# Alias for +server_status+ attribute
|
22
|
+
# @return [String]
|
23
|
+
def status
|
24
|
+
server_status
|
25
|
+
end
|
26
|
+
|
27
|
+
# @param [String] name of status
|
28
|
+
def status=(name)
|
29
|
+
self.server_status = name
|
30
|
+
end
|
31
|
+
|
14
32
|
end
|
15
33
|
end
|
16
34
|
end
|
@@ -2,7 +2,6 @@ module Easy
|
|
2
2
|
module Resources
|
3
3
|
module Redmine
|
4
4
|
class EasyWebApplication < RedmineBase
|
5
|
-
|
6
5
|
self.element_name = 'easy_web_application'
|
7
6
|
|
8
7
|
self.schema = {
|
@@ -13,7 +12,7 @@ module Easy
|
|
13
12
|
easy_crm_case_id: :integer,
|
14
13
|
easy_contact_id: :integer,
|
15
14
|
aasm_event: :string,
|
16
|
-
notes: :string
|
15
|
+
notes: :string,
|
17
16
|
}
|
18
17
|
|
19
18
|
belongs_to :easy_contact, class_name: 'Easy::Resources::Redmine::EasyContact'
|
@@ -21,6 +20,7 @@ module Easy
|
|
21
20
|
belongs_to :easy_server, class_name: 'Easy::Resources::Redmine::EasyServer'
|
22
21
|
belongs_to :issue, class_name: 'Easy::Resources::Redmine::Issue'
|
23
22
|
|
23
|
+
has_many :custom_fields, class_name: 'Easy::Resources::Redmine::CustomField'
|
24
24
|
has_many :easy_web_application_activities, class_name: 'Easy::Resources::Redmine::EasyWebApplicationActivity'
|
25
25
|
has_one :easy_web_application_activity, class_name: 'Easy::Resources::Redmine::EasyWebApplicationActivity'
|
26
26
|
|
@@ -28,6 +28,18 @@ module Easy
|
|
28
28
|
url
|
29
29
|
end
|
30
30
|
|
31
|
+
# @!group ESko specific custom_fields
|
32
|
+
|
33
|
+
# @return [Boolean,nil]
|
34
|
+
def application_moves_on_request?
|
35
|
+
custom_fields.find { |cf| cf.internal_name == "application_move_on_request" }&.cast_value
|
36
|
+
end
|
37
|
+
|
38
|
+
# @return [Boolean,nil]
|
39
|
+
def application_updates_on_request?
|
40
|
+
custom_fields.find { |cf| cf.internal_name == "application_updates_on_request" }&.cast_value
|
41
|
+
end
|
42
|
+
|
31
43
|
end
|
32
44
|
end
|
33
45
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Easy
|
2
|
+
module Resources
|
3
|
+
module Redmine
|
4
|
+
class Errors < ::ActiveResource::Errors
|
5
|
+
|
6
|
+
# Redmine in XML responses specify type="array" on Errors
|
7
|
+
# It cause that `Hash.from_xml` already parsed errors as a Array
|
8
|
+
def from_xml(xml, save_cache = false)
|
9
|
+
array = begin
|
10
|
+
Array.wrap(Hash.from_xml(xml)["errors"])
|
11
|
+
rescue StandardError
|
12
|
+
[]
|
13
|
+
end
|
14
|
+
from_array array, save_cache
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -2,10 +2,9 @@ module Easy
|
|
2
2
|
module Resources
|
3
3
|
module Redmine
|
4
4
|
class RedmineBase < ::Easy::Resource
|
5
|
-
|
6
5
|
self.include_root_in_json = true
|
7
6
|
self.format = :xml
|
8
|
-
|
7
|
+
add_response_method :http_response
|
9
8
|
|
10
9
|
class_attribute :api_key
|
11
10
|
|
@@ -26,10 +25,16 @@ module Easy
|
|
26
25
|
h
|
27
26
|
end
|
28
27
|
|
28
|
+
# Parse value of TOTAL amount of entities from headers or response
|
29
|
+
# @return [Integer]
|
30
|
+
def retrieve_total(response)
|
31
|
+
(response['Total'] || response.body[/total_count[:="]+(\d+)/] && Regexp.last_match(1)).to_i
|
32
|
+
end
|
33
|
+
|
29
34
|
def get_all(**params, &block)
|
30
35
|
records = results = all(params: params)
|
31
36
|
response = results.http_response
|
32
|
-
total = response
|
37
|
+
total = retrieve_total(response)
|
33
38
|
current_page = 1
|
34
39
|
|
35
40
|
while records.any?
|
@@ -46,6 +51,11 @@ module Easy
|
|
46
51
|
end
|
47
52
|
|
48
53
|
end
|
54
|
+
|
55
|
+
def errors
|
56
|
+
@errors ||= Errors.new(self)
|
57
|
+
end
|
58
|
+
|
49
59
|
end
|
50
60
|
end
|
51
61
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Easy
|
2
|
+
module Resources
|
3
|
+
module Redmine
|
4
|
+
class TimeEntry < RedmineBase
|
5
|
+
self.element_name = 'time_entry'
|
6
|
+
|
7
|
+
belongs_to :project, class_name: 'Easy::Resources::Redmine::Project'
|
8
|
+
belongs_to :issue, class_name: 'Easy::Resources::Redmine::Issue'
|
9
|
+
belongs_to :user, class_name: 'Easy::Resources::Redmine::User'
|
10
|
+
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
Dir["#{
|
1
|
+
gem_dir = File.expand_path('../../..', __dir__)
|
2
|
+
Dir["#{gem_dir}/spec/support/**/*.rb"].sort.each { |f| require f }
|
data/spec/easy_resources_spec.rb
CHANGED
@@ -6,7 +6,6 @@ RSpec.describe Easy::Resources do
|
|
6
6
|
end
|
7
7
|
|
8
8
|
describe '.configure' do
|
9
|
-
|
10
9
|
context "Easy::Resources::Redmine::RedmineBase" do
|
11
10
|
it "Easy::Resources::Redmine::RedmineBase" do
|
12
11
|
expect(Easy::Resources::Redmine::RedmineBase).to receive(:api_key=).with("xx1")
|
@@ -14,7 +13,5 @@ RSpec.describe Easy::Resources do
|
|
14
13
|
Easy::Resources::Redmine::RedmineBase.configure api_key: "xx1", url: "https://test.dummy"
|
15
14
|
end
|
16
15
|
end
|
17
|
-
|
18
16
|
end
|
19
|
-
|
20
17
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><easy_attendance><id>509</id><user id="17" name="Steve Helpdesk Dispatcher"/><arrival>2020-02-05T07:45:00+01:00</arrival><departure>2020-04-28T22:30:38+02:00</departure><easy_attendance_activity id="1" name="Office"/><locked>false</locked><arrival_user_ip>66.249.79.144</arrival_user_ip><departure_user_ip></departure_user_ip><range/><created_at>2020-02-05T07:32:19+01:00</created_at><updated_at>2020-02-05T07:32:19+01:00</updated_at><description/><need_approve>false</need_approve><limit_exceeded>false</limit_exceeded><hours>0.0</hours><easy_external_id/></easy_attendance>
|
@@ -11,6 +11,14 @@
|
|
11
11
|
<author id="14" name="Anonymní"/>
|
12
12
|
<internal_user_limit>0</internal_user_limit>
|
13
13
|
<git_repository type="string">git@git.easy.cz:package.git</git_repository>
|
14
|
+
<custom_fields type="array">
|
15
|
+
<custom_field id="695" name="Move on-request" internal_name="application_move_on_request" field_format="bool">
|
16
|
+
<value>1</value>
|
17
|
+
</custom_field>
|
18
|
+
<custom_field id="463" name="Updates on-request" internal_name="application_updates_on_request" field_format="bool">
|
19
|
+
<value>0</value>
|
20
|
+
</custom_field>
|
21
|
+
</custom_fields>
|
14
22
|
<created_at>2018-03-22T09:10:47Z</created_at>
|
15
23
|
<updated_at>2018-05-24T10:55:28Z</updated_at>
|
16
24
|
</easy_web_application>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<easy_web_hooks total_count="12" offset="0" limit="25" type="array">
|
3
|
+
<easy_web_hook>
|
4
|
+
<id>1</id>
|
5
|
+
<url>https://hooks.integromat.com/super-secret-hash</url>
|
6
|
+
<status>inactive</status>
|
7
|
+
<entity_type>Issue</entity_type>
|
8
|
+
<action>create</action>
|
9
|
+
<author id="1" name="Manager"/>
|
10
|
+
<api_includes>[]</api_includes>
|
11
|
+
<created_at>2017-08-18T11:56:53Z</created_at>
|
12
|
+
<updated_at>2019-08-29T07:44:16Z</updated_at>
|
13
|
+
</easy_web_hook>
|
14
|
+
<easy_web_hook>
|
15
|
+
<id>3</id>
|
16
|
+
<url>https://hooks.zapier.com/hooks/catch/hookID/hookSecret/</url>
|
17
|
+
<status>inactive</status>
|
18
|
+
<entity_type>Project</entity_type>
|
19
|
+
<action>destroy</action>
|
20
|
+
<author id="5" name="Admin"/>
|
21
|
+
<project id="7" name="Reporting"/>
|
22
|
+
<api_includes>[issue_categories]</api_includes>
|
23
|
+
<created_at>2019-06-19T11:41:22Z</created_at>
|
24
|
+
<updated_at>2019-06-19T11:41:22Z</updated_at>
|
25
|
+
</easy_web_hook>
|
26
|
+
</easy_web_hooks>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<easy_web_hook>
|
2
|
+
<id>1</id>
|
3
|
+
<url>https://hooks.integromat.com/super-secret-hash</url>
|
4
|
+
<status>inactive</status>
|
5
|
+
<entity_type>Issue</entity_type>
|
6
|
+
<action>create</action>
|
7
|
+
<author id="1" name="Manager"/>
|
8
|
+
<api_includes>[]</api_includes>
|
9
|
+
<created_at>2017-08-18T11:56:53Z</created_at>
|
10
|
+
<updated_at>2019-08-29T07:44:16Z</updated_at>
|
11
|
+
</easy_web_hook>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<time_entry>
|
3
|
+
<id>509</id>
|
4
|
+
<project id="110" name="Partner Program Implementation"/>
|
5
|
+
<user id="5" name="Manager Manager"/>
|
6
|
+
<activity id="1" name="Work"/>
|
7
|
+
<hours>4.0</hours>
|
8
|
+
<comments></comments>
|
9
|
+
<spent_on>2020-03-04</spent_on>
|
10
|
+
<easy_range_from/>
|
11
|
+
<easy_range_to/>
|
12
|
+
<easy_external_id/>
|
13
|
+
<entity_id>110</entity_id>
|
14
|
+
<entity_type>Project</entity_type>
|
15
|
+
<created_on>2020-03-04T15:03:56Z</created_on>
|
16
|
+
<updated_on>2020-03-04T15:03:56Z</updated_on>
|
17
|
+
<easy_is_billable>true</easy_is_billable>
|
18
|
+
<easy_billed>false</easy_billed>
|
19
|
+
<custom_fields type="array">
|
20
|
+
<custom_field id="105" name="test" internal_name="" field_format="list">
|
21
|
+
<value/>
|
22
|
+
</custom_field>
|
23
|
+
</custom_fields>
|
24
|
+
</time_entry>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
RSpec.describe Easy::Resources::Redmine::CustomField do
|
2
|
+
include_context "redmine active resource shares" do
|
3
|
+
let(:entity_name) { 'custom_field' }
|
4
|
+
end
|
5
|
+
|
6
|
+
let(:entity) { find_entity }
|
7
|
+
|
8
|
+
describe "#cast_value" do
|
9
|
+
subject { entity.cast_value }
|
10
|
+
context "with datetime" do
|
11
|
+
let(:entity) { find_entity "datetime" }
|
12
|
+
it { is_expected.to be_a DateTime }
|
13
|
+
end
|
14
|
+
context "with date" do
|
15
|
+
let(:entity) { find_entity "date" }
|
16
|
+
it { is_expected.to be_a Date }
|
17
|
+
end
|
18
|
+
context "with int" do
|
19
|
+
let(:entity) { find_entity "int" }
|
20
|
+
it { is_expected.to eq 0 }
|
21
|
+
end
|
22
|
+
context "with float" do
|
23
|
+
let(:entity) { find_entity "float" }
|
24
|
+
it { is_expected.to eq 24.0 }
|
25
|
+
end
|
26
|
+
context "with text" do
|
27
|
+
let(:entity) { find_entity "string" }
|
28
|
+
it { is_expected.not_to be_blank }
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
RSpec.describe Easy::Resources::Redmine::EasyAttendance do
|
2
|
+
include_context "redmine active resource shares" do
|
3
|
+
let(:entity_name) { 'easy_attendance' }
|
4
|
+
end
|
5
|
+
|
6
|
+
it 'get' do
|
7
|
+
expect(find_entity.arrival).not_to be_empty
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'has user' do
|
11
|
+
expect(find_entity.user).to be_a Easy::Resources::Redmine::User
|
12
|
+
end
|
13
|
+
end
|
@@ -3,7 +3,6 @@ RSpec.describe Easy::Resources::Redmine::EasyCrmCase do
|
|
3
3
|
let(:entity_name) { 'easy_crm_case' }
|
4
4
|
end
|
5
5
|
|
6
|
-
|
7
6
|
it 'get crm case' do
|
8
7
|
expect(find_entity.name).not_to be_empty
|
9
8
|
end
|
@@ -15,5 +14,4 @@ RSpec.describe Easy::Resources::Redmine::EasyCrmCase do
|
|
15
14
|
it 'crm case has customer' do
|
16
15
|
expect(find_entity.customer).to be_a Easy::Resources::Redmine::EasyContact
|
17
16
|
end
|
18
|
-
|
19
17
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
RSpec.describe Easy::Resources::Redmine::EasyServer do
|
2
|
+
include_context "redmine active resource shares" do
|
3
|
+
let(:entity_name) { 'easy_server' }
|
4
|
+
end
|
5
|
+
|
6
|
+
it "#status" do
|
7
|
+
expect(find_entity.status).to eq "running"
|
8
|
+
end
|
9
|
+
|
10
|
+
it "#status=" do
|
11
|
+
subject = find_entity
|
12
|
+
subject.status = "stopped"
|
13
|
+
expect(subject.server_status).to eq "stopped"
|
14
|
+
end
|
15
|
+
end
|
@@ -16,7 +16,7 @@ RSpec.describe Easy::Resources::Redmine::EasyWebApplication do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
it 'get ewa' do
|
19
|
-
expect(find_entity.attributes).to include
|
19
|
+
expect(find_entity.attributes).to include(*%w[id url git_repository version application_type created_at])
|
20
20
|
expect(find_entity.git_branch).to be_nil
|
21
21
|
expect(find_entity.name).not_to be_empty
|
22
22
|
end
|
@@ -29,7 +29,6 @@ RSpec.describe Easy::Resources::Redmine::EasyWebApplication do
|
|
29
29
|
include_examples "optional reference", :easy_contact
|
30
30
|
|
31
31
|
describe ".get_all" do
|
32
|
-
|
33
32
|
it "with block" do
|
34
33
|
stub_xml(path: "easy_web_applications.xml", source_file: "index", response_headers: { 'Total' => '4' })
|
35
34
|
stub_xml(path: "easy_web_applications.xml?page=2", source_file: "index")
|
@@ -53,7 +52,18 @@ RSpec.describe Easy::Resources::Redmine::EasyWebApplication do
|
|
53
52
|
subject.easy_web_application_activities_attributes = { activities_count_in_day: 13 }
|
54
53
|
subject.save
|
55
54
|
end
|
56
|
-
|
57
55
|
end
|
58
56
|
|
57
|
+
describe "application_moves_on_request?" do
|
58
|
+
subject { find_entity.application_moves_on_request? }
|
59
|
+
it "should be true" do
|
60
|
+
is_expected.to be_truthy
|
61
|
+
end
|
62
|
+
end
|
63
|
+
describe "application_updates_on_request?" do
|
64
|
+
subject { find_entity.application_updates_on_request? }
|
65
|
+
it "should be false" do
|
66
|
+
is_expected.to be_falsey
|
67
|
+
end
|
68
|
+
end
|
59
69
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
RSpec.describe Easy::Resources::Redmine::Errors do
|
2
|
+
include_context "redmine active resource shares" do
|
3
|
+
let(:entity_name) { 'time_entry' }
|
4
|
+
end
|
5
|
+
|
6
|
+
it 'invalid request' do
|
7
|
+
stub_xml source_file: "invalid_update", path: "#{entity_name.pluralize}.xml", method: :post, status: 422, request_body: { hours: 8.0, user_id: 1 }.to_xml(root: "time_entry")
|
8
|
+
|
9
|
+
time_entry = Easy::Resources::Redmine::TimeEntry.new hours: 8.0, user_id: 1
|
10
|
+
expect(time_entry.save).to eq false
|
11
|
+
expect(time_entry.errors).to be_a described_class
|
12
|
+
expect(time_entry.errors.full_messages).to eq ["Projekt je neplatné"]
|
13
|
+
end
|
14
|
+
end
|
@@ -3,7 +3,6 @@ RSpec.describe Easy::Resources::Redmine::Issue do
|
|
3
3
|
let(:entity_name) { 'issue' }
|
4
4
|
end
|
5
5
|
|
6
|
-
|
7
6
|
it 'get issue' do
|
8
7
|
expect(find_entity.subject).not_to be_empty
|
9
8
|
end
|
@@ -11,5 +10,4 @@ RSpec.describe Easy::Resources::Redmine::Issue do
|
|
11
10
|
it 'issue has project' do
|
12
11
|
expect(find_entity.project).to be_a Easy::Resources::Redmine::Project
|
13
12
|
end
|
14
|
-
|
15
13
|
end
|
@@ -1,5 +1,4 @@
|
|
1
1
|
RSpec.describe Easy::Resources::Redmine::RedmineBase do
|
2
|
-
|
3
2
|
it 'no configuration specify' do
|
4
3
|
described_class.site = nil
|
5
4
|
described_class.api_key = nil
|
@@ -15,5 +14,4 @@ RSpec.describe Easy::Resources::Redmine::RedmineBase do
|
|
15
14
|
expect(described_class.headers).to include "X-Redmine-API-Key" => "xxxx"
|
16
15
|
end
|
17
16
|
end
|
18
|
-
|
19
17
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
RSpec.describe Easy::Resources::Redmine::TimeEntry do
|
2
|
+
include_context "redmine active resource shares" do
|
3
|
+
let(:entity_name) { 'time_entry' }
|
4
|
+
end
|
5
|
+
|
6
|
+
it 'get' do
|
7
|
+
expect(find_entity.spent_on).not_to be_empty
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'has project' do
|
11
|
+
expect(find_entity.project).to be_a Easy::Resources::Redmine::Project
|
12
|
+
end
|
13
|
+
end
|
@@ -3,7 +3,6 @@ RSpec.describe Easy::Resources::Redmine::User do
|
|
3
3
|
let(:entity_name) { 'user' }
|
4
4
|
end
|
5
5
|
|
6
|
-
|
7
6
|
it 'get user' do
|
8
7
|
expect(find_entity.mail).not_to be_empty
|
9
8
|
end
|
@@ -15,5 +14,4 @@ RSpec.describe Easy::Resources::Redmine::User do
|
|
15
14
|
# it 'issue has project' do
|
16
15
|
# expect(find_entity.project).to be_a Easy::Resources::Redmine::Project
|
17
16
|
# end
|
18
|
-
|
19
17
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
class DummyResource < Easy::Resource
|
2
2
|
self.site = "easyredmine.com"
|
3
3
|
self.format = :json
|
4
|
+
|
4
5
|
end
|
5
6
|
RSpec.describe Easy::Resource do
|
6
7
|
subject { DummyResource.new({ id: 1 }, true) }
|
@@ -22,7 +23,6 @@ RSpec.describe Easy::Resource do
|
|
22
23
|
expect(subject).to receive(:patch).with nil, {}, value.to_xml(root: "dummy-resource")
|
23
24
|
subject.update_column :att, 1
|
24
25
|
end
|
25
|
-
|
26
26
|
end
|
27
27
|
|
28
28
|
describe "#patch" do
|
@@ -39,4 +39,4 @@ RSpec.describe Easy::Resource do
|
|
39
39
|
subject.patch "deployed"
|
40
40
|
end
|
41
41
|
end
|
42
|
-
end
|
42
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
ENV["RAILS_ENV"] = "test"
|
2
2
|
require "simplecov"
|
3
3
|
SimpleCov.start 'rails' do
|
4
|
-
add_filter '
|
5
|
-
add_filter 'lib/easy/resources/
|
4
|
+
add_filter '/bin'
|
5
|
+
add_filter '/lib/easy/resources/spec_helper'
|
6
|
+
add_filter '/lib/easy/resources/version'
|
7
|
+
add_filter '/vendor'
|
6
8
|
end
|
7
9
|
|
8
10
|
require "bundler/setup"
|
@@ -16,7 +18,6 @@ require "active_resource_response/http_mock"
|
|
16
18
|
Dir["./spec/support/**/*.rb"].sort.each { |f| require f }
|
17
19
|
|
18
20
|
RSpec.configure do |config|
|
19
|
-
|
20
21
|
# Disable RSpec exposing methods globally on `Module` and `main`
|
21
22
|
config.disable_monkey_patching!
|
22
23
|
|
@@ -24,4 +25,3 @@ RSpec.configure do |config|
|
|
24
25
|
c.syntax = :expect
|
25
26
|
end
|
26
27
|
end
|
27
|
-
|
@@ -2,7 +2,7 @@ RSpec.shared_context "active resource shares", shared_context: :metadata do
|
|
2
2
|
let(:site) { 'https://test.dummy' }
|
3
3
|
let(:api_key) { 'secret' }
|
4
4
|
|
5
|
-
let(:entity_name) {}
|
5
|
+
let(:entity_name) { "" }
|
6
6
|
|
7
7
|
before(:each) do
|
8
8
|
ActiveResource::HttpMock.reset!
|
@@ -17,13 +17,13 @@ RSpec.shared_context "active resource shares", shared_context: :metadata do
|
|
17
17
|
# @param [Hash] options @see #stub_easy_resource_request
|
18
18
|
def stub_json(**options)
|
19
19
|
options[:format] = "json"
|
20
|
-
stub_resource_request(options)
|
20
|
+
stub_resource_request(**options)
|
21
21
|
end
|
22
22
|
|
23
23
|
# @param [Hash] options @see #stub_easy_resource_request
|
24
24
|
def stub_xml(**options)
|
25
25
|
options[:format] = "xml"
|
26
|
-
stub_resource_request(options)
|
26
|
+
stub_resource_request(**options)
|
27
27
|
end
|
28
28
|
|
29
29
|
# @param [String] format XML or JSON
|
@@ -9,13 +9,13 @@ RSpec.shared_context "redmine active resource shares", shared_context: :metadata
|
|
9
9
|
# @param [Hash] options @see #stub_easy_resource_request
|
10
10
|
def stub_json(**options)
|
11
11
|
options[:format] = "json"
|
12
|
-
stub_easy_resource_request(options)
|
12
|
+
stub_easy_resource_request(**options)
|
13
13
|
end
|
14
14
|
|
15
15
|
# @param [Hash] options @see #stub_easy_resource_request
|
16
16
|
def stub_xml(**options)
|
17
17
|
options[:format] = "xml"
|
18
|
-
stub_easy_resource_request(options)
|
18
|
+
stub_easy_resource_request(**options)
|
19
19
|
end
|
20
20
|
|
21
21
|
def stub_easy_resource_request(format:, path:, **options)
|
@@ -25,4 +25,4 @@ RSpec.shared_context "redmine active resource shares", shared_context: :metadata
|
|
25
25
|
options[:path] = path
|
26
26
|
stub_resource_request options
|
27
27
|
end
|
28
|
-
end
|
28
|
+
end
|
metadata
CHANGED
@@ -1,57 +1,58 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy-resources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
|
7
|
+
- Petr
|
8
|
+
- Lukáš
|
9
|
+
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2021-06-08 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
15
|
+
name: activeresource
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
16
17
|
requirements:
|
17
|
-
- - "
|
18
|
+
- - "~>"
|
18
19
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
+
version: '5.1'
|
20
21
|
type: :runtime
|
21
22
|
prerelease: false
|
22
23
|
version_requirements: !ruby/object:Gem::Requirement
|
23
24
|
requirements:
|
24
|
-
- - "
|
25
|
+
- - "~>"
|
25
26
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
27
|
+
version: '5.1'
|
27
28
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: activeresource
|
29
|
+
name: activeresource-response
|
29
30
|
requirement: !ruby/object:Gem::Requirement
|
30
31
|
requirements:
|
31
32
|
- - "~>"
|
32
33
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
34
|
+
version: '1.2'
|
34
35
|
type: :runtime
|
35
36
|
prerelease: false
|
36
37
|
version_requirements: !ruby/object:Gem::Requirement
|
37
38
|
requirements:
|
38
39
|
- - "~>"
|
39
40
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
41
|
+
version: '1.2'
|
41
42
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
43
|
+
name: railties
|
43
44
|
requirement: !ruby/object:Gem::Requirement
|
44
45
|
requirements:
|
45
|
-
- - "
|
46
|
+
- - ">="
|
46
47
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
48
|
+
version: '0'
|
48
49
|
type: :runtime
|
49
50
|
prerelease: false
|
50
51
|
version_requirements: !ruby/object:Gem::Requirement
|
51
52
|
requirements:
|
52
|
-
- - "
|
53
|
+
- - ">="
|
53
54
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
55
|
+
version: '0'
|
55
56
|
- !ruby/object:Gem::Dependency
|
56
57
|
name: easy-configuration
|
57
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,88 +67,116 @@ dependencies:
|
|
66
67
|
- - ">="
|
67
68
|
- !ruby/object:Gem::Version
|
68
69
|
version: '0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: easy_style
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
69
84
|
- !ruby/object:Gem::Dependency
|
70
85
|
name: rails
|
71
86
|
requirement: !ruby/object:Gem::Requirement
|
72
87
|
requirements:
|
73
88
|
- - "~>"
|
74
89
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
90
|
+
version: '6.1'
|
76
91
|
type: :development
|
77
92
|
prerelease: false
|
78
93
|
version_requirements: !ruby/object:Gem::Requirement
|
79
94
|
requirements:
|
80
95
|
- - "~>"
|
81
96
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
97
|
+
version: '6.1'
|
83
98
|
- !ruby/object:Gem::Dependency
|
84
99
|
name: rspec-rails
|
85
100
|
requirement: !ruby/object:Gem::Requirement
|
86
101
|
requirements:
|
87
102
|
- - "~>"
|
88
103
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
104
|
+
version: '4.0'
|
90
105
|
type: :development
|
91
106
|
prerelease: false
|
92
107
|
version_requirements: !ruby/object:Gem::Requirement
|
93
108
|
requirements:
|
94
109
|
- - "~>"
|
95
110
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
111
|
+
version: '4.0'
|
97
112
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
113
|
+
name: sqlite3
|
99
114
|
requirement: !ruby/object:Gem::Requirement
|
100
115
|
requirements:
|
101
116
|
- - "~>"
|
102
117
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
118
|
+
version: 1.4.2
|
104
119
|
type: :development
|
105
120
|
prerelease: false
|
106
121
|
version_requirements: !ruby/object:Gem::Requirement
|
107
122
|
requirements:
|
108
123
|
- - "~>"
|
109
124
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
125
|
+
version: 1.4.2
|
111
126
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
127
|
+
name: webmock
|
113
128
|
requirement: !ruby/object:Gem::Requirement
|
114
129
|
requirements:
|
115
130
|
- - "~>"
|
116
131
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
132
|
+
version: '3.13'
|
118
133
|
type: :development
|
119
134
|
prerelease: false
|
120
135
|
version_requirements: !ruby/object:Gem::Requirement
|
121
136
|
requirements:
|
122
137
|
- - "~>"
|
123
138
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
125
|
-
description:
|
139
|
+
version: '3.13'
|
140
|
+
description: Define common Active::Resources for Redmine / Easy Redmine and Easy Project
|
141
|
+
entities.
|
126
142
|
email:
|
127
143
|
- petr@easy.cz
|
144
|
+
- lukas@easy.cz
|
128
145
|
executables: []
|
129
146
|
extensions: []
|
130
147
|
extra_rdoc_files: []
|
131
148
|
files:
|
149
|
+
- CHANGELOG.md
|
132
150
|
- MIT-LICENSE
|
133
151
|
- README.md
|
134
152
|
- Rakefile
|
135
153
|
- lib/easy/resource.rb
|
136
154
|
- lib/easy/resources.rb
|
137
155
|
- lib/easy/resources/railtie.rb
|
156
|
+
- lib/easy/resources/redmine/custom_field.rb
|
157
|
+
- lib/easy/resources/redmine/easy_attendance.rb
|
138
158
|
- lib/easy/resources/redmine/easy_contact.rb
|
139
159
|
- lib/easy/resources/redmine/easy_crm_case.rb
|
140
160
|
- lib/easy/resources/redmine/easy_server.rb
|
141
161
|
- lib/easy/resources/redmine/easy_web_application.rb
|
142
162
|
- lib/easy/resources/redmine/easy_web_application_activity.rb
|
143
163
|
- lib/easy/resources/redmine/easy_web_hook.rb
|
164
|
+
- lib/easy/resources/redmine/errors.rb
|
144
165
|
- lib/easy/resources/redmine/issue.rb
|
145
166
|
- lib/easy/resources/redmine/project.rb
|
146
167
|
- lib/easy/resources/redmine/redmine_base.rb
|
168
|
+
- lib/easy/resources/redmine/time_entry.rb
|
147
169
|
- lib/easy/resources/redmine/user.rb
|
148
170
|
- lib/easy/resources/spec_helper.rb
|
149
171
|
- lib/easy/resources/version.rb
|
150
172
|
- spec/easy_resources_spec.rb
|
173
|
+
- spec/fixtures/files/custom_field/bool.xml
|
174
|
+
- spec/fixtures/files/custom_field/date.xml
|
175
|
+
- spec/fixtures/files/custom_field/datetime.xml
|
176
|
+
- spec/fixtures/files/custom_field/float.xml
|
177
|
+
- spec/fixtures/files/custom_field/int.xml
|
178
|
+
- spec/fixtures/files/custom_field/string.xml
|
179
|
+
- spec/fixtures/files/easy_attendance/show.xml
|
151
180
|
- spec/fixtures/files/easy_contact.json
|
152
181
|
- spec/fixtures/files/easy_contact/show.xml
|
153
182
|
- spec/fixtures/files/easy_crm_case.json
|
@@ -161,64 +190,90 @@ files:
|
|
161
190
|
- spec/fixtures/files/easy_web_application/with_easy_contact.xml
|
162
191
|
- spec/fixtures/files/easy_web_application/with_easy_crm_case.xml
|
163
192
|
- spec/fixtures/files/easy_web_application/with_ewaa.xml
|
193
|
+
- spec/fixtures/files/easy_web_hook/index.xml
|
194
|
+
- spec/fixtures/files/easy_web_hook/show.xml
|
164
195
|
- spec/fixtures/files/issue.json
|
165
196
|
- spec/fixtures/files/issue/show.xml
|
166
197
|
- spec/fixtures/files/project.json
|
167
198
|
- spec/fixtures/files/project/show.xml
|
199
|
+
- spec/fixtures/files/time_entry/invalid_update.xml
|
200
|
+
- spec/fixtures/files/time_entry/show.xml
|
168
201
|
- spec/fixtures/files/user/show.xml
|
202
|
+
- spec/models/easy-resources/redmine/custom_field_spec.rb
|
203
|
+
- spec/models/easy-resources/redmine/easy_attendance_spec.rb
|
169
204
|
- spec/models/easy-resources/redmine/easy_contact_spec.rb
|
170
205
|
- spec/models/easy-resources/redmine/easy_crm_case_spec.rb
|
206
|
+
- spec/models/easy-resources/redmine/easy_server_spec.rb
|
171
207
|
- spec/models/easy-resources/redmine/easy_web_application_activity_spec.rb
|
172
208
|
- spec/models/easy-resources/redmine/easy_web_application_spec.rb
|
209
|
+
- spec/models/easy-resources/redmine/easy_web_hook_spec.rb
|
210
|
+
- spec/models/easy-resources/redmine/errors_spec.rb
|
173
211
|
- spec/models/easy-resources/redmine/issue_spec.rb
|
174
212
|
- spec/models/easy-resources/redmine/project_spec.rb
|
175
213
|
- spec/models/easy-resources/redmine/redmine_base_spec.rb
|
214
|
+
- spec/models/easy-resources/redmine/time_entry_spec.rb
|
176
215
|
- spec/models/easy-resources/redmine/user_spec.rb
|
177
216
|
- spec/models/easy-resources/resource_spec.rb
|
178
217
|
- spec/spec_helper.rb
|
179
218
|
- spec/support/active_resource.rb
|
180
219
|
- spec/support/fixtures.rb
|
181
220
|
- spec/support/redmine_active_resource.rb
|
182
|
-
homepage: https://
|
221
|
+
homepage: https://git.easy.cz/easy/resources
|
183
222
|
licenses:
|
184
223
|
- MIT
|
185
224
|
metadata:
|
186
225
|
allowed_push_host: https://rubygems.org
|
187
|
-
post_install_message:
|
226
|
+
post_install_message:
|
188
227
|
rdoc_options: []
|
189
228
|
require_paths:
|
190
229
|
- lib
|
191
230
|
required_ruby_version: !ruby/object:Gem::Requirement
|
192
231
|
requirements:
|
193
|
-
- - "
|
232
|
+
- - "~>"
|
194
233
|
- !ruby/object:Gem::Version
|
195
|
-
version: '
|
234
|
+
version: '2.5'
|
196
235
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
197
236
|
requirements:
|
198
237
|
- - ">="
|
199
238
|
- !ruby/object:Gem::Version
|
200
239
|
version: '0'
|
201
240
|
requirements: []
|
202
|
-
rubygems_version: 3.
|
203
|
-
signing_key:
|
241
|
+
rubygems_version: 3.2.16
|
242
|
+
signing_key:
|
204
243
|
specification_version: 4
|
205
|
-
summary:
|
244
|
+
summary: ActiveResources connectors for Easy Project / Easy Redmine
|
206
245
|
test_files:
|
207
246
|
- spec/spec_helper.rb
|
247
|
+
- spec/models/easy-resources/redmine/custom_field_spec.rb
|
208
248
|
- spec/models/easy-resources/redmine/project_spec.rb
|
209
249
|
- spec/models/easy-resources/redmine/easy_crm_case_spec.rb
|
210
250
|
- spec/models/easy-resources/redmine/easy_contact_spec.rb
|
211
251
|
- spec/models/easy-resources/redmine/issue_spec.rb
|
252
|
+
- spec/models/easy-resources/redmine/time_entry_spec.rb
|
212
253
|
- spec/models/easy-resources/redmine/redmine_base_spec.rb
|
254
|
+
- spec/models/easy-resources/redmine/easy_web_hook_spec.rb
|
213
255
|
- spec/models/easy-resources/redmine/easy_web_application_activity_spec.rb
|
214
256
|
- spec/models/easy-resources/redmine/easy_web_application_spec.rb
|
257
|
+
- spec/models/easy-resources/redmine/easy_server_spec.rb
|
258
|
+
- spec/models/easy-resources/redmine/errors_spec.rb
|
215
259
|
- spec/models/easy-resources/redmine/user_spec.rb
|
260
|
+
- spec/models/easy-resources/redmine/easy_attendance_spec.rb
|
216
261
|
- spec/models/easy-resources/resource_spec.rb
|
217
262
|
- spec/support/active_resource.rb
|
218
263
|
- spec/support/fixtures.rb
|
219
264
|
- spec/support/redmine_active_resource.rb
|
220
265
|
- spec/easy_resources_spec.rb
|
266
|
+
- spec/fixtures/files/easy_web_hook/index.xml
|
267
|
+
- spec/fixtures/files/easy_web_hook/show.xml
|
221
268
|
- spec/fixtures/files/easy_contact/show.xml
|
269
|
+
- spec/fixtures/files/time_entry/show.xml
|
270
|
+
- spec/fixtures/files/time_entry/invalid_update.xml
|
271
|
+
- spec/fixtures/files/custom_field/datetime.xml
|
272
|
+
- spec/fixtures/files/custom_field/bool.xml
|
273
|
+
- spec/fixtures/files/custom_field/float.xml
|
274
|
+
- spec/fixtures/files/custom_field/date.xml
|
275
|
+
- spec/fixtures/files/custom_field/int.xml
|
276
|
+
- spec/fixtures/files/custom_field/string.xml
|
222
277
|
- spec/fixtures/files/easy_crm_case.json
|
223
278
|
- spec/fixtures/files/easy_crm_case/show.xml
|
224
279
|
- spec/fixtures/files/project.json
|
@@ -229,6 +284,7 @@ test_files:
|
|
229
284
|
- spec/fixtures/files/easy_contact.json
|
230
285
|
- spec/fixtures/files/easy_server/index.xml
|
231
286
|
- spec/fixtures/files/easy_server/show.xml
|
287
|
+
- spec/fixtures/files/easy_attendance/show.xml
|
232
288
|
- spec/fixtures/files/easy_web_application/index.xml
|
233
289
|
- spec/fixtures/files/easy_web_application/with_ewaa.xml
|
234
290
|
- spec/fixtures/files/easy_web_application/with_custom_fields.xml
|