edge_framework 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile.lock +4 -2
- data/bin/edge +3 -1
- data/edge.gemspec +1 -1
- data/lib/edge/console.rb +6 -1
- data/lib/edge/version.rb +1 -1
- data/lib/edge_framework.rb +53 -4
- data/template/base/assets/sass/_setting.scss +1 -1
- data/template/base/assets/sass/edge.scss +1 -1
- data/template/base/config.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODA0NjU4MTZkZTFmNDM5ZWJkMzIzYzFlM2FhNTE5MWQ3MTk5N2E5Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YmIxNmQ0YmRkNzdiZDRjYWVmZGY1ZjQwNzM5OGU3MjkyMjA4OTJhMA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTU3OGQ5ZDI5MzViYTA2M2NhNWNhODY1OWM5NzZjZDY0MjQ4M2Y5ZWMxODc3
|
10
|
+
OGM5YjkyYjg1NWRlNzk1ZThhZmZjMDBjNmY4ZDg1YTcyNGI3MTZhZjg0MWJk
|
11
|
+
ZjM4YjE3Yzk1NmNmZjMwMTg2MjhhMDA5OThiZDA0YmFjMGRmNmI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDVhNjYzNDQxNGU0NWQwMGVkYWExMGNhNTlkMDUxZGEzZDlmNTA3YTFjMWE0
|
14
|
+
M2QxMzcwMDc3NWJhMmU1YWYwNjBhNDMzMDViOGM5ZDdmZDcwODRkYjlhN2Ji
|
15
|
+
MjMyZjJmOWU3ZDIzYTEwZjQ0YjAzMWJkNDgyMzQyODI0MWQyNmE=
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
edge_framework (0.0.
|
4
|
+
edge_framework (0.0.3)
|
5
5
|
compass (>= 0.12.0)
|
6
6
|
sass (>= 3.2.0)
|
7
7
|
|
@@ -26,6 +26,7 @@ GEM
|
|
26
26
|
diff-lcs (>= 1.1.3, < 2.0)
|
27
27
|
rspec-mocks (2.14.3)
|
28
28
|
sass (3.2.10)
|
29
|
+
win32console (1.3.2-x86-mingw32)
|
29
30
|
|
30
31
|
PLATFORMS
|
31
32
|
x86-mingw32
|
@@ -33,6 +34,7 @@ PLATFORMS
|
|
33
34
|
DEPENDENCIES
|
34
35
|
bundler (~> 1.3)
|
35
36
|
edge_framework!
|
36
|
-
paint
|
37
|
+
paint (~> 0.8.6)
|
37
38
|
rake
|
38
39
|
rspec
|
40
|
+
win32console
|
data/bin/edge
CHANGED
@@ -6,8 +6,10 @@ command = ARGV[0]
|
|
6
6
|
type = ARGV[1]
|
7
7
|
name = ARGV[2]
|
8
8
|
|
9
|
-
if command == '' || command == '
|
9
|
+
if command == nil || command == 'help' || command == '-h'
|
10
10
|
Edge.help()
|
11
11
|
elsif command == 'create'
|
12
12
|
Edge.create( type, name )
|
13
|
+
else
|
14
|
+
Edge.not_found( command )
|
13
15
|
end
|
data/edge.gemspec
CHANGED
@@ -22,5 +22,5 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.add_development_dependency "bundler", "~> 1.3"
|
23
23
|
s.add_development_dependency "rake"
|
24
24
|
s.add_development_dependency "rspec"
|
25
|
-
s.add_development_dependency "
|
25
|
+
s.add_development_dependency "win32console" # Color output for Windows
|
26
26
|
end
|
data/lib/edge/console.rb
CHANGED
@@ -1,10 +1,15 @@
|
|
1
1
|
module Edge
|
2
2
|
class Console
|
3
3
|
def colorize(text, color_code)
|
4
|
-
"\
|
4
|
+
"\e[#{color_code}m#{text}\e[0m"
|
5
5
|
end
|
6
6
|
|
7
7
|
def red(text); colorize(text, 31); end
|
8
8
|
def green(text); colorize(text, 32); end
|
9
|
+
def yellow(text); colorize(text, 33); end
|
10
|
+
def blue(text); colorize(text, 34); end
|
11
|
+
def magenta(text); colorize(text, 35); end
|
12
|
+
def cyan(text); colorize(text, 36); end
|
13
|
+
|
9
14
|
end
|
10
15
|
end
|
data/lib/edge/version.rb
CHANGED
data/lib/edge_framework.rb
CHANGED
@@ -1,16 +1,65 @@
|
|
1
1
|
root = File.join(File.dirname(__FILE__), "..")
|
2
2
|
require "edge/version"
|
3
|
+
require "win32console" # Command line color for Windows
|
4
|
+
require "fileutils" # Copy files
|
3
5
|
|
4
6
|
module Edge
|
5
|
-
require
|
7
|
+
require "edge/console"
|
6
8
|
@console = Edge::Console.new
|
7
9
|
|
10
|
+
# Create project
|
11
|
+
def self.create(type, name)
|
12
|
+
# If name is specified, create new directory
|
13
|
+
if name
|
14
|
+
puts "Creating #{ @console.magenta(name) } as #{ @console.yellow(type) } project..."
|
15
|
+
|
16
|
+
FileUtils.mkdir( name )
|
17
|
+
destination = File.join( Dir.pwd, name )
|
18
|
+
# If type is specified, create new file in the current directory
|
19
|
+
elsif type
|
20
|
+
puts "Generating #{ @console.yellow(type) } template..."
|
21
|
+
destination = Dir.pwd
|
22
|
+
else
|
23
|
+
puts "The correct syntax is #{ @console.cyan('edge create') } #{ @console.yellow('<project_type>') } #{ @console.magenta('<project_name>') }"
|
24
|
+
puts "#{ @console.yellow('project_type') } \t Currently these are the available templates:"
|
25
|
+
puts "\t\t html - Static HTML template"
|
26
|
+
puts "\t\t php - Standard PHP template"
|
27
|
+
puts "#{ @console.magenta('project_name') } \t (Optional) If not specified, the template will be generated in current directory"
|
28
|
+
return false
|
29
|
+
end
|
30
|
+
|
31
|
+
# Gem home directory
|
32
|
+
home = File.expand_path( "..", File.dirname(__FILE__) )
|
33
|
+
template = File.join( home, "template" )
|
34
|
+
|
35
|
+
# Copy assets file
|
36
|
+
assets = File.join( template, "base" )
|
37
|
+
FileUtils.cp_r( Dir["#{assets}/*"], destination )
|
38
|
+
|
39
|
+
# Copy site file
|
40
|
+
site = File.join( template, type )
|
41
|
+
FileUtils.cp_r( Dir["#{site}/*"], destination )
|
42
|
+
|
43
|
+
if name
|
44
|
+
puts "#{ @console.green('Done!') } For starter, you can run #{ @console.cyan('compass watch') } #{ @console.cyan(name) } to generate the CSS"
|
45
|
+
else
|
46
|
+
puts "#{ @console.green('Done!') } For starter, you can run #{ @console.cyan('compass watch') } to generate the CSS"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# Help message
|
8
51
|
def self.help()
|
9
|
-
puts "
|
52
|
+
puts "Welcome to Edge Framework v-0.1 (Abaddon)"
|
53
|
+
puts "To create template, run #{ @console.cyan('edge create') } #{ @console.yellow('<project_type>') } #{ @console.magenta('<project_name>') }"
|
54
|
+
puts "#{ @console.yellow('project_type') } \t Currently these are the available templates:"
|
55
|
+
puts "\t\t html - Static HTML template"
|
56
|
+
puts "\t\t php - Standard PHP template"
|
57
|
+
puts "#{ @console.magenta('project_name') } \t (Optional) If not specified, the template will be generated in current directory"
|
10
58
|
end
|
11
59
|
|
12
|
-
|
13
|
-
|
60
|
+
# Error message for non-existance command
|
61
|
+
def self.not_found(command)
|
62
|
+
puts "The command '#{command}' does not exist. Run #{ @console.cyan("edge -h") } for available commands."
|
14
63
|
end
|
15
64
|
end
|
16
65
|
|
data/template/base/config.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edge_framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henner Setyono
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|
@@ -81,19 +81,19 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: win32console
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ! '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0
|
89
|
+
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ! '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0
|
96
|
+
version: '0'
|
97
97
|
description: Minimal Responsive Framework
|
98
98
|
email:
|
99
99
|
- henner@setyono.net
|