scene7-wrapper 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. data/.document +5 -0
  2. data/.rspec +1 -0
  3. data/.rvmrc +1 -0
  4. data/Gemfile +19 -0
  5. data/Gemfile.lock +64 -0
  6. data/LICENSE.txt +20 -0
  7. data/README.rdoc +24 -0
  8. data/Rakefile +28 -0
  9. data/VERSION +1 -0
  10. data/lib/scene7/asset.rb +104 -0
  11. data/lib/scene7/client.rb +56 -0
  12. data/lib/scene7/company.rb +29 -0
  13. data/lib/scene7/config.rb +33 -0
  14. data/lib/scene7/crop.rb +24 -0
  15. data/lib/scene7/folder.rb +60 -0
  16. data/lib/scene7-wrapper.rb +9 -0
  17. data/scene7-wrapper.gemspec +119 -0
  18. data/spec/file_fixtures/fpo.jpg +0 -0
  19. data/spec/fixtures/create_folder/folder.xml +8 -0
  20. data/spec/fixtures/delete_asset/success.xml +1 -0
  21. data/spec/fixtures/delete_folder/empty_response.xml +6 -0
  22. data/spec/fixtures/get_assets/all_assets.xml +1 -0
  23. data/spec/fixtures/get_assets_by_name/hat_asset.xml +4 -0
  24. data/spec/fixtures/get_assets_by_name/jacket_asset.xml +1 -0
  25. data/spec/fixtures/get_assets_by_name/zero_found.xml +1 -0
  26. data/spec/fixtures/get_company_info/company.xml +13 -0
  27. data/spec/fixtures/get_company_info/test_request.xml +1 -0
  28. data/spec/fixtures/get_folders/folders.xml +26 -0
  29. data/spec/fixtures/rename_asset/failure.xml +1 -0
  30. data/spec/fixtures/rename_asset/success.xml +1 -0
  31. data/spec/fixtures/submit_job/upload_urls_job_response.xml +7 -0
  32. data/spec/scene7/asset_spec.rb +195 -0
  33. data/spec/scene7/client_spec.rb +91 -0
  34. data/spec/scene7/company_spec.rb +63 -0
  35. data/spec/scene7/config_spec.rb +77 -0
  36. data/spec/scene7/crop_spec.rb +62 -0
  37. data/spec/scene7/folder_spec.rb +115 -0
  38. data/spec/spec_helper.rb +16 -0
  39. metadata +283 -0
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --colour
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm use ree@scene7 --create
data/Gemfile ADDED
@@ -0,0 +1,19 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'savon'
4
+ gem 'httpclient'
5
+ gem 'activesupport'
6
+ gem 'i18n'
7
+
8
+ # Add dependencies to develop your gem here.
9
+ # Include everything needed to run rake, tests, features, etc.
10
+ group :development do
11
+ gem "shoulda", ">= 0"
12
+ gem "bundler", "~> 1.0.0"
13
+ gem "jeweler", "~> 1.5.2"
14
+ gem "rspec"
15
+ gem "savon_spec"
16
+ gem "mocha"
17
+ gem "ruby-debug"
18
+ gem 'timecop'
19
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,64 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ activesupport (3.0.5)
5
+ builder (3.0.0)
6
+ columnize (0.3.2)
7
+ crack (0.1.8)
8
+ diff-lcs (1.1.2)
9
+ git (1.2.5)
10
+ gyoku (0.3.1)
11
+ builder (>= 2.1.2)
12
+ httpclient (2.1.6.1)
13
+ httpi (0.7.9)
14
+ rack
15
+ i18n (0.5.0)
16
+ jeweler (1.5.2)
17
+ bundler (~> 1.0.0)
18
+ git (>= 1.2.5)
19
+ rake
20
+ linecache (0.43)
21
+ mocha (0.9.12)
22
+ rack (1.2.1)
23
+ rake (0.8.7)
24
+ rspec (2.5.0)
25
+ rspec-core (~> 2.5.0)
26
+ rspec-expectations (~> 2.5.0)
27
+ rspec-mocks (~> 2.5.0)
28
+ rspec-core (2.5.1)
29
+ rspec-expectations (2.5.0)
30
+ diff-lcs (~> 1.1.2)
31
+ rspec-mocks (2.5.0)
32
+ ruby-debug (0.10.4)
33
+ columnize (>= 0.1)
34
+ ruby-debug-base (~> 0.10.4.0)
35
+ ruby-debug-base (0.10.4)
36
+ linecache (>= 0.3)
37
+ savon (0.8.6)
38
+ builder (>= 2.1.2)
39
+ crack (~> 0.1.8)
40
+ gyoku (>= 0.3.0)
41
+ httpi (>= 0.7.8)
42
+ savon_spec (0.1.4)
43
+ mocha (>= 0.9.8)
44
+ rspec (>= 2.0.0)
45
+ savon (~> 0.8.0)
46
+ shoulda (2.11.3)
47
+ timecop (0.3.5)
48
+
49
+ PLATFORMS
50
+ ruby
51
+
52
+ DEPENDENCIES
53
+ activesupport
54
+ bundler (~> 1.0.0)
55
+ httpclient
56
+ i18n
57
+ jeweler (~> 1.5.2)
58
+ mocha
59
+ rspec
60
+ ruby-debug
61
+ savon
62
+ savon_spec
63
+ shoulda
64
+ timecop
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Brian Rose
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,24 @@
1
+ = scene7-wrapper
2
+
3
+ Provides a wrapper around the Adobe Scene 7 SOAP API.
4
+
5
+ = Contributors
6
+
7
+ * Brian Rose (heimidal)
8
+ * Jim Whiteman (jwhiteman)
9
+
10
+ == Contributing to scene7-wrapper
11
+
12
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
13
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
14
+ * Fork the project
15
+ * Start a feature/bugfix branch
16
+ * Commit and push until you are happy with your contribution
17
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
18
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
19
+
20
+ == Copyright
21
+
22
+ Copyright (c) 2011 Factory Design Labs. See LICENSE.txt for
23
+ further details.
24
+
data/Rakefile ADDED
@@ -0,0 +1,28 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'rake'
11
+
12
+ require 'jeweler'
13
+ Jeweler::Tasks.new do |gem|
14
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15
+ gem.name = "scene7-wrapper"
16
+ gem.homepage = "http://github.com/factorylabs/scene7-wrapper"
17
+ gem.license = "MIT"
18
+ gem.summary = %Q{A Scene7 wrapper for Rails 3.x apps.}
19
+ gem.description = %Q{A Scene7 wrapper for Rails 3.x apps.}
20
+ gem.email = "brian.rose@factorylabs.com"
21
+ gem.authors = ["Brian Rose", "Jim Whiteman"]
22
+ # Include your dependencies below. Runtime dependencies are required when using your gem,
23
+ # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
24
+ # gem.add_runtime_dependency 'jabber4r', '> 0.1'
25
+ # gem.add_development_dependency 'rspec', '> 1.2.3'
26
+ end
27
+ Jeweler::RubygemsDotOrgTasks.new
28
+
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -0,0 +1,104 @@
1
+ require 'digest/sha1'
2
+
3
+ module Scene7
4
+ class Asset
5
+
6
+ class << self
7
+ def find_by_name(name)
8
+ find_all_by_name(name).first
9
+ end
10
+
11
+ def find_all_by_name(name)
12
+ response = Client.perform_request(:get_assets_by_name,
13
+ :company_handle => Client.company_handle,
14
+ :name_array => {:items => name},
15
+ :order! => [:company_handle, :name_array]
16
+ )
17
+
18
+ attributes = response.to_hash[:get_assets_by_name_return][:asset_array][:items] rescue []
19
+
20
+ collection = attributes.is_a?(Array) ? attributes : [attributes]
21
+
22
+ collection.map! { |asset| new(asset) }
23
+ end
24
+
25
+ def create(params)
26
+ source_url = params.delete(:source_url)
27
+ dest_path = params.delete(:dest_path)
28
+
29
+ request = {
30
+ :company_handle => Client.company_handle,
31
+ :job_name => job_name(source_url),
32
+ :upload_urls_job => {
33
+ :url_array => {
34
+ :items => {
35
+ :source_url => source_url,
36
+ :dest_path => dest_path,
37
+ :order! => [:source_url, :dest_path]
38
+ }
39
+ },
40
+ :overwrite => false,
41
+ :ready_for_publish => false,
42
+ :create_mask => false,
43
+ :email_setting => "None",
44
+ :order! => [:url_array, :overwrite, :ready_for_publish, :create_mask, :email_setting]
45
+ },
46
+ :order! => [:company_handle, :job_name, :upload_urls_job]
47
+ }
48
+
49
+ Client.perform_request(:submit_job, request)
50
+
51
+ asset = nil
52
+ 1.upto(20) do
53
+ break if asset
54
+ sleep 1
55
+ asset = find_by_name(File.basename(dest_path, File.extname(dest_path)))
56
+ end
57
+
58
+ raise "Could not create asset" if asset.nil?
59
+
60
+ asset
61
+ end
62
+
63
+ def job_name(name)
64
+ Digest::SHA1.hexdigest("#{name}#{Time.now.usec}")[0..20]
65
+ end
66
+ end
67
+
68
+ attr_reader :attributes
69
+
70
+ def initialize(attributes)
71
+ @attributes = attributes
72
+ end
73
+
74
+ def name
75
+ attributes[:name]
76
+ end
77
+
78
+ def rename(new_name)
79
+ response = Client.perform_request(:rename_asset, {
80
+ :company_handle => Client.company_handle,
81
+ :asset_handle => handle,
82
+ :new_name => new_name,
83
+ :validate_name => true,
84
+ :rename_files => true,
85
+ :order! => [:company_handle, :asset_handle, :new_name, :validate_name, :rename_files]
86
+ })
87
+
88
+ @attributes[:name] = new_name
89
+ return true
90
+ rescue Savon::SOAP::Fault
91
+ raise "Could not rename the file -- name already taken."
92
+ end
93
+
94
+ def handle
95
+ attributes[:asset_handle]
96
+ end
97
+
98
+ def destroy
99
+ response = Client.perform_request(:delete_asset, :company_handle => Client.company_handle, :asset_handle => handle, :order! => [:company_handle, :asset_handle])
100
+ return response.http.code == 200
101
+ end
102
+
103
+ end
104
+ end
@@ -0,0 +1,56 @@
1
+ require 'active_support/core_ext'
2
+
3
+ module Scene7
4
+ class Client
5
+ cattr_reader :configuration
6
+
7
+ CONFIG_FIELDS = [:subdomain, :user, :password, :app_name, :app_version].freeze
8
+ NAMESPACE = "http://www.scene7.com/IpsApi/xsd/2010-01-31"
9
+
10
+ class << self
11
+ def configure(options)
12
+ params = CONFIG_FIELDS.map { |field| options[field] }
13
+
14
+ @@configuration = Config.new(*params)
15
+
16
+ self
17
+ end
18
+
19
+ def reset_configuration
20
+ @@configuration = nil
21
+ @@company_handle = nil
22
+ end
23
+
24
+ def client
25
+ Savon::Client.new do
26
+ wsdl.namespace = NAMESPACE
27
+ wsdl.endpoint = configuration.endpoint
28
+ end
29
+ end
30
+
31
+ def perform_request(action, body_params)
32
+ client.request(:ns, action) do
33
+ soap.input = [input_for_action(action), {:xmlns => "http://www.scene7.com/IpsApi/xsd/2010-01-31" }]
34
+ soap.header = header
35
+ soap.body = body_params
36
+ end
37
+ end
38
+
39
+ def header
40
+ if configuration.blank?
41
+ raise 'Call Scene7::Client.configure with your configuration first.'
42
+ else
43
+ configuration.header
44
+ end
45
+ end
46
+
47
+ def company_handle
48
+ @@company_handle ||= Company.find_by_name(configuration.app_name).handle
49
+ end
50
+
51
+ def input_for_action(action)
52
+ action.to_s.camelize(:lower) + 'Param'
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,29 @@
1
+ module Scene7
2
+ class Company
3
+ def self.find_by_name(name)
4
+ response = Scene7::Client.perform_request(:get_company_info, :company_name => name)
5
+
6
+ company_data = response.to_hash[:get_company_info_return][:company_info]
7
+
8
+ new(company_data)
9
+ end
10
+
11
+ attr_reader :attributes
12
+
13
+ def initialize(attributes)
14
+ @attributes = attributes
15
+ end
16
+
17
+ def name
18
+ attributes[:name]
19
+ end
20
+
21
+ def handle
22
+ attributes[:company_handle]
23
+ end
24
+
25
+ def root_path
26
+ attributes[:root_path]
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,33 @@
1
+ require 'active_support/core_ext'
2
+
3
+ module Scene7
4
+ class Config
5
+ attr_reader :user, :password, :app_name, :app_version, :subdomain
6
+
7
+ AUTH_NAMESPACE = "http://www.scene7.com/IpsApi/xsd"
8
+
9
+ def initialize(subdomain, user, password, app_name, app_version)
10
+ @subdomain = subdomain
11
+ @user = user
12
+ @password = password
13
+ @app_name = app_name
14
+ @app_version = app_version
15
+ end
16
+
17
+ def endpoint
18
+ "https://#{subdomain}.scene7.com/scene7/services/IpsApiService"
19
+ end
20
+
21
+ def header
22
+ {
23
+ :auth_header => {
24
+ :user => user,
25
+ :password => password,
26
+ :app_name => app_name,
27
+ :app_version => app_version
28
+ },
29
+ :attributes! => { :auth_header => { :xmlns => AUTH_NAMESPACE } }
30
+ }
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,24 @@
1
+ require 'active_support/core_ext'
2
+
3
+ module Scene7
4
+ module Crop
5
+ def self.convert_from_scale_first_and_format(params)
6
+ format_url_params convert_params_from_scale_first(params)
7
+ end
8
+
9
+ def self.format_url_params(params)
10
+ "scl=#{params[:scale_factor]}&crop=#{params[:x].round},#{params[:y].round},#{params[:width].round},#{params[:height].round}"
11
+ end
12
+
13
+ def self.convert_params_from_scale_first(orig_params)
14
+ {}.tap do |params|
15
+ scale_factor = orig_params[:scale_factor].to_f
16
+ params[:scale_factor] = 1.0 / scale_factor
17
+ params[:height] = orig_params[:height].to_f / scale_factor
18
+ params[:width] = orig_params[:width].to_f / scale_factor
19
+ params[:x] = orig_params[:x].to_f / scale_factor
20
+ params[:y] = orig_params[:y].to_f / scale_factor
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,60 @@
1
+ module Scene7
2
+ class Folder
3
+ attr_reader :attributes
4
+
5
+ class << self
6
+ def all
7
+ response = Client.perform_request(:get_folders, :company_handle => Client.company_handle)
8
+
9
+ folder_hashes = response.to_hash[:get_folders_return][:folder_array][:items]
10
+
11
+ folder_hashes.map { |folder_hash| self.new(folder_hash) }
12
+ end
13
+
14
+ def find_by_handle(handle)
15
+ all.detect { |folder| folder.handle == handle }
16
+ end
17
+
18
+ def create(params)
19
+ raise ":folder_path is required to create a folder" unless params[:folder_path]
20
+
21
+ base_request_params = {:company_handle => Client.company_handle, :order! => [:company_handle, :folder_path]}
22
+ full_request_params = base_request_params.merge(params)
23
+
24
+ response = Client.perform_request(:create_folder, full_request_params)
25
+ attributes = response.to_hash[:create_folder_return]
26
+
27
+ new(attributes)
28
+ end
29
+
30
+ end
31
+
32
+ def initialize(attributes)
33
+ @attributes = attributes
34
+ end
35
+
36
+ def destroy
37
+ response = Client.perform_request(:delete_folder, :company_handle => Client.company_handle, :folder_handle => self.handle, :order! => [:company_handle, :folder_handle])
38
+
39
+ return response.http.code == 200
40
+ end
41
+
42
+ # folderHandle
43
+ def handle
44
+ attributes[:folder_handle]
45
+ end
46
+
47
+ def path
48
+ attributes[:path]
49
+ end
50
+
51
+ def last_modified
52
+ attributes[:last_modified]
53
+ end
54
+
55
+ def has_subfolders
56
+ attributes[:has_subfolders]
57
+ end
58
+
59
+ end
60
+ end
@@ -0,0 +1,9 @@
1
+ require 'savon'
2
+
3
+ require 'scene7/client'
4
+ require 'scene7/config'
5
+ require 'scene7/company'
6
+ require 'scene7/asset'
7
+ require 'scene7/folder'
8
+ require 'scene7/crop'
9
+
@@ -0,0 +1,119 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{scene7-wrapper}
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Brian Rose", "Jim Whiteman"]
12
+ s.date = %q{2011-03-18}
13
+ s.description = %q{A Scene7 wrapper for Rails 3.x apps.}
14
+ s.email = %q{brian.rose@factorylabs.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".rspec",
22
+ ".rvmrc",
23
+ "Gemfile",
24
+ "Gemfile.lock",
25
+ "LICENSE.txt",
26
+ "README.rdoc",
27
+ "Rakefile",
28
+ "VERSION",
29
+ "lib/scene7-wrapper.rb",
30
+ "lib/scene7/asset.rb",
31
+ "lib/scene7/client.rb",
32
+ "lib/scene7/company.rb",
33
+ "lib/scene7/config.rb",
34
+ "lib/scene7/crop.rb",
35
+ "lib/scene7/folder.rb",
36
+ "scene7-wrapper.gemspec",
37
+ "spec/file_fixtures/fpo.jpg",
38
+ "spec/fixtures/create_folder/folder.xml",
39
+ "spec/fixtures/delete_asset/success.xml",
40
+ "spec/fixtures/delete_folder/empty_response.xml",
41
+ "spec/fixtures/get_assets/all_assets.xml",
42
+ "spec/fixtures/get_assets_by_name/hat_asset.xml",
43
+ "spec/fixtures/get_assets_by_name/jacket_asset.xml",
44
+ "spec/fixtures/get_assets_by_name/zero_found.xml",
45
+ "spec/fixtures/get_company_info/company.xml",
46
+ "spec/fixtures/get_company_info/test_request.xml",
47
+ "spec/fixtures/get_folders/folders.xml",
48
+ "spec/fixtures/rename_asset/failure.xml",
49
+ "spec/fixtures/rename_asset/success.xml",
50
+ "spec/fixtures/submit_job/upload_urls_job_response.xml",
51
+ "spec/scene7/asset_spec.rb",
52
+ "spec/scene7/client_spec.rb",
53
+ "spec/scene7/company_spec.rb",
54
+ "spec/scene7/config_spec.rb",
55
+ "spec/scene7/crop_spec.rb",
56
+ "spec/scene7/folder_spec.rb",
57
+ "spec/spec_helper.rb"
58
+ ]
59
+ s.homepage = %q{http://github.com/factorylabs/scene7-wrapper}
60
+ s.licenses = ["MIT"]
61
+ s.require_paths = ["lib"]
62
+ s.rubygems_version = %q{1.5.0}
63
+ s.summary = %q{A Scene7 wrapper for Rails 3.x apps.}
64
+ s.test_files = [
65
+ "spec/scene7/asset_spec.rb",
66
+ "spec/scene7/client_spec.rb",
67
+ "spec/scene7/company_spec.rb",
68
+ "spec/scene7/config_spec.rb",
69
+ "spec/scene7/crop_spec.rb",
70
+ "spec/scene7/folder_spec.rb",
71
+ "spec/spec_helper.rb"
72
+ ]
73
+
74
+ if s.respond_to? :specification_version then
75
+ s.specification_version = 3
76
+
77
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
78
+ s.add_runtime_dependency(%q<savon>, [">= 0"])
79
+ s.add_runtime_dependency(%q<httpclient>, [">= 0"])
80
+ s.add_runtime_dependency(%q<activesupport>, [">= 0"])
81
+ s.add_runtime_dependency(%q<i18n>, [">= 0"])
82
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
83
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
84
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
85
+ s.add_development_dependency(%q<rspec>, [">= 0"])
86
+ s.add_development_dependency(%q<savon_spec>, [">= 0"])
87
+ s.add_development_dependency(%q<mocha>, [">= 0"])
88
+ s.add_development_dependency(%q<ruby-debug>, [">= 0"])
89
+ s.add_development_dependency(%q<timecop>, [">= 0"])
90
+ else
91
+ s.add_dependency(%q<savon>, [">= 0"])
92
+ s.add_dependency(%q<httpclient>, [">= 0"])
93
+ s.add_dependency(%q<activesupport>, [">= 0"])
94
+ s.add_dependency(%q<i18n>, [">= 0"])
95
+ s.add_dependency(%q<shoulda>, [">= 0"])
96
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
97
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
98
+ s.add_dependency(%q<rspec>, [">= 0"])
99
+ s.add_dependency(%q<savon_spec>, [">= 0"])
100
+ s.add_dependency(%q<mocha>, [">= 0"])
101
+ s.add_dependency(%q<ruby-debug>, [">= 0"])
102
+ s.add_dependency(%q<timecop>, [">= 0"])
103
+ end
104
+ else
105
+ s.add_dependency(%q<savon>, [">= 0"])
106
+ s.add_dependency(%q<httpclient>, [">= 0"])
107
+ s.add_dependency(%q<activesupport>, [">= 0"])
108
+ s.add_dependency(%q<i18n>, [">= 0"])
109
+ s.add_dependency(%q<shoulda>, [">= 0"])
110
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
111
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
112
+ s.add_dependency(%q<rspec>, [">= 0"])
113
+ s.add_dependency(%q<savon_spec>, [">= 0"])
114
+ s.add_dependency(%q<mocha>, [">= 0"])
115
+ s.add_dependency(%q<ruby-debug>, [">= 0"])
116
+ s.add_dependency(%q<timecop>, [">= 0"])
117
+ end
118
+ end
119
+
Binary file
@@ -0,0 +1,8 @@
1
+ <?xml version='1.0' encoding='UTF-8'?>
2
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
3
+ <soapenv:Body>
4
+ <createFolderReturn xmlns="http://www.scene7.com/IpsApi/xsd/2010-01-31">
5
+ <folderHandle>exampleFolderHandle</folderHandle>
6
+ </createFolderReturn>
7
+ </soapenv:Body>
8
+ </soapenv:Envelope>
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><deleteAssetReturn xmlns="http://www.scene7.com/IpsApi/xsd/2010-01-31" /></soapenv:Body></soapenv:Envelope>
@@ -0,0 +1,6 @@
1
+ <?xml version='1.0' encoding='UTF-8'?>
2
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
3
+ <soapenv:Body>
4
+ <deleteFolderReturn xmlns="http://www.scene7.com/IpsApi/xsd/2010-01-31" />
5
+ </soapenv:Body>
6
+ </soapenv:Envelope>
@@ -0,0 +1 @@
1
+ <myxml />
@@ -0,0 +1,4 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><getAssetsByNameReturn xmlns="http://www.scene7.com/IpsApi/xsd/2010-01-31"><assetArray>
2
+ <items><assetHandle>a|1234</assetHandle><type>Image</type><name>Hat</name><folder>Example.com/sample/F0_Products_01-08-11/A01/</folder><folderHandle>f|Example.com/sample/F0_Products_01-08-11/A01/</folderHandle><readyForPublish>true</readyForPublish><trashState>NotInTrash</trashState><projects /><ipsImageUrl>image-no-ips/Example.com/_optimized_/c3c/c324027f-1d47-46f8-hdad-d7424c9e4aa3.tif</ipsImageUrl><created>2011-03-01T17:04:40.177-06:00</created><createUser>test@example.com</createUser><lastModified>2011-03-01T17:04:44.172-06:00</lastModified><lastModifyUser>image optimization</lastModifyUser><metadataArray><items><name>eVideoTypeImage</name><value></value></items></metadataArray><imageInfo><originalPath>Example.com/sample/F10_Product_02-18-11/A01/</originalPath><originalFile>MY_hero.png</originalFile><optimizedPath>Example.com/_optimized_/c3c/</optimizedPath><optimizedFile>c3240f7f-1d47-41f8-9dad-d7d24c9e4aa3.tif</optimizedFile><maskPath></maskPath><maskFile></maskFile><width>2150</width><height>2500</height><fileSize>2643733</fileSize><resolution>0.0</resolution><sku>MY_hero</sku><description>MY_hero</description><comments></comments><userData></userData><anchorX>1075</anchorX><anchorY>1250</anchorY><urlModifier></urlModifier><urlPostApplyModifier /><zoomTargets /><masks /><imageMaps /></imageInfo></items>
3
+ <items><assetHandle>a|1235</assetHandle><type>Image</type><name>Hat</name><folder>Example.com/sample/F0_Products_01-08-11/A01/</folder><folderHandle>f|Example.com/sample/F0_Products_01-08-11/A01/</folderHandle><readyForPublish>true</readyForPublish><trashState>NotInTrash</trashState><projects /><ipsImageUrl>image-no-ips/Example.com/_optimized_/c3c/c324027f-1d47-46f8-hdad-d7424c9e4aa3.tif</ipsImageUrl><created>2011-03-01T17:04:40.177-06:00</created><createUser>test@example.com</createUser><lastModified>2011-03-01T17:04:44.172-06:00</lastModified><lastModifyUser>image optimization</lastModifyUser><metadataArray><items><name>eVideoTypeImage</name><value></value></items></metadataArray><imageInfo><originalPath>Example.com/sample/F10_Product_02-18-11/A01/</originalPath><originalFile>MY_hero.png</originalFile><optimizedPath>Example.com/_optimized_/c3c/</optimizedPath><optimizedFile>c3240f7f-1d47-41f8-9dad-d7d24c9e4aa3.tif</optimizedFile><maskPath></maskPath><maskFile></maskFile><width>2150</width><height>2500</height><fileSize>2643733</fileSize><resolution>0.0</resolution><sku>MY_hero</sku><description>MY_hero</description><comments></comments><userData></userData><anchorX>1075</anchorX><anchorY>1250</anchorY><urlModifier></urlModifier><urlPostApplyModifier /><zoomTargets /><masks /><imageMaps /></imageInfo></items>
4
+ </assetArray></getAssetsByNameReturn></soapenv:Body></soapenv:Envelope>
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><getAssetsByNameReturn xmlns="http://www.scene7.com/IpsApi/xsd/2010-01-31"><assetArray><items><assetHandle>a|1234</assetHandle><type>Image</type><name>Jacket</name><folder>Example.com/sample/F0_Products_01-08-11/A01/</folder><folderHandle>f|Example.com/sample/F0_Products_01-08-11/A01/</folderHandle><readyForPublish>true</readyForPublish><trashState>NotInTrash</trashState><projects /><ipsImageUrl>image-no-ips/Example.com/_optimized_/c3c/c324027f-1d47-46f8-hdad-d7424c9e4aa3.tif</ipsImageUrl><created>2011-03-01T17:04:40.177-06:00</created><createUser>test@example.com</createUser><lastModified>2011-03-01T17:04:44.172-06:00</lastModified><lastModifyUser>image optimization</lastModifyUser><metadataArray><items><name>eVideoTypeImage</name><value></value></items></metadataArray><imageInfo><originalPath>Example.com/sample/F10_Product_02-18-11/A01/</originalPath><originalFile>MY_hero.png</originalFile><optimizedPath>Example.com/_optimized_/c3c/</optimizedPath><optimizedFile>c3240f7f-1d47-41f8-9dad-d7d24c9e4aa3.tif</optimizedFile><maskPath></maskPath><maskFile></maskFile><width>2150</width><height>2500</height><fileSize>2643733</fileSize><resolution>0.0</resolution><sku>MY_hero</sku><description>MY_hero</description><comments></comments><userData></userData><anchorX>1075</anchorX><anchorY>1250</anchorY><urlModifier></urlModifier><urlPostApplyModifier /><zoomTargets /><masks /><imageMaps /></imageInfo></items></assetArray></getAssetsByNameReturn></soapenv:Body></soapenv:Envelope>
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><getAssetsByNameReturn xmlns="http://www.scene7.com/IpsApi/xsd/2010-01-31"><assetArray /></getAssetsByNameReturn></soapenv:Body></soapenv:Envelope>