version_reader 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +6 -0
- data/Gemfile.lock +1 -1
- data/README.md +3 -5
- data/VERSION +1 -1
- data/lib/version_reader.rb +4 -0
- data/spec/version_reader_spec.rb +1 -0
- data/version_reader.gemspec +1 -1
- metadata +7 -5
- data/.rvmrc +0 -52
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
version_reader
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.9.3-p194
|
data/.travis.yml
ADDED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# version_reader
|
1
|
+
# version_reader [](http://travis-ci.org/luxflux/version_reader) [](https://codeclimate.com/github/luxflux/version_reader)
|
2
2
|
|
3
3
|
Small Gem to read your version file.
|
4
4
|
|
@@ -16,9 +16,7 @@ version_reader.normal # 0.4.2
|
|
16
16
|
## Rails integration
|
17
17
|
|
18
18
|
If you add this gem to your Gemfile of a Rails application it will
|
19
|
-
automatically define ```CoolApp::Application.version``` and fill in a VersionReader instance.
|
20
|
-
|
21
|
-
It will also load some Rails flavor.
|
19
|
+
automatically define ```CoolApp::Application.version``` and fill in a Rails-flavored VersionReader instance.
|
22
20
|
|
23
21
|
## Flavors
|
24
22
|
|
@@ -33,7 +31,7 @@ The Rails flavor adds some additional methods which also show some information a
|
|
33
31
|
Always adds the current Rails-Environment to the version. Maybe useful to see whether this is staging or not :)
|
34
32
|
|
35
33
|
```ruby
|
36
|
-
|
34
|
+
CoolApp::Application.version.rails_env
|
37
35
|
```
|
38
36
|
Output would be ```0.4.2-development```.
|
39
37
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
data/lib/version_reader.rb
CHANGED
data/spec/version_reader_spec.rb
CHANGED
data/version_reader.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
|
|
6
6
|
gem.email = ["raffael@yux.ch"]
|
7
7
|
gem.description = %q{Easily read your VERSION file and display it in different formats}
|
8
8
|
gem.summary = %q{Reads your VERSION file and gives the ability to display it in an easy way}
|
9
|
-
gem.homepage = ""
|
9
|
+
gem.homepage = "https://github.com/luxflux/version_reader"
|
10
10
|
|
11
11
|
gem.files = `git ls-files`.split($\)
|
12
12
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: version_reader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-07-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -68,7 +68,9 @@ extra_rdoc_files: []
|
|
68
68
|
files:
|
69
69
|
- .gitignore
|
70
70
|
- .rspec
|
71
|
-
- .
|
71
|
+
- .ruby-gemset
|
72
|
+
- .ruby-version
|
73
|
+
- .travis.yml
|
72
74
|
- .watchr
|
73
75
|
- Gemfile
|
74
76
|
- Gemfile.lock
|
@@ -84,7 +86,7 @@ files:
|
|
84
86
|
- spec/version_reader/flavor/rails_spec.rb
|
85
87
|
- spec/version_reader_spec.rb
|
86
88
|
- version_reader.gemspec
|
87
|
-
homepage:
|
89
|
+
homepage: https://github.com/luxflux/version_reader
|
88
90
|
licenses: []
|
89
91
|
post_install_message:
|
90
92
|
rdoc_options: []
|
@@ -104,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
106
|
version: '0'
|
105
107
|
requirements: []
|
106
108
|
rubyforge_project:
|
107
|
-
rubygems_version: 1.8.
|
109
|
+
rubygems_version: 1.8.23
|
108
110
|
signing_key:
|
109
111
|
specification_version: 3
|
110
112
|
summary: Reads your VERSION file and gives the ability to display it in an easy way
|
data/.rvmrc
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
|
3
|
-
# This is an RVM Project .rvmrc file, used to automatically load the ruby
|
4
|
-
# development environment upon cd'ing into the directory
|
5
|
-
|
6
|
-
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
|
7
|
-
# Only full ruby name is supported here, for short names use:
|
8
|
-
# echo "rvm use 1.9.3" > .rvmrc
|
9
|
-
environment_id="ruby-1.9.3-p194@version-reader"
|
10
|
-
|
11
|
-
# Uncomment the following lines if you want to verify rvm version per project
|
12
|
-
# rvmrc_rvm_version="1.13.4 (stable)" # 1.10.1 seams as a safe start
|
13
|
-
# eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
|
14
|
-
# echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
|
15
|
-
# return 1
|
16
|
-
# }
|
17
|
-
|
18
|
-
# First we attempt to load the desired environment directly from the environment
|
19
|
-
# file. This is very fast and efficient compared to running through the entire
|
20
|
-
# CLI and selector. If you want feedback on which environment was used then
|
21
|
-
# insert the word 'use' after --create as this triggers verbose mode.
|
22
|
-
if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
|
23
|
-
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
|
24
|
-
then
|
25
|
-
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
|
26
|
-
[[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
|
27
|
-
\. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
|
28
|
-
if [[ $- == *i* ]] # check for interactive shells
|
29
|
-
then echo "Using: $(tput setaf 2)$GEM_HOME$(tput sgr0)" # show the user the ruby and gemset they are using in green
|
30
|
-
else echo "Using: $GEM_HOME" # don't use colors in non-interactive shells
|
31
|
-
fi
|
32
|
-
else
|
33
|
-
# If the environment file has not yet been created, use the RVM CLI to select.
|
34
|
-
rvm --create use "$environment_id" || {
|
35
|
-
echo "Failed to create RVM environment '${environment_id}'."
|
36
|
-
return 1
|
37
|
-
}
|
38
|
-
fi
|
39
|
-
|
40
|
-
# If you use bundler, this might be useful to you:
|
41
|
-
# if [[ -s Gemfile ]] && {
|
42
|
-
# ! builtin command -v bundle >/dev/null ||
|
43
|
-
# builtin command -v bundle | GREP_OPTIONS= \grep $rvm_path/bin/bundle >/dev/null
|
44
|
-
# }
|
45
|
-
# then
|
46
|
-
# printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
|
47
|
-
# gem install bundler
|
48
|
-
# fi
|
49
|
-
# if [[ -s Gemfile ]] && builtin command -v bundle >/dev/null
|
50
|
-
# then
|
51
|
-
# bundle install | GREP_OPTIONS= \grep -vE '^Using|Your bundle is complete'
|
52
|
-
# fi
|