class Crep::HockeyAppAppSource
Public Instance Methods
apps()
click to toggle source
# File lib/crep/model/app_source/hockeyapp_app_source.rb, line 18 def apps @client.get_apps end
apps_for_app_identifier(app_identifier)
click to toggle source
# File lib/crep/model/app_source/hockeyapp_app_source.rb, line 39 def apps_for_app_identifier(app_identifier) @client.get_apps.select do |a| a.public_identifier == app_identifier end end
apps_for_bundle_identifier(bundle_identifier)
click to toggle source
# File lib/crep/model/app_source/hockeyapp_app_source.rb, line 33 def apps_for_bundle_identifier(bundle_identifier) @client.get_apps.select do |a| a.bundle_identifier.casecmp(bundle_identifier.downcase).zero? end end
configure()
click to toggle source
# File lib/crep/model/app_source/hockeyapp_app_source.rb, line 9 def configure HockeyApp::Config.configure do |config| raise 'Missing API token (CREP_HOCKEY_API_TOKEN)' unless ENV['CREP_HOCKEY_API_TOKEN'] config.token = ENV['CREP_HOCKEY_API_TOKEN'] end @client = HockeyApp.build_client end
versions(app_identifier)
click to toggle source
# File lib/crep/model/app_source/hockeyapp_app_source.rb, line 45 def versions(app_identifier) apps = apps_for_app_identifier(app_identifier) raise("Unable to find app with identifier: #{app_identifier}") unless apps.count.positive? app = apps.first app.versions.map do |version| Crep::Version.new(version.shortversion, version.version, app.public_identifier.downcase) end end
versions_for_bundle_identifier(bundle_identifier)
click to toggle source
# File lib/crep/model/app_source/hockeyapp_app_source.rb, line 22 def versions_for_bundle_identifier(bundle_identifier) apps = apps_for_bundle_identifier(bundle_identifier) raise("Unable to find app with bundle identifier: #{bundle_identifier}") unless apps.count.positive? app = apps.first app.versions.map do |version| Crep::Version.new(version.shortversion, version.version, app.public_identifier.downcase) end end