stitch-rb 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/stitch.rb +0 -1
- data/lib/stitch/compilers/coffeescript.rb +1 -1
- data/lib/stitch/package.rb +1 -1
- data/lib/stitch/version.rb +1 -1
- metadata +20 -32
- data/lib/stitch/dependency.rb +0 -44
data/lib/stitch.rb
CHANGED
data/lib/stitch/package.rb
CHANGED
data/lib/stitch/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,23 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: stitch-rb
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.5
|
4
5
|
prerelease:
|
5
|
-
version: 0.0.4
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Alex MacCaw
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
date: 2011-07-19 00:00:00 -04:00
|
14
|
-
default_executable:
|
12
|
+
date: 2011-10-19 00:00:00.000000000Z
|
15
13
|
dependencies: []
|
16
|
-
|
17
14
|
description: A JavaScript package manager
|
18
|
-
email:
|
15
|
+
email:
|
19
16
|
- maccman@gmail.com
|
20
17
|
executables: []
|
21
|
-
|
22
18
|
extensions: []
|
23
|
-
|
24
19
|
extra_rdoc_files: []
|
25
|
-
|
26
|
-
files:
|
20
|
+
files:
|
27
21
|
- .gitignore
|
28
22
|
- Gemfile
|
29
23
|
- LICENSE
|
@@ -40,39 +34,33 @@ files:
|
|
40
34
|
- lib/stitch/compilers/coffeescript.rb
|
41
35
|
- lib/stitch/compilers/javascript.rb
|
42
36
|
- lib/stitch/compilers/tmpl.rb
|
43
|
-
- lib/stitch/dependency.rb
|
44
37
|
- lib/stitch/package.rb
|
45
38
|
- lib/stitch/server.rb
|
46
39
|
- lib/stitch/source.rb
|
47
40
|
- lib/stitch/version.rb
|
48
41
|
- stitch.gemspec
|
49
|
-
|
50
|
-
homepage: ""
|
42
|
+
homepage: ''
|
51
43
|
licenses: []
|
52
|
-
|
53
44
|
post_install_message:
|
54
45
|
rdoc_options: []
|
55
|
-
|
56
|
-
require_paths:
|
46
|
+
require_paths:
|
57
47
|
- lib
|
58
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
59
49
|
none: false
|
60
|
-
requirements:
|
61
|
-
- -
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version:
|
64
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
55
|
none: false
|
66
|
-
requirements:
|
67
|
-
- -
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version:
|
56
|
+
requirements:
|
57
|
+
- - ! '>='
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
70
60
|
requirements: []
|
71
|
-
|
72
61
|
rubyforge_project:
|
73
|
-
rubygems_version: 1.6
|
62
|
+
rubygems_version: 1.8.6
|
74
63
|
signing_key:
|
75
64
|
specification_version: 3
|
76
65
|
summary: Stitch ported to Ruby
|
77
66
|
test_files: []
|
78
|
-
|
data/lib/stitch/dependency.rb
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
require "pathname"
|
2
|
-
|
3
|
-
module Stitch
|
4
|
-
class Dependency
|
5
|
-
class << self
|
6
|
-
def from_path(path, result = [])
|
7
|
-
path = Pathname.new(path)
|
8
|
-
|
9
|
-
if path.directory?
|
10
|
-
path.children.each do |child|
|
11
|
-
from_path(child, result)
|
12
|
-
end
|
13
|
-
else
|
14
|
-
dependency = self.new(path)
|
15
|
-
result << dependency if dependency.valid?
|
16
|
-
end
|
17
|
-
result
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
attr_reader :path
|
22
|
-
|
23
|
-
def initialize(path)
|
24
|
-
@path = Pathname.new(path)
|
25
|
-
end
|
26
|
-
|
27
|
-
def ext
|
28
|
-
path.extname
|
29
|
-
end
|
30
|
-
|
31
|
-
def compile
|
32
|
-
compiler.compile(path)
|
33
|
-
end
|
34
|
-
|
35
|
-
def valid?
|
36
|
-
!!compiler
|
37
|
-
end
|
38
|
-
|
39
|
-
protected
|
40
|
-
def compiler
|
41
|
-
Compiler.for_extension(ext)
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|