Module: Dependabot::Pub::Helpers
- Extended by:
- T::Helpers, T::Sig
- Includes:
- Kernel
- Included in:
- FileParser, FileUpdater, UpdateChecker
- Defined in:
- lib/dependabot/pub/helpers.rb
Instance Attribute Summary collapse
-
#credentials ⇒ Object
readonly
Returns the value of attribute credentials.
-
#dependency_files ⇒ Object
readonly
Returns the value of attribute dependency_files.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Attribute Details
#credentials ⇒ Object (readonly)
Returns the value of attribute credentials.
26 27 28 |
# File 'lib/dependabot/pub/helpers.rb', line 26 def credentials @credentials end |
#dependency_files ⇒ Object (readonly)
Returns the value of attribute dependency_files.
29 30 31 |
# File 'lib/dependabot/pub/helpers.rb', line 29 def dependency_files @dependency_files end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
32 33 34 |
# File 'lib/dependabot/pub/helpers.rb', line 32 def @options end |
Class Method Details
.pub_helpers_path ⇒ Object
34 35 36 |
# File 'lib/dependabot/pub/helpers.rb', line 34 def self.pub_helpers_path File.join(ENV.fetch("DEPENDABOT_NATIVE_HELPERS_PATH", nil), "pub") end |
.run_infer_sdk_versions(dir, url: nil) ⇒ Object
38 39 40 41 42 43 44 45 46 |
# File 'lib/dependabot/pub/helpers.rb', line 38 def self.run_infer_sdk_versions(dir, url: nil) env = {} cmd = File.join(pub_helpers_path, "infer_sdk_versions") opts = url ? "--flutter-releases-url=#{url}" : "" stdout, _, status = Open3.capture3(env, cmd, opts, chdir: dir) return nil unless status.success? JSON.parse(stdout) end |