edge_framework 0.0.3 → 0.1.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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NmU0YWY1MDczNDQ5NTExZjVkMjM1M2E0Y2JlNGYzNmRiMTE5MTRmOA==
4
+ ODA0NjU4MTZkZTFmNDM5ZWJkMzIzYzFlM2FhNTE5MWQ3MTk5N2E5Yg==
5
5
  data.tar.gz: !binary |-
6
- OTQwNGMxMTE4MGM4YzY2YjJjZWM2ZDYwMDJjODQxNGYxYWEzMDY4Nw==
6
+ YmIxNmQ0YmRkNzdiZDRjYWVmZGY1ZjQwNzM5OGU3MjkyMjA4OTJhMA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NTI0YWE0ZWU1ZGU1NTlhZTU4YmYwYTQ0ZmY0YzI2OTA0MzljZTg4MGViYWUx
10
- NzhlOTVlZGRkNTUyMTViZWE2ODNjOTcxNjY3ZDljNzA5NTRlMjg5ZTgxOTQw
11
- ZjNkMjNmYzZiZThhOTMzOWVlN2RjMjgyZjUwN2Q2ODk5OWIzZWY=
9
+ MTU3OGQ5ZDI5MzViYTA2M2NhNWNhODY1OWM5NzZjZDY0MjQ4M2Y5ZWMxODc3
10
+ OGM5YjkyYjg1NWRlNzk1ZThhZmZjMDBjNmY4ZDg1YTcyNGI3MTZhZjg0MWJk
11
+ ZjM4YjE3Yzk1NmNmZjMwMTg2MjhhMDA5OThiZDA0YmFjMGRmNmI=
12
12
  data.tar.gz: !binary |-
13
- ZThiNTMzODhlOWVmYWE0NmRkZmU2YmQ2MDJkYmVkZGE4NjU2NzI2MTE1MzQ3
14
- ZmIyYzYwMTczOTE2NTlmYjdhYTI5YzJkNGZkMDkzMzI3MWJhMGRkYmM4ZGJl
15
- YzRhOGQ5ZTRkZjQ1ZTVmZjllNWYwYTQ5YTRiZDZiMGQ5ZmYxYTU=
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.2)
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 == 'help'
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 "paint", "~> 0.8.6"
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
- "\033[#{color_code}m#{text}\033[0m"
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
@@ -1,3 +1,3 @@
1
1
  module Edge
2
- VERSION = "0.0.3"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -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 'edge/console'
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 "Installing....[" + @console.green("DONE") + "]"
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
- def self.create(type, name)
13
- puts "#{type} #{name}"
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
 
@@ -47,4 +47,4 @@
47
47
  // -----------
48
48
  // $block-grid-max-width : em($content-width);
49
49
  // $block-grid-total : 12;
50
- // $block-grid-margin : em(25px); // Margin between column at maximum row's width
50
+ // $block-grid-margin : em(25px); // Margin between block at maximum row's width
@@ -1,3 +1,3 @@
1
1
  // Leave this file without any modification
2
2
  @import "setting";
3
- @import "edge";
3
+ @import "edge/components";
@@ -1,4 +1,4 @@
1
- require "edge"
1
+ require "edge_framework"
2
2
 
3
3
  http_path = "/"
4
4
  css_dir = "assets/css"
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.3
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-25 00:00:00.000000000 Z
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: paint
84
+ name: win32console
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - ! '>='
88
88
  - !ruby/object:Gem::Version
89
- version: 0.8.6
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.8.6
96
+ version: '0'
97
97
  description: Minimal Responsive Framework
98
98
  email:
99
99
  - henner@setyono.net