ragoon 0.8.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/README.md +7 -1
- data/lib/ragoon.rb +6 -4
- data/lib/ragoon/services.rb +6 -5
- data/lib/ragoon/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23616cbfc914424fbaae35704b3e75882cbf07c6
|
4
|
+
data.tar.gz: 78a00db94a1831c7b0d74eda848e422b09dcd9cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9729d0754e37771f8fc7e9de50d7f7234c3aed0bf567a1c6372a0d921ba4d00045c59b7fdd3312c74f16e805595490808154d8241206863853d83ccbb0431adf
|
7
|
+
data.tar.gz: 208f461513e1024985d2bf0041a96555c7da2eb074c1622ed6e3dad5340981640ca83c74848d5b062a6492895d1460f2cfeafc8a8bf42d7e6dee4fb9e6da6d92
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -2,10 +2,16 @@
|
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/kwappa/ragoon.svg?branch=master)](https://travis-ci.org/kwappa/ragoon)
|
4
4
|
|
5
|
-
Ragoon is simple Garoon
|
5
|
+
Ragoon is simple Garoon 4 API Client.
|
6
6
|
|
7
7
|
- https://cybozudev.zendesk.com/hc/ja/categories/200157760-Garoon-API
|
8
8
|
|
9
|
+
## !! BREAKING CHANGE !!
|
10
|
+
|
11
|
+
Verson 1.0.0 contains a change with braking compatibility for Garoon 3 (Will be fixed later).
|
12
|
+
|
13
|
+
Specify your garoon version (3 or 4) on your ENV or secret option.
|
14
|
+
|
9
15
|
## Usage
|
10
16
|
|
11
17
|
### Schedule
|
data/lib/ragoon.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
require 'nokogiri'
|
2
|
+
require 'rest-client'
|
3
|
+
require 'time'
|
4
|
+
|
1
5
|
require 'ragoon/version'
|
2
6
|
require 'ragoon/xml'
|
3
7
|
require 'ragoon/client'
|
@@ -6,9 +10,6 @@ require 'ragoon/services/schedule'
|
|
6
10
|
require 'ragoon/services/notification'
|
7
11
|
require 'ragoon/services/workflow'
|
8
12
|
|
9
|
-
require 'nokogiri'
|
10
|
-
require 'rest-client'
|
11
|
-
|
12
13
|
module Ragoon
|
13
14
|
@@secret_options = {}
|
14
15
|
|
@@ -16,7 +17,8 @@ module Ragoon
|
|
16
17
|
{
|
17
18
|
endpoint: ENV['GAROON_ENDPOINT'] || secret_options[:garoon_endpoint] || raise_option_error('endpoint'),
|
18
19
|
username: ENV['GAROON_USERNAME'] || secret_options[:garoon_username] || raise_option_error('username'),
|
19
|
-
password: ENV['GAROON_PASSWORD'] || secret_options[:garoon_password] || raise_option_error('password')
|
20
|
+
password: ENV['GAROON_PASSWORD'] || secret_options[:garoon_password] || raise_option_error('password'),
|
21
|
+
version: ENV['GAROON_VERSION'] || secret_options[:garoon_version] || 4
|
20
22
|
}
|
21
23
|
end
|
22
24
|
|
data/lib/ragoon/services.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
class Ragoon::Services
|
2
2
|
SERVICE_LOCATIONS = {
|
3
|
-
schedule: '/cbpapi/schedule/api?',
|
4
|
-
notification: '/cbpapi/notification/api?',
|
5
|
-
workflow: '/cbpapi/workflow/api?',
|
3
|
+
schedule: '/cbpapi/schedule/api.csp?',
|
4
|
+
notification: '/cbpapi/notification/api.csp?',
|
5
|
+
workflow: '/cbpapi/workflow/api.csp?',
|
6
6
|
}.freeze
|
7
7
|
|
8
8
|
attr_reader :client, :action_type
|
@@ -14,7 +14,9 @@ class Ragoon::Services
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def endpoint
|
17
|
-
"#{base_endpoint}#{SERVICE_LOCATIONS[action_type]}"
|
17
|
+
url = "#{base_endpoint}#{SERVICE_LOCATIONS[action_type]}"
|
18
|
+
url.gsub!('.csp', '') if @options[:version].to_i == 3
|
19
|
+
url
|
18
20
|
end
|
19
21
|
|
20
22
|
def self.start_and_end(date = Date.today)
|
@@ -49,5 +51,4 @@ class Ragoon::Services
|
|
49
51
|
return nil if time.nil?
|
50
52
|
time.utc.strftime('%FT%TZ')
|
51
53
|
end
|
52
|
-
|
53
54
|
end
|
data/lib/ragoon/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ragoon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SHIOYA, Hiromu
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|