scorched 1.0.0.pre2 → 1.0.0.pre3

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: dc8f0ec16a8fc5307ace63bfc13bd74d73dc0a87
4
- data.tar.gz: 21b4eeb5b8dfc7e2c47e2704410240f500411919
3
+ metadata.gz: df1c61cb8ccb03b0bae14dda80b50f22e00530be
4
+ data.tar.gz: 8782b7f14fcf6986d200dcb2964f30604c78be1b
5
5
  SHA512:
6
- metadata.gz: 93820429bb91adcff11934dd18ed9bc86221ef00bac773d754a1cd9a140f307ef1a8ffa002cf2e8d2d755ad965c509a5074bd26fbb96c5a083bade556c19fa82
7
- data.tar.gz: a95f5a24ac574a3d55b025c3f17ce79702d74c4d4ac476259ac44ad471e315d8af96eda35c3d9c45a7b7cc006ed48a3690af71986c8ec3030d9c41da94c2bf54
6
+ metadata.gz: b4ccefaee00f1c66b57736510051d81a6381b840b8daee5f4cb0b69f17591b13a43c29568f8cebba6b7ba179d85ca4e6bf578c3d049486b7d8f727c543b7d942
7
+ data.tar.gz: '05990c3fa144a24f72557a6379aeab375a86827b7c196f5aeaa7b1dbb79f44f9d7d6c19023131443c058baab3e9cbd51593f4469246c739dda27f59eb236b0df'
data/CHANGES.md CHANGED
@@ -3,6 +3,10 @@ Changelog
3
3
 
4
4
  _Note that Scorched is yet to reach a v1.0 release. This means breaking changes may still be made. If upgrading the version of Scorched for your project, review this changelog carefully._
5
5
 
6
+ ### v1.0.0.pre3
7
+ * APP_ENV now preferred over RACK_ENV for setting the environment.
8
+ ### v1.0.0.pre2
9
+ * Updated core dependencies.
6
10
  ### v1.0.0.pre
7
11
  * Refactored `process` method. Now named `respond`, and breaks out to other methods. The logic surrounding filters and halting has also been modified, as is now more intuitive in my opinion.
8
12
  * Removed `@_handled` instance variable, and the related `handled` condition.
@@ -1,4 +1,4 @@
1
- ENV['RACK_ENV'] ||= 'development'
1
+ ENV['APP_ENV'] ||= ENV['RACK_ENV'] || 'development'
2
2
 
3
3
  # Gems
4
4
  require 'rack'
@@ -34,7 +34,7 @@ module Scorched
34
34
  :tilt => {default_encoding: 'UTF-8'}, # Options intended for Tilt. This gets around potential key name conflicts between Scorched and the renderer invoked by Tilt.
35
35
  }
36
36
 
37
- if ENV['RACK_ENV'] == 'development'
37
+ if ENV['APP_ENV'] == 'development'
38
38
  config[:show_exceptions] = true
39
39
  config[:static_dir] = 'public'
40
40
  config[:cache_templates] = false
@@ -1,3 +1,3 @@
1
1
  module Scorched
2
- VERSION = '1.0.0.pre2'
2
+ VERSION = '1.0.0.pre3'
3
3
  end
@@ -1,4 +1,4 @@
1
- ENV['RACK_ENV'] = 'production'
1
+ ENV['APP_ENV'] = 'production'
2
2
 
3
3
  require 'rack/test'
4
4
  require_relative '../lib/scorched.rb'
@@ -8,14 +8,14 @@ Scorched::Controller.config[:logger] = Logger.new(nil)
8
8
  module Scorched
9
9
  class SimpleCounter
10
10
  def initialize(app)
11
- @app = app
12
- end
11
+ @app = app
12
+ end
13
13
 
14
14
  def call(env)
15
15
  env['scorched.simple_counter'] ||= 0
16
16
  env['scorched.simple_counter'] += 1
17
- @app.call(env)
18
- end
17
+ @app.call(env)
18
+ end
19
19
  end
20
20
  end
21
21
 
@@ -26,11 +26,11 @@ module GlobalConfig
26
26
  let(:app) do
27
27
  Class.new(Scorched::Controller)
28
28
  end
29
-
29
+
30
30
  let(:rt) do
31
31
  Rack::Test::Session.new(app)
32
32
  end
33
-
33
+
34
34
  original_dir = __dir__
35
35
  before(:all) do
36
36
  Dir.chdir(__dir__)
@@ -44,4 +44,4 @@ RSpec.configure do |c|
44
44
  c.alias_example_to :they
45
45
  # c.backtrace_clean_patterns = []
46
46
  c.include GlobalConfig
47
- end
47
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scorched
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre2
4
+ version: 1.0.0.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Wardrop
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-03 00:00:00.000000000 Z
11
+ date: 2017-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack