dingbat/nsrails

Problem with Cocoapds/NSRails config for 2.0.2

matthewsinclair opened this issue · 7 comments

I'm trying to use the 2.0.2 version of NSRails (in RubyMotion) and no matter what I do, the built version is somehow defaulting back to 2.0.1.

The problem appears to be that even though I am specifying 2.0.2 in my Podfile in the root of the RM project, the built file in vendor/Podfile.lock is coming up for version 2.0.1. And in version 2.0.1, it appears that there is no attribute on NSRConfig for "additionalHTTPHeaders", which means that the whole thing is basically useless for me because I need to provide an auth token to talk to my back end.

Anyway, here's the Podfile from my test app:

platform :ios, '6.0'
pod 'NSRails', :git => 'git@github.com:dingbat/nsrails.git', :tag => "v2.0.2"

BTW: using just "pod 'NSRails'" by itself or trying to specify "pod 'NSRails', '~> 2.0.2'" also doesn't work as there's no 2.0.2 version pushed to the Cocoapods repo as yet.

And here's the Podfile.lock file generated after a 'pod install':

PODS:
  - NSRails (2.0.2)

DEPENDENCIES:
  - NSRails (from `git@github.com:dingbat/nsrails.git`, tag `v2.0.2`)

EXTERNAL SOURCES:
  NSRails:
    :git: git@github.com:dingbat/nsrails.git
    :tag: v2.0.2

SPEC CHECKSUMS:
  NSRails: 6e21ec06f955b00c80a5f0ed41a78f38a178eb78

COCOAPODS: 0.17.2

That all seems to look ok. But here's the Podfile.lock file generated by Cocoapods in vendor/Podfile.lock

PODS:
  - NSRails (2.0.1)

DEPENDENCIES:
  - NSRails

SPEC CHECKSUMS:
  NSRails: 6c628aa8f38fc8a1b480837c311107d9bc0f0890

COCOAPODS: 0.17.2

There's some comments on the closed issue #25, but as it's closed, I figured I'd open a new issue. To see if anyone has any ideas.

Thanks,
M@

Ok, so I have managed to hack this into working by checking out my own copy of NSRails and then creating a 2.0.2 directory in ~/.cocoapods/master/NSRails/2.0.2 and manually copying in the NSRails.podspec file. Now a build will use the correct version. But without this horrible hack, even using :local in the Podfile ends up bringing in version 2.0.1 into the built artefacts. I'll plough on ...

Hey Matt,

Really sorry about the delay, I've been busy with exams & things.

I'll submit a PR to CocoaPods with version 2.0.2 today, hopefully that should get things working nicely. It's annoying that the PodSpec has to be updated with every new release, but I'll be mindful of it.

I'll post back when the PR is merged, and you can test it out again.

-Dan

Brilliant. Thanks. Good luck with exams.

Regards,
M@

On 06/04/2013, at 10:56 AM, dan hassin notifications@github.com wrote:

Hey Matt,

Really sorry about the delay, I've been busy with exams & things.

I'll submit a PR to CocoaPods with version 2.0.2 today, hopefully that
should get things working nicely. It's annoying that the PodSpec has to be
updated with every new release, but I'll be mindful of it.

I'll post back when the PR is merged, and you can test it out again.

-Dan


Reply to this email directly or view it on
GitHubhttps://github.com//issues/34#issuecomment-15986962
.

Hi Dan,

I was wondering if you have had a chance to push the 2.0.2 stuff to the Cocoapods repo yet? I just had a look here:

https://github.com/CocoaPods/Specs/tree/master/NSRails

And there's no entry for 2.0.2 yet, just the one for 2.0.1.

Thanks,
M@

Hi Dan,

Just wondering if you have had a chance to push 2.0.2 to the Cocoapods repo? It still only has 2.0.1 in there (which requires some local surgery to get it to work with 2.0.2).

Thanks,
M@

Hey, really sorry about the delay.

2.0.2 is merged into the Cocoapods and everything should be sorted out!

Thanks!

Regards,
M@

On 30/05/2013, at 2:51 AM, dan hassin notifications@github.com wrote:

Hey, really sorry about the delay.

2.0.2 is merged into the Cocoapods and everything should be sorted out!


Reply to this email directly or view it on
GitHubhttps://github.com//issues/34#issuecomment-18630339
.