weaver 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/weaver +40 -0
- data/lib/weaver/version.rb +1 -1
- data/weaver.gemspec +3 -3
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d88d0dc074e3954041492b855be991e9cdacef6
|
4
|
+
data.tar.gz: dacf007842eabf908bef78d8984427d76e55e5cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e1a371e48c8496132c37b65e7cf35ee0655d12c8e971589a59f010c706ac6db3d36631b2195538a466aec02f790eca97ec8479a7540c8d3692dd6b1b24317b1
|
7
|
+
data.tar.gz: 4ea7df7572c677ff81426ce74b0c389ae4f5e2553913ddb13d2415f34dcb01b5b284e43a1e8881dc99a14f4fc24ac51a24391bdd3237fb720663fa1e3d908b72
|
data/bin/weaver
CHANGED
@@ -118,9 +118,49 @@ def preview!
|
|
118
118
|
Website.run!
|
119
119
|
end
|
120
120
|
|
121
|
+
def create!(args)
|
122
|
+
|
123
|
+
if args.length != 1
|
124
|
+
puts "Usage: weaver create <folder>"
|
125
|
+
return
|
126
|
+
end
|
127
|
+
|
128
|
+
gemfile = <<-GEMFILE
|
129
|
+
source 'https://rubygems.org'
|
130
|
+
|
131
|
+
gem 'weaver', '~> #{Weaver::VERSION}'
|
132
|
+
GEMFILE
|
133
|
+
|
134
|
+
source = <<-SOURCE
|
135
|
+
topnav_page "", "My first weaver page" do
|
136
|
+
header do
|
137
|
+
col 12 do
|
138
|
+
h1 "Main page"
|
139
|
+
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
row do
|
144
|
+
col 12 do
|
145
|
+
h2 "Examples"
|
146
|
+
p "Some content"
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
SOURCE
|
151
|
+
|
152
|
+
to_create = "#{args[0]}"
|
153
|
+
FileUtils::mkdir_p "#{to_create}"
|
154
|
+
FileUtils::mkdir_p "#{to_create}/source"
|
155
|
+
File.write "#{to_create}/Gemfile", gemfile
|
156
|
+
File.write "#{to_create}/source/index.weave", source
|
157
|
+
end
|
158
|
+
|
121
159
|
command = ARGV.shift
|
122
160
|
if command == "build"
|
123
161
|
build!(ARGV)
|
162
|
+
elsif command == "create"
|
163
|
+
create!(ARGV)
|
124
164
|
else
|
125
165
|
preview!
|
126
166
|
end
|
data/lib/weaver/version.rb
CHANGED
data/weaver.gemspec
CHANGED
@@ -22,14 +22,14 @@ Gem::Specification.new do |spec|
|
|
22
22
|
raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
23
23
|
end
|
24
24
|
|
25
|
-
spec.add_dependency "sinatra"
|
26
|
-
spec.add_dependency "trollop"
|
27
|
-
|
28
25
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
29
26
|
spec.bindir = "bin"
|
30
27
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
31
28
|
spec.require_paths = ["lib"]
|
32
29
|
|
30
|
+
spec.add_dependency "sinatra"
|
31
|
+
spec.add_dependency "trollop"
|
32
|
+
|
33
33
|
spec.add_development_dependency "bundler", "~> 1.9"
|
34
34
|
spec.add_development_dependency "rake", "~> 10.0"
|
35
35
|
end
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weaver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Siaw
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11
|
11
|
+
date: 2015-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: trollop
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.9'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.9'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '10.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '10.0'
|
69
69
|
description: Site generator with a simple DSL
|
@@ -76,9 +76,9 @@ executables:
|
|
76
76
|
extensions: []
|
77
77
|
extra_rdoc_files: []
|
78
78
|
files:
|
79
|
-
-
|
80
|
-
-
|
81
|
-
-
|
79
|
+
- .gitignore
|
80
|
+
- .rspec
|
81
|
+
- .travis.yml
|
82
82
|
- CODE_OF_CONDUCT.md
|
83
83
|
- Gemfile
|
84
84
|
- LICENSE.txt
|
@@ -653,17 +653,17 @@ require_paths:
|
|
653
653
|
- lib
|
654
654
|
required_ruby_version: !ruby/object:Gem::Requirement
|
655
655
|
requirements:
|
656
|
-
- -
|
656
|
+
- - '>='
|
657
657
|
- !ruby/object:Gem::Version
|
658
658
|
version: '0'
|
659
659
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
660
660
|
requirements:
|
661
|
-
- -
|
661
|
+
- - '>='
|
662
662
|
- !ruby/object:Gem::Version
|
663
663
|
version: '0'
|
664
664
|
requirements: []
|
665
665
|
rubyforge_project:
|
666
|
-
rubygems_version: 2.4.
|
666
|
+
rubygems_version: 2.4.7
|
667
667
|
signing_key:
|
668
668
|
specification_version: 4
|
669
669
|
summary: Website generator
|