Closed junaruga closed 8 years ago
I'll state my intent and preference, but then go on to propose a concession.
I prefer to have the .ruby-version there for development as it hints at which version we should be primarily developing against. It also sets up RVM currently when you enter the repository so you don't have to remember to do it. You can always have your version manager not acknowledge this file.
Having said that, I would be okay with not having it in the repository and instead having it in the setup instructions. I think it's important that the file be defined, but we don't necessary have to have it defined upon first checkout. In that setup section, we would recommend which version this file should contain.
Note that, in my mind, the .ruby-version is not specifying a required ruby version. It's just the preferred one for development. That's why I don't think we want to use the same value in the gemspec. The gemspec, however, should specify the minimum version against which we are developing, which I think should be 2.0.0. I think that's a separate issue.
Hi, @mojavelinux I could understand your intent. Thanks.
I am afraid below case. Below is the case of rbenv. However RVM must have same kind of case of this. Yes, .ruby-version is not specifying a required ruby version, exactly.
However if developers may want to use other version's Ruby, they will see "modified file". I want to avoid modified file, that we have discussed about last time. https://github.com/asciidoctor/docbookrx/pull/47
$ rbenv versions
system
2.2.4
* 2.3.0 (set by /home/jaruga/git/docbookrx/.ruby-version)
$ rbenv local 2.2.4
$ rbenv versions
system
* 2.2.4 (set by /home/jaruga/git/docbookrx/.ruby-version)
2.3.0
$ git status
...
modified: .ruby-version
...
If you want to know the RVM version, if you will see RVM version in .travis.yml, you may remember it.
I want to avoid modified file, that we have discussed about last time.
Exactly. I'm saying that I agree. I'm just requesting that when we remove it, we add it to the instructions in the README at the same time. Specifically, let's add it to this section:
https://github.com/asciidoctor/docbookrx#prepare-rvm-optional
We should change "default" to "2.3.0". If you go ahead and send a PR, I'd be happy to review and revise the instructions.
I found ".ruby-version" file was registered on this git repository. https://github.com/asciidoctor/docbookrx/blob/0f3c954a7a549cfeafdbbbbc2293f5a673fbdbfb/.ruby-version
However I like the style that .ruby-version file is not registered on the repository. Because I guess that developers like to use their own ruby version with RVM or Rbenv on their local environment.
Look at the case of popular project nokogiri. nokogiri is addeding .ruby-version to .gitignore file. https://github.com/sparklemotion/nokogiri/blob/v1.6.8/.gitignore#L11
If you want to restrict used ruby version, you can use required_ruby_version in gemspec file or Rakefile. http://guides.rubygems.org/specification-reference/#required_ruby_version
Cases of required_ruby_version https://github.com/bundler/bundler/blob/v1.12.5/bundler.gemspec#L17 https://github.com/sparklemotion/nokogiri/blob/v1.6.8/Rakefile#L153
Thanks.