scharfie-bones 0.1.0 → 0.1.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.
data/README CHANGED
@@ -22,7 +22,7 @@ Starting it up:
22
22
  - Generate:
23
23
  bones my_bones_app
24
24
  cd my_bones_app
25
-
25
+
26
26
  - Serve
27
27
  rake server
28
28
 
@@ -31,8 +31,8 @@ Starting it up:
31
31
 
32
32
  Flatten your views into .html files:
33
33
 
34
- - Cache with our without versioning
34
+ - Cache
35
35
  rake cache:simple # without versioning
36
36
  rake cache:versioned # with versioning
37
37
 
38
- Then upload the entire public/ directory to your server.
38
+ Then upload the entire public/ directory to your server.
data/bones.gemspec CHANGED
@@ -1,14 +1,15 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "bones"
3
- s.version = "0.1.0"
3
+ s.version = "0.1.1"
4
4
  s.date = "2008-08-22"
5
+ s.authors = ["Chris Scharf", "Ryan Heath"]
6
+ s.email = "scharfie@gmail.com"
5
7
 
6
8
  s.summary = "Simple HTML mockup framework for designers using ERB"
7
9
  s.description = "Simple HTML mockup framework for designers using ERB"
8
- s.email = "scharfie@gmail.com"
9
10
  s.homepage = "http://github.com/scharfie/bones"
11
+
10
12
  s.has_rdoc = false
11
- s.authors = ["Chris Scharf", "Ryan Heath"]
12
13
 
13
14
  s.require_paths = ['lib']
14
15
  s.default_executable = 'bones'
@@ -16,6 +17,7 @@ Gem::Specification.new do |s|
16
17
 
17
18
  s.files = [
18
19
  'README',
20
+ 'lib/Rakefile',
19
21
  'bin/bones',
20
22
  'lib/bones.rb',
21
23
  'lib/boot.rb',
@@ -26,12 +28,12 @@ Gem::Specification.new do |s|
26
28
  'lib/init.rb',
27
29
  'lib/pages/directory.html.erb',
28
30
  'lib/pages/intro.html.erb',
29
- 'lib/Rakefile',
30
31
  'lib/server.rb',
31
32
  'lib/tasks/bones.rb',
32
33
  'bones.gemspec'
33
34
  ]
34
35
 
36
+ # Dependencies
35
37
  s.add_dependency("rack", [">= 0.3.0"])
36
38
  s.add_dependency("activesupport", [">= 2.1.0"])
37
39
  end
data/lib/Rakefile CHANGED
@@ -1,3 +1,3 @@
1
1
  require 'rubygems'
2
2
  require 'bones'
3
- require 'bones/lib/tasks'
3
+ require 'tasks/bones'
data/lib/bones.rb CHANGED
@@ -10,6 +10,7 @@ class Bones
10
10
  # Create a new template for the given path
11
11
  # and compile it
12
12
  template = Template.new(request.path_info)
13
+ template.request = request
13
14
  output = template.compile
14
15
 
15
16
  # Build a rack response
@@ -34,6 +35,7 @@ class Bones
34
35
  attr_accessor :path
35
36
  attr_accessor :layout
36
37
  attr_accessor :options
38
+ attr_accessor :request
37
39
 
38
40
  # Load all available helpers
39
41
  def self.include_helpers
@@ -150,7 +152,7 @@ class Bones
150
152
  @versioned_destination ||= get_versioned_destination
151
153
  end
152
154
 
153
- # Transfers all public directories to the new 'versioned'
155
+ # Copies all public directories to the new 'versioned'
154
156
  # directory, so each version can contain it's own mockup
155
157
  # (note: only copies asset directories - ignores "v1", "v2", etc)
156
158
  def copy_public_directories
data/lib/boot.rb CHANGED
@@ -29,6 +29,10 @@ def page_directories
29
29
  directories(ROOT / 'pages')
30
30
  end
31
31
 
32
+ def versioned_directories
33
+ Bones::Versioned.directories
34
+ end
35
+
32
36
  def public_directories
33
- directories(ROOT / 'public') - page_directories - Bones::Versioned.directories
37
+ directories(ROOT / 'public') - page_directories - versioned_directories
34
38
  end
data/lib/init.rb CHANGED
@@ -51,8 +51,8 @@ class BonesInitializer
51
51
 
52
52
  ensure_file(ROOT / 'public' / 'stylesheets' / 'styles.css')
53
53
 
54
- puts "** Adding Rakefile to parent directory"
55
54
  ensure_file(ROOT / 'Rakefile') do |f|
55
+ puts "** Adding Rakefile to parent directory"
56
56
  f.write File.read(SYSTEM / 'Rakefile')
57
57
  end
58
58
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scharfie-bones
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Scharf
@@ -41,6 +41,7 @@ extra_rdoc_files: []
41
41
 
42
42
  files:
43
43
  - README
44
+ - lib/Rakefile
44
45
  - bin/bones
45
46
  - lib/bones.rb
46
47
  - lib/boot.rb
@@ -51,7 +52,6 @@ files:
51
52
  - lib/init.rb
52
53
  - lib/pages/directory.html.erb
53
54
  - lib/pages/intro.html.erb
54
- - lib/Rakefile
55
55
  - lib/server.rb
56
56
  - lib/tasks/bones.rb
57
57
  - bones.gemspec