cinderella 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -31,8 +31,8 @@ module Cinderella
31
31
  puts "Cinderella Version: #{Cinderella::VERSION}"
32
32
  end
33
33
 
34
- def root
35
- @root ||=
34
+ def root_dir
35
+ @root_dir ||=
36
36
  if ENV['SMEAGOL_ROOT_DIR']
37
37
  "#{ENV['SMEAGOL_ROOT_DIR']}/Developer"
38
38
  else
@@ -48,8 +48,8 @@ module Cinderella
48
48
  system("lunchy stop #{service}")
49
49
  end
50
50
  puts ""
51
- puts "Removing #{root}/Developer"
52
- system("rm -rf ~/.cinderella.profile #{root}/Developer")
51
+ puts "Removing #{root_dir}/Developer"
52
+ system("rm -rf ~/.cinderella.profile #{root_dir}/Developer")
53
53
  puts "Cinderella successfully uninstalled"
54
54
  end
55
55
 
@@ -71,11 +71,9 @@ module Cinderella
71
71
  puts "Extracting #{local_file} to /opt"
72
72
  `tar zxvf #{local_file} -C /opt > #{log_file} 2>&1`
73
73
  if $?.success?
74
- puts "Cinderella successfully installed"
75
- puts "Open up a new shell and run the following command"
76
- puts "\nsource /opt/Developer/cinderella.profile\n"
77
- puts "\nThen run the 'cinderella' command."
78
- exit 0
74
+ post_install
75
+ puts "\n\nCinderella successfully installed"
76
+ puts "Open up a new terminal and you're ready to go!"
79
77
  else
80
78
  puts "Something went wrong installing cinderella, logs at #{log_file}"
81
79
  exit 1
@@ -86,6 +84,17 @@ module Cinderella
86
84
  end
87
85
  end
88
86
 
87
+ def post_install
88
+ script_file = "#{Dir.tmpdir}/cinderella.post_install.sh"
89
+
90
+ File.open(script_file, "w") do |fp|
91
+ fp.puts "#!/bin/bash"
92
+ fp.puts "source /opt/Developer/cinderella.profile"
93
+ fp.puts "cinderella"
94
+ end
95
+ `sh #{script_file}`
96
+ end
97
+
89
98
  def binary_url
90
99
  "http://cinderella.s3.amazonaws.com/cinderella-0.3.2.tar.bz2"
91
100
  end
@@ -1,3 +1,3 @@
1
1
  module Cinderella
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cinderella
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 21
5
+ prerelease:
5
6
  segments:
6
7
  - 0
7
8
  - 3
8
- - 2
9
- version: 0.3.2
9
+ - 3
10
+ version: 0.3.3
10
11
  platform: ruby
11
12
  authors:
12
13
  - Corey Donohoe
@@ -21,9 +22,11 @@ dependencies:
21
22
  name: lunchy
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - ~>
26
28
  - !ruby/object:Gem::Version
29
+ hash: 15
27
30
  segments:
28
31
  - 0
29
32
  - 4
@@ -35,9 +38,11 @@ dependencies:
35
38
  name: chef
36
39
  prerelease: false
37
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
38
42
  requirements:
39
43
  - - "="
40
44
  - !ruby/object:Gem::Version
45
+ hash: 63
41
46
  segments:
42
47
  - 0
43
48
  - 10
@@ -49,9 +54,11 @@ dependencies:
49
54
  name: json
50
55
  prerelease: false
51
56
  requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
52
58
  requirements:
53
59
  - - "="
54
60
  - !ruby/object:Gem::Version
61
+ hash: 7
55
62
  segments:
56
63
  - 1
57
64
  - 5
@@ -63,9 +70,11 @@ dependencies:
63
70
  name: rest-client
64
71
  prerelease: false
65
72
  requirement: &id004 !ruby/object:Gem::Requirement
73
+ none: false
66
74
  requirements:
67
75
  - - ~>
68
76
  - !ruby/object:Gem::Version
77
+ hash: 13
69
78
  segments:
70
79
  - 1
71
80
  - 6
@@ -103,23 +112,27 @@ rdoc_options: []
103
112
  require_paths:
104
113
  - lib
105
114
  required_ruby_version: !ruby/object:Gem::Requirement
115
+ none: false
106
116
  requirements:
107
117
  - - ">="
108
118
  - !ruby/object:Gem::Version
119
+ hash: 3
109
120
  segments:
110
121
  - 0
111
122
  version: "0"
112
123
  required_rubygems_version: !ruby/object:Gem::Requirement
124
+ none: false
113
125
  requirements:
114
126
  - - ">="
115
127
  - !ruby/object:Gem::Version
128
+ hash: 3
116
129
  segments:
117
130
  - 0
118
131
  version: "0"
119
132
  requirements: []
120
133
 
121
134
  rubyforge_project: cinderella
122
- rubygems_version: 1.3.6
135
+ rubygems_version: 1.6.2
123
136
  signing_key:
124
137
  specification_version: 3
125
138
  summary: The development environment you never wanted to manage alone