Permalink
Browse files

Merge branch 'master' of github.com:carlhuda/bundler-site

Conflicts:
	src/layouts/application.haml
  • Loading branch information...
2 parents 818931e + d92bb2e commit d3edcc501603a6133c5bd5f9bf1d4150e74286ae @wycats wycats committed May 14, 2010
View
56 src/layouts/application.haml
@@ -16,26 +16,36 @@
#footer
= img("emocow.png")
.spacer
- %p
- = link("home", "index.html")
- \/
- = link("install", "bundle_install.html")
- \/
- = link("lock", "bundle_lock.html")
- \/
- = link("package", "bundle_package.html")
- \/
- = link("#setup", "bundler_setup.html")
- \/
- = link("git", "git.html")
- \/
- = link("groups", "groups.html")
- \/
- = link("Rails 2.3", "rails23.html")
- \/
- = link("Rails 3", "rails3.html")
- \/
- = link("deploy", "deploy.html")
+ #navigation
+ %p
+ %b commands
+ = link("home", "index.html")
+ \/
+ = link("install", "bundle_install.html")
+ \/
+ = link("lock", "bundle_lock.html")
+ \/
+ = link("package", "bundle_package.html")
+ %p
+ %b usage
+ = link("gemfile", "gemfile.html")
+ \/
+ = link("git", "git.html")
+ \/
+ = link("groups", "groups.html")
+ \/
+ = link("setup", "bundler_setup.html")
+ \/
+ = link("deploying", "deploying.html")
+ %p
+ %b frameworks
+ = link("rubygems", "rubygems.html")
+ \/
+ = link("sinatra", "sinatra.html")
+ \/
+ = link("rails 2.3", "rails23.html")
+ \/
+ = link("rails 3", "rails3.html")
.spacer
= img("bundler-small.png")
#credits
@@ -48,7 +58,7 @@
_gaq.push(['_setAccount', 'UA-557621-9']);
_gaq.push(['_trackPageview']);
(function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
View
0 src/pages/deploy.haml → src/pages/deploying.haml
File renamed without changes.
View
51 src/pages/gemfile.haml
@@ -0,0 +1,51 @@
+%h2 Gemfiles
+
+.contents
+ .bullet
+ .description
+ Gemfiles require at least one gem source, in the form of the URL for a Rubygems server.
+ There are shortcuts for the default gem server, so all of these sources are the same.
+ :highlight_ruby
+ source :rubygems
+ source "http://rubygems.org"
+ source :rubyforge
+ source "http://gems.rubyforge.org"
+ source :gemcutter
+ source "http://gemcutter.org"
+
+ .bullet
+ .description
+ Declare the gems that you need, including version numbers. Specify versions using the same
+ syntax that Rubygems supports for dependencies.
+ :highlight_ruby
+ gem "nokogiri"
+ gem "rails", "3.0.0.beta3"
+ gem "rack", ">=1.0"
+ gem "thin", "~>1.1"
+
+ .bullet
+ .description
+ Git repositories are also valid gem sources, for multiple gems or just a single gem. Valid
+ git options are :tag, :branch, and :ref, defaulting to the master branch.
+ :highlight_ruby
+ git "git://github.com/wycats/thor.git", :tag => "v0.13.4"
+ gem "thor"
+
+ gem "nokogiri", :git => "git://github.com/tenderlove/nokogiri.git"
+ = link("Learn more: Git", "git.html")
+
+ .bullet
+ .description
+ If you are actively developing a gem, perhaps checked out from Github, you can use the gem
+ directly from its directory on your filesystem.
+ :highlight_ruby
+ gem "nokogiri", :path => "~/sw/gems/nokogiri"
+
+ .bullet
+ .description
+ Dependencies placed into a group can be ignored at install time or required together
+ :highlight_ruby
+ group :development do
+ gem "wirble"
+ end
+ = link("Learn more: Groups", "groups.html")
View
19 src/pages/git.haml
@@ -6,8 +6,7 @@
Specify that a gem should come from a git
repository with a .gemspec at its root
:highlight_ruby
- gem "nokogiri", :git =>
- "git://github.com/tenderlove/nokogiri.git"
+ gem "nokogiri", :git => "git://github.com/tenderlove/nokogiri.git"
.bullet
.description
@@ -16,8 +15,7 @@
that bundler should use when resolving
dependencies
:highlight_ruby
- gem "deep_merge", "1.0", :git =>
- "git://github.com/peritor/deep_merge.git"
+ gem "deep_merge", "1.0", :git => "git://github.com/peritor/deep_merge.git"
.bullet
.description
@@ -35,22 +33,17 @@
Specify that a git repository should use
a particular ref, branch, or tag
:highlight_ruby
- git "git://github.com/rails/rails.git",
- :ref => "4aded"
+ git "git://github.com/rails/rails.git", :ref => "4aded"
- git "git://github.com/rails/rails.git",
- :branch => "2-3-stable"
+ git "git://github.com/rails/rails.git", :branch => "2-3-stable"
- git "git://github.com/rails/rails.git",
- :tag => "v2.3.5"
+ git "git://github.com/rails/rails.git", :tag => "v2.3.5"
.bullet
.description
Specifying a ref, branch, or tag for a
git repository specified inline works
exactly the same way
:highlight_ruby
- gem "nokogiri", :git =>
- "git://github.com/tenderlove/nokogiri.git",
- :ref => "0eec4"
+ gem "nokogiri", :git => "git://github.com/tenderlove/nokogiri.git", :ref => "0eec4"
View
4 src/pages/groups.haml
@@ -11,9 +11,7 @@
gem "nokogiri"
gem "sinatra"
- group :development do
- gem "wirble"
- end
+ gem "wirble", :group => :development
group :test do
gem "rspec"
View
5 src/pages/index.haml
@@ -1,5 +1,5 @@
#intro
- Bundler manages an <strong>application's dependencies</strong> through its
+ Bundler manages an <strong>application's dependencies</strong> through its
entire life across many machines systematically and repeatably.
%h2 Getting Started
@@ -25,6 +25,7 @@
source "http://rubygems.org"
gem "nokogiri"
gem "rack"
+ = link("Learn More: Gemfiles", "gemfile.html")
.bullet
.description
@@ -136,7 +137,7 @@
.bullet
.description
- Install gems to a different location
+ Install gems to a different location
(the default is ~/.bundle)
.how
:highlight_plain
View
45 src/pages/rubygems.haml
@@ -0,0 +1,45 @@
+%h2 Using Bundler with Rubygem gemspecs
+
+.contents
+ .bullet
+ .description
+ If you already have a gem with a gemspec, you can generate a Gemfile for your gem.
+ .how
+ :highlight_plain
+ $ bundle init --gemspec
+ .notes
+ If you are creating a new gem, simply create a new Gemfile.
+
+ .bullet
+ .description
+ Gems in the default group are regular dependencies, and gems in the :development group are
+ development dependencies. Gems in other groups will not be included in the gemspec.
+ :highlight_ruby
+ source :rubyforge
+ gem "json"
+
+ group :development do
+ gem "rspec"
+ end
+
+ group :debugging do
+ gem "ruby-debug"
+ gem "awsome_print"
+ end
+
+ .bullet
+ .description
+ Inside your gemspec, load bundler and replace all of the dependency calls with a single call to
+ \#add_bundler_dependencies.
+ :highlight_ruby
+ require 'bundler'
+ Gem::Specification.new do |s|
+ # [...]
+ s.add_bundler_dependencies
+ end
+
+ .bullet
+ .description
+ That's it! You can now build your gem.
+ :highlight_plain
+ $ gem build my_gem.gemspec
View
26 src/pages/sinatra.haml
@@ -0,0 +1,26 @@
+%h2 Using Bundler with Sinatra
+
+.contents
+ .bullet
+ .description
+ To use bundler with a Sinatra application, you only need to do two things. First, create a Gemfile.
+ :highlight_ruby
+ gem "sinatra"
+
+ .bullet
+ .description
+ Then, set up your config.ru file to load the bundle before it loads your Sinatra app.
+ :highlight_ruby
+ require 'rubygems'
+ require 'bundler'
+ Bundler.setup
+
+ require 'sinatra'
+ require 'my_sinatra_app'
+ run MySinatraApp
+
+ .bullet
+ .description
+ Start your development server with rackup, and Sinatra will be loaded via Bundler.
+ :highlight_plain
+ $ rackup
View
18 src/stylesheets/application.sass
@@ -82,13 +82,17 @@ img
img
display: block
- p
- font-family: Helvetica, sans-serif
- color: #366
- font-size: 16px
- a
- text-decoration: none
- color: #0e3f54
+ #navigation
+ +flexbox(vertical, center)
+
+ p
+ font-family: Helvetica, sans-serif
+ color: #366
+ font-size: 16px
+ margin: 0
+ a
+ text-decoration: none
+ color: #0e3f54
.contents
width: 725px

0 comments on commit d3edcc5

Please sign in to comment.