wso2_toolbox 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24ebff4181acd11b571bc23e57ace37558244704
4
- data.tar.gz: 16ac1b56304a0d245801dfd696185b44eb1c37f5
3
+ metadata.gz: 842229c8de966f0b65e2f89e6119a374ac696726
4
+ data.tar.gz: 40da42ccf3a63cadc2f9c1762838617adaf07c6d
5
5
  SHA512:
6
- metadata.gz: 65caa9a9cdcf53408258bf877a2a08d111fdb100ebc5df9151b62aead005b2cbeccd771543b4e3c148bbd6f2c8f79a268cd06ce0be0fbfc86d0e058dd99155d8
7
- data.tar.gz: abefaf7531afce6b1a976852527ea8623b9fd8cae13f059c33af501a28ba6c51547b416c7ac1809f5906c606dd1136d5ac5257bc7fab9c4a0c0c5c22aea73f8d
6
+ metadata.gz: b941fb874d6799d784ead6029742e96ad4e691cf3be77f99171dd620dbbcf3fc199a55533fb2917a84fa245b392ab51aee544ca16c0c126dad60e1508ca30e2c
7
+ data.tar.gz: fba81783be62a0e1dc6a576ae67d04095c3c415bf3d47aeb1a4784b744a99c8663e13794e98cf028b391a92a862a89c16d26528a6554f03b1330c62b77eeb04a
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
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](http://keepachangelog.com/en/1.0.0/)
5
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.2.1] - 2018-01-15
10
+ ### Changed
11
+ - Fix time parser
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wso2_toolbox (0.2.0)
4
+ wso2_toolbox (0.2.1)
5
5
  actionpack (>= 5.0)
6
6
  activesupport (>= 5.0)
7
7
  request_store (~> 1.3.2)
@@ -116,7 +116,7 @@ PLATFORMS
116
116
  ruby
117
117
 
118
118
  DEPENDENCIES
119
- bundler (~> 1.16)
119
+ bundler (~> 1.16.1)
120
120
  dotenv
121
121
  pry-byebug
122
122
  rails-controller-testing (~> 1.0)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_support'
2
4
 
3
5
  module Wso2Toolbox
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Wso2Toolbox
2
4
  module RspecUtils
3
5
  module SharedExamples
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Wso2Toolbox
2
4
  module RspecUtils
3
5
  module SharedExamples
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'wso2_toolbox/rspec_utils/shared_examples'
2
4
  require 'wso2_toolbox/rspec_utils/shared_examples/identity_headers'
3
5
 
@@ -1,4 +1,4 @@
1
- # forzen_string_literal: true
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'json'
4
4
  require 'request_store'
@@ -23,7 +23,7 @@ module Wso2Toolbox
23
23
  Wso2Toolbox::TokenManager::ApiManagerService.create_token
24
24
 
25
25
  write(:token_time_for_job,
26
- Time.now + token_params[:expires_in].seconds)
26
+ Time.now + token_params[:expires_in].to_i.seconds)
27
27
  write(:token_for_job,
28
28
  "#{token_params[:token_type]} #{token_params[:access_token]}")
29
29
  end
@@ -5,7 +5,7 @@ require 'active_support/core_ext/numeric/time'
5
5
  module Wso2Toolbox
6
6
  module TokenManager
7
7
  module Adapters
8
- module RailsCachedAdaper
8
+ module RailsCachedAdapter
9
9
  class << self
10
10
  TOKEN_DELAY = 5.minutes
11
11
 
@@ -22,7 +22,7 @@ module Wso2Toolbox
22
22
  Setting.token_for_job =
23
23
  "#{token_params[:token_type]} #{token_params[:access_token]}"
24
24
  Setting.token_time_for_job =
25
- Time.now + token_params[:expires_in].seconds
25
+ Time.now + token_params[:expires_in].to_i.seconds
26
26
  end
27
27
 
28
28
  def store_token(token)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Wso2Toolbox
2
- VERSION = '0.2.0'.freeze
4
+ VERSION = '0.2.1'
3
5
  end
data/lib/wso2_toolbox.rb CHANGED
@@ -1,9 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'wso2_toolbox/version'
2
4
  require 'wso2_toolbox/identity_headers'
3
5
  require 'wso2_toolbox/configuration'
4
6
  require 'wso2_toolbox/token_manager'
5
7
  require 'wso2_toolbox/token_manager/api_manager_service'
6
8
  require 'wso2_toolbox/token_manager/adapters/local_file_adapter'
9
+ require 'wso2_toolbox/token_manager/adapters/rails_cached_adapter'
7
10
 
8
11
  module Wso2Toolbox
9
12
  class << self
data/wso2_toolbox.gemspec CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  lib = File.expand_path('../lib', __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
@@ -22,7 +23,7 @@ Gem::Specification.new do |spec|
22
23
  spec.add_dependency 'request_store', '~> 1.3.2'
23
24
  spec.add_dependency 'rest-client', '>= 2.0.2'
24
25
 
25
- spec.add_development_dependency 'bundler', '~> 1.15.4'
26
+ spec.add_development_dependency 'bundler', '~> 1.16.1'
26
27
  spec.add_development_dependency 'dotenv'
27
28
  spec.add_development_dependency 'pry-byebug'
28
29
  spec.add_development_dependency 'rails-controller-testing', '~> 1.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wso2_toolbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abner Carleto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-11 00:00:00.000000000 Z
11
+ date: 2018-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.15.4
75
+ version: 1.16.1
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 1.15.4
82
+ version: 1.16.1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: dotenv
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -205,6 +205,7 @@ files:
205
205
  - ".rspec"
206
206
  - ".ruby-gemset"
207
207
  - ".travis.yml"
208
+ - CHANGELOG.md
208
209
  - Gemfile
209
210
  - Gemfile.lock
210
211
  - README.md