Initial improvements #3

Closed
wants to merge 3 commits into
from

3 participants

@steveklabnik

I broke them out into four different commits in case you only want parts.

  • note about proper ruby version - This project doesn't work without 1.9.3. Added a README note and .rvmrc.
  • Adding test task - Really? I don't want to type 'ruby -Ilib -r./test/helper.rb test/*_test.rb every time I want to run tests. :p
  • adding vim swap files to gitignore - I hate accidentally commiting swap files
  • Changing syntax for errors. Class.new is worse than regular inheritance.
@steveklabnik

I backed off the commit about the Error situation.

@steveklabnik

However, I'd accept a patch that adds .rvmrc to the .gitignore and provides a .rvmrc.example file, if you want to send one along.

I can't go along with this. We'll just have to fight to the death over it. Again. :p

@steveklabnik

I updated the commit to just leave the note in the README, and not do anything with the .rvmrc.

@practicingruby
Elm City Craftworks member

I can't go along with this. We'll just have to fight to the death over it. Again. :p

That's fine. This is what atomic commits are for! They let me ignore things that are clearly wrong 🐨

@steveklabnik

❤️ ❤️ ❤️

@practicingruby
Elm City Craftworks member

I cherry picked your note about 1.9.3, though I'm not 100% sure its accurate. It may be possible to use this on Ruby < 1.9.3 if you install the io-console gem there. But since I haven't tested at all there, probably better to just mark it 1.9.3+. It's not like anyone is going to make a decision to use this or not based on its ruby version :)

@steveklabnik

Word. What about the other two?

@eregon

Changing syntax for errors. Class.new is worse than regular inheritance.

Why? I really like this syntax, although using the class keyword is fine if in the same file too (but I hate having a file just with class Ex < StEx\nend)

However, I'd accept a patch that adds .rvmrc to the .gitignore and provides a .rvmrc.example file, if you want to send one along.

I can't go along with this. We'll just have to fight to the death over it. Again. :p

I might agree with you here, because rvm users can set whether they want to activate .rvmrc and anyway I use rbenv :)

@practicingruby
Elm City Craftworks member

Another area where I deviate intentionally from convention. I added a test/suite.rb file though, which will make it easy to run the whole suite.

I just feel like now that I split my gemspec out for Bundler, and I use minitest which allows me to simply require my test files and have them run, Rake is YAGNI until I need it for something. Once I do, this task is a good one to add though.

I'm more concerned about running them easily than using rake specifically, so no specific complaints here.

Oh, one more thing: without a Gemfile, I felt kinda bad not specifying which version of rake we were using. So I actually think I prefer this for that reason.

Elm City Craftworks member

I've been getting away with this "experiment" for about a year now and have not missed Rake. But I've been also mostly working on bullshit toys like this, so YMMV :)

@steveklabnik

Why?

Please see my commit here for the discussion. I've reversed my position on this.

@practicingruby
Elm City Craftworks member

@steveklabnik Cherry-picked the vim swapfile change, made a similar (but non-conventional) change that addresses the concern of running all the tests at once, without a rake dependency. Closing this request now, because I think that accounts for everything. Feel free to continue discussion though.

@eregon

Please see my commit here for the discussion. I've reversed my position on this.

Ah, I see, one of the most weird feature of ruby: constants may "know" their names when assigned a class.

@steveklabnik

Yep I'd consider it closed.

@practicingruby
Elm City Craftworks member

@eregon:

I might agree with you here, because rvm users can set whether they want to activate .rvmrc and anyway I use rbenv :)

This is precisely the reason why this bugs me :)
If I want to just look around a project, I don't want .rvmrc files to get in my way and ask me if I want to "trust" them. Having a .rvmrc.example file makes it easy for me to copy it in place if I want it, and ignore it otherwise.

@eregon

I just feel like now that I split my gemspec out for Bundler, and I use minitest which allows me to simply require my test files and have them run, Rake is YAGNI until I need it for something. Once I do, this task is a good one to add though.

Agreed, rake is just a nice way to group things, but if you have a single task easy enough to run directly (like rspec), it's better to not use Rake, and it's a bit faster and cleaner (but unfortunately TravisCI require both a Gemfile and a Rakefile by default...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment