ruby_version_reader 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.travis.yml +1 -0
- data/CHANGELOG.md +7 -0
- data/lib/ruby_version_reader.rb +8 -4
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93f7956dba5ae340d79784aa85f8da9515550714
|
4
|
+
data.tar.gz: e705668e7fead23d9b6c1b934ca8397ac0508580
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21e5c0739b9435479e2aa7c0141a65690a5f81d9e9a6133214b8517b5e41a42403acfb6f3d9eeeb2071623adbd117fb8ccc586dca3e419109c1615b9f1b67441
|
7
|
+
data.tar.gz: 014854fb94ea74065d718671d5cf069e4b2de2ea229f6501b0653447f84c9ca43da21e036817483451ee3f76752d40cb07c9bb0b02ea8196aeebb71d223c9133
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 0.2.0 - 2015-01-05
|
4
|
+
### Added
|
5
|
+
- Allow `:rvm_path` option in RubyVersionReader initialize
|
6
|
+
|
7
|
+
### Deprecated, Removed, Fixed
|
8
|
+
- Nothing
|
9
|
+
|
3
10
|
## 0.1.1 - 2014-12-03
|
4
11
|
### Added
|
5
12
|
- Ability to initialize a RubyVersionReader with no arguments (like the README says you can)
|
data/lib/ruby_version_reader.rb
CHANGED
@@ -2,13 +2,17 @@ require 'date'
|
|
2
2
|
require 'time'
|
3
3
|
|
4
4
|
class RubyVersionReader
|
5
|
-
VERSION = '0.
|
5
|
+
VERSION = '0.2.0'
|
6
6
|
|
7
|
-
attr_accessor :path, :environment_manager
|
7
|
+
attr_accessor :path, :environment_manager, :options
|
8
8
|
|
9
|
-
|
9
|
+
# Available options:
|
10
|
+
# *:rvm_path: The path to the rvm executable (used if given_environment_manager == 'rvm'). Default: nil.
|
11
|
+
def initialize(given_path = './', given_environment_manager = 'rvm', given_options = {})
|
10
12
|
@path = File.expand_path(given_path)
|
11
13
|
@environment_manager = given_environment_manager
|
14
|
+
@options = {}
|
15
|
+
@options[:rvm_path] = given_options[:rvm_path].to_s
|
12
16
|
end
|
13
17
|
|
14
18
|
def to_s
|
@@ -28,7 +32,7 @@ class RubyVersionReader
|
|
28
32
|
def environment_manager_load_string
|
29
33
|
case environment_manager
|
30
34
|
when 'rvm'
|
31
|
-
"rvm #{to_s} do"
|
35
|
+
"#{options[:rvm_path].empty? ? 'rvm' : options[:rvm_path]} #{to_s} do"
|
32
36
|
when 'rbenv'
|
33
37
|
"RBENV_VERSION=#{to_s}"
|
34
38
|
when 'chruby'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_version_reader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcos Wright-Kuhns
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -89,6 +89,8 @@ extra_rdoc_files: []
|
|
89
89
|
files:
|
90
90
|
- ".gitignore"
|
91
91
|
- ".rspec"
|
92
|
+
- ".ruby-gemset"
|
93
|
+
- ".ruby-version"
|
92
94
|
- ".travis.yml"
|
93
95
|
- CHANGELOG.md
|
94
96
|
- Gemfile
|
@@ -97,7 +99,6 @@ files:
|
|
97
99
|
- README.rdoc
|
98
100
|
- Rakefile
|
99
101
|
- lib/ruby_version_reader.rb
|
100
|
-
- pkg/ruby_version_reader-0.1.0.gem
|
101
102
|
- ruby_version_reader.gemspec
|
102
103
|
- spec/ruby_version_reader_spec.rb
|
103
104
|
- spec/spec_helper.rb
|
@@ -121,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
122
|
version: '0'
|
122
123
|
requirements: []
|
123
124
|
rubyforge_project:
|
124
|
-
rubygems_version: 2.
|
125
|
+
rubygems_version: 2.4.3
|
125
126
|
signing_key:
|
126
127
|
specification_version: 4
|
127
128
|
summary: Read .ruby-version and .ruby-gemset files.
|