cinderella 0.2.6 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ .bundle
2
+ pkg
3
+ .DS_Store
4
+ Gemfile.lock
5
+ *.gem
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'http://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in sinatra_auth_github.gemspec
4
+ gemspec
5
+
6
+ # vim:ft=ruby
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010 Corey Donohoe
1
+ Copyright (c) 2010-2011 Corey Donohoe
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rubygems/specification'
3
3
  require 'bundler'
4
4
 
5
5
  GEM = "cinderella"
6
- GEM_VERSION = "0.2.6"
6
+ GEM_VERSION = "0.2.7"
7
7
  AUTHOR = "Corey Donohoe"
8
8
  EMAIL = "atmos@atmos.org"
9
9
  HOMEPAGE = "http://github.com/atmos/cinderella"
data/bin/cinderella CHANGED
@@ -9,6 +9,40 @@ ENV['EMAIL'] ||= 'noreply@gmail.com'
9
9
  ENV['EDITOR'] ||= 'vim'
10
10
  ENV['FULLNAME'] ||= 'Marlon Brando'
11
11
 
12
- Cider::Runner.run
12
+ config = {
13
+ :action => 'install'
14
+ }
15
+
16
+ optparse = OptionParser.new do |opts|
17
+ opts.banner = "Usage: cinderella [options]"
18
+
19
+ opts.on( '-h', '--help', 'Display this screen' ) do
20
+ puts opts
21
+ exit
22
+ end
23
+
24
+ opts.on( '-u', '--uninstall', 'Uninstall cinderella' ) do
25
+ config[:action] = 'uninstall'
26
+ end
27
+
28
+ opts.on( '-i', '--install', 'Install cinderella [Default]' ) do
29
+ config[:action] = 'uninstall'
30
+ end
31
+
32
+ opts.on( '-v', '--version', 'Display the cinderella version' ) do
33
+ config[:action] = 'version'
34
+ end
35
+ end
36
+
37
+ optparse.parse!
38
+
39
+ case config[:action]
40
+ when 'uninstall'
41
+ Cinderella::Runner.uninstall
42
+ when 'version'
43
+ Cinderella::Runner.version
44
+ else
45
+ Cinderella::Runner.run
46
+ end
13
47
 
14
48
  # vim:ft=ruby
data/bootstrap.sh ADDED
@@ -0,0 +1,46 @@
1
+ echo "Ensuring we have the latest version of cinderella installed"
2
+ echo "A first time install takes about 45 minutes on a modern machine"
3
+
4
+ mkdir -p ~/.cinderella
5
+ echo "Run started `date`" >> ~/.cinderella/bootstrap.log 2>&1
6
+ which ruby >> ~/.cinderella/bootstrap.log 2>&1
7
+ which gem >> ~/.cinderella/bootstrap.log 2>&1
8
+
9
+ if [ `gem --version` != "1.7.2" ]; then
10
+ echo "You need to upgrade rubygems to 1.7.2"
11
+ fi
12
+
13
+ which gem | grep -q rvm
14
+ if [ $? -eq 0 ]; then
15
+ gem uninstall cinderella -aIx >> ~/.cinderella/bootstrap.log 2>&1
16
+ gem install cinderella --no-rdoc --no-ri >> ~/.cinderella/bootstrap.log 2>&1
17
+ else
18
+ sudo gem uninstall cinderella -aIx >> ~/.cinderella/bootstrap.log 2>&1
19
+ sudo gem install cinderella --no-rdoc --no-ri >> ~/.cinderella/bootstrap.log 2>&1
20
+ sudo gem update >> ~/.cinderella/bootstrap.log 2>&1
21
+ fi
22
+
23
+ echo "Cinderella installed successfully"
24
+
25
+ function run_cinderella {
26
+ hash -r
27
+ if [ -f ~/.cinderella.profile ]; then
28
+ source ~/.cinderella.profile
29
+ fi
30
+ cinderella
31
+ if [ "$?" -eq "0" ]; then
32
+ exit 0
33
+ fi
34
+ }
35
+
36
+ # try cinderella three times just in case shit gets weird
37
+ run_cinderella
38
+ run_cinderella
39
+ run_cinderella
40
+
41
+ cat ~/.cinderella/bootstrap.log
42
+ echo ""
43
+ echo "Something went wrong with the install. :("
44
+ echo "Dump this log into a gist and link to me to it"
45
+ echo "http://github.com/atmos/cinderella/issues"
46
+ echo "Sorry it failed. :("
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "cinderella/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "cinderella"
7
+ s.version = Cinderella::VERSION
8
+ s.authors = ["Corey Donohoe"]
9
+ s.email = ["atmos@atmos.org"]
10
+ s.homepage = "https://github.com/atmos/cinderella"
11
+ s.summary = %q{The development environment you never wanted to manage alone}
12
+ s.description = %q{The development environment you never wanted to manage alone}
13
+
14
+ s.rubyforge_project = "cinderella"
15
+
16
+ s.add_dependency "rvm", "~>0.1.47"
17
+ s.add_dependency "lunchy", "~>0.4.0"
18
+ s.add_dependency "chef", "~>0.9.10"
19
+ s.add_dependency "json", "~>1.4.6"
20
+ s.add_dependency "rest-client", "~>1.6.1"
21
+
22
+ s.files = `git ls-files`.split("\n")
23
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
24
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
25
+ s.require_paths = ["lib"]
26
+ end
data/lib/cinderella.rb CHANGED
@@ -2,8 +2,9 @@ require "etc"
2
2
  require "json"
3
3
  require "tmpdir"
4
4
  require "rest_client"
5
+ require "cinderella/version"
5
6
 
6
- module Cider
7
+ module Cinderella
7
8
  class Runner
8
9
  RECOMMENDED_LLVM = 2206
9
10
  MACOS_FULL_VERSION = `/usr/bin/sw_vers -productVersion`.chomp
@@ -13,6 +14,28 @@ module Cider
13
14
  new.run
14
15
  end
15
16
 
17
+ def self.uninstall
18
+ new.uninstall
19
+ end
20
+
21
+ def self.version
22
+ puts "Cinderella Version: #{Cinderella::VERSION}"
23
+ end
24
+
25
+ def uninstall
26
+ print "Stopping Service: "
27
+ services = %w/memcached mysql redis mongodb postgresql/
28
+ services.each do |service|
29
+ print "#{service} "
30
+ sleep 0.5
31
+ system("lunchy stop #{service}")
32
+ end
33
+ puts ""
34
+ puts "Removing ~/Developer"
35
+ system("rm -rf ~/.cinderella.profile ~/Developer")
36
+ puts "Cinderella successfully uninstalled"
37
+ end
38
+
16
39
  def run
17
40
  if root?
18
41
  warn "#{$0} should not be run as root, try again as a normal user"
@@ -0,0 +1,3 @@
1
+ module Cinderella
2
+ VERSION = "0.2.8"
3
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cinderella
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease: false
4
+ hash: 7
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 6
10
- version: 0.2.6
9
+ - 8
10
+ version: 0.2.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Corey Donohoe
@@ -15,11 +15,13 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-08 00:00:00 -08:00
18
+ date: 2011-06-10 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- version_requirements: &id001 !ruby/object:Gem::Requirement
22
+ name: rvm
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
23
25
  none: false
24
26
  requirements:
25
27
  - - ~>
@@ -30,12 +32,28 @@ dependencies:
30
32
  - 1
31
33
  - 47
32
34
  version: 0.1.47
33
- requirement: *id001
34
35
  type: :runtime
35
- name: rvm
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: lunchy
36
39
  prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ hash: 15
46
+ segments:
47
+ - 0
48
+ - 4
49
+ - 0
50
+ version: 0.4.0
51
+ type: :runtime
52
+ version_requirements: *id002
37
53
  - !ruby/object:Gem::Dependency
38
- version_requirements: &id002 !ruby/object:Gem::Requirement
54
+ name: chef
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
39
57
  none: false
40
58
  requirements:
41
59
  - - ~>
@@ -46,12 +64,12 @@ dependencies:
46
64
  - 9
47
65
  - 10
48
66
  version: 0.9.10
49
- requirement: *id002
50
67
  type: :runtime
51
- name: chef
52
- prerelease: false
68
+ version_requirements: *id003
53
69
  - !ruby/object:Gem::Dependency
54
- version_requirements: &id003 !ruby/object:Gem::Requirement
70
+ name: json
71
+ prerelease: false
72
+ requirement: &id004 !ruby/object:Gem::Requirement
55
73
  none: false
56
74
  requirements:
57
75
  - - ~>
@@ -62,12 +80,12 @@ dependencies:
62
80
  - 4
63
81
  - 6
64
82
  version: 1.4.6
65
- requirement: *id003
66
83
  type: :runtime
67
- name: json
68
- prerelease: false
84
+ version_requirements: *id004
69
85
  - !ruby/object:Gem::Dependency
70
- version_requirements: &id004 !ruby/object:Gem::Requirement
86
+ name: rest-client
87
+ prerelease: false
88
+ requirement: &id005 !ruby/object:Gem::Requirement
71
89
  none: false
72
90
  requirements:
73
91
  - - ~>
@@ -78,26 +96,30 @@ dependencies:
78
96
  - 6
79
97
  - 1
80
98
  version: 1.6.1
81
- requirement: *id004
82
99
  type: :runtime
83
- name: rest-client
84
- prerelease: false
100
+ version_requirements: *id005
85
101
  description: The development environment you never wanted to manage alone
86
- email: atmos@atmos.org
102
+ email:
103
+ - atmos@atmos.org
87
104
  executables:
88
105
  - cinderella
89
106
  extensions: []
90
107
 
91
- extra_rdoc_files:
92
- - LICENSE
108
+ extra_rdoc_files: []
109
+
93
110
  files:
111
+ - .gitignore
112
+ - Gemfile
94
113
  - LICENSE
95
114
  - README.md
96
115
  - Rakefile
97
- - lib/cinderella.rb
98
116
  - bin/cinderella
117
+ - bootstrap.sh
118
+ - cinderella.gemspec
119
+ - lib/cinderella.rb
120
+ - lib/cinderella/version.rb
99
121
  has_rdoc: true
100
- homepage: http://github.com/atmos/cinderella
122
+ homepage: https://github.com/atmos/cinderella
101
123
  licenses: []
102
124
 
103
125
  post_install_message:
@@ -125,8 +147,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
147
  version: "0"
126
148
  requirements: []
127
149
 
128
- rubyforge_project:
129
- rubygems_version: 1.3.7
150
+ rubyforge_project: cinderella
151
+ rubygems_version: 1.6.2
130
152
  signing_key:
131
153
  specification_version: 3
132
154
  summary: The development environment you never wanted to manage alone