Skip to content

Commit

Permalink
fixes tests for changes to get_app_store_version_number, and bumps ve…
Browse files Browse the repository at this point in the history
…rsion for release
  • Loading branch information
john-douglas-nz-xero committed Jul 17, 2023
1 parent 72daf1c commit 64c1845
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ def self.run(params)
bundle_id = GetInfoPlistValueAction.run(path: plist, key: 'CFBundleIdentifier') # TODO: add same kind of flag to support build setting variables
end

random = Helper.test? ? "123" : SecureRandom.uuid

if params[:country]
uri = URI("http://itunes.apple.com/lookup?bundleId=#{bundle_id}&country=#{params[:country]}&rand=#{SecureRandom.uuid}")
uri = URI("http://itunes.apple.com/lookup?bundleId=#{bundle_id}&country=#{params[:country]}&rand=#{random}")
else
uri = URI("http://itunes.apple.com/lookup?bundleId=#{bundle_id}&rand=#{SecureRandom.uuid}")
uri = URI("http://itunes.apple.com/lookup?bundleId=#{bundle_id}&rand=#{random}")
end
Net::HTTP.get(uri)

Expand Down Expand Up @@ -80,7 +82,7 @@ def self.available_options
end

def self.authors
["SiarheiFedartsou"]
["SiarheiFedartsou", "jdouglas-nz", "raymondjacobson"]
end

def self.is_supported?(platform)
Expand Down
2 changes: 1 addition & 1 deletion lib/fastlane/plugin/versioning/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Fastlane
module Versioning
VERSION = "0.5.1"
VERSION = "0.5.2"
end
end
6 changes: 3 additions & 3 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ def fake_api_responses
FileUtils.cp_r(source, destination)

fake_existing_response = File.read(File.join(destination, '/numbers_lookup_response'))
stub_request(:get, "http://itunes.apple.com/lookup?bundleId=com.apple.Numbers").to_return(fake_existing_response)
stub_request(:get, "http://itunes.apple.com/lookup?bundleId=com.apple.Numbers&rand=123").to_return(fake_existing_response)
fake_existing_in_country_response = File.read(File.join(destination, '/numbers_lookup_country_us_response'))
stub_request(:get, "http://itunes.apple.com/lookup?bundleId=com.apple.Numbers&country=us").to_return(fake_existing_in_country_response)
stub_request(:get, "http://itunes.apple.com/lookup?bundleId=com.apple.Numbers&country=us&rand=123").to_return(fake_existing_in_country_response)
fake_nonexistent_response = File.read(File.join(destination, '/nonexistent_lookup_response'))
stub_request(:get, "http://itunes.apple.com/lookup?bundleId=com.some.nonexistent.app").to_return(fake_nonexistent_response)
stub_request(:get, "http://itunes.apple.com/lookup?bundleId=com.some.nonexistent.app&rand=123").to_return(fake_nonexistent_response)
end

def copy_info_plist_fixtures
Expand Down

0 comments on commit 64c1845

Please sign in to comment.