rack-takana 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rack-takana/middleware.rb +19 -6
- data/lib/rack-takana/models/project.rb +1 -1
- data/lib/rack-takana.rb +5 -5
- metadata +3 -3
@@ -16,6 +16,7 @@ module Takana
|
|
16
16
|
@host = "localhost"
|
17
17
|
|
18
18
|
if Takana.db
|
19
|
+
|
19
20
|
if defined?(Rails)
|
20
21
|
Rails.logger.debug "[Takana] #{@name} at #{@path} #{@kind} #{@paths}"
|
21
22
|
end
|
@@ -24,14 +25,26 @@ module Takana
|
|
24
25
|
|
25
26
|
@paths.each { |p| @project.add_load_path(path: p, source: 'takana-rack') }
|
26
27
|
|
27
|
-
if defined?(Compass) && defined?(Rails)
|
28
|
+
if defined?(Compass) && defined?(Rails) && Rails.application.config.compass.present?
|
29
|
+
|
28
30
|
begin
|
29
|
-
|
30
|
-
|
31
|
-
|
31
|
+
config = Rails.application.config.compass.serialize
|
32
|
+
|
33
|
+
if config.present?
|
34
|
+
attributes = {}
|
35
|
+
|
36
|
+
Compass::Configuration::ATTRIBUTES.each do |k|
|
37
|
+
attributes[k] = Rails.application.config.compass.send(k)
|
38
|
+
end
|
39
|
+
|
40
|
+
@project.compass_configs.delete
|
41
|
+
@project.add_compass_config(
|
42
|
+
config: compass_config,
|
43
|
+
attributes: attributes
|
44
|
+
)
|
32
45
|
end
|
33
46
|
rescue => e
|
34
|
-
|
47
|
+
|
35
48
|
end
|
36
49
|
end
|
37
50
|
end
|
@@ -75,7 +88,7 @@ module Takana
|
|
75
88
|
|
76
89
|
def update_content_length!
|
77
90
|
new_size = 0
|
78
|
-
@response.each{|part| new_size += part.bytesize}
|
91
|
+
@response.each { |part| new_size += part.bytesize }
|
79
92
|
@headers.merge!("Content-Length" => new_size.to_s)
|
80
93
|
end
|
81
94
|
|
data/lib/rack-takana.rb
CHANGED
@@ -21,13 +21,13 @@ end
|
|
21
21
|
Takana.initialize_db
|
22
22
|
|
23
23
|
if Takana.db
|
24
|
-
require 'takana
|
25
|
-
require 'takana
|
26
|
-
require 'takana
|
24
|
+
require 'rack-takana/models/project'
|
25
|
+
require 'rack-takana/models/load_path'
|
26
|
+
require 'rack-takana/models/compass_config'
|
27
27
|
end
|
28
28
|
|
29
|
-
require 'takana
|
29
|
+
require 'rack-takana/middleware'
|
30
30
|
|
31
31
|
if defined?(Rails)
|
32
|
-
require 'takana
|
32
|
+
require 'rack-takana/railtie'
|
33
33
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-takana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|
@@ -107,7 +107,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
107
107
|
version: '0'
|
108
108
|
segments:
|
109
109
|
- 0
|
110
|
-
hash:
|
110
|
+
hash: 2009484903996514444
|
111
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
112
|
none: false
|
113
113
|
requirements:
|