volt 0.9.5.pre5 → 0.9.5.pre6

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: 848470b46efd1f1d8835f8501af6fc39d052cd4c
4
- data.tar.gz: 6ff661da03f4f1e572c566b95d2b91868748148e
3
+ metadata.gz: e582dab04f540400c74bab267d28e0e138977b0f
4
+ data.tar.gz: 1fd96c3672b66a1ecb3610bca02876c5bf62507d
5
5
  SHA512:
6
- metadata.gz: 11b26392d7fab2365755625fafd4708cc8398eecf3aad5c83757a3fbdb6f52baa1c9f38f483d23a52ca61ae98e5e42955028e382e87abf524495851d72684644
7
- data.tar.gz: fe2f9c21b79e7da0b478b84aaffaa86da7cf63bf73b2f0b793723c73351de40971027c17044907822b43adbc88d3028ed525a0a7a5aca54fa8718068e998b915
6
+ metadata.gz: 58642fa49f534975037d7389a4ebb8c9de0e66cb65370306e007afc27bd02800aa747be8fca53aff9c8492e119cf944e13680d45942c1bd58d2a90fcedd25860
7
+ data.tar.gz: 59c6d2309af1bf94dcf05a8622b7fbfb823d9d371cef696efd0724e6f175437a012d0e3cc6a5f1b633500d88593e55d145db8203789378258b142a71bfb06a43
data/lib/volt/cli.rb CHANGED
@@ -50,6 +50,7 @@ module Volt
50
50
  method_option :bind, type: :string, aliases: '-b', banner: 'the ip the server should bind to'
51
51
 
52
52
  def server
53
+ move_to_root
53
54
  if ENV['PROFILE_BOOT']
54
55
  begin
55
56
  require 'ruby-prof'
@@ -102,6 +103,7 @@ module Volt
102
103
  method_option :file_path, type: :string
103
104
  def runner(file_path)
104
105
  ENV['SERVER'] = 'true'
106
+ move_to_root
105
107
  require 'volt/cli/runner'
106
108
 
107
109
  Volt::CLI::Runner.run_file(file_path)
@@ -111,6 +113,7 @@ module Volt
111
113
 
112
114
  def drop_collection(collection)
113
115
  ENV['SERVER'] = 'true'
116
+ move_to_root
114
117
  require 'volt/boot'
115
118
 
116
119
  Volt.boot(Dir.pwd)
@@ -122,6 +125,30 @@ module Volt
122
125
  say("Collection #{collection} dropped", :green) if drop == true
123
126
  end
124
127
 
128
+ def move_to_root
129
+ unless Gem.win_platform?
130
+ # Change CWD to the root of the volt project
131
+ pwd = Dir.pwd
132
+ changed = false
133
+ loop do
134
+ if File.exists?(pwd + '/Gemfile')
135
+ Dir.chdir(pwd) if changed
136
+ break
137
+ else
138
+ changed = true
139
+
140
+ # Move up a directory and try again
141
+ pwd = pwd.gsub(/\/[^\/]+$/, '')
142
+
143
+ if pwd == ''
144
+ puts "You are not currently in a volt project directory"
145
+ exit 1
146
+ end
147
+ end
148
+ end
149
+ end
150
+ end
151
+
125
152
  def self.source_root
126
153
  File.expand_path(File.join(File.dirname(__FILE__), '../../templates'))
127
154
  end
@@ -131,27 +158,5 @@ end
131
158
  # Add in more features
132
159
  require 'volt/cli/asset_compile'
133
160
 
134
- unless Gem.win_platform?
135
- # Change CWD to the root of the volt project
136
- pwd = Dir.pwd
137
- changed = false
138
- loop do
139
- if File.exists?(pwd + '/Gemfile')
140
- Dir.chdir(pwd) if changed
141
- break
142
- else
143
- changed = true
144
-
145
- # Move up a directory and try again
146
- pwd = pwd.gsub(/\/[^\/]+$/, '')
147
-
148
- if pwd == ''
149
- puts "You are not currently in a volt project directory"
150
- exit 1
151
- end
152
- end
153
- end
154
- end
155
-
156
161
  puts "Volt #{Volt::Version::STRING}"
157
162
  Volt::CLI.start(ARGV)
@@ -3,6 +3,7 @@ module Volt
3
3
  desc 'precompile', 'precompile all application assets'
4
4
 
5
5
  def precompile
6
+ move_to_root
6
7
  compile
7
8
  end
8
9
 
data/lib/volt/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Volt
2
2
  module Version
3
- STRING = '0.9.5.pre5'
3
+ STRING = '0.9.5.pre6'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: volt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5.pre5
4
+ version: 0.9.5.pre6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stout