Skip to content

Commit

Permalink
Merge pull request #580 from amorde/require-once
Browse files Browse the repository at this point in the history
Only require 'digest' once instead of on every call of `uuid_for_path`
  • Loading branch information
segiddins authored Jun 19, 2018
2 parents 517e1f6 + 8176b13 commit 5d9add3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

##### Bug Fixes

* Only `require 'digest'` once instead of per call to `uuid_for_path`
[Eric Amorde](https://github.com/amorde)
[#580](https://github.com/CocoaPods/Xcodeproj/pull/580)

* Xcode 10 support for input file list and output file list
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#7835](https://github.com/CocoaPods/CocoaPods/issues/7835)
Expand Down
3 changes: 2 additions & 1 deletion lib/xcodeproj/project/uuid_generator.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module Xcodeproj
class Project
class UUIDGenerator
require 'digest'

def initialize(project)
@project = project
@new_objects_by_uuid = {}
Expand Down Expand Up @@ -76,7 +78,6 @@ def switch_uuids(objects)
end

def uuid_for_path(path)
require 'digest'
Digest::MD5.hexdigest(path).upcase
end

Expand Down

0 comments on commit 5d9add3

Please sign in to comment.