ment 0.1.0 → 0.2.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4785be29cbbbf67e5a6ef11fa0384742765e41ba
4
- data.tar.gz: b1807bf0bc46e24d6f9b9a88b6fb6cf48a84db75
3
+ metadata.gz: c4b0535763c7bd2aa4f15e3b3cdea6c03e8efefa
4
+ data.tar.gz: 668eee2be8cee34003fcc2169a9610c601b02cb1
5
5
  SHA512:
6
- metadata.gz: e0f2218ae6b375ccf24fbc9eb4f1b7fef50c40258b04ec3bd57bb504f8e05f683a78945b51c28f5531b796f8dbbc277567486d6a8abf382d9db820136e7961e3
7
- data.tar.gz: 432d857006b3c9c7173e3c16266e01b7d01b7fc630031e9c0001af209ee00de2c3a3d7986805d3f700f62a1cd658d0c3dcc3598bb9323bffcc5ee70122af1275
6
+ metadata.gz: 36cbf276933c80e5e0f6752881a37555def9d2cbfe2cc2e95edf709538c2e7204c0e0f37133564508b1123809dc0488d603a6e34ec9c59d0f9c979a7ccc12477
7
+ data.tar.gz: c693aa1aada6db3396706840361b82cbc55ce22baad5aa399c5aee610feea7239e48364146e550559873084308d0994e45e2bf84850e4daaa2418ada4aff809a
data/README.md CHANGED
@@ -117,4 +117,4 @@ end
117
117
 
118
118
  ## License
119
119
 
120
- See the [LICENSE](https://github.com/patriciomacadden/envi/blob/master/LICENSE).
120
+ See the [LICENSE](https://github.com/patriciomacadden/ment/blob/master/LICENSE).
@@ -1,5 +1,5 @@
1
1
  module Ment
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
 
4
4
  extend self
5
5
 
@@ -11,7 +11,7 @@ module Ment
11
11
  (ENV['RACK_ENV'] || 'development').to_sym
12
12
  end
13
13
 
14
- %w(development production test).each do |env|
14
+ %w(development production staging test).each do |env|
15
15
  define_method("#{env}?") { environment == env.to_sym }
16
16
  end
17
17
  end
@@ -81,6 +81,30 @@ scope 'Cuba integration' do
81
81
  end
82
82
  end
83
83
 
84
+ scope '::staging?' do
85
+ test "returns true if ENV['RACK_ENV'] = :staging" do
86
+ with_env('staging') do
87
+ assert Cuba.staging?
88
+ end
89
+ end
90
+
91
+ test "returns false if ENV['RACK_ENV'] != :staging" do
92
+ assert !Cuba.staging?
93
+ end
94
+ end
95
+
96
+ scope '#staging?' do
97
+ test "returns true if ENV['RACK_ENV'] = :staging" do
98
+ with_env('staging') do
99
+ assert @app.staging?
100
+ end
101
+ end
102
+
103
+ test "returns false if ENV['RACK_ENV'] != :staging" do
104
+ assert !@app.staging?
105
+ end
106
+ end
107
+
84
108
  scope '::test?' do
85
109
  test "returns true if ENV['RACK_ENV'] = :test" do
86
110
  assert Cuba.test?
@@ -81,6 +81,30 @@ scope 'Hobbit integration' do
81
81
  end
82
82
  end
83
83
 
84
+ scope '::staging?' do
85
+ test "returns true if ENV['RACK_ENV'] = :staging" do
86
+ with_env('staging') do
87
+ assert HobbitApp.staging?
88
+ end
89
+ end
90
+
91
+ test "returns false if ENV['RACK_ENV'] != :staging" do
92
+ assert !HobbitApp.staging?
93
+ end
94
+ end
95
+
96
+ scope '#staging?' do
97
+ test "returns true if ENV['RACK_ENV'] = :staging" do
98
+ with_env('staging') do
99
+ assert @app.to_app.class.staging?
100
+ end
101
+ end
102
+
103
+ test "returns false if ENV['RACK_ENV'] != :staging" do
104
+ assert !@app.to_app.class.staging?
105
+ end
106
+ end
107
+
84
108
  scope '::test?' do
85
109
  test "returns true if ENV['RACK_ENV'] = :test" do
86
110
  assert HobbitApp.test?
@@ -133,6 +133,30 @@ scope Ment do
133
133
  end
134
134
  end
135
135
 
136
+ scope '::staging?' do
137
+ test "returns true if ENV['RACK_ENV'] = :staging" do
138
+ with_env('staging') do
139
+ assert App.staging?
140
+ end
141
+ end
142
+
143
+ test "returns false if ENV['RACK_ENV'] != :staging" do
144
+ assert !App.staging?
145
+ end
146
+ end
147
+
148
+ scope '#staging?' do
149
+ test "returns true if ENV['RACK_ENV'] = :staging" do
150
+ with_env('staging') do
151
+ assert @app.staging?
152
+ end
153
+ end
154
+
155
+ test "returns false if ENV['RACK_ENV'] != :staging" do
156
+ assert !@app.staging?
157
+ end
158
+ end
159
+
136
160
  scope '::test?' do
137
161
  test "returns true if ENV['RACK_ENV'] = :test" do
138
162
  assert App.test?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patricio Mac Adden
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-26 00:00:00.000000000 Z
11
+ date: 2015-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  requirements: []
134
134
  rubyforge_project:
135
- rubygems_version: 2.2.2
135
+ rubygems_version: 2.4.5
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: "(environ)ment adds methods for asking what's the value of RACK_ENV."