rocketio 0.2.0 → 0.2.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
  SHA1:
3
- metadata.gz: c81e2dd778eb2ae80019ccfdbd0a07da71685609
4
- data.tar.gz: 18fb36dc539e788db0c8ca0a4143fbf8867eab23
3
+ metadata.gz: cf979ed0411d6e6e4388a1832715d82a792054e6
4
+ data.tar.gz: 4a9cd0d72c951843860d0872ba5310caf3932b11
5
5
  SHA512:
6
- metadata.gz: b5d4954032b4b5fedfa2d43cfff1b923f8a43fabab4eb41bf3e3fa5592ad7459fc836859553b2e37d84ec65812f04a4371ab7a276ddcbdde09892c2aa88c9ba4
7
- data.tar.gz: 5d19a34c16c3f4aaf635940796a6f1d435d11d4a12de9c6e55b5dc543c830ad79d83a2db26b9e47e206cbf4db3a23b61a14999e285aa2dce8388b44955f09f24
6
+ metadata.gz: 7cfb21a58bae0e43d65b07fe1cee2355f5126407ca942e30058aac18cb644f77a2566335dc83c15778405b7c688ce82290c887c90cb77facca232b115595b860
7
+ data.tar.gz: 7b1a235d42e494da7e923e7116223107cd6f4c310b2e069c4baf3629ab864d0a72caf9d8e32cb10bc03b7daaea3196cb8f4983c99d1968461b467006473023a9
data/lib/rocketio.rb CHANGED
@@ -14,13 +14,13 @@ module RocketIO
14
14
  extend self
15
15
 
16
16
  ENVIRONMENTS = {
17
- 'development' => :development,
18
- 'testing' => :testing,
19
- 'stage' => :stage,
20
- 'production' => :production
17
+ 'development' => 'development'.freeze,
18
+ 'testing' => 'testing'.freeze,
19
+ 'stage' => 'stage'.freeze,
20
+ 'production' => 'production'.freeze,
21
21
  }.freeze
22
22
 
23
- environment = ENV['APP_ENV'] || ENV['RACK_ENV'] || ENVIRONMENTS.keys[0]
23
+ environment = ENV['APP_ENV'] || ENV['RACK_ENV'] || ENVIRONMENTS.values[0]
24
24
  unless ENVIRONMENT = ENVIRONMENTS[environment]
25
25
  raise(StandardError, '%s environment not supported. Use one of %s' % [environment.inspect, ENVIRONMENTS.keys*', '])
26
26
  end
@@ -30,7 +30,7 @@ module RocketIO
30
30
  end
31
31
 
32
32
  ENVIRONMENTS.each_value do |env|
33
- define_method(env.to_s + '?') {ENVIRONMENT == env}
33
+ define_method(env + '?') {ENVIRONMENT == env}
34
34
  end
35
35
 
36
36
  GET = 'GET'.freeze
@@ -273,6 +273,8 @@ module RocketIO
273
273
  end
274
274
  new(method, path_params).call(env)
275
275
  end
276
+
277
+ def environment; RocketIO.environment end
276
278
  end
277
279
 
278
280
  Controller.instance_variable_set(:@__api__, {})
@@ -1,3 +1,3 @@
1
1
  module RocketIO
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocketio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Slee Woo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-09 00:00:00.000000000 Z
11
+ date: 2016-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -241,5 +241,5 @@ rubyforge_project:
241
241
  rubygems_version: 2.5.1
242
242
  signing_key:
243
243
  specification_version: 4
244
- summary: '["rocketio-0.2.0", "Simple, fast, scalable web framework for Ruby"]'
244
+ summary: '["rocketio-0.2.1", "Simple, fast, scalable web framework for Ruby"]'
245
245
  test_files: []