botanicus-rango 0.0.3 → 0.0.4

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.
Files changed (2) hide show
  1. data/bin/rango +10 -9
  2. metadata +31 -1
data/bin/rango CHANGED
@@ -1,10 +1,9 @@
1
1
  #!/usr/bin/env ruby1.9
2
- # coding: utf-8
2
+ # encoding: utf-8
3
3
 
4
- rango_root = File.join(File.dirname(__FILE__), '..')
5
- $:.unshift("#{rango_root}/lib")
6
-
7
- require "rango/ext/colored_string"
4
+ base = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
5
+ libdir = File.expand_path(File.join(File.dirname(base), "..", "lib"))
6
+ $:.unshift(libdir) unless $:.include?(libdir)
8
7
 
9
8
  def help(command, description, indentation = 40)
10
9
  indentation = indentation - command.length
@@ -12,16 +11,18 @@ def help(command, description, indentation = 40)
12
11
  STDERR.puts(command + spaces + description)
13
12
  end
14
13
 
15
- case command = ARGV.first
14
+ case command = ARGV.shift
16
15
  when "create"
17
- require "rango/cli/generators"
18
- Rango::Generator.new(ARGV)
16
+ # we can't use require_relative because it can be symlinked to
17
+ # /usr/bin or just be located in different place than we expect
18
+ require "rango/cli/generator"
19
+ Rango::CLI::Generator.new(*ARGV).create
19
20
  when "-i"
20
21
  require "rango"
21
22
  Rango.boot
22
23
  Rango.interactive
23
24
  else
24
- # STDERR.puts(ColoredString.template("=== <green.bold>Usage</green.bold> ==="))
25
+ # TODO: Generators.each { |generator| puts generator.help }
25
26
  STDERR.puts("=== Usage ===")
26
27
  help "rango create project mycoolproject", "Generate new site"
27
28
  help "rango create app mycoolapp", "Generate new application"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: botanicus-rango
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Jakub \xC5\xA0\xC5\xA5astn\xC3\xBD aka Botanicus"
@@ -31,6 +31,36 @@ dependencies:
31
31
  - !ruby/object:Gem::Version
32
32
  version: "0"
33
33
  version:
34
+ - !ruby/object:Gem::Dependency
35
+ name: path
36
+ type: :runtime
37
+ version_requirement:
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: "0"
43
+ version:
44
+ - !ruby/object:Gem::Dependency
45
+ name: erubis
46
+ type: :development
47
+ version_requirement:
48
+ version_requirements: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: "0"
53
+ version:
54
+ - !ruby/object:Gem::Dependency
55
+ name: thor
56
+ type: :development
57
+ version_requirement:
58
+ version_requirements: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: "0"
63
+ version:
34
64
  description: ""
35
65
  email: knava.bestvinensis@gmail.com
36
66
  executables: