Can't install Sublime Text with .app meta

59 views
Skip to first unread message

gum...@gmail.com

unread,
Aug 5, 2012, 2:13:35 PM8/5/12
to babush...@googlegroups.com
Love babushka, but I'm having trouble trying to install Sublime Text 2 with the .app meta.  I define my dep like this:


The problem appears to be with the way they name their dmg as "Sublime Text 2.0.1.dmg" instead of just "Sublime Text 2.dmg".  I think babushka is getting confused because it's trying to parse a version number when "Sublime Text 2" is the name of the app itself. (See error message below)

So I'm wondering if there's currently a way to tell babushka not to use the filename in the source as the name of the app, or a way to tell babushka they differ? I tried using provides, but I don't think that solves the same problem. I can help fix this, but need to understand if I'm even using it right first.

Sublime Text 2.app {
  (defining Sublime Text 2.app against app)
  $ uname -s
  Darwin
  $ sw_vers
  ProductName: Mac OS X
  ProductVersion: 10.7.4
  BuildVersion: 11E53
  setup not defined.
  VersionStr.new('Text 2.app'): couldn't parse a version number.
  Check /Users/peter/.babushka/deps/sublime_text_2.rb.
  /usr/local/babushka/lib/babushka/version_str.rb:21:in `initialize'
  /usr/local/babushka/lib/babushka/core_patches/string.rb:85:in `new'
  /usr/local/babushka/lib/babushka/core_patches/string.rb:85:in `to_version'
  /usr/local/babushka/lib/babushka/version_of.rb:43:in `initialize'
  /usr/local/babushka/lib/babushka/version_of.rb:12:in `new'
  /usr/local/babushka/lib/babushka/version_of.rb:12:in `VersionOf'

Ben Hoskings

unread,
Aug 6, 2012, 7:45:26 AM8/6/12
to babush...@googlegroups.com
Cheers. Good find -- I think the version handling in '.app' will need some tightening. I'll have a look.

- Ben
> --
> To post, email babush...@googlegroups.com
> To unsubscribe, email babushka_app...@googlegroups.com
> ~
> http://babushka.me
> http://github.com/benhoskings/babushka
> http://groups.google.com/group/babushka_app

Ben Hoskings

unread,
Aug 6, 2012, 11:10:19 AM8/6/12
to babush...@googlegroups.com
Just had a proper look at this -- there's actually a pending spec in the suite for this exact case:

https://github.com/benhoskings/babushka/blob/master/spec/babushka/version_of_spec.rb#L32

I marked it pending some time ago. It's actually a tricky one to solve considering command name strings can contain spaces, like "unicorn >= 4.0", etc.

I've refactored the version-related code and added a 'version' acceptor to the template. If you update to next:

babushka babushka version=next

Then you should be able to use that dep, with an addition:
version '>= 2.0.1'
end

Let me know how it goes -- I'll merge 'next' to 'master' in the next couple of days.

Cheers
Ben



On 06/08/2012, at 4:13 AM, gum...@gmail.com wrote:

Peter Gumeson

unread,
Aug 6, 2012, 12:29:17 PM8/6/12
to babush...@googlegroups.com
Thanks Ben! Worked like a charm.

That's all I was missing to complete my comprehensive Subllime Text deps that:

* Installs the DMG
* Downloads a nicer theme
* Installs some custom user prefs
* Installs the subl command in /usr/local/bin

I'll post them here in case you are a Sublime user and might find them useful:


peter

Ben Hoskings

unread,
Aug 6, 2012, 8:51:51 PM8/6/12
to babush...@googlegroups.com
Awesome, thanks. Nice set of sublime deps :)
Reply all
Reply to author
Forward
0 new messages