hyper 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/hyper/generator.rb +6 -8
- data/lib/hyper/version.rb +1 -1
- metadata +5 -12
- data/lib/hyper/template/Gemfile +0 -1
- data/lib/hyper/template/config.ru +0 -11
- data/lib/hyper/template/lib/helper.rb +0 -3
- data/lib/hyper/template/templates/layout.html.erb +0 -9
- data/lib/hyper/template/templates/views/index.html.erb +0 -1
data/lib/hyper/generator.rb
CHANGED
@@ -4,6 +4,9 @@ module Hyper
|
|
4
4
|
class Generator
|
5
5
|
include Term::ANSIColor
|
6
6
|
|
7
|
+
# Path to template directory
|
8
|
+
TEMPLATE_PATH = File.expand_path(File.dirname(__FILE__) + '/../../template').freeze
|
9
|
+
|
7
10
|
def initialize(name, options = {})
|
8
11
|
@name = name
|
9
12
|
@options = options
|
@@ -30,14 +33,9 @@ module Hyper
|
|
30
33
|
|
31
34
|
# Returns a glob of paths for files and folders in Hyper's template directory.
|
32
35
|
def template_contents
|
33
|
-
Dir[File.join(
|
36
|
+
Dir[File.join(TEMPLATE_PATH, '*')]
|
34
37
|
end
|
35
|
-
|
36
|
-
# Returns the path to Hyper's template directory.
|
37
|
-
def template_path
|
38
|
-
File.expand_path(File.dirname(__FILE__) + '/template')
|
39
|
-
end
|
40
|
-
|
38
|
+
|
41
39
|
# Returns a path to use for creating a new file inside the destination directory.
|
42
40
|
def destination_path(path)
|
43
41
|
File.join(destination_folder, common_component_path(path))
|
@@ -57,7 +55,7 @@ module Hyper
|
|
57
55
|
#
|
58
56
|
# Used to build destination paths.
|
59
57
|
def common_component_path(path)
|
60
|
-
path.sub(
|
58
|
+
path.sub(TEMPLATE_PATH, '')
|
61
59
|
end
|
62
60
|
|
63
61
|
# Returns an easy to understand string representing and installation path.
|
data/lib/hyper/version.rb
CHANGED
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:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 2
|
10
|
+
version: 0.4.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- James Wilding
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
19
|
-
default_executable:
|
18
|
+
date: 2011-11-09 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: rack
|
@@ -90,17 +89,11 @@ files:
|
|
90
89
|
- lib/hyper/application.rb
|
91
90
|
- lib/hyper/generator.rb
|
92
91
|
- lib/hyper/static.rb
|
93
|
-
- lib/hyper/template/config.ru
|
94
|
-
- lib/hyper/template/Gemfile
|
95
|
-
- lib/hyper/template/lib/helper.rb
|
96
|
-
- lib/hyper/template/templates/layout.html.erb
|
97
|
-
- lib/hyper/template/templates/views/index.html.erb
|
98
92
|
- lib/hyper/utils.rb
|
99
93
|
- lib/hyper/version.rb
|
100
94
|
- lib/hyper.rb
|
101
95
|
- README.md
|
102
96
|
- bin/hyper
|
103
|
-
has_rdoc: true
|
104
97
|
homepage: http://github.com/jameswilding/hyper
|
105
98
|
licenses: []
|
106
99
|
|
@@ -130,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
123
|
requirements: []
|
131
124
|
|
132
125
|
rubyforge_project:
|
133
|
-
rubygems_version: 1.
|
126
|
+
rubygems_version: 1.8.11
|
134
127
|
signing_key:
|
135
128
|
specification_version: 3
|
136
129
|
summary: Zero-config framework for static websites
|
data/lib/hyper/template/Gemfile
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
gem 'hyper'
|
@@ -1 +0,0 @@
|
|
1
|
-
<p>Find me in <%= __FILE__ -%></p>
|