cinderella 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/LICENSE +20 -0
  2. data/README.md +25 -0
  3. data/Rakefile +38 -0
  4. data/bin/cinderella +37 -0
  5. data/lib/cinderella.rb +37 -0
  6. metadata +118 -0
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2010 Corey Donohoe
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,25 @@
1
+ cinderella
2
+ ==========
3
+
4
+ apple + homebrew + chef
5
+
6
+ Installing
7
+ ==========
8
+
9
+ % open http://www.atmos.org/cinderella/intro.html
10
+
11
+ You should be in great shape for contributing to open source on a mac after that.
12
+
13
+ Contributing
14
+ ============
15
+
16
+ Check out the [smeagol][smeagol] project if you want to modify the recipes
17
+
18
+ Developing
19
+ ==========
20
+ % gem install bundler
21
+ % bundle install
22
+ % bundle exec rake repackage
23
+ % gem push
24
+
25
+ [smeagol]: http://github.com/atmos/smeagol
@@ -0,0 +1,38 @@
1
+ require 'rake/gempackagetask'
2
+ require 'rubygems/specification'
3
+ require 'bundler'
4
+
5
+ GEM = "cinderella"
6
+ GEM_VERSION = "0.2.0"
7
+ AUTHOR = "Corey Donohoe"
8
+ EMAIL = "atmos@atmos.org"
9
+ HOMEPAGE = "http://github.com/atmos/cinderella"
10
+ SUMMARY = "The development environment you never wanted to manage alone"
11
+
12
+ spec = Gem::Specification.new do |s|
13
+ s.name = GEM
14
+ s.version = GEM_VERSION
15
+ s.platform = Gem::Platform::RUBY
16
+ s.has_rdoc = true
17
+ s.extra_rdoc_files = ["LICENSE"]
18
+ s.summary = SUMMARY
19
+ s.description = s.summary
20
+ s.author = AUTHOR
21
+ s.email = EMAIL
22
+ s.homepage = HOMEPAGE
23
+
24
+ bundle = Bundler::Definition.build('Gemfile', 'Gemfile.lock', { })
25
+ bundle.dependencies.each do |dep|
26
+ next unless dep.groups.include?(:runtime)
27
+ s.add_dependency(dep.name, dep.version_requirements.to_s)
28
+ end
29
+
30
+ s.bindir = "bin"
31
+ s.executables = %w( cinderella )
32
+ s.require_path = 'lib'
33
+ s.files = %w(LICENSE README.md Rakefile) + Dir.glob("{lib}/**/*")
34
+ end
35
+
36
+ Rake::GemPackageTask.new(spec) do |pkg|
37
+ pkg.gem_spec = spec
38
+ end
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env ruby
2
+ require "rubygems"
3
+ require "cinderella"
4
+ require "optparse"
5
+
6
+ ENV['HOME'] ||= '/Users/bofh'
7
+ ENV['USER'] ||= 'bofh'
8
+ ENV['EMAIL'] ||= 'noreply@gmail.com'
9
+ ENV['EDITOR'] ||= 'vim'
10
+ ENV['FULLNAME'] ||= 'Marlon Brando'
11
+
12
+ RECOMMENDED_LLVM = 2206
13
+ MACOS_FULL_VERSION = `/usr/bin/sw_vers -productVersion`.chomp
14
+ MACOS_VERSION = /(10\.\d+)(\.\d+)?/.match(MACOS_FULL_VERSION).captures.first.to_f
15
+
16
+ if MACOS_VERSION >= 10.6
17
+ begin
18
+ xcode_path = `/usr/bin/xcode-select -print-path`.chomp
19
+ exit(1) if xcode_path.empty?
20
+ if `#{xcode_path}/usr/bin/llvm-gcc-4.2 -v 2>&1` =~ /LLVM build (\d{4,})/
21
+ if $1.to_i < RECOMMENDED_LLVM
22
+ $stderr.puts "You should really upgrade your xcode install"
23
+ end
24
+ end
25
+ rescue
26
+ $stderr.puts "You need xcode for this to work :\\"
27
+ exit(1)
28
+ end
29
+ else
30
+ $stderr.puts "You should really upgrade to snow leopard"
31
+ $stderr.puts "Make sure you have xcode installed and cross your fingers"
32
+ $stderr.puts "I've seen it work on leopard though..."
33
+ end
34
+
35
+ Cider::Runner.run
36
+
37
+ # vim:ft=ruby
@@ -0,0 +1,37 @@
1
+ require "json"
2
+ require "tmpdir"
3
+ require "rest_client"
4
+
5
+ module Cider
6
+ class Runner
7
+ def self.run
8
+ new.run
9
+ end
10
+
11
+ def run
12
+ system("rm -rf ~/.cinderella")
13
+ system("chef-solo -c #{config}")
14
+ exit($?.to_i)
15
+ end
16
+
17
+ def config
18
+ download_solo_rb
19
+ filename
20
+ end
21
+
22
+ private
23
+
24
+ def download_solo_rb
25
+ response = RestClient.get("http://ciderapp.org/solo.rb")
26
+ if response.code == 200
27
+ File.open(filename, "w") do |fp|
28
+ fp.write(response.body)
29
+ end
30
+ end
31
+ end
32
+
33
+ def filename
34
+ @filename ||= File.expand_path(File.join(Dir.tmpdir, "cinderella.rb"))
35
+ end
36
+ end
37
+ end
metadata ADDED
@@ -0,0 +1,118 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cinderella
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 2
9
+ - 0
10
+ version: 0.2.0
11
+ platform: ruby
12
+ authors:
13
+ - Corey Donohoe
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-08-31 00:00:00 -07:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ version_requirements: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ~>
26
+ - !ruby/object:Gem::Version
27
+ hash: 91
28
+ segments:
29
+ - 0
30
+ - 1
31
+ - 32
32
+ version: 0.1.32
33
+ requirement: *id001
34
+ type: :runtime
35
+ name: rvm
36
+ prerelease: false
37
+ - !ruby/object:Gem::Dependency
38
+ version_requirements: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ hash: 43
44
+ segments:
45
+ - 0
46
+ - 9
47
+ - 8
48
+ version: 0.9.8
49
+ requirement: *id002
50
+ type: :runtime
51
+ name: chef
52
+ prerelease: false
53
+ - !ruby/object:Gem::Dependency
54
+ version_requirements: &id003 !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - "="
58
+ - !ruby/object:Gem::Version
59
+ hash: 3
60
+ segments:
61
+ - 1
62
+ - 4
63
+ - 2
64
+ version: 1.4.2
65
+ requirement: *id003
66
+ type: :runtime
67
+ name: json
68
+ prerelease: false
69
+ description: The development environment you never wanted to manage alone
70
+ email: atmos@atmos.org
71
+ executables:
72
+ - cinderella
73
+ extensions: []
74
+
75
+ extra_rdoc_files:
76
+ - LICENSE
77
+ files:
78
+ - LICENSE
79
+ - README.md
80
+ - Rakefile
81
+ - lib/cinderella.rb
82
+ - bin/cinderella
83
+ has_rdoc: true
84
+ homepage: http://github.com/atmos/cinderella
85
+ licenses: []
86
+
87
+ post_install_message:
88
+ rdoc_options: []
89
+
90
+ require_paths:
91
+ - lib
92
+ required_ruby_version: !ruby/object:Gem::Requirement
93
+ none: false
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ hash: 3
98
+ segments:
99
+ - 0
100
+ version: "0"
101
+ required_rubygems_version: !ruby/object:Gem::Requirement
102
+ none: false
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ hash: 3
107
+ segments:
108
+ - 0
109
+ version: "0"
110
+ requirements: []
111
+
112
+ rubyforge_project:
113
+ rubygems_version: 1.3.7
114
+ signing_key:
115
+ specification_version: 3
116
+ summary: The development environment you never wanted to manage alone
117
+ test_files: []
118
+