Permalink
Browse files

Removing github commits and cleaned whitespace

  • Loading branch information...
1 parent 326270b commit 26c1a036ba58cf9e35aeb95d1e8f4be400772aad @burtlo committed Sep 30, 2012
View
@@ -2,5 +2,5 @@ source :rubygems
gem 'bundler'
gem 'hashie'
-gem 'octokit'
-gem 'json'
+gem 'json'
+gem 'yard'
View
@@ -2,25 +2,25 @@ YARD-Bundler: A YARD extension for Bundler
=========================================
NOTE: This extension is currently under development. At the current moment,
-the plugin is not fully featured or compliant with all of Bundler and Gemfile features.
+the plugin is not fully featured or compliant with all of Bundler and Gemfile features.
However, please feel free to fork the project and take a look around.
Synopsis
--------
-YARD-Bundler is a YARD extension that processes Bundler Gemfile and Gemfile.lock
+YARD-Bundler is a YARD extension that processes Bundler Gemfile and Gemfile.lock
files and includes them in the documentation output.
Features (Example)
--------
-Take a look at [example output](http://recursivegames.com/yard-bundler/file.Gemfile.html)
+Take a look at [example output](http://recursivegames.com/yard-bundler/file.Gemfile.html)
generated with the yard-bundler plugin.
**1. Gemfile.lock and Gemfile are parsed and [included in your file list](http://recursivegames.com/yard-bundler/file_list.html).
**2. Gemfile formatted with all dependencies shown in a [TOC](http://recursivegames.com/yard-bundler/file.Gemfile.html).
-
+
**3. Gem description contains direct links to [documentation](http://rubydoc.info) and [rubygem's description](http://rubygems.org)
**4. Gems with Github projects will have a direct link to Github.
@@ -43,16 +43,16 @@ Installation
Usage
-----
-YARD supports for automatically including gems with the prefix `yard-`
-as a plugin. To enable automatic loading yard-cucumber.
+YARD supports for automatically including gems with the prefix `yard-`
+as a plugin. To enable automatic loading yard-cucumber.
1. Edit `~/.yard/config` and insert the following line:
load_plugins: true
2. Run `yardoc`, use the rake task, or run `yard server`, as would [normally](https://github.com/lsegal/yard).
-Be sure to update any file patterns so that they do not exclude `feature`
+Be sure to update any file patterns so that they do not exclude `feature`
files. yard-cucumber will even process your step definitions and transforms.
$ yardoc 'lib/**/*.rb' 'spec/**/*_spec.rb'
View
@@ -2,7 +2,7 @@ GEM
remote: http://rubygems.org/
specs:
addressable (2.2.6)
- diff-lcs (1.1.2)
+ diff-lcs (1.1.3)
guard (0.4.2)
thor (~> 0.14.6)
guard-rspec (0.4.0)
@@ -11,14 +11,14 @@ GEM
mime-types (1.16)
rest-client (1.6.3)
mime-types (>= 1.16)
- rspec (2.6.0)
- rspec-core (~> 2.6.0)
- rspec-expectations (~> 2.6.0)
- rspec-mocks (~> 2.6.0)
- rspec-core (2.6.4)
- rspec-expectations (2.6.0)
- diff-lcs (~> 1.1.2)
- rspec-mocks (2.6.0)
+ rspec (2.11.0)
+ rspec-core (~> 2.11.0)
+ rspec-expectations (~> 2.11.0)
+ rspec-mocks (~> 2.11.0)
+ rspec-core (2.11.1)
+ rspec-expectations (2.11.3)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.11.3)
thor (0.14.6)
PLATFORMS
View
@@ -53,18 +53,17 @@ def gemspec
# curl https://rubygems.org/api/v1/versions/coulda.json
#
def versions
-
+
open "http://rubygems.org/api/v1/versions/#{@name}.json" do |response|
json = JSON.parse(response.read)
versions_mash = json.map {|version| Hashie::Mash.new version }
end
-
+
rescue => exception
log.error "could not load the rubygems information for #{@name} => #{exception}"
return Hashie::Mash.new
end
-
end
end
@@ -1,5 +1,5 @@
#filecontents ul.dependencies {
- list-style: none;
+ list-style: none;
padding-left: 0px;
}
@@ -39,15 +39,15 @@ div.details ul.links li { float: left; padding-top: 10px; }
/*li.issue { margin-left: 15px; }*/
div.issue {
- margin-left: 15px;
+ margin-left: 15px;
background-color: #F6C9CC; border: 1px solid #ebc6ca; -moz-border-radius: 3px; -webkit-border-radius: 3px;
}
li.issue span.time { font-size: 10px; }
li.issue span.tags { font-size: 10px; text-transform:uppercase; }
/*li.commit { }*/
div.commit {
- margin-left: 15px;
+ margin-left: 15px;
background-color: #EAF2F5; border: 1px solid #BEDCE7; -moz-border-radius: 3px; -webkit-border-radius: 3px;
}
li.commit span.time { font-size: 10px; }
@@ -5,10 +5,9 @@
<div>
Provided below is a list of the files defined in the Gemfile and Gemfile.lock.
All of the dependencies and sub-dependencies are shown here with links to their
- documentation and if it the project is hosted on Github additional links are
- included to the project, issues, and recent commits.
+ documentation and if it the project is hosted on Github additional links are
+ included to the project and issues.
</div>
-<!-- <img src="gemfile.png" /> -->
<ul class="dependencies">
<% dependencies.each do |dep| %>
@@ -17,67 +16,67 @@
<div class="name"><%= h dep.name %></div>
<div class="version">(<a href="<%= h dep.rubygems_version_url %>"><%= h dep.version %></a>)</div>
</h3>
-
+
<br style="clear:both;"/>
<!-- Dependencies -->
-
+
</li>
<li class="details">
<div class="details">
<ul class="links">
-
+
<!-- Rubydoc -->
-
+
<li class="documentation"><a href="<%= h dep.yardoc_url %>">Rubydoc</a></li>
<!-- Documentation -->
<% if dep.documentation_url %>
<li class="documentation">&nbsp;|&nbsp;<a href="<%= h dep.documentation_url %>">Documentation</a></li>
<% end %>
-
+
<!-- Homepage -->
<% if dep.homepage_url %>
<li class="homepage">&nbsp;|&nbsp;<a href="<%= h dep.homepage_url %>">Homepage</a></li>
<% end %>
<!-- Project -->
-
+
<% if dep.source_code_url %>
<li class="source-code">&nbsp;|&nbsp;<a href="<%= h dep.source_code_url %>">Source Code</a></li>
<% end %>
<!-- Bug Tracker -->
-
+
<% if dep.bug_tracker_url %>
<li class="bug-tracker">&nbsp;|&nbsp;<a href="<%= h dep.bug_tracker_url %>">Bug Tracker</a></li>
<% end %>
<!-- Mailing List -->
-
+
<% if dep.mailing_list_url %>
<li class="mailing-list">&nbsp;|&nbsp;<a href="<%= h dep.mailing_list_url %>">Mailing List</a></li>
<% end %>
-
+
<!-- Wiki -->
-
+
<% if dep.wiki_url %>
<li class="wiki">&nbsp;|&nbsp;<a href="<%= h dep.wiki_url %>">Wiki</a></li>
<% end %>
-
+
</ul>
-
+
<!-- More Details -->
-
+
<ul>
<br style="clear:both;"/>
<!-- Newer Versions -->
-
+
<% if dep.newer_versions.length == 0 %>
This is the latest released version.
<% elsif dep.newer_versions.length == 1 %>
- [!] There is 1 newer release.
+ [!] There is 1 newer release.
(<%= dep.versions.first.number %>)
<!-- Release Date -->
<!-- Link all the versions that are displayed. -->
@@ -89,10 +88,10 @@
<!-- Link all the versions that are displayed. -->
<!-- Hide all the version information until the user clicks on the 'There is 1 newer release' -->
<% end %>
-
+
<!-- Collapsed Version: Show the number of open issues -->
<!-- Issues when expanded -->
-
+
<% if dep.issues and not dep.open_bugs.empty? %>
<h4><%= dep.open_bugs.length %> Open Issue<%= dep.open_bugs.length > 1 ? 's' : '' %></h4>
<% dep.open_bugs.each do |issue| %>
@@ -110,34 +109,12 @@
<br style="clear: both;">
</div>
<% end %>
-
- <% end %>
- <!-- Collapsed Version: Show the date/time of the recent commit -->
- <!-- Commits when expanded -->
-
- <% if dep.commits and not dep.commits.empty? %>
- <h4>Recent Commits</h4>
- <% dep.commits[0..4].each do |commit| %>
- <li class="commit"> </li>
- <div class="commit">
- <div style="float:left; padding-top: 12px; padding-left: 10px;">
- <img src="<%= gravatar_image_from_email commit.author.email %>">
- </div>
- <div style=" padding-left: 42px; padding-top: 10px;">
- <a href="http://github.com<%= commit.url %>"><%= h commit.message %></a>
- <br/>
- <span class="time"><%= human_friendly_time commit.committed_date %></span>
- </div>
- <br style="clear:both;"/>
- </div>
-
- <% end %>
<% end %>
-
+
</ul></div>
</li>
-
+
<% end %>
</ul>
<br/ style="clear:both;">
@@ -1,26 +1,26 @@
def init
-
+
# The Bundler namespace was stored within the Registry attached as a child on
- # root, however, we do not want to have it displayed in the Class List so we
+ # root, however, we do not want to have it displayed in the Class List so we
# have it removed.
YARD::Registry.root.children.delete YARD::CodeObjects::Bundler::BUNDLER_NAMESPACE
-
+
# Generate an ExtraFileObject, this is similar to a README, out of the Gemfile
gemfile = YARD::CodeObjects::ExtraFileObject.new("Gemfile.html",erb(:gemfile))
-
+
# Add it to the files that should be persisted and appearing in the FileList
options[:files] << gemfile
-
+
super
-
+
asset("css/bundler.css",file("css/bundler.css",true))
end
#
# Helper method for providing the gemfile dependencies for use in the gemfile
# template (gemfile.erb).
-#
+#
def dependencies
@dependencies ||= begin
YARD::Registry.all(:dependency)
@@ -30,24 +30,24 @@ def dependencies
#
# Ideally this would perform the rails actionpack date helper, but in the interest
# of keeping this small, this is simply going to return the date of the event
-#
+#
# @param [String] date_string representation to convert to something more human
# readable.
# @return [String] a time that is human friendly
#
def human_friendly_time(time_string)
# if the time is within the last two days, from now, specify the time in hours
# ago, otherwise present the information as as a date string
-
+
# require 'active_support/time'
# two_days_ago = DateTime.current.advance :days => -2
- #
+ #
# if DateTime.parse(time_string) - two_days_ago > 0
# DateTime.parse(time_string) - two_days_ago
# end
-
+
time_string
-
+
rescue
log.debug "Failed to generate a human friendly time from #{time_string}"
time_string
@@ -56,9 +56,4 @@ def human_friendly_time(time_string)
def gravatar_image_from_id(hash)
"http://www.gravatar.com/avatar/#{hash}?s=25"
-end
-
-def gravatar_image_from_email(email)
- require 'digest/md5'
- gravatar_image_from_id Digest::MD5.hexdigest(email)
end
Oops, something went wrong.

0 comments on commit 26c1a03

Please sign in to comment.