stagery 1.1.0 → 1.2.0

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: 6454bcc50b2856f4d8d8e69bfa4b32b8f5c6cdba672466319eca71cdacc0acd8
4
- data.tar.gz: 75cebae60d7963a011e30d22eccb98bca88b1b5ca0015527da63ca57f6fd7970
3
+ metadata.gz: 66b65d43d63d33a4bc16f8d24bca54e879c2b57b3e207cc9d9b1c8321c6d1174
4
+ data.tar.gz: 83122c8932ed6ef7ebc046a960c591302977665f862bba4a439a8bc17e9a7d61
5
5
  SHA512:
6
- metadata.gz: 03b0537235f3e8177408e76adfbfc890e2da05a04ad0c9489913ffdee3ec21734d4637bed2cc11c2d31152806f41448975c8aecdd09847d0f547b479e60513b9
7
- data.tar.gz: f6910ced7d65cdfdc4f2358cf586cdea74bfed0b7ca338aea769060248466fba5b0ba84affb706c48e98bfb3f71b11155e902b498ba360d9357f33f29c44a162
6
+ metadata.gz: 3833a633d4c9d1060fea0938c11b7aca26e3dc69bec636c4e085bce2139211a40926d62891527940332ae39a4d8ccb8d60b24af8d29f7571c6b701fb064f58a0
7
+ data.tar.gz: cc097c31a8506dece9e164a68e69e8a26883d02e42728c23ae641ce3b58a26cb7499565363d28b6e078e5be10fa282b16bb7d55163238c12385c18f489bcabc3
data/README.md CHANGED
@@ -29,6 +29,7 @@ Stagery.stage.ci? # => false
29
29
  ```
30
30
 
31
31
  If `STAGERY_STAGE` environment variable is not set, `Stagery.stage` will automatically fallback to `development`.
32
+ If you are using Rails, it will automatically fallback to `Rails.env`.
32
33
 
33
34
  ## Contributing
34
35
 
data/lib/stagery.rb CHANGED
@@ -6,7 +6,10 @@ require_relative 'stagery/test_helper'
6
6
 
7
7
  module Stagery
8
8
  def self.stage
9
- @_stage ||= ActiveSupport::StringInquirer.new(ENV["STAGERY_STAGE"] || "development")
9
+ @_stage ||=
10
+ ActiveSupport::StringInquirer.new(
11
+ ENV["STAGERY_STAGE"] || (defined?(Rails) ? ::Rails.env : "development")
12
+ )
10
13
  end
11
14
 
12
15
  def self.stage=(stage)
@@ -1,3 +1,3 @@
1
1
  module Stagery
2
- VERSION = '1.1.0'
2
+ VERSION = '1.2.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stagery
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florent Beaurain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-23 00:00:00.000000000 Z
11
+ date: 2021-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport