uberbringer 0.0.4 → 0.0.5

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: b56a8413abe4f44a4057a1fc9e632e17d939f2f1
4
- data.tar.gz: 825d1c12a28ce32bbfe99c3100a613dd0d558b41
3
+ metadata.gz: 1060e6a3d82adc7bd28400eecbfe07415e306dcf
4
+ data.tar.gz: 9e93be86a4798e60b3c3ee55f4f6728c8054deb8
5
5
  SHA512:
6
- metadata.gz: 9f0236c5e44c16eeb2a9c84447e7a0c7a977b74d5761c05ff3fd021ce266a7f7e13980230c848fc48ed3724832f6c1385b599d4c46e077d64d99bd889f0aeb18
7
- data.tar.gz: c0b7b70e97a7b8bd87f17000192424d9bf2de0e7837a4eeeb14994fc3662e9c4af8dec10c983153b1f6d38dc54fd1c3e2e84ce3de003510c13042cf05e523759
6
+ metadata.gz: 27ab10c099d605bb8d43e4043a46456530ee71d5aa4b0d30fe154de91b4d14b06c980879a9318995aef022f38487076bd78f4239f6c604be9db56ba0f5f49353
7
+ data.tar.gz: 05313b3d463a1f4e36eddd658ef7ccfb589e06b951f78528440fc0211e28926b63a2d2b7b7a44d24f5c5bcd40ff7ef8184a3be8348dcb3afc0ee44fc6bbd44ad
data/Gemfile.lock CHANGED
@@ -1,59 +1,63 @@
1
- PATH
2
- remote: .
3
- specs:
4
- uberbringer (0.0.3)
5
- fig_newton
6
- soap-object
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- akami (1.3.1)
12
- gyoku (>= 0.4.0)
13
- nokogiri
14
- builder (3.2.2)
15
- diff-lcs (1.2.5)
16
- fig_newton (0.12)
17
- yml_reader (>= 0.5)
18
- gyoku (1.3.1)
19
- builder (>= 2.1.2)
20
- httpi (2.4.1)
21
- rack
22
- mini_portile (0.6.2)
23
- nokogiri (1.6.6.2-x86-mingw32)
24
- mini_portile (~> 0.6.0)
25
- nori (2.6.0)
26
- rack (1.6.4)
27
- rspec (3.1.0)
28
- rspec-core (~> 3.1.0)
29
- rspec-expectations (~> 3.1.0)
30
- rspec-mocks (~> 3.1.0)
31
- rspec-core (3.1.7)
32
- rspec-support (~> 3.1.0)
33
- rspec-expectations (3.1.2)
34
- diff-lcs (>= 1.2.0, < 2.0)
35
- rspec-support (~> 3.1.0)
36
- rspec-mocks (3.1.3)
37
- rspec-support (~> 3.1.0)
38
- rspec-support (3.1.2)
39
- savon (2.11.1)
40
- akami (~> 1.2)
41
- builder (>= 2.1.2)
42
- gyoku (~> 1.2)
43
- httpi (~> 2.3)
44
- nokogiri (>= 1.4.0)
45
- nori (~> 2.4)
46
- wasabi (~> 3.4)
47
- soap-object (0.6.5)
48
- savon (>= 2.2.0)
49
- wasabi (3.5.0)
50
- httpi (~> 2.0)
51
- nokogiri (>= 1.4.2)
52
- yml_reader (0.5)
53
-
54
- PLATFORMS
55
- x86-mingw32
56
-
57
- DEPENDENCIES
58
- rspec (>= 2.12.0)
59
- uberbringer!
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ uberbringer (0.0.4)
5
+ fig_newton
6
+ soap-object
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ akami (1.3.1)
12
+ gyoku (>= 0.4.0)
13
+ nokogiri
14
+ builder (3.2.2)
15
+ diff-lcs (1.2.5)
16
+ fig_newton (0.12)
17
+ yml_reader (>= 0.5)
18
+ gyoku (1.3.1)
19
+ builder (>= 2.1.2)
20
+ httpi (2.4.1)
21
+ rack
22
+ mini_portile2 (2.0.0)
23
+ nokogiri (1.6.7-x86-mingw32)
24
+ mini_portile2 (~> 2.0.0.rc2)
25
+ nori (2.6.0)
26
+ rack (1.6.4)
27
+ rspec (3.4.0)
28
+ rspec-core (~> 3.4.0)
29
+ rspec-expectations (~> 3.4.0)
30
+ rspec-mocks (~> 3.4.0)
31
+ rspec-core (3.4.1)
32
+ rspec-support (~> 3.4.0)
33
+ rspec-expectations (3.4.0)
34
+ diff-lcs (>= 1.2.0, < 2.0)
35
+ rspec-support (~> 3.4.0)
36
+ rspec-mocks (3.4.0)
37
+ diff-lcs (>= 1.2.0, < 2.0)
38
+ rspec-support (~> 3.4.0)
39
+ rspec-support (3.4.1)
40
+ savon (2.11.1)
41
+ akami (~> 1.2)
42
+ builder (>= 2.1.2)
43
+ gyoku (~> 1.2)
44
+ httpi (~> 2.3)
45
+ nokogiri (>= 1.4.0)
46
+ nori (~> 2.4)
47
+ wasabi (~> 3.4)
48
+ soap-object (0.6.7)
49
+ savon (>= 2.2.0)
50
+ wasabi (3.5.0)
51
+ httpi (~> 2.0)
52
+ nokogiri (>= 1.4.2)
53
+ yml_reader (0.6)
54
+
55
+ PLATFORMS
56
+ x86-mingw32
57
+
58
+ DEPENDENCIES
59
+ rspec (>= 2.12.0)
60
+ uberbringer!
61
+
62
+ BUNDLED WITH
63
+ 1.10.6
data/lib/uberbringer.rb CHANGED
@@ -9,19 +9,19 @@ require 'uberbringer/empty_response'
9
9
 
10
10
 
11
11
  module Uberbringer
12
+ include SoapObject::Factory
12
13
 
13
14
  def initialize
14
- @service = RemedyService.new
15
15
  @builder = QueryBuilder.new
16
16
  end
17
17
 
18
18
  def list_with_filter(criteria, options = {})
19
19
  query = normalize_params(@builder.build(criteria), options)
20
- @service.execute_query(query)
20
+ using(RemedyService).execute_query(query)
21
21
  end
22
22
 
23
23
  def result
24
- result = @service.body[:help_desk_query_list_service_response][:get_list_values]
24
+ result = using(RemedyService).body[:help_desk_query_list_service_response][:get_list_values]
25
25
  return result if result.kind_of?(Array)
26
26
  return [result] if result.kind_of?(Hash)
27
27
  end
@@ -29,7 +29,7 @@ module Uberbringer
29
29
  private
30
30
 
31
31
  def normalize_params(query, options)
32
- params = options.merge({:start_record => 0, :max_limit => 10})
32
+ params = {:start_record => 0, :max_limit => 10}.merge(options)
33
33
  {
34
34
  'Qualification' => query,
35
35
  'startRecord' => params[:start_record],
@@ -64,6 +64,10 @@ module Uberbringer
64
64
  filter_by_status(map_status(status),OPERATORS[:not_equal_to])
65
65
  end
66
66
 
67
+ def closed_within_days(number_of_days = 7)
68
+ self << {:field => FIELD_MAPPINGS[:closed_date], :value => date_format(Date.today - number_of_days), :operator => OPERATORS[:greater_than]}
69
+ end
70
+
67
71
  private
68
72
 
69
73
  def filter_by_status(values, operator = OPERATORS[:equal_to])
@@ -5,8 +5,10 @@ module Uberbringer
5
5
 
6
6
  wsdl FigNewton.remedy_wsdl
7
7
  soap_header({'AuthenticationInfo' => {:userName => FigNewton.remedy_username, :password => FigNewton.remedy_password}})
8
- ssl_verification(false)
9
- ssl_version(:TLSv1)
8
+ ssl_options do |opts|
9
+ opts.verify_mode = :none
10
+ opts.version = :TLSv1
11
+ end
10
12
 
11
13
  def execute_query(query)
12
14
  begin
@@ -1,3 +1,3 @@
1
1
  module Uberbringer
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uberbringer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - mosaic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-24 00:00:00.000000000 Z
11
+ date: 2015-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: soap-object
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: fig_newton
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 2.12.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 2.12.0
55
55
  description: Wrapper around remedy web service for easy querying
@@ -59,7 +59,7 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - .gitignore
62
+ - ".gitignore"
63
63
  - Gemfile
64
64
  - Gemfile.lock
65
65
  - README.md
@@ -81,17 +81,17 @@ require_paths:
81
81
  - lib
82
82
  required_ruby_version: !ruby/object:Gem::Requirement
83
83
  requirements:
84
- - - '>='
84
+ - - ">="
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0'
87
87
  required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - '>='
89
+ - - ">="
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  requirements: []
93
93
  rubyforge_project:
94
- rubygems_version: 2.0.14
94
+ rubygems_version: 2.4.5.1
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: Wrapper around remedy web service for easy querying