otrs_connector 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = otrs_connector
2
2
 
3
- otrs_connector connects to the OTRS API, wich some modifications that opens up more of the OTRS/ITSM internals.
3
+ otrs_connector connects to the OTRS API, with some modifications that opens up more of the OTRS/ITSM internals.
4
4
  By default only the ticketing system is opened to the external API in OTRS.
5
5
  Please see my other github project, rails_otrs to download the latest OTRS modifictions so that this will work correctly.
6
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 0.5.3
data/lib/otrs/relation.rb CHANGED
@@ -1,6 +1,31 @@
1
1
  class OTRS::Relation < Array
2
2
  require 'will_paginate/array'
3
3
 
4
+ #attr_accessor :where_hash, :connect_params
5
+ #
6
+ #def where(opts_hash={}, *rest)
7
+ # return self if opts_hash.blank?
8
+ #
9
+ # relation = clone
10
+ # relation.where_hash += opts_hash
11
+ # relation
12
+ #end
13
+ #
14
+ #def initialize(opts)
15
+ # self.send("where_hash=".to_sym, opts[:data])
16
+ # self.send("connect_params=".to_sym, opts.except(:data))
17
+ #end
18
+ #
19
+ #def to_query
20
+ # self.where_hash
21
+ #end
22
+ #
23
+ #
24
+ #def run_query
25
+ # a = OTRS.connect(self.connect_params.merge(self.where_hash))
26
+ # a.collect { |b| b.collect {|c| OTRS.object_preprocessor c }}
27
+ #end
28
+
4
29
  def where(attributes)
5
30
  relation = self.class.new
6
31
  attributes.each do |lookup_key,lookup_value|
data/lib/otrs.rb CHANGED
@@ -3,6 +3,7 @@ class OTRS
3
3
  include ActiveModel::Naming
4
4
  include ActiveModel::Validations
5
5
  extend ActiveModel::Callbacks
6
+ require File.dirname(__FILE__) + '/otrs'
6
7
 
7
8
  define_model_callbacks :create, :update, :save
8
9
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "otrs_connector"
8
- s.version = "0.5.2"
8
+ s.version = "0.5.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brian Goff"]
12
- s.date = "2012-04-23"
12
+ s.date = "2012-05-14"
13
13
  s.description = "Connect your RAILS app to OTRS/ITSM"
14
14
  s.email = "cpuguy83@gmail.com"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: otrs_connector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-23 00:00:00.000000000 Z
12
+ date: 2012-05-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -141,7 +141,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
141
141
  version: '0'
142
142
  segments:
143
143
  - 0
144
- hash: 434281716631286809
144
+ hash: -2370731004959895313
145
145
  required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  none: false
147
147
  requirements: