giddy 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/giddy/client.rb +4 -0
- data/lib/giddy/mediator.rb +9 -2
- data/lib/giddy/version.rb +1 -1
- metadata +4 -4
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/lib/giddy/client.rb
CHANGED
@@ -4,6 +4,10 @@ module Giddy
|
|
4
4
|
@mediator = Mediator.new(username, password, token, secure_token)
|
5
5
|
end
|
6
6
|
|
7
|
+
def set_system_credentials(system_id, system_password)
|
8
|
+
@mediator.set_system_credentials system_id, system_password
|
9
|
+
end
|
10
|
+
|
7
11
|
def search(attrs)
|
8
12
|
if attrs.has_key?(:image_id) and attrs.keys.length == 1
|
9
13
|
return Search.new(@mediator).get_image_details(attrs[:image_id]).first
|
data/lib/giddy/mediator.rb
CHANGED
@@ -8,12 +8,19 @@ module Giddy
|
|
8
8
|
@password = password
|
9
9
|
@token = token
|
10
10
|
@secure_token = secure_token
|
11
|
+
@system_id = nil
|
12
|
+
@system_password = nil
|
13
|
+
end
|
14
|
+
|
15
|
+
def set_system_credentials(system_id, system_password)
|
16
|
+
@system_id = system_id
|
17
|
+
@system_password = system_password
|
11
18
|
end
|
12
19
|
|
13
20
|
def create_session
|
14
21
|
data = {
|
15
|
-
:SystemId => Giddy.config.system_id,
|
16
|
-
:SystemPassword => Giddy.config.system_password,
|
22
|
+
:SystemId => @system_id || Giddy.config.system_id,
|
23
|
+
:SystemPassword => @system_password || Giddy.config.system_password,
|
17
24
|
:UserName => @username,
|
18
25
|
:UserPassword => @password
|
19
26
|
}
|
data/lib/giddy/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: giddy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Brian Muller
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2013-10-
|
13
|
+
date: 2013-10-20 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|
@@ -97,7 +97,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
97
97
|
requirements:
|
98
98
|
- - ">="
|
99
99
|
- !ruby/object:Gem::Version
|
100
|
-
hash:
|
100
|
+
hash: 2656067166173040371
|
101
101
|
segments:
|
102
102
|
- 0
|
103
103
|
version: "0"
|
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
106
|
requirements:
|
107
107
|
- - ">="
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
hash:
|
109
|
+
hash: 2656067166173040371
|
110
110
|
segments:
|
111
111
|
- 0
|
112
112
|
version: "0"
|