Thimblr 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/thimblr.rb +3 -5
  2. metadata +2 -2
@@ -18,13 +18,13 @@ class Thimblr::Application < Sinatra::Base
18
18
  Locations = {
19
19
  "mac" => {"dir" => "~/Library/Application Support/Thimblr/", 'name' => "Application Support", 'platform' => "mac"},
20
20
  "nix" => {'dir' => "~/.thimblr/",'name' => "Home directory", 'platform' => "nix"},
21
- "win" => {'dir' => "~/AppData/Roaming/Thimblr/",'name' => "AppData", 'platform' => "nix"} # TODO: This value is hardcoded for vista/7, I should probably superceed expand_path and parse for different versions of Windows here
21
+ "win" => {'dir' => "~/AppData/Roaming/Thimblr/",'name' => "AppData", 'platform' => "win"} # TODO: This value is hardcoded for vista/7, I should probably superceed expand_path and parse for different versions of Windows here
22
22
  }
23
23
 
24
24
  case RbConfig::CONFIG['target_os']
25
25
  when /darwin/i
26
26
  Platform = "mac"
27
- when /mswin32/i
27
+ when /mswin32/i,/mingw32/i
28
28
  Platform = "win"
29
29
  else
30
30
  Platform = "nix"
@@ -46,9 +46,7 @@ class Thimblr::Application < Sinatra::Base
46
46
  set :settingsfile, File.expand_path(File.join(Locations[Platform]['dir'],'settings.yaml'))
47
47
 
48
48
  # Generate Data & Theme directories if required
49
- if not File.directory?(File.expand_path(File.join(Locations[Platform]['dir'],"themes")))
50
- FileUtils.cp_r(File.join(root,'themes'),File.expand_path(Locations[Platform]['dir']))
51
- end
49
+ FileUtils.cp_r(File.join(root,'themes'),File.expand_path(Locations[Platform]['dir'])) if not File.directory?(File.expand_path(File.join(Locations[Platform]['dir'],"themes")))
52
50
 
53
51
  if not File.directory?(File.expand_path(File.join(Locations[Platform]['dir'],"data")))
54
52
  FileUtils.mkdir_p(File.expand_path(File.join(Locations[Platform]['dir'],"data")))
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- - 0
9
- version: 0.9.0
8
+ - 1
9
+ version: 0.9.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - JP Hastings-Spital