rails_app_version 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b88a327da8016755f2d83c27196a5a397727b65a84352fb1bc66f86902e44fca
4
- data.tar.gz: 40025876dbfb8327aa5aca6cc0ff0601af7232f557e1daff581d78b6523e80b6
3
+ metadata.gz: c349aa9229b34d82b9649759bc0bf6874ac3ec0f395f1a4d7bdd82a0ecfcbcc4
4
+ data.tar.gz: fa57ffd7636b51b2dfcabda06d3d387a6e5c1d2145a024d99ba6026f36258b7c
5
5
  SHA512:
6
- metadata.gz: 7a37e92c5cd0de896b0d82fe248e158a5faa4247aac81e0795b67660899acb80924143a446a34917c154034ad19de96d66b468825b9f49ce088d53fa40ed57bf
7
- data.tar.gz: f9ab9e0958f3587eebe3e7cb56359bb39c21ca1d10a0135d92ad673e6271483eeb23db81dfd1e424c017efe3bcb9f388b97539080a42797bc0f198e577019d97
6
+ metadata.gz: 20034d4a7cd45ccf939ee1501ff6b5313e066e852565d635d2e711a22ce12ab102c3e1a538580476cb188882a916df7a014c9c329f42b94eef39bcf8a84b44cb
7
+ data.tar.gz: 5b6b218c9ddf5bf17c6a40cdf8c37eb78c84489e9ede694765083122fbe5d874b8c8d3c7e6c29a154ebb2d7df8f0b4707288b1640aecd9a3a0c79289e4772fc9
data/README.md CHANGED
@@ -1,6 +1,10 @@
1
- # RailsAppVersion
1
+ # Rails AppVersion
2
2
 
3
- RailsAppVersion is a Ruby on Rails engine designed to easily manage and access your application's version and environment information. It allows for a seamless integration of versioning within your Rails application, providing a straightforward way to access the current application version and environment without hardcoding these values.
3
+ Rails AppVersion is a Ruby on Rails engine designed to easily manage and access your application's version and environment information.
4
+
5
+ It allows for a seamless integration of versioning within your Rails application, providing a straightforward way to access the current application version and environment without hardcoding these values.
6
+
7
+ This gem is exclusively build for Rails applications and is compatible with Rails 7.0 and above.
4
8
 
5
9
  ## Usage
6
10
  How to use my plugin.
@@ -30,12 +34,12 @@ Rails.application.environment # => "staging"
30
34
  - Flexible Usage: Access the application version and environment information anywhere in your Rails application.
31
35
 
32
36
  ## Contributing
33
- Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
34
- 1. Fork the repo
35
- 2. Create your feature branch (git checkout -b my-new-feature)
36
- 3. Commit your changes (git commit -am 'Add some feature')
37
- 4. Push to the branch (git push origin my-new-feature)
38
- 5. Create a new Pull Request
37
+ Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
38
+ 1. Fork the repo
39
+ 2. Create your feature branch (git checkout -b my-new-feature)
40
+ 3. Commit your changes (git commit -am 'Add some feature')
41
+ 4. Push to the branch (git push origin my-new-feature)
42
+ 5. Create a new Pull Request
39
43
 
40
44
  ## License
41
45
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,4 @@
1
+ shared:
2
+ version: <%= Rails.root.join('VERSION').read.strip rescue '0.0.0' %>
3
+ revision: <%= Rails.root.join('REVISION').read.strip rescue (`git rev-parse HEAD`.strip rescue '0') %>
4
+ show_revision: <%= Rails.env.local? %>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsAppVersion
4
- VERSION = '0.1.0'
4
+ VERSION = "0.1.1"
5
5
  end
@@ -1,18 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rails_app_version/version'
3
+ require "rails_app_version/version"
4
4
 
5
5
  module RailsAppVersion
6
6
  class Engine < ::Rails::Engine
7
7
  attr_reader :app_config, :version, :environment
8
8
 
9
- initializer 'fetch_config' do |app|
9
+ initializer "fetch_config" do |app|
10
10
  @app_config = begin
11
11
  app.config_for(:app_version)
12
12
  rescue RuntimeError
13
13
  # Load the default configuration from the gem, if the app does not have one
14
- require 'erb'
15
- yaml = Engine.root.join('config', 'app_version.yml')
14
+ require "erb"
15
+ yaml = Engine.root.join("config", "app_version.yml")
16
16
  all_configs = ActiveSupport::ConfigurationFile.parse(yaml).deep_symbolize_keys
17
17
  all_configs[:shared]
18
18
  end
@@ -20,7 +20,7 @@ module RailsAppVersion
20
20
  @version = @app_config[:version]
21
21
  @environment = @app_config[:environment] || Rails.env
22
22
  end
23
- initializer 'patch_application' do |app|
23
+ initializer "patch_application" do |app|
24
24
  # Inject the module into the application
25
25
  app.class.send(:include, RailsAppVersion::AppVersion)
26
26
  app.class.send(:include, RailsAppVersion::AppEnvironment)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_app_version
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdelkader Boudih
@@ -33,6 +33,7 @@ extra_rdoc_files: []
33
33
  files:
34
34
  - README.md
35
35
  - Rakefile
36
+ - config/app_version.yml
36
37
  - lib/rails_app_version.rb
37
38
  - lib/rails_app_version/version.rb
38
39
  homepage: https://github.com/seuros/rails_app_version
@@ -50,7 +51,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
50
51
  requirements:
51
52
  - - ">="
52
53
  - !ruby/object:Gem::Version
53
- version: '0'
54
+ version: 3.1.0
54
55
  required_rubygems_version: !ruby/object:Gem::Requirement
55
56
  requirements:
56
57
  - - ">="