reparcs 0.2.0 → 0.2.1

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.
@@ -1,3 +1,7 @@
1
+ == 0.2.1 09/09/2008:
2
+ * 1 Fixed
3
+ * error copying javascript files to Website's publish directory.
4
+
1
5
  == 0.2.0 09/09/2008:
2
6
  * 1 Added
3
7
  * Included the prototype & scriptaculous javascript files to the project
@@ -45,5 +45,5 @@ include StylesheetElements
45
45
  include Shortcuts
46
46
 
47
47
  module Reparcs
48
- VERSION = "0.2.0"
48
+ VERSION = "0.2.1"
49
49
  end
@@ -1,6 +1,9 @@
1
1
  require 'fileutils'
2
2
  include Base
3
3
 
4
+ path = __FILE__.gsub("projects.rb", "")
5
+ JAVASCRIPT_LIB_PATH = "#{path}../../javascript"
6
+
4
7
  #The Projects module contains the classes that act as good starting points for
5
8
  #reparcs projects.
6
9
  module Projects
@@ -15,8 +18,7 @@ module Projects
15
18
  @lang = "en"
16
19
  @xmlns = "http://www.w3.org/1999/xhtml"
17
20
  @charset = "utf-8"
18
- @start_element = %{<!DOCTYPE html PUBLIC
19
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
21
+ @start_element = %{<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
20
22
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
21
23
  <html
22
24
  xml:lang=\"#{@xml_lang}\"
@@ -43,7 +45,7 @@ module Projects
43
45
  #the files when published.
44
46
  #Unless you intend to create a javascript directory and include them yourself!
45
47
  def include_scriptaculous
46
- Dir.foreach("#{__FILE__}../../../javascript") { |f|
48
+ Dir.foreach(JAVASCRIPT_LIB_PATH) { |f|
47
49
  unless f[0,1] == "."
48
50
  s = Script.new({:src => "javascript/#{f}"})
49
51
  @head.append(s)
@@ -82,9 +84,9 @@ module Projects
82
84
  end
83
85
  #Automatically includes the required javascript files, for the effects.
84
86
  def include_scriptaculous_files
85
- Dir.foreach("#{__FILE__}../../../javascript") { |f|
87
+ Dir.foreach(JAVASCRIPT_LIB_PATH) { |f|
86
88
  unless f[0,1] == "."
87
- @javascript_files << "../javascript/#{f}"
89
+ @javascript_files << "#{JAVASCRIPT_LIB_PATH}/#{f}"
88
90
  end
89
91
  }
90
92
  end
@@ -112,8 +114,7 @@ module Projects
112
114
  def append(name, page)
113
115
  @pages << [name, page]
114
116
  end
115
- #Publishes the entire website to the given directory, Note* if you
116
- #have any files in the given directory, they may be replaced!
117
+ #Publishes the entire website to the given directory.
117
118
  def publish(directory)
118
119
  root = directory
119
120
  unless @javascript_files.length == 0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reparcs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Caine