Hello community, here is the log from the commit of package rubygem-rhc for openSUSE:Factory checked in at 2016-10-25 17:43:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-rhc (Old) and /work/SRC/openSUSE:Factory/.rubygem-rhc.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-rhc" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-rhc/rubygem-rhc.changes 2015-04-18 10:38:55.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-rhc.new/rubygem-rhc.changes 2016-10-25 17:43:32.000000000 +0200 @@ -1,0 +2,30 @@ +Wed Aug 3 04:35:26 UTC 2016 - co...@suse.com + +- updated to version 1.38.7 + no changelog found + +------------------------------------------------------------------- +Thu Nov 5 05:31:18 UTC 2015 - co...@suse.com + +- updated to version 1.38.4 + no changelog found + +------------------------------------------------------------------- +Fri Sep 11 04:30:07 UTC 2015 - co...@suse.com + +- updated to version 1.37.1 + no changelog found + +------------------------------------------------------------------- +Wed Jul 8 04:31:16 UTC 2015 - co...@suse.com + +- updated to version 1.36.4 + no changelog found + +------------------------------------------------------------------- +Fri Jun 12 04:33:41 UTC 2015 - co...@suse.com + +- updated to version 1.35.4 + no changelog found + +------------------------------------------------------------------- Old: ---- rhc-1.35.3.gem New: ---- rhc-1.38.7.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-rhc.spec ++++++ --- /var/tmp/diff_new_pack.IGXcZ6/_old 2016-10-25 17:43:33.000000000 +0200 +++ /var/tmp/diff_new_pack.IGXcZ6/_new 2016-10-25 17:43:33.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-rhc # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-rhc -Version: 1.35.3 +Version: 1.38.7 Release: 0 %define mod_name rhc %define mod_full_name %{mod_name}-%{version} ++++++ rhc-1.35.3.gem -> rhc-1.38.7.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -10,6 +10,10 @@ or the OpenShift support page https://openshift.redhat.com/support. +RHC from rubygems.org is built on Ruby 1.8.7. RHC does have conditional +dependencies during build time, so it can be built on multiple versions of Ruby. +If you are running into any dependency issues when using RHC, please try to +build RHC locally using `gem build rhc.gemspec` to use the correct dependencies. ## Using RHC to create an application diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/features/app_feature.rb new/features/app_feature.rb --- old/features/app_feature.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/features/app_feature.rb 1970-01-01 01:00:00.000000000 +0100 @@ -11,6 +11,18 @@ let(:app){ @app } it "should clone successfully" do + # The following works around an issue with strict host key checking. + # create-app --from-app uses SSH to copy the application. However, + # this test uses a new application, so without this workaround, create-app + # --from-app will be trying to log into the application for the first + # time, and so SSH will not recognize the host key and will prompt for + # confirmation, causing the test to hang and eventually time out. To work + # around the problem, we tell rhc to initiate an SSH connection using + # GIT_SSH (which disables strict host key checking), which will cause SSH + # to add the host to ~/.ssh/known_hosts, which will allow the subsequent + # create-app --from-app command to succeed. + rhc 'ssh', '--ssh', ENV['GIT_SSH'], app.name, '--', 'true' + app_name = "clone#{random}" r = rhc 'create-app', app_name, '--from-app', app.name r.stdout.should match /Domain:\s+#{app.domain}/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rhc/commands/app.rb new/lib/rhc/commands/app.rb --- old/lib/rhc/commands/app.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rhc/commands/app.rb 1970-01-01 01:00:00.000000000 +0100 @@ -101,6 +101,12 @@ end.join(', ') env = collect_env_vars(arg_envs.concat(Array(options.env))) + if options.env && env.empty? + raise RHC::EnvironmentVariableNotProvidedException.new( + "Environment variable(s) not provided.\n" + + "Please provide at least one environment variable using the syntax VARIABLE=VALUE. VARIABLE can only contain letters, digits and underscore ('_') and can't begin with a digit.") + end + if env.present? && !rest_domain.supports_add_application_with_env_vars? env = [] warn "Server does not support environment variables." @@ -109,6 +115,7 @@ scaling = options.scaling region = options.region gear_profile = options.gear_size + ha = nil raise RHC::RegionsAndZonesNotSupportedException if region.present? && !rest_client.supports_regions_and_zones? @@ -116,6 +123,7 @@ scaling = from_app.scalable if scaling.nil? region = from_app.region if region.nil? gear_profile = from_app.gear_profile if gear_profile.nil? + ha = from_app.ha? if !from_app.ha.nil? if region.present? && !rest_client.allows_region_selection? region = nil @@ -142,6 +150,7 @@ (["From app:", from_app.name] if from_app), ["Gear Size:", options.gear_size || (from_app ? "Copied from '#{from_app.name}'" : "default")], ["Scaling:", (scaling ? "yes" : "no") + (from_app && options.scaling.nil? ? " (copied from '#{from_app.name}')" : '')], + (["HA:", (ha ? "yes" : "no") + (from_app ? " (copied from '#{from_app.name}')" : '')] if ha.present?), (["Environment Variables:", env.map{|item| "#{item.name}=#{item.value}"}.join(', ')] if env.present?), (["Region:", region + (from_app && options.region.nil? ? " (copied from '#{from_app.name}')" : '')] if region), ].compact @@ -152,7 +161,7 @@ say "Creating application '#{name}' ... " # create the main app - rest_app = create_app(name, cartridges, rest_domain, gear_profile, scaling, options.from_code, env, options.auto_deploy, options.keep_deployments, options.deployment_branch, options.deployment_type, region) + rest_app = create_app(name, cartridges, rest_domain, gear_profile, scaling, options.from_code, env, options.auto_deploy, options.keep_deployments, options.deployment_branch, options.deployment_type, region, ha) success "done" paragraph{ indent{ success rest_app.messages.map(&:strip) } } @@ -176,7 +185,7 @@ warn "not complete" add_issue("Jenkins failed to install - #{e}", "Installing jenkins and jenkins-client", - "rhc create-app jenkins", + "rhc create-app jenkins jenkins-1", "rhc add-cartridge jenkins-client -a #{rest_app.name}") end end @@ -429,10 +438,16 @@ domain, app = discover_domain_and_app gear_info = rest_client.find_application_gear_groups_endpoints(domain, app).map do |group| group.gears.map do |gear| + color_cart = if gear['endpoints'].present? + e = gear['endpoints'].collect{ |c| c['cartridge_name'] }.uniq + lambda { |c| e.include?(c) ? color(c, :green) : c } + else + lambda { |c| c } + end [ gear['id'], gear['state'] == 'started' ? color(gear['state'], :green) : color(gear['state'], :yellow), - (gear['endpoints'].blank? ? group.cartridges : gear['endpoints']).collect{ |c| c['cartridge_name'] || c['name'] }.join(' '), + group.cartridges.collect{ |c| color_cart.call(c['name']) }.join(' '), group.gear_profile, gear['region'], gear['zone'], @@ -590,7 +605,7 @@ result end - def create_app(name, cartridges, rest_domain, gear_profile=nil, scale=nil, from_code=nil, environment_variables=nil, auto_deploy=nil, keep_deployments=nil, deployment_branch=nil, deployment_type=nil, region=nil) + def create_app(name, cartridges, rest_domain, gear_profile=nil, scale=nil, from_code=nil, environment_variables=nil, auto_deploy=nil, keep_deployments=nil, deployment_branch=nil, deployment_type=nil, region=nil, ha=nil) app_options = {:cartridges => Array(cartridges)} app_options[:gear_profile] = gear_profile if gear_profile app_options[:scale] = scale if scale @@ -602,6 +617,7 @@ app_options[:deployment_branch] = deployment_branch if deployment_branch app_options[:deployment_type] = deployment_type if deployment_type app_options[:region] = region if region + app_options[:ha] = ha if ha debug "Creating application '#{name}' with these options - #{app_options.inspect}" rest_domain.add_application(name, app_options) rescue RHC::Rest::Exception => e diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rhc/commands/cartridge.rb new/lib/rhc/commands/cartridge.rb --- old/lib/rhc/commands/cartridge.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rhc/commands/cartridge.rb 1970-01-01 01:00:00.000000000 +0100 @@ -147,7 +147,7 @@ summary "Start a cartridge" syntax "<cartridge> [--namespace NAME] [--app NAME]" - argument :cart_type, "The name of the cartridge you are stopping", ["-c", "--cartridge cartridge"] + argument :cart_type, "The name of the cartridge you are starting", ["-c", "--cartridge cartridge"] takes_application alias_action :"app cartridge start", :root_command => true, :deprecated => true def start(cartridge) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rhc/commands/port_forward.rb new/lib/rhc/commands/port_forward.rb --- old/lib/rhc/commands/port_forward.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rhc/commands/port_forward.rb 1970-01-01 01:00:00.000000000 +0100 @@ -71,6 +71,7 @@ syntax "<application>" takes_application :argument => true option ["-g", "--gear ID"], "Gear ID you are port forwarding to (optional)" + option ["-s", "--service [SERVICE,]"], "A CSV list of services to port forward (optional)" def run(app) rest_app = find_app ssh_uri = URI.parse(options.gear ? rest_app.gear_ssh_url(options.gear) : rest_app.ssh_url) @@ -95,7 +96,7 @@ raise RHC::PermissionDeniedException.new "Permission denied." if line =~ /permission denied/i # ...and also which services are available for the application # for us to forward ports for. - if line =~ /\A\s*(\S+) -> #{HOST_AND_PORT}\z/ + if line =~ /\A\s*(\S+) -> #{HOST_AND_PORT}\z/ and (options.service.nil? or options.service.empty? or options.service.split(',').include? $1) debug fs = ForwardingSpec.new($1, $2, $3.to_i) forwarding_specs << fs else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rhc/commands.rb new/lib/rhc/commands.rb --- old/lib/rhc/commands.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rhc/commands.rb 1970-01-01 01:00:00.000000000 +0100 @@ -6,7 +6,7 @@ module Commander class Command attr_accessor :default_action, :root, :info - + def default_action? default_action.present? end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rhc/core_ext.rb new/lib/rhc/core_ext.rb --- old/lib/rhc/core_ext.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rhc/core_ext.rb 1970-01-01 01:00:00.000000000 +0100 @@ -7,7 +7,7 @@ def present? !blank? end - + def blank? respond_to?(:empty?) ? empty? : !self end @@ -18,9 +18,11 @@ # Avoid a conflict if to_json is already defined unless Object.new.respond_to? :to_json + #:nocov: def to_json(options=nil) RHC::Json.encode(self) end + #:nocov: end end @@ -38,7 +40,7 @@ results end - end + end end class File diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rhc/exceptions.rb new/lib/rhc/exceptions.rb --- old/lib/rhc/exceptions.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rhc/exceptions.rb 1970-01-01 01:00:00.000000000 +0100 @@ -295,7 +295,7 @@ super message end end - + class RemoteFileOrPathNotFound < FileOrPathNotFound def initialize(message="Remote File, file path, or directory could not be found") super message diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rhc/git_helpers.rb new/lib/rhc/git_helpers.rb --- old/lib/rhc/git_helpers.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rhc/git_helpers.rb 1970-01-01 01:00:00.000000000 +0100 @@ -83,7 +83,7 @@ def git_config_get(key) return nil unless has_git? - + config_get_cmd = "#{discover_git_executable} config --get #{key}" value = %x[#{config_get_cmd}].strip debug "Git config '#{config_get_cmd}' returned '#{value}'" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rhc/helpers.rb new/lib/rhc/helpers.rb --- old/lib/rhc/helpers.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rhc/helpers.rb 1970-01-01 01:00:00.000000000 +0100 @@ -135,6 +135,7 @@ global_option('--timeout SECONDS', Integer, 'The timeout for operations') do |value| raise RHC::Exception, "Timeout must be a positive integer" unless value > 0 end + global_option '--always-auth', "Always use authentication when making OpenShift API requests.", :hide => true global_option '--noprompt', "Suppress all interactive operations command", :hide => true do $terminal.page_at = nil end @@ -200,7 +201,7 @@ return nil if token_store_user_key.nil? token_store.get(token_store_user_key, options.server) end - + def parse_headers(headers) Hash[ Array(headers).map do |header| @@ -217,6 +218,7 @@ :headers => parse_headers(options.header), :timeout => options.timeout, :warn => BOUND_WARNING, + :api_always_auth => options.always_auth }.merge!(ssl_options).merge!(opts)) end @@ -327,7 +329,7 @@ else $terminal.color(item, *args) end - else + else item end end @@ -520,7 +522,15 @@ # split spaces but preserve sentences between quotes def split_path(s, keep_quotes=false) - keep_quotes ? s.split(/\s(?=(?:[^"]|"[^"]*")*$)/) : CSV::parse_line(s, :col_sep => ' ') + #:nocov: + if keep_quotes + s.split(/\s(?=(?:[^"]|"[^"]*")*$)/) + elsif RUBY_VERSION.to_f < 1.9 + CSV::parse_line(s, fs = ' ') + else #ruby 1.9 or newer + CSV::parse_line(s, :col_sep => ' ') + end + #:nocov: end def discover_windows_executables(&block) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rhc/output_helpers.rb new/lib/rhc/output_helpers.rb --- old/lib/rhc/output_helpers.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rhc/output_helpers.rb 1970-01-01 01:00:00.000000000 +0100 @@ -66,7 +66,7 @@ end end end - + def display_app_summary(applications) section do if !applications.nil? and !applications.empty? @@ -79,7 +79,7 @@ end end end - + end def display_app_configurations(rest_app) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rhc/rest/api.rb new/lib/rhc/rest/api.rb --- old/lib/rhc/rest/api.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rhc/rest/api.rb 1970-01-01 01:00:00.000000000 +0100 @@ -10,12 +10,11 @@ @server_api_versions = [] debug "Client supports API versions #{preferred_api_versions.join(', ')}" @client_api_versions = preferred_api_versions - always_auth = RHC::Helpers.to_boolean(RHC::Config['always_auth'], false) @server_api_versions, @current_api_version, links = api_info({ :url => client.url, :method => :get, :accept => :json, - :no_auth => !always_auth, + :no_auth => !client.api_always_auth }) debug "Server supports API versions #{@server_api_versions.join(', ')}" @@ -29,7 +28,7 @@ :method => :get, :accept => :json, :api_version => api_version_negotiated, - :no_auth => !always_auth, + :no_auth => !client.api_always_auth }) end else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rhc/rest/application.rb new/lib/rhc/rest/application.rb --- old/lib/rhc/rest/application.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rhc/rest/application.rb 1970-01-01 01:00:00.000000000 +0100 @@ -7,7 +7,7 @@ define_attr :domain_id, :name, :creation_time, :uuid, :git_url, :app_url, :gear_profile, :framework, - :scalable, :health_check_path, :embedded, :gear_count, + :scalable, :health_check_path, :embedded, :gear_count, :ha, :ssh_url, :building_app, :cartridges, :initial_git_url, :auto_deploy, :deployment_branch, :deployment_type, :keep_deployments, :deployments :region @@ -18,6 +18,10 @@ scalable end + def ha? + ha + end + def id attributes['id'] || uuid end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rhc/rest/client.rb new/lib/rhc/rest/client.rb --- old/lib/rhc/rest/client.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rhc/rest/client.rb 1970-01-01 01:00:00.000000000 +0100 @@ -378,6 +378,7 @@ @debug ||= false @auth = options.delete(:auth) + @api_always_auth = options.delete(:api_always_auth) self.headers.merge!(options.delete(:headers)) if options[:headers] self.options.merge!(options) @@ -389,6 +390,10 @@ @end_point end + def api_always_auth + @api_always_auth + end + def api @api ||= RHC::Rest::Api.new(self, @preferred_api_versions).tap do |api| self.current_api_version = api.api_version_negotiated @@ -436,7 +441,7 @@ handle_error!(e.res, args[1], client) end raise ConnectionException.new( - "An unexpected error occured when connecting to the server: #{e.message}") + "An unexpected error occurred when connecting to the server: #{e.message}") rescue HTTPClient::TimeoutError => e raise TimeoutException.new( "Connection to server timed out. "\ @@ -493,7 +498,7 @@ raise rescue => e debug_error(e) - raise ConnectionException, "An unexpected error occured: #{e.message}", e.backtrace + raise ConnectionException, "An unexpected error occurred: #{e.message}", e.backtrace end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rhc/tar_gz.rb new/lib/rhc/tar_gz.rb --- old/lib/rhc/tar_gz.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rhc/tar_gz.rb 1970-01-01 01:00:00.000000000 +0100 @@ -9,7 +9,7 @@ module TarGz def self.contains(filename, search, force_ruby=false) - + return false if ! (File.file? filename and File.basename(filename).downcase =~ /.\.t(ar\.)?gz$/i) regex = Regexp.new search diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 1970-01-01 01:00:00.000000000 +0100 +++ new/metadata 1970-01-01 01:00:00.000000000 +0100 @@ -1,13 +1,13 @@ --- !ruby/object:Gem::Specification name: rhc version: !ruby/object:Gem::Version - hash: 157 + hash: 129 prerelease: segments: - 1 - - 35 - - 3 - version: 1.35.3 + - 38 + - 7 + version: 1.38.7 platform: ruby authors: - Red Hat @@ -15,36 +15,12 @@ bindir: bin cert_chain: [] -date: 2015-04-10 00:00:00 Z +date: 2016-08-01 00:00:00 Z dependencies: - !ruby/object:Gem::Dependency - name: net-ssh - prerelease: false - requirement: &id001 !ruby/object:Gem::Requirement - none: false - requirements: - - - ">=" - - !ruby/object:Gem::Version - hash: 25 - segments: - - 2 - - 0 - - 11 - version: 2.0.11 - - - < - - !ruby/object:Gem::Version - hash: 45 - segments: - - 2 - - 9 - - 3 - version: 2.9.3 - type: :runtime - version_requirements: *id001 -- !ruby/object:Gem::Dependency name: net-scp prerelease: false - requirement: &id002 !ruby/object:Gem::Requirement + requirement: &id001 !ruby/object:Gem::Requirement none: false requirements: - - ">=" @@ -56,11 +32,11 @@ - 2 version: 1.1.2 type: :runtime - version_requirements: *id002 + version_requirements: *id001 - !ruby/object:Gem::Dependency name: net-ssh-multi prerelease: false - requirement: &id003 !ruby/object:Gem::Requirement + requirement: &id002 !ruby/object:Gem::Requirement none: false requirements: - - ">=" @@ -72,11 +48,11 @@ - 0 version: 1.2.0 type: :runtime - version_requirements: *id003 + version_requirements: *id002 - !ruby/object:Gem::Dependency name: archive-tar-minitar prerelease: false - requirement: &id004 !ruby/object:Gem::Requirement + requirement: &id003 !ruby/object:Gem::Requirement none: false requirements: - - ">=" @@ -86,11 +62,11 @@ - 0 version: "0" type: :runtime - version_requirements: *id004 + version_requirements: *id003 - !ruby/object:Gem::Dependency name: commander prerelease: false - requirement: &id005 !ruby/object:Gem::Requirement + requirement: &id004 !ruby/object:Gem::Requirement none: false requirements: - - ">=" @@ -109,11 +85,11 @@ - 0 version: 4.3.0 type: :runtime - version_requirements: *id005 + version_requirements: *id004 - !ruby/object:Gem::Dependency name: highline prerelease: false - requirement: &id006 !ruby/object:Gem::Requirement + requirement: &id005 !ruby/object:Gem::Requirement none: false requirements: - - ~> @@ -125,11 +101,11 @@ - 11 version: 1.6.11 type: :runtime - version_requirements: *id006 + version_requirements: *id005 - !ruby/object:Gem::Dependency name: httpclient prerelease: false - requirement: &id007 !ruby/object:Gem::Requirement + requirement: &id006 !ruby/object:Gem::Requirement none: false requirements: - - ">=" @@ -140,12 +116,20 @@ - 4 - 0 version: 2.4.0 + - - < + - !ruby/object:Gem::Version + hash: 19 + segments: + - 2 + - 7 + - 0 + version: 2.7.0 type: :runtime - version_requirements: *id007 + version_requirements: *id006 - !ruby/object:Gem::Dependency name: open4 prerelease: false - requirement: &id008 !ruby/object:Gem::Requirement + requirement: &id007 !ruby/object:Gem::Requirement none: false requirements: - - ">=" @@ -155,11 +139,11 @@ - 0 version: "0" type: :runtime - version_requirements: *id008 + version_requirements: *id007 - !ruby/object:Gem::Dependency name: rake prerelease: false - requirement: &id009 !ruby/object:Gem::Requirement + requirement: &id008 !ruby/object:Gem::Requirement none: false requirements: - - ">=" @@ -171,11 +155,11 @@ - 7 version: 0.8.7 type: :development - version_requirements: *id009 + version_requirements: *id008 - !ruby/object:Gem::Dependency name: webmock prerelease: false - requirement: &id010 !ruby/object:Gem::Requirement + requirement: &id009 !ruby/object:Gem::Requirement none: false requirements: - - < @@ -186,11 +170,11 @@ - 12 version: "1.12" type: :development - version_requirements: *id010 + version_requirements: *id009 - !ruby/object:Gem::Dependency name: rspec prerelease: false - requirement: &id011 !ruby/object:Gem::Requirement + requirement: &id010 !ruby/object:Gem::Requirement none: false requirements: - - ">=" @@ -209,11 +193,11 @@ - 99 version: "2.99" type: :development - version_requirements: *id011 + version_requirements: *id010 - !ruby/object:Gem::Dependency name: fakefs prerelease: false - requirement: &id012 !ruby/object:Gem::Requirement + requirement: &id011 !ruby/object:Gem::Requirement none: false requirements: - - ">=" @@ -232,11 +216,11 @@ - 0 version: 0.6.0 type: :development - version_requirements: *id012 + version_requirements: *id011 - !ruby/object:Gem::Dependency name: thor prerelease: false - requirement: &id013 !ruby/object:Gem::Requirement + requirement: &id012 !ruby/object:Gem::Requirement none: false requirements: - - ">=" @@ -246,25 +230,27 @@ - 0 version: "0" type: :development - version_requirements: *id013 + version_requirements: *id012 - !ruby/object:Gem::Dependency name: cucumber prerelease: false - requirement: &id014 !ruby/object:Gem::Requirement + requirement: &id013 !ruby/object:Gem::Requirement none: false requirements: - - - ">=" + - - <= - !ruby/object:Gem::Version - hash: 3 + hash: 51 segments: - - 0 - version: "0" + - 1 + - 3 + - 20 + version: 1.3.20 type: :development - version_requirements: *id014 + version_requirements: *id013 - !ruby/object:Gem::Dependency name: activesupport prerelease: false - requirement: &id015 !ruby/object:Gem::Requirement + requirement: &id014 !ruby/object:Gem::Requirement none: false requirements: - - ~> @@ -275,7 +261,7 @@ - 0 version: "3.0" type: :development - version_requirements: *id015 + version_requirements: *id014 description: The client tools for the OpenShift platform that allow for application management. email: d...@lists.openshift.redhat.com executables: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/rhc/commands/app_spec.rb new/spec/rhc/commands/app_spec.rb --- old/spec/rhc/commands/app_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/rhc/commands/app_spec.rb 1970-01-01 01:00:00.000000000 +0100 @@ -775,27 +775,43 @@ end describe 'app show --gears' do - let(:arguments) { ['app', 'show', 'app1', '--gears', '--raw'] } + context do + let(:arguments) { ['app', 'show', 'app1', '--gears', '--raw'] } - context 'when run' do - before do - @domain = rest_client.add_domain("mockdomain") - @domain.add_application("app1", "mock_type") + context 'when run' do + before do + @domain = rest_client.add_domain("mockdomain") + @domain.add_application("app1", "mock_type") + end + it { run_output.should match(/ID\s+State\s+Cartridges\s+Size\s+SSH URL/) } + it { run_output.should match("fakegearid0 started mock_type small fakegear...@fakesshurl.com") } + it { expect{ run }.to exit_with_code(0) } + end + + context 'with regions and zones' do + before do + @domain = rest_client.add_domain("mockdomain") + @app = @domain.add_application("app1", "mock_type") + @app.gears.each{|g| g['region'] = 'south'; g['zone'] = 'west'} + end + it { run_output.should match(/ID\s+State\s+Cartridges\s+Size\s+Region\s+Zone\s+SSH URL/) } + it { run_output.should match(/fakegearid0\s+started\s+mock_type\s+small\s+south\s+west\s+fakegear...@fakesshurl.com/) } + it { expect{ run }.to exit_with_code(0) } end - it { run_output.should match(/ID\s+State\s+Cartridges\s+Size\s+SSH URL/) } - it { run_output.should match("fakegearid0 started mock_type small fakegear...@fakesshurl.com") } - it { expect{ run }.to exit_with_code(0) } end - context 'with regions and zones' do - before do - @domain = rest_client.add_domain("mockdomain") - @app = @domain.add_application("app1", "mock_type") - @app.gears.each{|g| g['region'] = 'south'; g['zone'] = 'west'} + context do + let(:arguments) { ['app', 'show', 'app1', '--gears'] } + + context 'with cartridge that exposes an endpoint' do + before do + @domain = rest_client.add_domain("mockdomain") + # An application has to be scalable to expose an endpoint. + @app = @domain.add_application("app1", "mock_type", true) + @app.gears.first['endpoints'] = [{ 'cartridge_name' => 'mock_cart-1' }] + end + it { (run_output.match(/fakegearid0\s+([^\s]+)\s+small\s+fakegearid0@fakesshurl\.com/)[1]).should be_colorized("started", :green) } end - it { run_output.should match(/ID\s+State\s+Cartridges\s+Size\s+Region\s+Zone\s+SSH URL/) } - it { run_output.should match(/fakegearid0\s+started\s+mock_type\s+small\s+south\s+west\s+fakegear...@fakesshurl.com/) } - it { expect{ run }.to exit_with_code(0) } end end @@ -974,5 +990,16 @@ end end + [['app', 'create', 'app1', 'mock_standalone_cart-1', '-e', 'FOOBAR'], + ['app', 'create', 'app1', 'mock_standalone_cart-1', '--env', 'FOOBAR'], + ['app', 'create', 'app1', 'mock_standalone_cart-1', '-eFOOBAR'] + ].each_with_index do |args, i| + context "when run with syntactically incorrect env vars #{i}" do + let(:arguments) { args } + it { expect { run }.to exit_with_code(159) } + it { run_output.should match(/Environment variable\(s\) not provided.\nPlease provide at least one environment variable using the syntax VARIABLE=VALUE\. VARIABLE can only contain letters, digits and underscore \('_'\) and can't begin with a digit\./) } + end + end + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/rhc/commands/ssh_spec.rb new/spec/rhc/commands/ssh_spec.rb --- old/spec/rhc/commands/ssh_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/rhc/commands/ssh_spec.rb 1970-01-01 01:00:00.000000000 +0100 @@ -28,7 +28,7 @@ it { expect{ run }.to exit_with_code(0) } end end - + describe 'ssh without command including debugging' do let(:arguments) { ['app', 'ssh', 'app1', '--debug'] } @@ -173,18 +173,17 @@ describe 'app ssh custom ssh with spaces and arguments' do let(:arguments) { ['app', 'ssh', 'app1', '--ssh', '"/path/to /ssh" --with_custom_flag'] } - context 'when custom ssh does not exist as a path' do - before(:each) do - @domain = rest_client.add_domain("mockdomain") - @domain.add_application("app1", "mock_type") - RHC::Commands::Ssh.any_instance.should_not_receive(:has_ssh?) - File.should_receive(:exist?).at_least(1).and_return(true) - File.should_receive(:executable?).at_least(1).and_return(true) - subject.class.any_instance.stub(:discover_git_executable).and_return('git') - Kernel.should_receive(:exec).with("/path/to /ssh", '--with_custom_flag', "fakeuuidfortestsapp1@127.0.0.1").once.times.and_return(0) - end - it { expect { run }.to exit_with_code(0) } + + before(:each) do + @domain = rest_client.add_domain("mockdomain") + @domain.add_application("app1", "mock_type") + RHC::Commands::Ssh.any_instance.should_not_receive(:has_ssh?) + File.should_receive(:exist?).at_least(1).and_return(true) + File.should_receive(:executable?).at_least(1).and_return(true) + subject.class.any_instance.stub(:discover_git_executable).and_return('git') + Kernel.should_receive(:exec).with("/path/to /ssh", "--with_custom_flag", "fakeuuidfortestsapp1@127.0.0.1").once.times.and_return(0) end + it { expect { run }.to exit_with_code(0) } end describe 'ssh tests' do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/rhc/helpers_spec.rb new/spec/rhc/helpers_spec.rb --- old/spec/rhc/helpers_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/rhc/helpers_spec.rb 1970-01-01 01:00:00.000000000 +0100 @@ -60,7 +60,7 @@ it("should be colorized") do message = "this is #{_color} -" output = capture{ subject.send(method,message) } - output.should be_colorized(message,_color) + output.chomp.should be_colorized(message,_color) end it("should return true"){ subject.send(method,'anything').should be_true } end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/rhc/rest_client_spec.rb new/spec/rhc/rest_client_spec.rb --- old/spec/rhc/rest_client_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/rhc/rest_client_spec.rb 1970-01-01 01:00:00.000000000 +0100 @@ -71,7 +71,7 @@ context "against an endpoint that has a generic error" do let(:endpoint){ mock_href('other_error') } it "raises a generic error for any other error condition" do - expect{ client.api }.to raise_error(RHC::Rest::ConnectionException, "An unexpected error occured: Other Error") + expect{ client.api }.to raise_error(RHC::Rest::ConnectionException, "An unexpected error occurred: Other Error") end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/rhc/rest_spec.rb new/spec/rhc/rest_spec.rb --- old/spec/rhc/rest_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/rhc/rest_spec.rb 1970-01-01 01:00:00.000000000 +0100 @@ -368,7 +368,7 @@ stub_request(:get, mock_href).to_return(return_data) end it "throws an error" do - response.should raise_error(RHC::Rest::ConnectionException, 'An unexpected error occured: unexpected nil') + response.should raise_error(RHC::Rest::ConnectionException, 'An unexpected error occurred: unexpected nil') end end @@ -496,7 +496,7 @@ context "with a generic exception error" do before{ stub_request(:get, mock_href).to_raise(Exception.new('Generic Error')) } - it{ response.should raise_error(RHC::Rest::ConnectionException, "An unexpected error occured: Generic Error") } + it{ response.should raise_error(RHC::Rest::ConnectionException, "An unexpected error occurred: Generic Error") } end context "with an unauthorized request" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/spec_helper.rb new/spec/spec_helper.rb --- old/spec/spec_helper.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/spec_helper.rb 1970-01-01 01:00:00.000000000 +0100 @@ -567,8 +567,7 @@ [ ansi_code(color), msg, - ansi_code(:clear), - "\n" + ansi_code(:clear) ].join('') end end