stitch-rb 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -2,3 +2,4 @@
2
2
  .bundle
3
3
  Gemfile.lock
4
4
  pkg/*
5
+ .DS_Store
data/README.md CHANGED
@@ -30,7 +30,7 @@ Stitch includes a basic Rack server, for example this is how you'd use it with R
30
30
 
31
31
  Compilers need to inherit from `Stitch::Compiler`. They're very simple, for example:
32
32
 
33
- class jQueryTmplCompiler < Stitch::Compiler
33
+ class TmplCompiler < Stitch::Compiler
34
34
  # List of supported extensions
35
35
  extensions :tmpl
36
36
 
@@ -0,0 +1,2 @@
1
+ # The Gem is called stitch-rb (due to a conflict), but the library is called Stitch
2
+ require File.join(File.dirname(__FILE__), "stitch")
@@ -8,8 +8,8 @@ module Stitch
8
8
  false
9
9
  end
10
10
 
11
- def compile(filename)
12
- source = File.read(filename)
11
+ def compile(path)
12
+ source = File.read(path)
13
13
  CoffeeScript.compile(source)
14
14
  end
15
15
  end
@@ -2,8 +2,8 @@ module Stitch
2
2
  class JavaScriptCompiler < Compiler
3
3
  extensions :js
4
4
 
5
- def compile(filename)
6
- File.read(filename)
5
+ def compile(path)
6
+ File.read(path)
7
7
  end
8
8
  end
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module Stitch
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: stitch-rb
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Alex MacCaw
@@ -33,6 +33,7 @@ files:
33
33
  - examples/app/controllers/controller.coffee
34
34
  - examples/compile.rb
35
35
  - examples/lib/jquery.js
36
+ - lib/stitch-rb.rb
36
37
  - lib/stitch.rb
37
38
  - lib/stitch/compiler.rb
38
39
  - lib/stitch/compilers/coffeescript.rb