ahc 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/ahc.gemspec +1 -1
  4. data/lib/ahc_helper.rb +4 -1
  5. metadata +14 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8958f1162cef85726c3f53f93107275191db340f
4
- data.tar.gz: 610c2eca0837eedbce911c84270e95c4e21bff5b
3
+ metadata.gz: b2cb593207a4d65e72f576da1dcdda0d1664327d
4
+ data.tar.gz: 3b73c9ea18cfba259a5d8e4650db2a08f01984ce
5
5
  SHA512:
6
- metadata.gz: 2e3069138aae9782d4938be5fc79411454cbee1b0ba46d11ccfdc71b2a775a86b140db87ca8146a69008fa01245f5a7aef773f3881d85a2117ffc8d3490037e3
7
- data.tar.gz: 928bb0dbed45d3f3338b514775ac97d4f607e5d0c48aa72aa5aff28f940acbc046171bdc6b3047e4fac3769a5335e6aa7872dcb911ded9355ecfd40fad97b8e7
6
+ metadata.gz: fd9391d67ded935af0260acf1334ff9a29addcd5d4f0b8fdf77613f5510149b94a4d47d7eaec3372084737a64ca6bee492979e971629a17fc8b24a9534f0d906
7
+ data.tar.gz: 0bd05a5781238e272a94bfd590238d33a5ebf49ae883e043493b1dd426ad5af28125e4e5576bdf8c637351830c8c2cc7795ecc3c7e7c5e51334863c587ab4435
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.5
1
+ 0.3.6
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "ahc"
8
- s.version = "0.3.5"
8
+ s.version = "0.3.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andriy Romanov"]
@@ -53,14 +53,17 @@ class AhcProxy
53
53
  def call(env)
54
54
  request = Rack::Request.new(env)
55
55
  path = request.fullpath
56
+
56
57
  if path.start_with?('/s/') || path.start_with?('/static/') || path.start_with?('/plovr/')
57
58
  begin
58
59
  response = Net::HTTP.get(URI.parse("http://#{Ahc.host || Ahc.default_host}:#{Ahc.port || Ahc.default_port}" + path))
59
- return [200, {}, [response]]
60
+ headers = path.end_with?('.css') ? {"Content-Type"=>"text/css"} : {}
61
+ return [200, headers, [response]]
60
62
  rescue
61
63
  return [200, {}, ['Ahc server is not running']]
62
64
  end
63
65
  end
66
+
64
67
  @app.call(env)
65
68
  end
66
69
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ahc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andriy Romanov
@@ -14,56 +14,56 @@ dependencies:
14
14
  name: rspec
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 2.8.0
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 2.8.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rdoc
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '3.12'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.12'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: jeweler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.8.7
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.8.7
69
69
  description: Ahc allows you to move all your client side code to ahc server
@@ -74,8 +74,8 @@ extra_rdoc_files:
74
74
  - LICENSE.txt
75
75
  - README.rdoc
76
76
  files:
77
- - .document
78
- - .rspec
77
+ - ".document"
78
+ - ".rspec"
79
79
  - Gemfile
80
80
  - Gemfile.lock
81
81
  - LICENSE.txt
@@ -99,17 +99,17 @@ require_paths:
99
99
  - lib
100
100
  required_ruby_version: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - '>='
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - '>='
107
+ - - ">="
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project:
112
- rubygems_version: 2.0.3
112
+ rubygems_version: 2.2.0
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: Ahc allows you to move all your client side code to ahc server