Skip to content

Commit

Permalink
Improved warning message for DSL attribute renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Halligon committed May 17, 2016
1 parent 5374c41 commit ed1aaa7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

##### Enhancements

* None.
* Improved warning message for the renaming of `xcodeproj` to `project` in the `Podfile` DSL.
[Olivier Halligon](https://github.com/AliSoftware)
[#?](https://github.com/CocoaPods/CocoaPods/pull/?)

##### Bug Fixes

Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods-core/podfile/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def project(path, build_configurations = {})
# For pre-1.0 versions use `xcodeproj`.
#
def xcodeproj(*args)
CoreUI.warn 'xcodeproj was renamed to `project`. Please use that from now on.'
CoreUI.warn '`xcodeproj` was renamed to `project`. Please update your Podfile accordingly.'
project(*args)
end

Expand Down
2 changes: 1 addition & 1 deletion spec/podfile/dsl_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ module Pod
podfile = Podfile.new { xcodeproj 'App.xcodeproj', 'Test' => :debug }
podfile.target_definitions['Pods'].user_project_path.should == 'App.xcodeproj'
podfile.target_definitions['Pods'].build_configurations.should == { 'Test' => :debug }
CoreUI.warnings.should == 'xcodeproj was renamed to `project`. Please use that from now on.'
CoreUI.warnings.should == '`xcodeproj` was renamed to `project`. Please update your Podfile accordingly.'
end
end

Expand Down

0 comments on commit ed1aaa7

Please sign in to comment.