awestruct 0.2.14 → 0.2.15

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.
@@ -11,6 +11,7 @@ require 'awestruct/commands/server'
11
11
  require 'awestruct/commands/deploy'
12
12
  require 'yaml'
13
13
  require 'fssm'
14
+ require 'fileutils'
14
15
 
15
16
  def parse(args)
16
17
  options = OpenStruct.new( {
@@ -94,9 +95,8 @@ def parse(args)
94
95
  exit
95
96
  end
96
97
 
97
-
98
98
  end
99
-
99
+
100
100
  opts.parse!(args)
101
101
  options
102
102
  end
@@ -128,7 +128,6 @@ unless options.init
128
128
  end
129
129
 
130
130
  config = Awestruct::Config.new(Dir.pwd)
131
- # config.input_dir = File.join(Dir.pwd, '_root')
132
131
 
133
132
  if ( options.init )
134
133
  if ( options.generate || options.auto || options.server )
@@ -147,7 +146,7 @@ def camelize(str)
147
146
  end
148
147
 
149
148
  if ( options.script )
150
- puts "Running #{options.script} and exiting"
149
+ puts "Running #{options.script} and exiting"
151
150
  require "awestruct/scripts/#{options.script}"
152
151
  script_class = eval "Awestruct::Scripts::#{camelize(options.script)}"
153
152
  script = script_class.new(*ARGV)
@@ -160,6 +159,12 @@ if ( options.server )
160
159
  default_base_url = "http://#{hostname}:#{options.port}"
161
160
  end
162
161
 
162
+ if ( options.force )
163
+ if File.exist?( site_path )
164
+ FileUtils.rmdir( site_path )
165
+ end
166
+ end
167
+
163
168
  if ( options.generate )
164
169
  cmd = Awestruct::Commands::Generate.new( config, options.profile, options.base_url, default_base_url, options.force )
165
170
  cmd.run
@@ -0,0 +1,17 @@
1
+ require 'open-uri'
2
+
3
+ module Awestruct
4
+ module Extensions
5
+ module RemotePartial
6
+
7
+ def remotePartial(url)
8
+
9
+ page = open(url)
10
+ return nil if !page
11
+ page.read
12
+
13
+ end
14
+
15
+ end
16
+ end
17
+ end
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Awestruct
3
- VERSION='0.2.14'
3
+ VERSION='0.2.15'
4
4
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 14
9
- version: 0.2.14
8
+ - 15
9
+ version: 0.2.15
10
10
  platform: ruby
11
11
  authors:
12
12
  - Bob McWhirter
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-03-12 00:00:00 -04:00
17
+ date: 2012-04-09 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -41,8 +41,8 @@ dependencies:
41
41
  segments:
42
42
  - 0
43
43
  - 4
44
- - 1
45
- version: 0.4.1
44
+ - 3
45
+ version: 0.4.3
46
46
  type: :runtime
47
47
  version_requirements: *id002
48
48
  - !ruby/object:Gem::Dependency
@@ -55,8 +55,8 @@ dependencies:
55
55
  segments:
56
56
  - 3
57
57
  - 1
58
- - 0
59
- version: 3.1.0
58
+ - 4
59
+ version: 3.1.4
60
60
  type: :runtime
61
61
  version_requirements: *id003
62
62
  - !ruby/object:Gem::Dependency
@@ -69,8 +69,8 @@ dependencies:
69
69
  segments:
70
70
  - 3
71
71
  - 1
72
- - 0
73
- version: 3.1.0
72
+ - 15
73
+ version: 3.1.15
74
74
  type: :runtime
75
75
  version_requirements: *id004
76
76
  - !ruby/object:Gem::Dependency
@@ -82,9 +82,9 @@ dependencies:
82
82
  - !ruby/object:Gem::Version
83
83
  segments:
84
84
  - 1
85
- - 4
85
+ - 5
86
86
  - 0
87
- version: 1.4.0
87
+ version: 1.5.0
88
88
  type: :runtime
89
89
  version_requirements: *id005
90
90
  - !ruby/object:Gem::Dependency
@@ -111,8 +111,8 @@ dependencies:
111
111
  segments:
112
112
  - 4
113
113
  - 2
114
- - 5
115
- version: 4.2.5
114
+ - 9
115
+ version: 4.2.9
116
116
  type: :runtime
117
117
  version_requirements: *id007
118
118
  - !ruby/object:Gem::Dependency
@@ -124,9 +124,9 @@ dependencies:
124
124
  - !ruby/object:Gem::Version
125
125
  segments:
126
126
  - 0
127
- - 11
128
- - 5
129
- version: 0.11.5
127
+ - 12
128
+ - 1
129
+ version: 0.12.1
130
130
  type: :runtime
131
131
  version_requirements: *id008
132
132
  - !ruby/object:Gem::Dependency
@@ -181,8 +181,9 @@ dependencies:
181
181
  segments:
182
182
  - 0
183
183
  - 2
184
- - 7
185
- version: 0.2.7
184
+ - 8
185
+ - 1
186
+ version: 0.2.8.1
186
187
  type: :runtime
187
188
  version_requirements: *id012
188
189
  - !ruby/object:Gem::Dependency
@@ -195,8 +196,8 @@ dependencies:
195
196
  segments:
196
197
  - 1
197
198
  - 6
198
- - 5
199
- version: 1.6.5
199
+ - 6
200
+ version: 1.6.6
200
201
  type: :runtime
201
202
  version_requirements: *id013
202
203
  - !ruby/object:Gem::Dependency
@@ -252,6 +253,7 @@ files:
252
253
  - lib/awestruct/extensions/pipeline.rb
253
254
  - lib/awestruct/extensions/posts.rb
254
255
  - lib/awestruct/extensions/relative.rb
256
+ - lib/awestruct/extensions/remotePartial.rb
255
257
  - lib/awestruct/extensions/sitemap.rb
256
258
  - lib/awestruct/extensions/tag_cloud.rb
257
259
  - lib/awestruct/extensions/tagger.rb