Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

##### Bug Fixes

* None.
* Fix a crash when running with certain activesupport versions.
[Eric Amorde](https://github.com/amorde)
[#781](https://github.com/CocoaPods/Core/pull/781)


## 1.16.2 (2024-10-31)
Expand Down
33 changes: 17 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activesupport (7.2.2)
activesupport (7.2.3.1)
base64
benchmark (>= 0.3)
bigdecimal
Expand All @@ -24,7 +24,7 @@ GEM
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
minitest (>= 5.1, < 6)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
addressable (2.9.0)
Expand All @@ -36,25 +36,26 @@ GEM
awesome_print (1.9.2)
bacon (1.2.0)
base64 (0.1.2)
benchmark (0.3.0)
bigdecimal (3.1.8)
benchmark (0.5.0)
bigdecimal (4.1.2)
coderay (1.1.3)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
concurrent-ruby (1.3.7)
connection_pool (3.0.2)
crack (1.0.1)
bigdecimal
rexml
drb (2.2.1)
ethon (0.16.0)
drb (2.2.3)
ethon (0.18.0)
ffi (>= 1.15.0)
ffi (1.17.0)
logger
ffi (1.17.4)
fuzzy_match (2.0.4)
hashdiff (1.2.1)
httpclient (2.9.0)
mutex_m
i18n (1.14.6)
i18n (1.15.2)
concurrent-ruby (~> 1.0)
json (2.7.5)
json (2.20.0)
kicker (3.0.0)
listen (~> 1.3.0)
notify (~> 0.5.2)
Expand All @@ -63,10 +64,10 @@ GEM
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
rb-kqueue (>= 0.2)
logger (1.6.1)
logger (1.7.0)
metaclass (0.0.4)
method_source (1.0.0)
minitest (5.25.1)
minitest (5.27.0)
mocha (1.4.0)
metaclass (~> 0.0.1)
mocha-on-bacon (0.2.3)
Expand Down Expand Up @@ -114,10 +115,10 @@ GEM
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.13.0)
securerandom (0.3.1)
securerandom (0.4.1)
strscan (3.1.8)
typhoeus (1.4.1)
ethon (>= 0.9.0)
typhoeus (1.6.0)
ethon (>= 0.18.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
Expand Down
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ begin
end

task :all do
puts "\033[0;32mUsing #{`ruby --version`}\033[0m"

title 'Running Unit Tests'
sh "bundle exec bacon #{specs('**')}"

Expand Down
2 changes: 2 additions & 0 deletions lib/cocoapods-core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class Informative < PlainInformative; end
require 'pathname'
require 'cocoapods-core/vendor'

# Fix for crash when importing certain activesupport versions
require 'logger'
require 'active_support'
require 'active_support/core_ext'

Expand Down
4 changes: 1 addition & 3 deletions spec/fixtures/CannonPodder14.podspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
]
},
"dependencies": {
"OCMock": [

]
"OCMock": []
}
}
]
Expand Down
4 changes: 1 addition & 3 deletions spec/fixtures/CannonPodder15.podspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
]
},
"dependencies": {
"OCMock": [

]
"OCMock": []
}
}
]
Expand Down
4 changes: 1 addition & 3 deletions spec/fixtures/CannonPodder16.podspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
]
},
"dependencies": {
"OCMock": [

]
"OCMock": []
}
}
]
Expand Down
4 changes: 1 addition & 3 deletions spec/fixtures/CannonPodder17.podspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
]
},
"dependencies": {
"OCMock": [

]
"OCMock": []
}
}
]
Expand Down
4 changes: 1 addition & 3 deletions spec/fixtures/CannonPodder18.podspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
]
},
"dependencies": {
"OCMock": [

]
"OCMock": []
}
}
]
Expand Down
6 changes: 5 additions & 1 deletion spec/specification/json_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,15 @@ module Pod
end

it 'maintains correct order of keys across versions' do
# json < 2.8.0 renders empty arrays and objects across multiple
# lines, newer versions render them compactly as [] / {}, so
# normalize empty collections before comparing.
normalize = ->(s) { s.gsub(/\[\s+\]/, '[]').gsub(/\{\s+\}/, '{}') }
%w(14 15 16 17 18).each do |version|
json = File.read(File.expand_path("../../fixtures/CannonPodder#{version}.podspec.json", __FILE__))
loaded_spec = Specification.from_json(json)
new_json = loaded_spec.to_pretty_json
new_json.should.equal json
normalize.call(new_json).should.equal normalize.call(json)
end
end
end
Expand Down