vae 0.6.6 → 0.6.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/lib/vae.rb +9 -10
- data/lib/vae_site_servlet.rb +7 -3
- data/lib/version.rb +1 -1
- metadata +13 -14
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
NWJhYzU3YzVjMTA3YTFmZjEyMzRjNGY4MjVhN2IzMmJmOWJkOTEwMzQ4MDkx
|
10
|
-
MzBhOGExNTI0NzIzNmM2MGQ2MzhiMjU4MWEzNzIxNDRjOWM2OTk3MjhhZTk2
|
11
|
-
ODc1NjdlNWY5ZjkyYTE5M2Y3ZjcxZWU4YWNmMDQ1NzE5YTdiZjM=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NDg4YTZiZjk4NTM2YzFlNGM2YTBiNzQwZjFmYzFiYzZmOGI1N2U0Y2FkMGE3
|
14
|
-
ZTFhNjBlZjk3YzBkYzg5OWQ0Yzc4YzAyYjQzMWM0MDI0NWJhYzQ5Nzc1YzUy
|
15
|
-
MWFjNDEzMDZjZmUzOGM3ZDBkYmI5NzJiNTZlYzRlOWJjMWJjZjc=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ebd54606b10c4ebe84df93817c47257dfef15b38
|
4
|
+
data.tar.gz: f34dd3a798203625979717a6116f9a5962e74737
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4d3ae734b13795572be3c9e645a3d90f25d660926a067f7535eb25d837eff1738134143e36bd9c1e0a720a63fe0f074285f5561382ea3cd71a610f3aba5465bd
|
7
|
+
data.tar.gz: a23d732052a5ec40ecccd1a55bd720e41be3569afd8b3a685429bab6a4b1093dc0fea3549240b529444f3c7389c9130221d60f390c8fc6c263fbbd776e3655c4
|
data/lib/vae.rb
CHANGED
@@ -109,6 +109,9 @@ class VaeLocal
|
|
109
109
|
stagerelease(ARGV.last, options[:site], options[:username], options[:password])
|
110
110
|
exit
|
111
111
|
end
|
112
|
+
|
113
|
+
# Move mongrel dependency here so not as required on Windows
|
114
|
+
|
112
115
|
raise VaeError, "You did not specify the path to the root of the local copy of your Vae site. Please specify it manually by using the --root option or cd to the site root (and make sure it contains a __vae.yml file)." unless options[:site_root]
|
113
116
|
raise VaeError, "You specified an invalid path to the local copy of your Vae site." unless File.exists?(options[:site_root])
|
114
117
|
|
@@ -157,7 +160,7 @@ class VaeLocal
|
|
157
160
|
puts "Request started, waiting for completion..."
|
158
161
|
loop do
|
159
162
|
sleep 5
|
160
|
-
req = Net::HTTP::Get.new("/
|
163
|
+
req = Net::HTTP::Get.new("/api/local/v1/job_status/#{data['job']}")
|
161
164
|
res = fetch_from_vaeplatform(site, req)
|
162
165
|
status = JSON.parse(res.body)
|
163
166
|
if status['status'] == "completed"
|
@@ -178,18 +181,14 @@ class VaeLocal
|
|
178
181
|
end
|
179
182
|
|
180
183
|
def stagerelease(action, site, username, password)
|
181
|
-
if action == "deploy"
|
182
|
-
action = "
|
184
|
+
if action == "deploy"
|
185
|
+
action = "stage"
|
183
186
|
elsif action == "stagerelease"
|
184
|
-
stagerelease("
|
185
|
-
stagerelease("
|
187
|
+
stagerelease("stage", site, username, password)
|
188
|
+
stagerelease("release", site, username, password)
|
186
189
|
return
|
187
|
-
elsif action == "release"
|
188
|
-
action = "releases/release"
|
189
|
-
elsif action == "rollback"
|
190
|
-
action = "releases/rollback"
|
191
190
|
end
|
192
|
-
req = Net::HTTP::Post.new("/#{action}")
|
191
|
+
req = Net::HTTP::Post.new("/api/local/v1/#{action}")
|
193
192
|
req.body = "username=#{CGI.escape(username)}&password=#{CGI.escape(password)}&vae_local=1"
|
194
193
|
res = fetch_from_vaeplatform(site, req)
|
195
194
|
if res.is_a?(Net::HTTPFound)
|
data/lib/vae_site_servlet.rb
CHANGED
@@ -139,14 +139,14 @@ class VaeSiteServlet < Servlet
|
|
139
139
|
st = File::stat(local_path)
|
140
140
|
mtime = st.mtime
|
141
141
|
etag = sprintf("%x-%x-%x", st.ino, st.size, st.mtime.to_i)
|
142
|
-
res.header['etag'] = etag
|
142
|
+
res.header['etag'] = etag if !req_scss?(req)
|
143
143
|
if not_modified?(req, res, mtime, etag)
|
144
144
|
puts "#{req.params["REQUEST_URI"]} not modified"
|
145
145
|
res.status = 304
|
146
146
|
else
|
147
147
|
mtype = WEBrick::HTTPUtils::mime_type(local_path, WEBrick::HTTPUtils::DefaultMimeTypes)
|
148
|
-
res.header['last-modified'] = mtime.httpdate
|
149
|
-
if req
|
148
|
+
res.header['last-modified'] = mtime.httpdate if !req_scss?(req)
|
149
|
+
if req_scss?(req)
|
150
150
|
res.header['Content-Type'] = "text/css"
|
151
151
|
res.body << render_sass(local_path)
|
152
152
|
else
|
@@ -180,6 +180,10 @@ class VaeSiteServlet < Servlet
|
|
180
180
|
end
|
181
181
|
end
|
182
182
|
end
|
183
|
+
|
184
|
+
def req_scss?(req)
|
185
|
+
req.params["REQUEST_URI"] =~ /\.(sass|scss)$/
|
186
|
+
end
|
183
187
|
|
184
188
|
def server_parsed?(path)
|
185
189
|
SERVER_PARSED.each do |ext|
|
data/lib/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
VER = "0.6.
|
1
|
+
VER = "0.6.9"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vae
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Action Verb, LLC
|
@@ -9,20 +9,20 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-09-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: chunky_png
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
@@ -43,14 +43,14 @@ dependencies:
|
|
43
43
|
name: directory_watcher
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
@@ -71,28 +71,28 @@ dependencies:
|
|
71
71
|
name: highline
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- -
|
81
|
+
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: json
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- -
|
88
|
+
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
type: :runtime
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- -
|
95
|
+
- - ">="
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
- !ruby/object:Gem::Dependency
|
@@ -150,19 +150,18 @@ require_paths:
|
|
150
150
|
- lib
|
151
151
|
required_ruby_version: !ruby/object:Gem::Requirement
|
152
152
|
requirements:
|
153
|
-
- -
|
153
|
+
- - ">="
|
154
154
|
- !ruby/object:Gem::Version
|
155
155
|
version: '0'
|
156
156
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
157
|
requirements:
|
158
|
-
- -
|
158
|
+
- - ">="
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
162
|
rubyforge_project:
|
163
|
-
rubygems_version: 2.
|
163
|
+
rubygems_version: 2.2.2
|
164
164
|
signing_key:
|
165
165
|
specification_version: 4
|
166
166
|
summary: This gem allows for local development for sites on Vae Platform (http://vaeplatform.com/)
|
167
167
|
test_files: []
|
168
|
-
has_rdoc:
|