awestruct 0.4.4 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,4 +5,7 @@ $: << File.dirname(__FILE__) + '/../lib'
5
5
  require 'rubygems'
6
6
  require 'awestruct/cli/invoker'
7
7
 
8
- Awestruct::CLI::Invoker.new( ARGV ).invoke!
8
+ invoker = Awestruct::CLI::Invoker.new( ARGV )
9
+ invoker.invoke!
10
+
11
+ invoker.success ? exit(0) : exit(-1)
@@ -20,6 +20,7 @@ module Awestruct
20
20
  rescue =>e
21
21
  puts e
22
22
  puts e.backtrace
23
+ return false
23
24
  end
24
25
  end
25
26
  end
@@ -11,6 +11,7 @@ module Awestruct
11
11
  mkdir( '_ext' )
12
12
  copy_file( '_ext/pipeline.rb', File.join( File.dirname(__FILE__), '/../frameworks/base_pipeline.rb' ) )
13
13
  mkdir( 'stylesheets' )
14
+ touch_file( '.awestruct_ignore' )
14
15
  }
15
16
 
16
17
  def initialize(dir=Dir.pwd,framework='compass',scaffold=true)
@@ -16,6 +16,7 @@ module Awestruct
16
16
 
17
17
  attr_reader :config
18
18
  attr_reader :profile
19
+ attr_reader :success
19
20
 
20
21
  def initialize(*options)
21
22
  options = options.flatten
@@ -26,6 +27,7 @@ module Awestruct
26
27
  end
27
28
  @threads = []
28
29
  @profile = nil
30
+ @success = true
29
31
  end
30
32
 
31
33
  def invoke!
@@ -42,6 +44,7 @@ module Awestruct
42
44
  invoke_auto() if ( options.auto )
43
45
 
44
46
  wait_for_completion()
47
+ success
45
48
  end
46
49
 
47
50
  def load_profile()
@@ -90,7 +93,7 @@ module Awestruct
90
93
  end
91
94
 
92
95
  def invoke_generate()
93
- Awestruct::CLI::Generate.new( config, profile, options.base_url, 'http://localhost:4242', options.force ).run
96
+ @success = Awestruct::CLI::Generate.new( config, options.profile, options.base_url, 'http://localhost:4242', options.force ).run
94
97
  end
95
98
 
96
99
  def invoke_deploy()
@@ -4,6 +4,7 @@ require 'awestruct/version'
4
4
 
5
5
  module Awestruct
6
6
  module CLI
7
+
7
8
  class Options
8
9
 
9
10
  attr_accessor :generate
@@ -41,7 +41,7 @@ module Awestruct
41
41
  doc = Hpricot( text )
42
42
 
43
43
  doc.search( "//a" ).each do |a|
44
- a['href'] = fix_url( base_url, a['href'] )
44
+ a['href'] = fix_url( base_url, a['href'] ) if a['href']
45
45
  end
46
46
  doc.search( "//link" ).each do |link|
47
47
  link['href'] = fix_url( base_url, link['href'] )
@@ -1,4 +1,5 @@
1
1
  require 'awestruct/deployers'
2
+ require 'git'
2
3
 
3
4
  module Awestruct
4
5
  module Deploy
@@ -15,7 +16,7 @@ module Awestruct
15
16
 
16
17
  private
17
18
  def git
18
- @git ||= Git.open('.')
19
+ @git ||= ::Git.open('.')
19
20
  end
20
21
 
21
22
  def publish_site
@@ -34,7 +35,7 @@ module Awestruct
34
35
  git.add(".")
35
36
  begin
36
37
  git.commit("Published #{@branch} to GitHub pages.")
37
- rescue Git::GitExecuteError => e
38
+ rescue ::Git::GitExecuteError => e
38
39
  $stderr.puts "Can't commit. #{e}."
39
40
  end
40
41
  end
@@ -7,13 +7,13 @@ module Awestruct
7
7
  class RSyncDeploy
8
8
 
9
9
  def initialize(site_config, deploy_config)
10
- @site_path = File.join( site_config.output_dir, '/' )
10
+ @site_path = File.join( site_config.output_dir, '/' ).gsub(/^\w:\//, '/')
11
11
  @host = deploy_config['host']
12
12
  @path = File.join( deploy_config['path'], '/' )
13
13
  end
14
14
 
15
15
  def run
16
- cmd = "rsync -r -l -i --no-p --no-g --chmod=Dg+s,ug+w --delete #{@site_path} #{@host}:#{@path}"
16
+ cmd = "rsync -r -l -i --no-p --no-g --chmod=Dg+sx,ug+rw --delete #{@site_path} #{@host}:#{@path}"
17
17
  Open3.popen3( cmd ) do |stdin, stdout, stderr|
18
18
  stdin.close
19
19
  threads = []
@@ -1,4 +1,4 @@
1
-
1
+ require 'awestruct/handler_chain'
2
2
  require 'open3'
3
3
 
4
4
  module Awestruct
@@ -1,4 +1,3 @@
1
-
2
1
  require 'awestruct/handlers/base_handler'
3
2
  require 'awestruct/handlers/file_handler'
4
3
  require 'awestruct/handlers/front_matter_handler'
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Awestruct
3
- VERSION='0.4.4'
3
+ VERSION='0.4.5'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awestruct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-14 00:00:00.000000000 -04:00
13
- default_executable:
12
+ date: 2012-07-02 00:00:00.000000000Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: hpricot
17
- requirement: &70224754730200 !ruby/object:Gem::Requirement
16
+ requirement: &70315235798680 !ruby/object:Gem::Requirement
18
17
  none: false
19
18
  requirements:
20
19
  - - ~>
@@ -22,10 +21,10 @@ dependencies:
22
21
  version: 0.8.6
23
22
  type: :runtime
24
23
  prerelease: false
25
- version_requirements: *70224754730200
24
+ version_requirements: *70315235798680
26
25
  - !ruby/object:Gem::Dependency
27
26
  name: haml
28
- requirement: &70224754729600 !ruby/object:Gem::Requirement
27
+ requirement: &70315235798060 !ruby/object:Gem::Requirement
29
28
  none: false
30
29
  requirements:
31
30
  - - ~>
@@ -33,10 +32,10 @@ dependencies:
33
32
  version: 3.1.4
34
33
  type: :runtime
35
34
  prerelease: false
36
- version_requirements: *70224754729600
35
+ version_requirements: *70315235798060
37
36
  - !ruby/object:Gem::Dependency
38
37
  name: sass
39
- requirement: &70224754728920 !ruby/object:Gem::Requirement
38
+ requirement: &70315235797480 !ruby/object:Gem::Requirement
40
39
  none: false
41
40
  requirements:
42
41
  - - ~>
@@ -44,10 +43,10 @@ dependencies:
44
43
  version: 3.1.15
45
44
  type: :runtime
46
45
  prerelease: false
47
- version_requirements: *70224754728920
46
+ version_requirements: *70315235797480
48
47
  - !ruby/object:Gem::Dependency
49
48
  name: rdiscount
50
- requirement: &70224754728280 !ruby/object:Gem::Requirement
49
+ requirement: &70315235796900 !ruby/object:Gem::Requirement
51
50
  none: false
52
51
  requirements:
53
52
  - - ~>
@@ -55,10 +54,10 @@ dependencies:
55
54
  version: 1.6.8
56
55
  type: :runtime
57
56
  prerelease: false
58
- version_requirements: *70224754728280
57
+ version_requirements: *70315235796900
59
58
  - !ruby/object:Gem::Dependency
60
59
  name: RedCloth
61
- requirement: &70224754727620 !ruby/object:Gem::Requirement
60
+ requirement: &70315235796300 !ruby/object:Gem::Requirement
62
61
  none: false
63
62
  requirements:
64
63
  - - ~>
@@ -66,10 +65,10 @@ dependencies:
66
65
  version: 4.2.9
67
66
  type: :runtime
68
67
  prerelease: false
69
- version_requirements: *70224754727620
68
+ version_requirements: *70315235796300
70
69
  - !ruby/object:Gem::Dependency
71
70
  name: coffee-script
72
- requirement: &70224754727000 !ruby/object:Gem::Requirement
71
+ requirement: &70315235795660 !ruby/object:Gem::Requirement
73
72
  none: false
74
73
  requirements:
75
74
  - - ~>
@@ -77,10 +76,10 @@ dependencies:
77
76
  version: 2.2.0
78
77
  type: :runtime
79
78
  prerelease: false
80
- version_requirements: *70224754727000
79
+ version_requirements: *70315235795660
81
80
  - !ruby/object:Gem::Dependency
82
81
  name: nokogiri
83
- requirement: &70224754726000 !ruby/object:Gem::Requirement
82
+ requirement: &70315235795100 !ruby/object:Gem::Requirement
84
83
  none: false
85
84
  requirements:
86
85
  - - ~>
@@ -88,10 +87,10 @@ dependencies:
88
87
  version: 1.5.2
89
88
  type: :runtime
90
89
  prerelease: false
91
- version_requirements: *70224754726000
90
+ version_requirements: *70315235795100
92
91
  - !ruby/object:Gem::Dependency
93
92
  name: compass
94
- requirement: &70224754725220 !ruby/object:Gem::Requirement
93
+ requirement: &70315235794540 !ruby/object:Gem::Requirement
95
94
  none: false
96
95
  requirements:
97
96
  - - ~>
@@ -99,10 +98,10 @@ dependencies:
99
98
  version: 0.12.1
100
99
  type: :runtime
101
100
  prerelease: false
102
- version_requirements: *70224754725220
101
+ version_requirements: *70315235794540
103
102
  - !ruby/object:Gem::Dependency
104
103
  name: compass-960-plugin
105
- requirement: &70224754724420 !ruby/object:Gem::Requirement
104
+ requirement: &70315235793960 !ruby/object:Gem::Requirement
106
105
  none: false
107
106
  requirements:
108
107
  - - ~>
@@ -110,10 +109,10 @@ dependencies:
110
109
  version: 0.10.4
111
110
  type: :runtime
112
111
  prerelease: false
113
- version_requirements: *70224754724420
112
+ version_requirements: *70315235793960
114
113
  - !ruby/object:Gem::Dependency
115
114
  name: bootstrap-sass
116
- requirement: &70224754723840 !ruby/object:Gem::Requirement
115
+ requirement: &70315235793400 !ruby/object:Gem::Requirement
117
116
  none: false
118
117
  requirements:
119
118
  - - ~>
@@ -121,10 +120,10 @@ dependencies:
121
120
  version: 2.0.1
122
121
  type: :runtime
123
122
  prerelease: false
124
- version_requirements: *70224754723840
123
+ version_requirements: *70315235793400
125
124
  - !ruby/object:Gem::Dependency
126
125
  name: org-ruby
127
- requirement: &70224754723200 !ruby/object:Gem::Requirement
126
+ requirement: &70315235792840 !ruby/object:Gem::Requirement
128
127
  none: false
129
128
  requirements:
130
129
  - - ~>
@@ -132,10 +131,10 @@ dependencies:
132
131
  version: 0.5.3
133
132
  type: :runtime
134
133
  prerelease: false
135
- version_requirements: *70224754723200
134
+ version_requirements: *70315235792840
136
135
  - !ruby/object:Gem::Dependency
137
136
  name: json
138
- requirement: &70224754722620 !ruby/object:Gem::Requirement
137
+ requirement: &70315235792240 !ruby/object:Gem::Requirement
139
138
  none: false
140
139
  requirements:
141
140
  - - ~>
@@ -143,10 +142,10 @@ dependencies:
143
142
  version: 1.6.6
144
143
  type: :runtime
145
144
  prerelease: false
146
- version_requirements: *70224754722620
145
+ version_requirements: *70315235792240
147
146
  - !ruby/object:Gem::Dependency
148
147
  name: git
149
- requirement: &70224754721880 !ruby/object:Gem::Requirement
148
+ requirement: &70315235791640 !ruby/object:Gem::Requirement
150
149
  none: false
151
150
  requirements:
152
151
  - - ~>
@@ -154,10 +153,10 @@ dependencies:
154
153
  version: 1.2.5
155
154
  type: :runtime
156
155
  prerelease: false
157
- version_requirements: *70224754721880
156
+ version_requirements: *70315235791640
158
157
  - !ruby/object:Gem::Dependency
159
158
  name: listen
160
- requirement: &70224754721200 !ruby/object:Gem::Requirement
159
+ requirement: &70315235778580 !ruby/object:Gem::Requirement
161
160
  none: false
162
161
  requirements:
163
162
  - - ~>
@@ -165,10 +164,10 @@ dependencies:
165
164
  version: 0.4.2
166
165
  type: :runtime
167
166
  prerelease: false
168
- version_requirements: *70224754721200
167
+ version_requirements: *70315235778580
169
168
  - !ruby/object:Gem::Dependency
170
169
  name: thin
171
- requirement: &70224754720680 !ruby/object:Gem::Requirement
170
+ requirement: &70315235778100 !ruby/object:Gem::Requirement
172
171
  none: false
173
172
  requirements:
174
173
  - - ~>
@@ -176,10 +175,10 @@ dependencies:
176
175
  version: 1.3.1
177
176
  type: :runtime
178
177
  prerelease: false
179
- version_requirements: *70224754720680
178
+ version_requirements: *70315235778100
180
179
  - !ruby/object:Gem::Dependency
181
180
  name: eventmachine
182
- requirement: &70224754719680 !ruby/object:Gem::Requirement
181
+ requirement: &70315235777640 !ruby/object:Gem::Requirement
183
182
  none: false
184
183
  requirements:
185
184
  - - ~>
@@ -187,40 +186,7 @@ dependencies:
187
186
  version: 1.0.0.beta.4
188
187
  type: :runtime
189
188
  prerelease: false
190
- version_requirements: *70224754719680
191
- - !ruby/object:Gem::Dependency
192
- name: hashery
193
- requirement: &70224754704220 !ruby/object:Gem::Requirement
194
- none: false
195
- requirements:
196
- - - ~>
197
- - !ruby/object:Gem::Version
198
- version: 1.5.0
199
- type: :development
200
- prerelease: false
201
- version_requirements: *70224754704220
202
- - !ruby/object:Gem::Dependency
203
- name: rspec
204
- requirement: &70224754702240 !ruby/object:Gem::Requirement
205
- none: false
206
- requirements:
207
- - - ~>
208
- - !ruby/object:Gem::Version
209
- version: '2.9'
210
- type: :development
211
- prerelease: false
212
- version_requirements: *70224754702240
213
- - !ruby/object:Gem::Dependency
214
- name: rake
215
- requirement: &70224754700840 !ruby/object:Gem::Requirement
216
- none: false
217
- requirements:
218
- - - ~>
219
- - !ruby/object:Gem::Version
220
- version: 0.9.2
221
- type: :development
222
- prerelease: false
223
- version_requirements: *70224754700840
189
+ version_requirements: *70315235777640
224
190
  description: Awestruct is a framework for creating static HTML sites.
225
191
  email: bob@mcwhirter.org
226
192
  executables:
@@ -310,7 +276,6 @@ files:
310
276
  - lib/awestruct/frameworks/bootstrap/base_index.html.haml
311
277
  - lib/awestruct/frameworks/bootstrap/base_layout.html.haml
312
278
  - bin/awestruct
313
- has_rdoc: true
314
279
  homepage: http://awestruct.org
315
280
  licenses: []
316
281
  post_install_message:
@@ -325,7 +290,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
325
290
  version: '0'
326
291
  segments:
327
292
  - 0
328
- hash: -1329152766291393664
293
+ hash: 458356617094483761
329
294
  required_rubygems_version: !ruby/object:Gem::Requirement
330
295
  none: false
331
296
  requirements:
@@ -334,10 +299,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
334
299
  version: '0'
335
300
  segments:
336
301
  - 0
337
- hash: -1329152766291393664
302
+ hash: 458356617094483761
338
303
  requirements: []
339
304
  rubyforge_project:
340
- rubygems_version: 1.6.2
305
+ rubygems_version: 1.8.10
341
306
  signing_key:
342
307
  specification_version: 3
343
308
  summary: Static site-baking utility