ryder 0.0.1 → 0.0.2

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.
data/bin/ryder CHANGED
@@ -1,4 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'ryder'
3
3
 
4
- ::Ryder::Application.generate(ARGV.first, ARGV.last)
4
+ if ARGV.first == ARGV.last
5
+ ::Ryder::Application.generate(ARGV.first)
6
+ else
7
+ ::Ryder::Application.generate(ARGV.first, ARGV.last)
8
+ end
@@ -5,14 +5,9 @@ module Ryder
5
5
  class Application
6
6
 
7
7
  def initialize(name, path)
8
- @name, @path = name, path
9
8
  @app = Pathname.new(path).join(name)
10
9
  end
11
10
 
12
- def app
13
- @app
14
- end
15
-
16
11
  def self.generate(name, path = Dir.pwd)
17
12
  box = new(name, path)
18
13
  box.create_project
@@ -20,7 +15,7 @@ module Ryder
20
15
 
21
16
  def create_project
22
17
  say('Creating the app...') do
23
- app.mkpath
18
+ @app.mkpath
24
19
  create_app_structure
25
20
  touch_app_files
26
21
  write_index_haml
@@ -36,28 +31,34 @@ module Ryder
36
31
 
37
32
  def create_app_structure
38
33
  %w(app/javascripts app/stylesheets app/views public/css public/js public/images).each do |path|
39
- app.join(path).mkpath
34
+ @app.join(path).mkpath
40
35
  end
41
36
  end
42
37
 
43
38
  def touch_app_files
44
39
  %w(app/javascripts/application.coffee app/stylesheets/application.scss app/views/index.haml).each do |file|
45
- FileUtils.touch app.join(file)
40
+ FileUtils.touch @app.join(file)
46
41
  end
47
42
  end
48
43
 
49
44
  def write_scss_file
50
- File.open(app.join('app/stylesheets/application.scss'), 'w+') do |file|
45
+ File.open(@app.join('app/stylesheets/application.scss'), 'w+') do |file|
51
46
  file.puts <<-HERE
52
- // For Twitter Bootstrap: Go get it and put it in public/css
47
+ // Twitter Bootstrap: Go get it and put it in public/css
48
+ // http://twitter.github.com/bootstrap/
49
+ //
50
+ // Bourbon
53
51
  // run bundle exec bourbon install and then move bourbon into app/stylesheets
54
52
  // @import 'bourbon/bourbon';
53
+ //
54
+ // Grid Framework - git clone https://github.com/thoughtbot/neat.git app/stylesheets/neat
55
+ // @import 'neat/neat';
55
56
  HERE
56
57
  end
57
58
  end
58
59
 
59
60
  def write_gemfile
60
- File.open(app.join('Gemfile'), 'w+') do |file|
61
+ File.open(@app.join('Gemfile'), 'w+') do |file|
61
62
  file.puts <<-HERE
62
63
  source :rubygems
63
64
  gem 'rack'
@@ -80,7 +81,7 @@ end
80
81
  end
81
82
 
82
83
  def write_guardfile
83
- File.open(app.join('Guardfile'), 'w+') do |file|
84
+ File.open(@app.join('Guardfile'), 'w+') do |file|
84
85
  file.puts <<-HERE
85
86
  guard 'sass', input: 'app/stylesheets', output: 'public/css'
86
87
  guard 'haml', input: 'app/views', output: 'public/' do
@@ -98,7 +99,7 @@ end
98
99
  end
99
100
 
100
101
  def write_index_haml
101
- File.open(app.join('app/views/index.haml'), 'w+') do |file|
102
+ File.open(@app.join('app/views/index.haml'), 'w+') do |file|
102
103
  file.puts <<-HERE
103
104
  !!!5
104
105
  %html
@@ -118,7 +119,7 @@ end
118
119
  end
119
120
 
120
121
  def write_config_ru
121
- File.open(app.join('config.ru'), 'w+') do |file|
122
+ File.open(@app.join('config.ru'), 'w+') do |file|
122
123
  file.puts <<-HERE
123
124
  require 'rack'
124
125
  require 'rack/contrib/try_static'
@@ -136,7 +137,7 @@ run lambda { |_| [404, {'Content-Type' => 'text/html'}, ['whoops! Not Found']]}
136
137
  end
137
138
 
138
139
  def write_procfile
139
- File.open(app.join('Procfile'), 'w+') do |file|
140
+ File.open(@app.join('Procfile'), 'w+') do |file|
140
141
  file.puts <<-HERE
141
142
  web: bundle exec rackup -p 7000
142
143
  guard: bundle exec guard start
@@ -12,5 +12,5 @@ Gem::Specification.new do |gem|
12
12
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
13
13
  gem.name = "ryder"
14
14
  gem.require_paths = ["lib"]
15
- gem.version = '0.0.1'
15
+ gem.version = '0.0.2'
16
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ryder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-13 00:00:00.000000000 Z
12
+ date: 2012-10-16 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: The simpliest prototyping tool, EVER
15
15
  email: