vae 0.7.1 → 0.7.2

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: c00c2f7b1b1887ce254238234b0aa7a10db3ebf1
4
- data.tar.gz: 12e99bdb18b40e27c6aa19de0848f09a5e312e85
3
+ metadata.gz: 7b11fdcfa1bea4ede251a9e873e0f7a26949e41e
4
+ data.tar.gz: 056e35277b00eb7efed32b3f26cd05d86742a4d6
5
5
  SHA512:
6
- metadata.gz: 2c6aa894ab6068dff0e9479aa1e4df4744ca23dd640ef4de0bf1926ac810e9a592656070dbb0ce23b4866cdf5db4f83e20ef4f310dd2d99c4d17a3bedd9add59
7
- data.tar.gz: 4b66219b0b66b0310773b9c2448ec52ce5903a29e78d5c113ffd38cc822f44edd8179b6848c0b0d3490bc0d1797493f087f34588bbf880ebb606b48e165ffdf2
6
+ metadata.gz: 33dd3ca9637e7a9858ac82436d5be96b98505e28a4f4991aefd29f46310c6e490e830eb5b30b5de020c17f2289d3d7600371a41ffe3d077cd3c7cdd30bf243de
7
+ data.tar.gz: fcdac100f40415eb3c421332337c46461a89094020a87a75ca999de62fa3cfdfdd4b014934fa8efc2ee8465b0f6960196f832c039c83ec39cce847b4387c226c
data/lib/full_stack.rb CHANGED
@@ -59,6 +59,7 @@ class FullStack
59
59
  end
60
60
 
61
61
  def launch_daemons
62
+ puts "Using Vae daemons at #{vae_thrift_path}"
62
63
  if VaeLocal.port_open?(9090)
63
64
  @pids << fork {
64
65
  Dir.chdir("#{vae_thrift_path}/rb/")
@@ -98,7 +99,7 @@ class FullStack
98
99
  return @vae_remote_path if @vae_remote_path
99
100
  thisdir = File.dirname(__FILE__)
100
101
  [ "#{thisdir}/../../vae_remote", "#{thisdir}/../../../vae_remote", "/usr/local/vae_remote", "/usr/local/opt/vae-remote", "/usr/local/Cellar/vae_remote/1.0.0", "~/vae_remote" ].each { |path|
101
- if File.exists?(path)
102
+ if File.exists?(path) and File.exists?(path + "/lib/general.php")
102
103
  return @vae_remote_path = path
103
104
  end
104
105
  }
@@ -109,8 +110,8 @@ class FullStack
109
110
  return @vae_thrift_path if @vae_thrift_path
110
111
  thisdir = File.dirname(__FILE__)
111
112
  [ "#{thisdir}/../../vae_thrift", "#{thisdir}/../../../vae_thrift", "/usr/local/vae_thrift", "/usr/local/opt/vae-thrift", "/usr/local/Cellar/vae_thrift/1.0.0", "~/vae_thrift", "#{vae_remote_path}/tests/dependencies/vae_thrift" ].each { |path|
112
- if File.exists?(path)
113
- return @vae_remote_path = path
113
+ if File.exists?(path) and File.exists?(path + "/cpp/vaedb")
114
+ return @vae_thrift_path = path
114
115
  end
115
116
  }
116
117
  raise VaeError, "Could not find Vae Thrift on your system.#{brew_message}"
data/lib/vae_local.rb CHANGED
@@ -64,6 +64,7 @@ class VaeLocal
64
64
  opts.on("-r","--root <path to site root>","Path to the root of the local copy of your Vae site.") { |o| options[:site_root] = o }
65
65
  opts.on("-s","--site <subdomain>","Vae subdomain for this site") { |o| options[:site] = o }
66
66
  opts.on("-f","--full-stack","Run in Full Stack Mode (experimental)") { options[:server] = FullStack }
67
+ opts.on("-b","--branch","If running stage or stagerelease, override the branch to deploy here") { |o| options[:branch] = o }
67
68
  opts.on("-d","--data-path <path>","Where to Store Content and Image Data When In Full Stack Mode") { |o| options[:data_path] = o }
68
69
  opts.on("-l","--log-level <level>","Vaedb Log Level (for Full Stack Mode)") { |o| options[:log_level] = o }
69
70
  opts.on_tail("-h","--help", "Show this help message") { puts opts; exit }
@@ -94,7 +95,7 @@ class VaeLocal
94
95
  end
95
96
 
96
97
  if [ "deploy", "release", "rollback", "stage", "stagerelease" ].include?(ARGV.last)
97
- stagerelease(ARGV.last, options[:site], options[:username], options[:password])
98
+ stagerelease(ARGV.last, options[:site], options[:username], options[:password], options[:branch])
98
99
  exit
99
100
  end
100
101
 
@@ -132,16 +133,16 @@ class VaeLocal
132
133
  raise VaeError, "An unknown error occurred requesting this operation from Vae Platform. Please email support for help."
133
134
  end
134
135
 
135
- def stagerelease(action, site, username, password)
136
+ def stagerelease(action, site, username, password, branch)
136
137
  if action == "deploy"
137
138
  action = "stage"
138
139
  elsif action == "stagerelease"
139
- stagerelease("stage", site, username, password)
140
- stagerelease("release", site, username, password)
140
+ stagerelease("stage", site, username, password, branch)
141
+ stagerelease("release", site, username, password, branch)
141
142
  return
142
143
  end
143
144
  req = Net::HTTP::Post.new("/api/local/v1/#{action}")
144
- req.body = "username=#{CGI.escape(username)}&password=#{CGI.escape(password)}&vae_local=1"
145
+ req.body = "username=#{CGI.escape(username)}&password=#{CGI.escape(password)}&branch=#{CGI.escape(branch)}&vae_local=1"
145
146
  res = VaeLocal.fetch_from_vaeplatform(site, req)
146
147
  if res.is_a?(Net::HTTPFound)
147
148
  raise VaeError, "Invalid username/password or insufficient permissions."
@@ -27,7 +27,11 @@ class VaeSiteServlet < Servlet
27
27
  @changed = {}
28
28
  }
29
29
  source_files.concat(changed.map { |filename,action|
30
- get_source_file(filename, (action == :deleted))
30
+ begin
31
+ get_source_file(filename, (action == :deleted))
32
+ rescue FileNotFound
33
+ nil
34
+ end
31
35
  }).reject { |src| src.nil? }
32
36
  end
33
37
 
@@ -87,6 +91,7 @@ class VaeSiteServlet < Servlet
87
91
  if wb_req.params['HTTP_X_REQUESTED_WITH']
88
92
  req['X-Requested-With'] = req_404['X-Requested-With'] = wb_req.params['HTTP_X_REQUESTED_WITH']
89
93
  end
94
+ req['X-Vae-Local-Host'] = wb_req.params['HTTP_HOST']
90
95
  res = @site.fetch_from_server(req)
91
96
  if res.body =~ /__vae_local_needs=(.*)/
92
97
  begin
data/lib/version.rb CHANGED
@@ -1 +1 @@
1
- VER = "0.7.1"
1
+ VER = "0.7.2"
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.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Action Verb, LLC
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-08-20 00:00:00.000000000 Z
12
+ date: 2017-04-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chunky_png