Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial commit

  • Loading branch information...
commit b65b5cc168e0f7f9dd4a4280a709283bebfca0f2 0 parents
@ywen2 ywen2 authored
19 .gitignore
@@ -0,0 +1,19 @@
+*.gem
+*.rbc
+.bundle
+.config
+.yardoc
+Gemfile.lock
+InstalledFiles
+_yardoc
+coverage
+doc/
+lib/bundler/man
+pkg
+rdoc
+spec/reports
+test/tmp
+test/version_tmp
+tmp
+.rvmrc
+test_reports
2  .rspec
@@ -0,0 +1,2 @@
+--colour
+--format documentation
1  .rvmrc.template
@@ -0,0 +1 @@
+rvm 1.9.3@pivotal_to_pdf-formatters
4 Gemfile
@@ -0,0 +1,4 @@
+source 'https://rubygems.org'
+
+# Specify your gem's dependencies in pivotal_to_pdf-formatters.gemspec
+gemspec
11 Guardfile
@@ -0,0 +1,11 @@
+guard 'spork' do
+ watch('Gemfile')
+ watch('Gemfile.lock')
+ watch('spec/spec_helper.rb') { :rspec }
+end
+
+guard 'rspec', :all_after_pass => false, :cli => "--color --format documentation --drb" do
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^lib/(.+)/(.+)\.rb$}) { |m| [ "lib/#{m[1]}/#{m[2]}.rb", "spec/#{m[1]}/#{m[2]}_spec.rb" ] }
+ watch('spec/spec_helper.rb') { "spec" }
+end
22 LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2012 Yi Wen
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 README.md
@@ -0,0 +1,29 @@
+# PivotalToPdf::Formatters
+
+TODO: Write a gem description
+
+## Installation
+
+Add this line to your application's Gemfile:
+
+ gem 'pivotal_to_pdf-formatters'
+
+And then execute:
+
+ $ bundle
+
+Or install it yourself as:
+
+ $ gem install pivotal_to_pdf-formatters
+
+## Usage
+
+TODO: Write usage instructions here
+
+## Contributing
+
+1. Fork it
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Added some feature'`)
+4. Push to the branch (`git push origin my-new-feature`)
+5. Create new Pull Request
3  Rakefile
@@ -0,0 +1,3 @@
+#!/usr/bin/env rake
+require "bundler/gem_tasks"
+Dir["#{File.dirname(__FILE__)}/tasks/**/*.rb"].each {|f| require f}
7 lib/pivotal_to_pdf-formatters.rb
@@ -0,0 +1,7 @@
+require "pivotal_to_pdf-formatters/version"
+
+module PivotalToPdf
+ module Formatters
+ # Your code goes here...
+ end
+end
5 lib/pivotal_to_pdf-formatters/version.rb
@@ -0,0 +1,5 @@
+module PivotalToPdf
+ module Formatters
+ VERSION = "0.0.1"
+ end
+end
25 pivotal_to_pdf-formatters.gemspec
@@ -0,0 +1,25 @@
+# -*- encoding: utf-8 -*-
+require File.expand_path('../lib/pivotal_to_pdf-formatters/version', __FILE__)
+
+Gem::Specification.new do |gem|
+ gem.authors = ["Yi Wen"]
+ gem.email = ["hayafirst@gmail.com"]
+ gem.description = %q{TODO: Write a gem description}
+ gem.summary = %q{TODO: Write a gem summary}
+ gem.homepage = ""
+
+ gem.files = `git ls-files`.split($\)
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
+ gem.name = "pivotal_to_pdf-formatters"
+ gem.require_paths = ["lib"]
+ gem.version = PivotalToPdf::Formatters::VERSION
+ gem.add_development_dependency(%q<rspec>)
+ gem.add_development_dependency(%q<rake>)
+ gem.add_development_dependency(%q<guard-spork>)
+ gem.add_development_dependency(%q<guard-rspec>)
+ gem.add_development_dependency(%q<tailor>, "0.1.5")
+ gem.add_development_dependency(%q<cane>)
+ gem.add_development_dependency(%q<simplecov>)
+ gem.add_development_dependency(%q<growl-rspec>)
+end
30 spec/spec_helper.rb
@@ -0,0 +1,30 @@
+require 'simplecov'
+SimpleCov.start do
+ SimpleCov.at_exit do
+ threshold = 100
+ SimpleCov.result.format!
+ if SimpleCov.result.covered_percent != threshold
+ actual_coverage = SimpleCov.result.covered_percent
+ puts "The coverage is #{actual_coverage}%. It has to be 100%"
+ exit 1
+ end
+ end
+end
+require 'spork'
+require 'guard/spork'
+
+Spork.prefork do
+ require 'rspec/core'
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
+ require "#{File.dirname(__FILE__)}/../lib/pivotal_to_pdf-formatters"
+
+ RSpec.configure do |config|
+ config.mock_with :rspec
+ end
+end
+
+Spork.each_run do
+ load "#{File.dirname(__FILE__)}/../lib/pivotal_to_pdf-formatters.rb"
+ Dir["#{File.dirname(__FILE__)}/../lib/pivotal_to_pdf-formatters/*.rb"].each {|f| load f}
+end
+
24 tasks/ci.rb
@@ -0,0 +1,24 @@
+begin
+ require 'rspec/core'
+ require 'rspec/core/rake_task'
+
+ require 'cane/rake_task'
+ task :ci => [
+ 'cruise_spec',
+ 'quality'
+ ]
+
+ desc "Run cane to check quality metrics"
+ Cane::RakeTask.new(:quality) do |cane|
+ cane.abc_max = 10
+ cane.no_doc = true
+ end
+ desc "Run all specs in spec directory (excluding plugin specs)"
+ RSpec::Core::RakeTask.new(:cruise_spec) do |t|
+ out = File.join(File.expand_path(File.dirname(__FILE__)), "..","test_reports/Rspec.html")
+ t.rspec_opts = ["--format", "html", "-o", out, "--format", "progress"]
+ excluded_paths = ['bundle', 'spec', 'config/boot.rb', '/var/', '/usr']
+ t.pattern = "spec/**/*_spec.rb"
+ end
+rescue LoadError => e
+end
17 tasks/rspec.rb
@@ -0,0 +1,17 @@
+begin
+ require 'rspec/core'
+ require 'rspec/core/rake_task'
+
+ spec_prereq = :noop
+ task :noop do
+ end
+
+ desc "Run all specs in spec directory (excluding plugin specs)"
+ RSpec::Core::RakeTask.new(:spec => spec_prereq) do |t|
+ t.rspec_opts = ["--format", "documentation"]
+ t.pattern = "spec/**/*_spec.rb"
+ end
+
+rescue LoadError => e
+ p e
+end
Please sign in to comment.
Something went wrong with that request. Please try again.