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 CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 0.5.3
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{bowline}
8
- s.version = "0.5.2"
8
+ s.version = "0.5.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Alex MacCaw"]
@@ -60,7 +60,7 @@ module Bowline
60
60
 
61
61
  def initialize_ruby
62
62
  return unless Bowline::Desktop.enabled?
63
- ruby_path = File.join(configuration.rubylib_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
@@ -23,15 +23,20 @@ module Bowline
23
23
  end
24
24
  module_function :rubylib_path
25
25
 
26
- def bowline_path
26
+ def local_bowline_path
27
27
  File.join(APP_ROOT, "vendor", "bowline")
28
28
  end
29
- module_function :bowline_path
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?(bowline_path)
39
+ File.directory?(local_bowline_path)
35
40
  end
36
41
  module_function :ready?
37
42
 
@@ -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
- # Copy RB libs - TODO
61
- FileUtils.mkdir_p(config.rubylib_path)
62
- FileUtils.cp_r(Bowline::Library.rubylib_path, config.rubylib_path)
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 Binary
74
+ # Copy Bowline binary
66
75
  FileUtils.mkdir("MacOS")
67
76
  FileUtils.cp(
68
77
  Bowline::Library.desktop_path,
@@ -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.bowline_path
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.bowline_path)
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
@@ -2,7 +2,7 @@ module Bowline
2
2
  module Version #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 5
5
- TINY = 2
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bowline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex MacCaw