hyper 0.3.0 → 0.4.0

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.
@@ -30,7 +30,7 @@ module Hyper
30
30
 
31
31
  # Returns a glob of paths for files and folders in Hyper's template directory.
32
32
  def template_contents
33
- Dir[File.join(template_path, '**/*')]
33
+ Dir[File.join(template_path, '*')]
34
34
  end
35
35
 
36
36
  # Returns the path to Hyper's template directory.
@@ -76,10 +76,9 @@ module Hyper
76
76
 
77
77
  # Actions
78
78
  def create_destination_folder
79
- unless File.directory?(destination_folder)
80
- run "mkdir #{destination_folder}"
81
- created @name
82
- end
79
+ run "rm -r #{destination_folder}" if File.directory?(destination_folder) && @options[:force]
80
+ run "mkdir #{destination_folder}"
81
+ created @name
83
82
  end
84
83
 
85
84
  # Copies a file or folder from Hyper's template to a new site folder.
@@ -0,0 +1,3 @@
1
+ module Hyper::Helper
2
+ # methods added here will be available in your templates
3
+ end
@@ -1,7 +1,7 @@
1
1
  module Hyper
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 3
4
+ MINOR = 4
5
5
  TINY = 0
6
6
 
7
7
  def self.to_s
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 3
8
+ - 4
9
9
  - 0
10
- version: 0.3.0
10
+ version: 0.4.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Wilding
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-07 00:00:00 +01:00
18
+ date: 2011-07-22 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -92,6 +92,7 @@ files:
92
92
  - lib/hyper/static.rb
93
93
  - lib/hyper/template/config.ru
94
94
  - lib/hyper/template/Gemfile
95
+ - lib/hyper/template/lib/helper.rb
95
96
  - lib/hyper/template/templates/layout.html.erb
96
97
  - lib/hyper/template/templates/views/index.html.erb
97
98
  - lib/hyper/utils.rb