goldshark_gem 0.2.6 → 0.2.7

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.
data/Gemfile CHANGED
@@ -6,7 +6,7 @@ gem "activesupport", :require => "active_support"
6
6
  gem 'libxml-ruby'
7
7
  group :test do
8
8
  gem 'minitest'
9
- gem 'ZenTest'
9
+ gem 'ZenTest', '~> 4.8.3'
10
10
  gem 'webmock'
11
11
  gem 'turn'
12
12
  gem 'vcr'
@@ -2,8 +2,8 @@
2
2
  Gem::Specification.new do |s|
3
3
  s.name = "goldshark_gem"
4
4
  s.platform = Gem::Platform::RUBY
5
- s.authors = ["Gabriele Roselli"]
6
- s.email = ["groselli@igodigital.com"]
5
+ s.authors = ["Gabriele Roselli","Ryan Carroll"]
6
+ s.email = ["groselli@igodigital.com", "rcarroll@igodigital.com"]
7
7
  s.summary = %q{A gem to interact with iGodigital GoldShark API}
8
8
  s.description = %q{A gem to interact with iGodigital GoldShark API}
9
9
  s.homepage = "https://rubygems.org/gems/goldshark_gem/"
@@ -15,5 +15,5 @@ Gem::Specification.new do |s|
15
15
  s.add_dependency 'activesupport'
16
16
  s.add_dependency 'libxml-ruby'
17
17
  s.require_paths = ["lib"]
18
- s.version = '0.2.6'
18
+ s.version = '0.2.7'
19
19
  end
@@ -77,17 +77,25 @@ module GS
77
77
  return get_call(uri)
78
78
  end
79
79
 
80
- def get_results(tool_step_option_ids = nil, completed = "true")
80
+ def get_results(tool_step_option_ids = nil, product_limit = nil, completed = "true")
81
81
  tool = get_tool
82
82
  unless tool_step_option_ids.nil?
83
83
  tool[:steps] = update_tool_options(tool, tool_step_option_ids)
84
84
  end
85
85
  tool[:steps].each{|step| step.reject!{|key, value| ![:tool_step_id, :selected_options, :selected_filter_options].include?(key)}}
86
86
  if @session_id.nil?
87
- uri = URI.parse("#{@url}/#{@tool_guid}/tool.json?locale=#{@locale}&sid=#{@session_id}&completed=#{completed}")
87
+ session_url = ""
88
88
  else
89
- uri = URI.parse("#{@url}/#{@tool_guid}/tool.json?locale=#{@locale}&completed=#{completed}")
89
+ session_url = "&sid=#{@session_id}"
90
90
  end
91
+ if product_limit.nil?
92
+ product_limit_url = ""
93
+ else
94
+ product_limit_url = "&product_limit=#{product_limit}"
95
+ end
96
+
97
+ uri = URI.parse("#{@url}/#{@tool_guid}/tool.json?locale=#{@locale}&completed=#{completed}#{session_url}#{product_limit_url}")
98
+
91
99
  http = Net::HTTP.new(uri.host, uri.port)
92
100
  request = Net::HTTP::Put.new(uri.request_uri)
93
101
  request.body = tool.to_json
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goldshark_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Gabriele Roselli
9
+ - Ryan Carroll
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2013-01-09 00:00:00.000000000 Z
13
+ date: 2013-02-05 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: activesupport
@@ -46,6 +47,7 @@ dependencies:
46
47
  description: A gem to interact with iGodigital GoldShark API
47
48
  email:
48
49
  - groselli@igodigital.com
50
+ - rcarroll@igodigital.com
49
51
  executables: []
50
52
  extensions: []
51
53
  extra_rdoc_files:
@@ -87,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
89
  version: '0'
88
90
  requirements: []
89
91
  rubyforge_project:
90
- rubygems_version: 1.8.23
92
+ rubygems_version: 1.8.25
91
93
  signing_key:
92
94
  specification_version: 3
93
95
  summary: A gem to interact with iGodigital GoldShark API