rails_app_version 0.2.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/rails_app_version/version.rb +1 -1
- data/lib/rails_app_version.rb +12 -0
- metadata +28 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de1ff73be83ef61042e2e2baddd1b94805f4f41a8ce2f1a021802ccad42c2323
|
4
|
+
data.tar.gz: a410eac1d9ac536a352f8d3158bf1e5bf6b872aa1fced4c2c152db4adc71d840
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1cfbe373f72deb414e9bbe6900e690552da4f8f5a68ca7d1df286bb553556a1e16c28f162b6098a7027cdcf7ac1a6d3126bfe986449834049d7a64716b29eb4
|
7
|
+
data.tar.gz: c09bae51fe6e6ee8e714cc04ef3b4f5558f2618ece745423bab6248372ab10de8e45d5d92b8aaac2dee94c75727b9b667e7bf0f13b7e00672a25655ecdfe73c8
|
data/README.md
CHANGED
@@ -25,7 +25,7 @@ $ bundle
|
|
25
25
|
After adding the gem, you can access the application version and environment information anywhere in your Rails application.
|
26
26
|
```ruby
|
27
27
|
Rails.application.version # => "1.0.0"
|
28
|
-
Rails.application.
|
28
|
+
Rails.application.env # => "staging"
|
29
29
|
```
|
30
30
|
|
31
31
|
## Features
|
data/lib/rails_app_version.rb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
require "rails"
|
4
4
|
require "rails/application"
|
5
5
|
require "rails_app_version/version"
|
6
|
+
require "action_controller/railtie"
|
6
7
|
|
7
8
|
module RailsAppVersion
|
8
9
|
class Version < Gem::Version
|
@@ -34,6 +35,17 @@ module RailsAppVersion
|
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
38
|
+
# Console
|
39
|
+
console do
|
40
|
+
# rubocop:disable Rails/Output
|
41
|
+
puts "Welcome to the Rails console!"
|
42
|
+
puts "Ruby version: #{RUBY_VERSION}"
|
43
|
+
puts "Application environment: #{Rails.application.env}"
|
44
|
+
puts "Application version: #{Rails.application.version}"
|
45
|
+
puts "To exit, press `Ctrl + D`."
|
46
|
+
# rubocop:enable Rails/Output
|
47
|
+
end
|
48
|
+
|
37
49
|
initializer "fetch_config" do |app|
|
38
50
|
@app_config = begin
|
39
51
|
app.config_for(:app_version, env: Rails.env)
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_app_version
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Abdelkader Boudih
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '7.0'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '8.1'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '7.0'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '8.1'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: dotenv-rails
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,6 +44,20 @@ dependencies:
|
|
38
44
|
- - ">="
|
39
45
|
- !ruby/object:Gem::Version
|
40
46
|
version: '0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: appraisal
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
41
61
|
description: Get the version of your Rails app
|
42
62
|
email:
|
43
63
|
- terminale@gmail.com
|
@@ -57,7 +77,7 @@ metadata:
|
|
57
77
|
source_code_uri: https://github.com/seuros/rails_app_version
|
58
78
|
changelog_uri: https://github.com/seuros/rails_app_version/blob/master/CHANGELOG.md
|
59
79
|
rubygems_mfa_required: 'true'
|
60
|
-
post_install_message:
|
80
|
+
post_install_message:
|
61
81
|
rdoc_options: []
|
62
82
|
require_paths:
|
63
83
|
- lib
|
@@ -72,8 +92,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
92
|
- !ruby/object:Gem::Version
|
73
93
|
version: '0'
|
74
94
|
requirements: []
|
75
|
-
rubygems_version: 3.5.
|
76
|
-
signing_key:
|
95
|
+
rubygems_version: 3.5.16
|
96
|
+
signing_key:
|
77
97
|
specification_version: 4
|
78
98
|
summary: Get the version of your Rails app
|
79
99
|
test_files: []
|