scms 4.0.1 → 4.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/lib/scms.rb +7 -8
  3. data/lib/scms/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzZkNWExZWQzODM0MTVjNDcxNjFiYzk3MTk1MmNjYTQyZjdmODQzNw==
4
+ MmI3NGRjNzAxYjg5MzMwY2FkMWU2NGYwZjc3OTJkN2Y5YzA4YTAyOQ==
5
5
  data.tar.gz: !binary |-
6
- ODFmODVjZTU0NjYyYmMxNmY4MzcwOWRmZDJkMTMzMDIyMzJjNjFjNw==
6
+ N2U5ODRiZDFkY2M4Yzk4YTNmZGQyYmVkZDYyN2NkZmE1MWJhNzk2Yw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YmUxY2VlMTU3ZDg5ODUyNGIzNGNiMjk1MDA2OTE5YmE0OGM3MTNkOGNmNDhh
10
- ZmY2Njk5ZWMwNTVlMDIzNTUwNGQxYjBmNWEyYTc5Nzc5NzJkZWIzZjJhNDA3
11
- NDU3NjZhYzUwOTRiMzcyZDcxNjEyNTA1MTUyMDlkNmUzM2FmNDY=
9
+ NTBlZDRhOWY1OTAxZmMzNjBiZDVlZTliNzk1ODMxNTk4MTFhYTA5MzdiYmMx
10
+ NDcwNGU4OTQ4ZWZlMjZhYzNiYWM0YjNhZmJmNDllNjYwNjZmOGNmMDBiOWMy
11
+ OGIxNzJiZjc2MGJjODM3Y2QxNzMyMGVjNjhkMGE3NTkyZWQ1YTY=
12
12
  data.tar.gz: !binary |-
13
- YTFhMDY3YjgzNDFlNjQ2Mjk2NDZiY2QzNzgzYjI4MjQ5MDlkZTAzNWMwNmNj
14
- ODM0OGUyZTNmZTA4YzlhNmU5ZjRmNTJhNWMwMjVkMTgxMmNmMWUxYzhkNTgx
15
- YjdjNmEyNzJiMjNmODUxMjM1ODEzYzEwMTk2YmU3N2EyMzM5Yjk=
13
+ NTMyY2Y5ZDg1N2VmMzg5MDRjNjc0ZTczNmFiNGU5ZGY1ZGUxMzg3OGMyNDIw
14
+ ZTVmMjRmMWFmYjdjM2Q0MzcyYTA0ZWVlYjNmODQ4MGRmYzY5NGUxMGZlNWJi
15
+ YTgzNjI3M2I3Yzc0ZDdiMjRiMDFmZTUwMTRkMjg3MzUzODJkYTA=
data/lib/scms.rb CHANGED
@@ -289,8 +289,13 @@ module Scms
289
289
  navModel = Scms.navModel(website, settings, options)
290
290
  #puts "navModel: #{navModel}"
291
291
 
292
+ websiteroot = '/'
293
+ websiteroot = settings["rooturl"] if settings["rooturl"] != nil
294
+ #puts "On save mode: #{options[:mode]}"
295
+ websiteroot = ScmsUtils.uriEncode("file:///#{website}/") if options[:mode] == "cms"
296
+
292
297
  monkeyhook = "";
293
- monkeyhook = "<script src='scripts/air-monkey-hook.js'></script>" if options[:mode] == "cms"
298
+ monkeyhook = "<script src='~/scripts/air-monkey-hook.js'></script>".gsub("~/", websiteroot) if options[:mode] == "cms"
294
299
 
295
300
  livereload = ""
296
301
  if options[:watch]
@@ -324,13 +329,6 @@ module Scms
324
329
  #puts "pagemodel: #{pagemodel}"
325
330
  #html = ""
326
331
  html = Scms.render(erbtemplate, pagemodel)
327
-
328
-
329
- websiteroot = '/'
330
- websiteroot = settings["rooturl"] if settings["rooturl"] != nil
331
- #puts "On save mode: #{options[:mode]}"
332
- websiteroot = ScmsUtils.uriEncode("file:///#{website}/") if options[:mode] == "cms"
333
-
334
332
  html = html.gsub('~/', websiteroot)
335
333
  begin
336
334
  File.open(fileName, 'w') {|f| f.write(html) }
@@ -350,6 +348,7 @@ module Scms
350
348
  websiteroot = '/'
351
349
  websiteroot = settings["rooturl"] unless settings["rooturl"] == nil
352
350
  websiteroot = ScmsUtils.uriEncode("file:///#{website}/") if options[:mode] == "cms"
351
+ #websiteroot = "" if options[:mode] == "cms"
353
352
 
354
353
  navModel = Array.new
355
354
  if settings["pages"] != nil
data/lib/scms/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Scms
2
- VERSION = "4.0.1"
2
+ VERSION = "4.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scms
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Courtenay Probert
@@ -218,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
218
  version: '0'
219
219
  requirements: []
220
220
  rubyforge_project:
221
- rubygems_version: 2.1.9
221
+ rubygems_version: 2.1.10
222
222
  signing_key:
223
223
  specification_version: 4
224
224
  summary: Create simple static websites, in a jiffy