massimo 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ source "http://gemcutter.org"
2
+ source "http://gems.github.com"
3
+
4
+ gem "activesupport", ">= 3.0.0.beta"
5
+ gem "sinatra_more", ">= 0.3.39"
6
+ gem "directory_watcher", ">= 1.3.1"
7
+ gem "sprockets", ">= 1.0.2"
8
+ gem "jsmin", ">= 1.0.1"
9
+
10
+ group :test do
11
+ gem "shoulda", ">= 2.10.3"
12
+ gem "rr", ">= 0.10.9"
13
+ end
data/Rakefile CHANGED
@@ -10,10 +10,10 @@ begin
10
10
  gem.email = "me@petebrowne.com"
11
11
  gem.homepage = "http://github.com/peterbrowne/massimo"
12
12
  gem.authors = [ "Peter Browne" ]
13
- gem.add_development_dependency "shoulda", ">= 2.10.2"
14
- gem.add_development_dependency "yard", ">= 0.5.2"
15
- gem.add_dependency "activesupport", ">= 2.3.5"
16
- gem.add_dependency "sinatra_more", ">= 0.3.29"
13
+ gem.add_development_dependency "shoulda", ">= 2.10.3"
14
+ gem.add_development_dependency "rr", ">= 0.10.9"
15
+ gem.add_dependency "activesupport", ">= 3.0.0.beta"
16
+ gem.add_dependency "sinatra_more", ">= 0.3.39"
17
17
  gem.add_dependency "directory_watcher", ">= 1.3.1"
18
18
  gem.add_dependency "sprockets", ">= 1.0.2"
19
19
  gem.add_dependency "jsmin", ">= 1.0.1"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.1
1
+ 0.4.2
data/bin/massimo CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require File.expand_path(File.join(File.dirname(__FILE__), *%w{.. lib massimo}))
4
- require File.expand_path(File.join(File.dirname(__FILE__), *%w{.. lib massimo command}))
3
+ require File.expand_path("../../lib/massimo", __FILE__)
4
+ require File.expand_path("../../lib/massimo/command", __FILE__)
5
5
 
6
- exit Massimo::Command.new(ARGV).run!
6
+ exit Massimo::Command.new(ARGV).run!
@@ -1,6 +1,7 @@
1
1
  require "optparse"
2
- require "active_support"
3
2
  require "yaml"
3
+ require "active_support/backtrace_cleaner"
4
+ require "active_support/core_ext/hash/keys"
4
5
  begin require "growl"; rescue LoadError; end
5
6
 
6
7
  module Massimo
@@ -79,7 +80,7 @@ module Massimo
79
80
  watcher = DirectoryWatcher.new(
80
81
  ".",
81
82
  :interval => 1,
82
- :glob => site.all_source_dirs.collect { |dir| File.join(dir, *%w{** *}) }
83
+ :glob => site.all_source_dirs.collect { |dir| File.join(dir, "**/*") }
83
84
  )
84
85
 
85
86
  watcher.add_observer do |*args|
@@ -1,5 +1,5 @@
1
- require File.join(File.dirname(__FILE__), "processing")
2
- require File.join(File.dirname(__FILE__), "collection")
1
+ require "massimo/resource/processing"
2
+ require "massimo/resource/collection"
3
3
 
4
4
  module Massimo
5
5
  module Resource
@@ -17,7 +17,7 @@ module Massimo
17
17
  files = files.dup
18
18
  add_full_path!(files)
19
19
  else
20
- files = Dir.glob(File.join(dir, "**", "*"))
20
+ files = Dir.glob(File.join(dir, "**/*"))
21
21
  reject_partials_and_directories!(files)
22
22
  reject_skipped_files!(files)
23
23
  end
data/lib/massimo/site.rb CHANGED
@@ -93,7 +93,7 @@ module Massimo
93
93
 
94
94
  # Reload all the files in the source lib dir.
95
95
  def reload_libs
96
- reload_files Dir.glob(dir_for(:lib, "**", "*.rb"))
96
+ reload_files Dir.glob(dir_for(:lib, "**/*.rb"))
97
97
  end
98
98
 
99
99
  # Load methods for listing all available files for each Resource type.
data/lib/massimo.rb CHANGED
@@ -5,20 +5,20 @@ require "rubygems"
5
5
  require "pathname"
6
6
  require "fileutils"
7
7
  require "singleton"
8
- require "active_support"
8
+ require "active_support/inflector"
9
+ require "active_support/core_ext/hash/keys"
9
10
  require "sinatra_more"
10
11
  require "sprockets"
11
12
  require "jsmin"
12
13
  require "tilt"
13
14
 
14
15
  # Internal
15
- lib_dir = File.dirname(__FILE__)
16
- require File.join(lib_dir, "massimo", "helpers")
17
- require File.join(lib_dir, "massimo", "templates")
18
- require File.join(lib_dir, "massimo", "site")
16
+ require "massimo/helpers"
17
+ require "massimo/templates"
18
+ require "massimo/site"
19
19
 
20
20
  module Massimo
21
- VERSION = File.read(File.join(File.dirname(__FILE__), "..", "VERSION")) # :nodoc:
21
+ VERSION = File.read(File.expand_path("../../VERSION", __FILE__)) # :nodoc:
22
22
 
23
23
  MissingResource = Class.new(StandardError) # :nodoc:
24
24
  InvalidResource = Class.new(StandardError) # :nodoc:
@@ -42,8 +42,8 @@ module Massimo
42
42
  end
43
43
  end
44
44
 
45
- require File.join(lib_dir, "massimo", "resource", "base")
46
- require File.join(lib_dir, "massimo", "view")
47
- require File.join(lib_dir, "massimo", "page")
48
- require File.join(lib_dir, "massimo", "stylesheet")
49
- require File.join(lib_dir, "massimo", "javascript")
45
+ require "massimo/resource/base"
46
+ require "massimo/view"
47
+ require "massimo/page"
48
+ require "massimo/stylesheet"
49
+ require "massimo/javascript"
data/massimo.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{massimo}
8
- s.version = "0.4.1"
8
+ s.version = "0.4.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Peter Browne"]
12
- s.date = %q{2010-01-10}
12
+ s.date = %q{2010-02-22}
13
13
  s.default_executable = %q{massimo}
14
14
  s.description = %q{Massimo builds HTML, Javascript, and CSS Files from your source.}
15
15
  s.email = %q{me@petebrowne.com}
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.files = [
22
22
  ".document",
23
23
  ".gitignore",
24
+ "Gemfile",
24
25
  "LICENSE",
25
26
  "README.md",
26
27
  "Rakefile",
@@ -105,27 +106,27 @@ Gem::Specification.new do |s|
105
106
  s.specification_version = 3
106
107
 
107
108
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
108
- s.add_development_dependency(%q<shoulda>, [">= 2.10.2"])
109
- s.add_development_dependency(%q<yard>, [">= 0.5.2"])
110
- s.add_runtime_dependency(%q<activesupport>, [">= 2.3.5"])
111
- s.add_runtime_dependency(%q<sinatra_more>, [">= 0.3.29"])
109
+ s.add_development_dependency(%q<shoulda>, [">= 2.10.3"])
110
+ s.add_development_dependency(%q<rr>, [">= 0.10.9"])
111
+ s.add_runtime_dependency(%q<activesupport>, [">= 3.0.0.beta"])
112
+ s.add_runtime_dependency(%q<sinatra_more>, [">= 0.3.39"])
112
113
  s.add_runtime_dependency(%q<directory_watcher>, [">= 1.3.1"])
113
114
  s.add_runtime_dependency(%q<sprockets>, [">= 1.0.2"])
114
115
  s.add_runtime_dependency(%q<jsmin>, [">= 1.0.1"])
115
116
  else
116
- s.add_dependency(%q<shoulda>, [">= 2.10.2"])
117
- s.add_dependency(%q<yard>, [">= 0.5.2"])
118
- s.add_dependency(%q<activesupport>, [">= 2.3.5"])
119
- s.add_dependency(%q<sinatra_more>, [">= 0.3.29"])
117
+ s.add_dependency(%q<shoulda>, [">= 2.10.3"])
118
+ s.add_dependency(%q<rr>, [">= 0.10.9"])
119
+ s.add_dependency(%q<activesupport>, [">= 3.0.0.beta"])
120
+ s.add_dependency(%q<sinatra_more>, [">= 0.3.39"])
120
121
  s.add_dependency(%q<directory_watcher>, [">= 1.3.1"])
121
122
  s.add_dependency(%q<sprockets>, [">= 1.0.2"])
122
123
  s.add_dependency(%q<jsmin>, [">= 1.0.1"])
123
124
  end
124
125
  else
125
- s.add_dependency(%q<shoulda>, [">= 2.10.2"])
126
- s.add_dependency(%q<yard>, [">= 0.5.2"])
127
- s.add_dependency(%q<activesupport>, [">= 2.3.5"])
128
- s.add_dependency(%q<sinatra_more>, [">= 0.3.29"])
126
+ s.add_dependency(%q<shoulda>, [">= 2.10.3"])
127
+ s.add_dependency(%q<rr>, [">= 0.10.9"])
128
+ s.add_dependency(%q<activesupport>, [">= 3.0.0.beta"])
129
+ s.add_dependency(%q<sinatra_more>, [">= 0.3.39"])
129
130
  s.add_dependency(%q<directory_watcher>, [">= 1.3.1"])
130
131
  s.add_dependency(%q<sprockets>, [">= 1.0.2"])
131
132
  s.add_dependency(%q<jsmin>, [">= 1.0.1"])
data/test/helper.rb CHANGED
@@ -9,7 +9,7 @@ require "assertions"
9
9
  require "rr"
10
10
 
11
11
  # Load Massimo
12
- require File.join(File.dirname(__FILE__), "..", "lib", "massimo")
12
+ require File.expand_path("../../lib/massimo", __FILE__)
13
13
 
14
14
  class Test::Unit::TestCase
15
15
  include Assertions
@@ -17,12 +17,12 @@ class Test::Unit::TestCase
17
17
 
18
18
  #
19
19
  def source_dir(*subdirs)
20
- File.join(File.dirname(__FILE__), "source", *subdirs)
20
+ File.join("./test/source", *subdirs)
21
21
  end
22
22
 
23
23
  #
24
24
  def output_dir(*subdirs)
25
- File.join(File.dirname(__FILE__), "output", *subdirs)
25
+ File.join("./test/output", *subdirs)
26
26
  end
27
27
 
28
28
  #
@@ -53,7 +53,7 @@ class Test::Unit::TestCase
53
53
 
54
54
  #
55
55
  def source_page_paths
56
- @source_page_paths ||= Pathname.glob(source_dir("pages", "**", "*")).
56
+ @source_page_paths ||= Pathname.glob(source_dir("pages/**/*")).
57
57
  reject { |p| p.basename.to_s =~ /^_/ || File.directory?(p) }.
58
58
  collect { |p| p.basename }
59
59
  end
data/test/test_helpers.rb CHANGED
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "helper")
1
+ require File.expand_path("../helper", __FILE__)
2
2
 
3
3
  class TestHelpers < Test::Unit::TestCase
4
4
  context "A Site's Helpers" do
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "helper")
1
+ require File.expand_path("../helper", __FILE__)
2
2
 
3
3
  class TestJavascript < Test::Unit::TestCase
4
4
  context "A Site" do
data/test/test_page.rb CHANGED
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "helper")
1
+ require File.expand_path("../helper", __FILE__)
2
2
 
3
3
  class TestPage < Test::Unit::TestCase
4
4
  context "A Site" do
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "helper")
1
+ require File.expand_path("../helper", __FILE__)
2
2
 
3
3
  class TestResource < Test::Unit::TestCase
4
4
  context "A site" do
data/test/test_site.rb CHANGED
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "helper")
1
+ require File.expand_path("../helper", __FILE__)
2
2
 
3
3
  class TestSite < Test::Unit::TestCase
4
4
 
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "helper")
1
+ require File.expand_path("../helper", __FILE__)
2
2
 
3
3
  class TestStylesheet < Test::Unit::TestCase
4
4
  context "A Site" do
data/test/test_view.rb CHANGED
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "helper")
1
+ require File.expand_path("../helper", __FILE__)
2
2
 
3
3
  class TestView < Test::Unit::TestCase
4
4
  context "A View with options" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: massimo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Browne
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-10 00:00:00 -06:00
12
+ date: 2010-02-22 00:00:00 -06:00
13
13
  default_executable: massimo
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,17 +20,17 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 2.10.2
23
+ version: 2.10.3
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
- name: yard
26
+ name: rr
27
27
  type: :development
28
28
  version_requirement:
29
29
  version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.5.2
33
+ version: 0.10.9
34
34
  version:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: activesupport
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 2.3.5
43
+ version: 3.0.0.beta
44
44
  version:
45
45
  - !ruby/object:Gem::Dependency
46
46
  name: sinatra_more
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: 0.3.29
53
+ version: 0.3.39
54
54
  version:
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: directory_watcher
@@ -94,6 +94,7 @@ extra_rdoc_files:
94
94
  files:
95
95
  - .document
96
96
  - .gitignore
97
+ - Gemfile
97
98
  - LICENSE
98
99
  - README.md
99
100
  - Rakefile