From 05826cd1d4b398c99c3536accb9cdc00943f87ed Mon Sep 17 00:00:00 2001 From: Darren Wallace Date: Wed, 1 Jun 2011 10:41:54 +0100 Subject: [PATCH] NOT Working, pushing to git hub to ask for help --- .rvmrc | 1 + LICENSE | 0 README.md | 0 guard-krammer.gemspec | 17 +++++---- lib/guard/krammer.rb | 52 +++++++++++++++++++++++++-- lib/guard/krammer/templates/Guardfile | 2 +- lib/guard/krammer/version.rb | 2 +- spec/source_docs/tester.md | 10 ++++++ 8 files changed, 73 insertions(+), 11 deletions(-) create mode 100644 .rvmrc create mode 100644 LICENSE create mode 100644 README.md create mode 100644 spec/source_docs/tester.md diff --git a/.rvmrc b/.rvmrc new file mode 100644 index 0000000..2268c83 --- /dev/null +++ b/.rvmrc @@ -0,0 +1 @@ +rvm --create 1.9.2@guard-krammer diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/guard-krammer.gemspec b/guard-krammer.gemspec index 947feb0..bfcdd87 100644 --- a/guard-krammer.gemspec +++ b/guard-krammer.gemspec @@ -1,22 +1,27 @@ # -*- encoding: utf-8 -*- $:.push File.expand_path("../lib", __FILE__) -require "guard/guard-krammer/version" +require "guard/krammer/version" Gem::Specification.new do |s| s.name = "guard-krammer" - s.version = Guard::Krammer::VERSION + s.version = Guard::KrammerVersion::VERSION s.authors = ["Darren Wallace"] s.email = ["wallace@midweekcrisis.com"] - s.homepage = "" + s.homepage = "http://www.cdsm.co.uk" s.summary = %q{Markdown folder > html folder conversion} s.description = %q{Watches a source folder and converts markdown docs to html docs in a target folder} s.rubyforge_project = "guard-krammer" - s.files = `git ls-files`.split("\n") + # s.files = `git ls-files`.split("\n") # Bundler created line + s.files = Dir.glob('{lib}/**/*') + %w[LICENSE README.md] # copied from guard examples s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } - s.require_paths = ["lib"] + s.require_paths = ["lib"] + s.add_dependency 'guard', '>= 0.2.2' + s.add_dependency 'kramdown', '~> 0.13.3' -end + s.add_development_dependency 'bundler', '~> 1.0' + s.add_development_dependency 'rspec', '~> 2.5' +end \ No newline at end of file diff --git a/lib/guard/krammer.rb b/lib/guard/krammer.rb index c3d535b..3205a68 100644 --- a/lib/guard/krammer.rb +++ b/lib/guard/krammer.rb @@ -1,7 +1,53 @@ -require "guard-krammer/version" +require "krammer/version" + +require 'guard' +require 'guard/guard' module Guard - module Krammer - # Your code goes here... + class Krammer < Guard + + def initialize(watchers=[], options={}) + super + # init stuff here, thx! + end + + # ================= + # = Guard methods = + # ================= + + # If one of those methods raise an exception, the Guard::GuardName instance + # will be removed from the active guards. + + # Called once when Guard starts + # Please override initialize method to init stuff + def start + true + end + + # Called on Ctrl-C signal (when Guard quits) + def stop + true + end + + # Called on Ctrl-Z signal + # This method should be mainly used for "reload" (really!) actions like reloading passenger/spork/bundler/... + def reload + true + end + + # Called on Ctrl-\ signal + # This method should be principally used for long action like running all specs/tests/... + def run_all + true + end + + # Called on file(s) modifications + def run_on_change(pathss) + paths.each do |path| + puts path + end + true + end + end end diff --git a/lib/guard/krammer/templates/Guardfile b/lib/guard/krammer/templates/Guardfile index 448e8b8..79a14ba 100644 --- a/lib/guard/krammer/templates/Guardfile +++ b/lib/guard/krammer/templates/Guardfile @@ -1,4 +1,4 @@ -guard 'krammer' +guard 'Krammer' watch(%r{^source_docs/.+\.md}) watch(%r{^source_docs/.+\.markdown}) end \ No newline at end of file diff --git a/lib/guard/krammer/version.rb b/lib/guard/krammer/version.rb index da8fda4..729f2ab 100644 --- a/lib/guard/krammer/version.rb +++ b/lib/guard/krammer/version.rb @@ -1,5 +1,5 @@ module Guard - module Krammer + module KrammerVersion VERSION = "0.0.1" end end diff --git a/spec/source_docs/tester.md b/spec/source_docs/tester.md new file mode 100644 index 0000000..88d03fb --- /dev/null +++ b/spec/source_docs/tester.md @@ -0,0 +1,10 @@ +# i40 Background +The all-new Hyundai i40 is an outstanding product. It is another new car from Hyundai that will change perceptions of the brand. +![](./assets/Hyundai-i40-wagon-renderings-price.jpg) +The i40 will act as the new brand ambassador, while at the same time attracting new customers to the brand - both private and fleet. Production began in April with the i40 Wagon first appearing in showrooms from summer 2011, with the i40 Sedan, which debuted at the Barcelona Motorshow on the 12th May, following later in the year. +![](./assets/i40 sedan.jpg) +Hyundai Motor Europe Vice President Allan Rushforth explains that.."The i40 sedan shares the same qualities found in the wagon, including outstanding levels of fuel-efficiency, comfort, and quality, and broadens the appeal of the i40 to buyers in the D-segment." +![](./assets/NEW_Allan%252520Rushforth_20070905124945.jpg) +The i-flow Concept, which the i40 is derived from, brought new ideas and a pioneering form to the traditional European D-segment. The dramatically-sculpted forms of the interior and exterior made for a striking sports sedan, with an athletic stance. +![](./assets/hyundai-1 iflow.jpg) +The name i-flow reflected the exceptionally aerodynamic shape and the flowing lines of the concept car's eye-catching styling. The i40 draws on the Hyundai i-flow Concept's sleek styling and innovative technology. Continue on to learn more about Hyundai's new brand direction.