bowline 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bowline.gemspec +1 -1
- data/lib/bowline/initializer.rb +3 -10
- data/lib/bowline/library.rb +8 -3
- data/lib/bowline/tasks/app.rake +21 -12
- data/lib/bowline/tasks/libs.rake +3 -2
- data/lib/bowline/version.rb +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.3
|
data/bowline.gemspec
CHANGED
data/lib/bowline/initializer.rb
CHANGED
@@ -60,7 +60,7 @@ module Bowline
|
|
60
60
|
|
61
61
|
def initialize_ruby
|
62
62
|
return unless Bowline::Desktop.enabled?
|
63
|
-
ruby_path =
|
63
|
+
ruby_path = Bowline::Library.local_rubylib_path
|
64
64
|
unless File.directory?(ruby_path)
|
65
65
|
ruby_path = Bowline::Library.rubylib_path
|
66
66
|
return unless File.directory?(ruby_path)
|
@@ -434,9 +434,7 @@ module Bowline
|
|
434
434
|
end
|
435
435
|
|
436
436
|
attr_accessor :gem_path
|
437
|
-
|
438
|
-
attr_accessor :rubylib_path
|
439
|
-
|
437
|
+
|
440
438
|
# Sets the default +time_zone+. Setting this will enable +time_zone+
|
441
439
|
# awareness for Active Record models and set the Active Record default
|
442
440
|
# timezone to <tt>:utc</tt>.
|
@@ -477,7 +475,6 @@ module Bowline
|
|
477
475
|
self.app_config_file = default_app_config_file
|
478
476
|
self.gems = default_gems
|
479
477
|
self.gem_path = default_gem_path
|
480
|
-
self.rubylib_path = default_rubylib_path
|
481
478
|
self.plugin_glob = default_plugin_glob
|
482
479
|
self.helper_glob = default_helper_glob
|
483
480
|
self.initializer_glob = default_initalizer_glob
|
@@ -613,11 +610,7 @@ module Bowline
|
|
613
610
|
)
|
614
611
|
gems
|
615
612
|
end
|
616
|
-
|
617
|
-
def default_rubylib_path
|
618
|
-
File.join(root_path, *%w{ vendor rubylib })
|
619
|
-
end
|
620
|
-
|
613
|
+
|
621
614
|
def default_gem_path
|
622
615
|
File.join(root_path, *%w{ vendor gems })
|
623
616
|
end
|
data/lib/bowline/library.rb
CHANGED
@@ -23,15 +23,20 @@ module Bowline
|
|
23
23
|
end
|
24
24
|
module_function :rubylib_path
|
25
25
|
|
26
|
-
def
|
26
|
+
def local_bowline_path
|
27
27
|
File.join(APP_ROOT, "vendor", "bowline")
|
28
28
|
end
|
29
|
-
module_function :
|
29
|
+
module_function :local_bowline_path
|
30
|
+
|
31
|
+
def local_rubylib_path
|
32
|
+
File.join(APP_ROOT, "vendor", "rubylib")
|
33
|
+
end
|
34
|
+
module_function :local_rubylib_path
|
30
35
|
|
31
36
|
def ready?
|
32
37
|
File.exist?(desktop_path) &&
|
33
38
|
File.directory?(rubylib_path) &&
|
34
|
-
File.directory?(
|
39
|
+
File.directory?(local_bowline_path)
|
35
40
|
end
|
36
41
|
module_function :ready?
|
37
42
|
|
data/lib/bowline/tasks/app.rake
CHANGED
@@ -48,21 +48,30 @@ namespace :app do
|
|
48
48
|
dirs.delete(File.join(APP_ROOT, 'db', 'migrate'))
|
49
49
|
dirs.delete_if {|i| i =~ /\.svn|\.DS_Store/ }
|
50
50
|
FileUtils.cp_r(dirs, '.')
|
51
|
-
|
52
|
-
# Copy Bowline
|
53
|
-
bowline_dir = File.join("vendor", "bowline")
|
54
|
-
FileUtils.rm_rf(bowline_dir)
|
55
|
-
FileUtils.cp_r(
|
56
|
-
Pathname.new(Bowline.lib_path).realpath,
|
57
|
-
bowline_dir
|
58
|
-
)
|
59
51
|
|
60
|
-
|
61
|
-
FileUtils.
|
62
|
-
|
52
|
+
FileUtils.mkdir_p("vendor")
|
53
|
+
FileUtils.cd("vendor") do
|
54
|
+
# Copy Bowline lib
|
55
|
+
bowline_path = "bowline"
|
56
|
+
FileUtils.rm_rf(bowline_path)
|
57
|
+
FileUtils.cp_r(
|
58
|
+
Pathname.new(Bowline.lib_path).realpath,
|
59
|
+
bowline_path
|
60
|
+
)
|
61
|
+
%w{assets pkg examples bin templates .git}.each do |unused|
|
62
|
+
FileUtils.rm_rf(File.join(bowline_path, unused))
|
63
|
+
end
|
64
|
+
|
65
|
+
rubylib_path = "rubylib"
|
66
|
+
FileUtils.rm_rf(rubylib_path)
|
67
|
+
FileUtils.cp_r(
|
68
|
+
Bowline::Library.rubylib_path,
|
69
|
+
rubylib_path
|
70
|
+
)
|
71
|
+
end
|
63
72
|
end
|
64
73
|
|
65
|
-
# Copy
|
74
|
+
# Copy Bowline binary
|
66
75
|
FileUtils.mkdir("MacOS")
|
67
76
|
FileUtils.cp(
|
68
77
|
Bowline::Library.desktop_path,
|
data/lib/bowline/tasks/libs.rake
CHANGED
@@ -40,7 +40,7 @@ namespace :libs do
|
|
40
40
|
# it to vendor/bowline. One caveat though, is that you have to
|
41
41
|
# re-run this task when you update the gem.
|
42
42
|
task :unpack => :environment do
|
43
|
-
local_path = Bowline::Library.
|
43
|
+
local_path = Bowline::Library.local_bowline_path
|
44
44
|
unless File.directory?(local_path)
|
45
45
|
begin
|
46
46
|
FileUtils.ln_s(
|
@@ -82,7 +82,8 @@ namespace :libs do
|
|
82
82
|
desc "Update Bowline's binary and pre-compiled libs"
|
83
83
|
task :update => :environment do
|
84
84
|
FileUtils.rm_rf(Bowline::Library.path)
|
85
|
-
FileUtils.rm_rf(Bowline::Library.
|
85
|
+
FileUtils.rm_rf(Bowline::Library.local_bowline_path)
|
86
|
+
FileUtils.rm_rf(Bowline::Library.local_rubylib_path)
|
86
87
|
Rake::Task["libs:setup"].invoke
|
87
88
|
end
|
88
89
|
end
|
data/lib/bowline/version.rb
CHANGED