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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c67a33e1c1cec2e28132441bbe32828c8528a2d9
4
- data.tar.gz: f2cce54f2fe6e0929e892cad9a4cef8906e1e938
3
+ metadata.gz: 23616cbfc914424fbaae35704b3e75882cbf07c6
4
+ data.tar.gz: 78a00db94a1831c7b0d74eda848e422b09dcd9cc
5
5
  SHA512:
6
- metadata.gz: 13e194b523eecb9dad99e0f721f990de3bd730e69f1c93b9f4df06369c7765f654f21da44b18e511e6bf6e7fb092fd85cb020633ab3de08d8bd1f44f2ae8d65d
7
- data.tar.gz: d64e8216be3f65f4ecc92727d693261b8a5f8d1f2491101d686e1732f11485e8c88156ab04e37c95ec28c93b12a32430fdc1b22270caa2823395f77968f8ef3e
6
+ metadata.gz: 9729d0754e37771f8fc7e9de50d7f7234c3aed0bf567a1c6372a0d921ba4d00045c59b7fdd3312c74f16e805595490808154d8241206863853d83ccbb0431adf
7
+ data.tar.gz: 208f461513e1024985d2bf0041a96555c7da2eb074c1622ed6e3dad5340981640ca83c74848d5b062a6492895d1460f2cfeafc8a8bf42d7e6dee4fb9e6da6d92
@@ -1,4 +1,4 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.1
4
- - 2.2.5
3
+ - 2.4.1
4
+ - 2.3.4
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 3 API Client.
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
@@ -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
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Ragoon
2
- VERSION = '0.8.1'
2
+ VERSION = '1.0.0'
3
3
  end
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.8.1
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-01-15 00:00:00.000000000 Z
11
+ date: 2017-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client