bitrise-io / ipa_analyzer

iOS IPA file analyzer: collects embedded mobileprovisioning and Info.plist information from a .ipa, can generate pretty printed JSON output.
MIT License
80 stars 15 forks source link

update rubyzip version #5

Closed tarappo closed 5 years ago

tarappo commented 5 years ago

I hope to use rubyzip ~2.x.x~ 1.2.x, so I remove '~> 1.1.7'. Pleaser you will merge and new version release.

I run rspec and all passed.

Finished in 0.13356 seconds (files took 0.49444 seconds to load)
2 examples, 0 failures
tarappo commented 5 years ago

This repository owner is @viktorbenei ? I hope to fix ci/bitrise/1c35505442a281ac/pr, but I can not access it. so please tell me why bitrise failed.

lszucs commented 5 years ago

Hi @tarappo

Thank you for opening a PR! The issue is, that rubocop check fails. The version referenced by the lock changed and rubocop has probably changed it's default checks, since this project was last built. You can run rubocop locally to ensure it succeeds. I'll paste the CI output for you to compare with your output, just to make sure.

I have a remark though: you removed the ~> 1.1.7 constraint, leaving >= 1.1.7 which means that major versions are also accepted. This could break the code. Please use ~> 1.1 to enforce major version compatibility.

Also, a small note: you mention 2.x.x, but rubyzip does not have a major version of 2. I guess you mean 1.2.x?

rubocop output:

Inspecting 8 files
CCCCCCCC
Offenses:
Gemfile:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
source 'https://rubygems.org'
^
ipa_analyzer.gemspec:1:1: C: Style/Encoding: Unnecessary utf-8 encoding comment.
# -*- encoding: utf-8 -*-
^^^^^^^^^^^^^^^^^^^^^^^^^
ipa_analyzer.gemspec:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
# -*- encoding: utf-8 -*-
^
ipa_analyzer.gemspec:2:1: C: Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
$:.push File.expand_path('../lib', __FILE__)
^
ipa_analyzer.gemspec:2:14: C: Style/ExpandPathArguments: Use expand_path('lib', __dir__) instead of expand_path('../lib', __FILE__).
$:.push File.expand_path('../lib', __FILE__)
             ^^^^^^^^^^^
ipa_analyzer.gemspec:22:3: C: Gemspec/OrderedDependencies: Dependencies should be sorted in an alphabetical order within their section of the gemspec. Dependency rake should appear before rubocop.
  s.add_development_dependency 'rake'
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bin/ipa_analyzer:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
#!/usr/bin/env ruby
^
bin/ipa_analyzer:6:14: C: Style/ExpandPathArguments: Use expand_path('../lib', __dir__) instead of expand_path('../../lib', __FILE__).
$:.push File.expand_path('../../lib', __FILE__)
             ^^^^^^^^^^^
bin/ipa_analyzer:91:1: C: Style/RescueStandardError: Avoid rescuing without specifying an error class.
rescue => ex
^^^^^^
bin/ipa_analyzer:91:11: C: Naming/RescuedExceptionsVariableName: Use e instead of ex.
rescue => ex
          ^^
lib/ipa_analyzer/analyzer.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
require 'tempfile'
^
lib/ipa_analyzer/analyzer.rb:39:7: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
      raise "Embedded mobile provisioning file not found in (#{@ipa_path}) at path (#{mobileprovision_path})" unless mobileprovision_entry
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/ipa_analyzer/analyzer.rb:54:1: C: Layout/EmptyLinesAroundExceptionHandlingKeywords: Extra empty line detected before the rescue.
lib/ipa_analyzer/analyzer.rb:55:7: C: Style/RescueStandardError: Avoid rescuing without specifying an error class.
      rescue => e
      ^^^^^^
lib/ipa_analyzer/analyzer.rb:73:7: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
      raise "File 'Info.plist' not found in #{@ipa_path}" unless info_plist_entry
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/ipa_analyzer/analyzer.rb:80:9: C: Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||.
        unless system("plutil -convert xml1 '#{tempfile.path}'")
        ^^^^^^
lib/ipa_analyzer/analyzer.rb:82:9: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
        end
        ^^^
lib/ipa_analyzer/analyzer.rb:90:1: C: Layout/EmptyLinesAroundExceptionHandlingKeywords: Extra empty line detected before the rescue.
lib/ipa_analyzer/analyzer.rb:91:7: C: Style/RescueStandardError: Avoid rescuing without specifying an error class.
      rescue => e
      ^^^^^^
lib/ipa_analyzer/analyzer.rb:110:7: C: Layout/EmptyComment: Source code comment is empty.
      #
      ^
lib/ipa_analyzer/analyzer.rb:113:7: C: Layout/EmptyComment: Source code comment is empty.
      #
      ^
lib/ipa_analyzer/analyzer.rb:114:7: C: Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||.
      if !mobileprovision_entry.nil? && !info_plist_entry.nil?
      ^^
lib/ipa_analyzer/analyzer.rb:129:7: C: Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||.
      if !mobileprovision_entry.nil? && !info_plist_entry.nil?
      ^^
lib/ipa_analyzer/analyzer.rb:131:7: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
      end
      ^^^
lib/ipa_analyzer/version.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
module IpaAnalyzer
^
lib/ipa_analyzer.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
require 'ipa_analyzer/version'
^
spec/analyzer_spec.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
require_relative './../lib/ipa_analyzer/analyzer'
^
spec/analyzer_spec.rb:74:65: C: Style/PercentLiteralDelimiters: %w-literals should be delimited by [ and ].
      expect(content['UISupportedInterfaceOrientations']).to eq(%w(UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight))
                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/analyzer_spec.rb:75:70: C: Style/PercentLiteralDelimiters: %w-literals should be delimited by [ and ].
      expect(content['UISupportedInterfaceOrientations~ipad']).to eq(%w(UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight))
                                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/spec_helper.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
spec/spec_helper.rb:2:1: C: Layout/LeadingBlankLines: Unnecessary blank line at the beginning of the source.
RSpec.configure do |config|
^^^^^
8 files inspected, 31 offenses detected
tarappo commented 5 years ago

@lszucs Thanks.

 I guess you mean 1.2.x?

yes. that's right. so I changed to use ~> 1.1.

Do I need to fix all rubocop check? I think that some rule is off. e.g IfUnlessModifier

tarappo commented 5 years ago

Hi I fixed all robocop checks. Please check this pull request.

lszucs commented 5 years ago

Hi @tarappo,

Thanks for taking your time! :) It looks good to me. Your change will be merged and release it on next Monday! 🎉