Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add requires_app_host DSL attribute #399

Merged
merged 1 commit into from
Aug 25, 2017

Conversation

dnkoutso
Copy link
Contributor

@dnkoutso dnkoutso commented Aug 5, 2017

No description provided.

@dnkoutso dnkoutso added this to the 1.4 milestone Aug 5, 2017
@dnkoutso
Copy link
Contributor Author

dnkoutso commented Aug 5, 2017

Hm I dont think this is right. Using the linter I can write a test the setting the flag to false it actually does not print out the message. I think the only way to achieve this is by defining the requries_app_host= method in dsl.rb.

@dnkoutso dnkoutso changed the title Add requires_app_host DSL attribute [WIP] Add requires_app_host DSL attribute Aug 5, 2017
@dnkoutso dnkoutso changed the title [WIP] Add requires_app_host DSL attribute Add requires_app_host DSL attribute Aug 23, 2017
@dnkoutso
Copy link
Contributor Author

@segiddins @dantoml if interested I believe this is now ready!

def _validate_test_type(t)
unless consumer.spec.test_specification?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this moved to the analyzer.rb and will check all test_only attributes that should be part only within test specifications.

@@ -253,28 +253,6 @@ def result_should_include(*values)

#------------------#

it 'checks that test type cannot be set at the root spec' do
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no longer needed, analyzer takes care of this.

@dnkoutso
Copy link
Contributor Author

dnkoutso commented Aug 23, 2017

Here's the JSON

{
  "name": "CannonPodder",
  "version": "1.0.1",
  "summary": "Small library that can be used to test CocoaPod stuff (CI, building etc.)",
  "homepage": "https://stash.corp.something.com/projects/IOS/repos/cannonpodder/browse",
  "license": {
    "type": "Proprietary",
    "text": "© 2017 Something, Inc."
  },
  "authors": {
    "Someone": "someone@something.com"
  },
  "source": {
    "git": "https://stash.corp.somewhere.com/scm/ios/cannonpodder.git",
    "tag": "1.0.1"
  },
  "platforms": {
    "ios": "9.0",
    "osx": "10.10"
  },
  "source_files": "Sources/**/*.{h,m}",
  "testspecs": [
    {
      "name": "Tests",
      "test_type": "unit",
      "source_files": "Tests/**/*.{h,m}",
      "requires_app_host": true
    }
  ]
}

@orta
Copy link
Member

orta commented Aug 23, 2017

Will a pre-1.3 JSON parser for a podspec ignore this?

@dnkoutso
Copy link
Contributor Author

dnkoutso commented Aug 23, 2017

Yes. Should be fine because it doesn't even have any logic for app hosts and test specs

@dnkoutso dnkoutso merged commit ba3b2a8 into CocoaPods:master Aug 25, 2017
@dnkoutso
Copy link
Contributor Author

yay! thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants