stagery 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7c7561d3c9f2d3267214993a89b8fbd0b26edb96ba68d086c01b2e3b977eb3f7
4
+ data.tar.gz: 49b32cfad64f3ccb4b3f46d50475e70be0cdd34a9bb6cd8e422592244388ca7d
5
+ SHA512:
6
+ metadata.gz: fe75ae774583cb2ace54d0d9390fbe6a4c2c6f0750293e14cb86349938947a93775bfc4300c252e2373715b9ecf1fdbd27cd4540f1bb2c0d9088fd4b7d70530d
7
+ data.tar.gz: 419b2f94220dd0a4b2d41ffc459a5c7af8fd8adf7f0063859f790058c34656a6641e565410bbbf192134424d6bb1992d685cbe64ff4ab8fb119b71189f1a70a4
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Florent Beaurain
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # Stagery
2
+
3
+ Know at what development life cycle stage you are đź‘€
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application’s Gemfile:
8
+
9
+ ```ruby
10
+ gem 'stagery'
11
+ ```
12
+
13
+ And run:
14
+
15
+ ```sh
16
+ bundle install
17
+ ```
18
+
19
+ ## How It Works
20
+
21
+ 1. Use `STAGERY_STAGE` environment variable to define at which stage of your flow you are
22
+
23
+ 2. Use `Stagery.stage` method in your code:
24
+
25
+ ```ruby
26
+ Stagery.stage # => "staging"
27
+ Stagery.stage.staging? # => true
28
+ Stagery.stage.ci? # => false
29
+ ```
30
+
31
+ If `STAGERY_STAGE` environment variable is not set, `Stagery.stage` will automatically fallback to `development`.
32
+
33
+ ## Contributing
34
+
35
+ Everyone is encouraged to help improve this project. Here are a few ways you can help:
36
+
37
+ - Report [bugs](https://github.com/beauraF/stagery/issues)
38
+ - Fix bugs and submit [pull requests](https://github.com/beauraF/stagery/pulls)
39
+ - Write, clarify, or fix documentation
40
+ - Suggest or add new features
data/lib/stagery.rb ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/string_inquirer'
4
+ require_relative 'stagery/version'
5
+
6
+ module Stagery
7
+ def self.stage
8
+ @_stage ||= ActiveSupport::StringInquirer.new(ENV["STAGERY_STAGE"] || "development")
9
+ end
10
+ end
@@ -0,0 +1,3 @@
1
+ module Stagery
2
+ VERSION = '1.0.0'
3
+ end
metadata ADDED
@@ -0,0 +1,60 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: stagery
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Florent Beaurain
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-03-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '5'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '5'
27
+ description:
28
+ email: beaurain.florent@gmail.com
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - LICENSE
34
+ - README.md
35
+ - lib/stagery.rb
36
+ - lib/stagery/version.rb
37
+ homepage: https://github.com/beauraF/stagery
38
+ licenses:
39
+ - MIT
40
+ metadata: {}
41
+ post_install_message:
42
+ rdoc_options: []
43
+ require_paths:
44
+ - lib
45
+ required_ruby_version: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: '2.6'
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ requirements: []
56
+ rubygems_version: 3.2.3
57
+ signing_key:
58
+ specification_version: 4
59
+ summary: "Know at what development life cycle stage you are \U0001F440"
60
+ test_files: []