ride 0.4.3 → 0.4.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,6 +14,7 @@ app_generators/ride/templates/RIDE_History.txt
14
14
  app_generators/ride/templates/RIDE_License.txt
15
15
  app_generators/ride/templates/RIDE_README.txt
16
16
  app_generators/ride/templates/.irbrc
17
+ app_generators/ride/templates/.vimrc
17
18
  app_generators/ride/templates/config/.screenrc.code.erb
18
19
  app_generators/ride/templates/config/code_template_ruby.erb
19
20
  app_generators/ride/templates/config/code_template_rails.erb
@@ -6,7 +6,7 @@ class RideGenerator < RubiGen::Base
6
6
  # These get passed into options
7
7
  default_options :author => nil, :language => "ruby", :shell => 'bash', :template_type => 'ramaze', :editor => 'vim', :console_debugger => 'script/ride-console'
8
8
 
9
- attr_reader :name, :main_lib, :shell, :editor, :template_type, :language, :screen_name, :console_debugger
9
+ attr_reader :name, :main_lib, :shell, :editor, :template_type, :language, :screen_name, :console_debugger, :shell
10
10
 
11
11
  def initialize(runtime_args, runtime_options = {})
12
12
  super
@@ -23,7 +23,7 @@ class RideGenerator < RubiGen::Base
23
23
  ruby_defaults = { :controller_base => nil, :view_base => nil, :model_base => nil, :test_base => "/spec/" }
24
24
  puts "Options: " + options.inspect
25
25
  puts 'template: ' + @template_type.to_s
26
- defaults = case @template_type
26
+ defaults = case @template_type.to_s
27
27
  when "ramaze"
28
28
  ramaze_defaults
29
29
  when "rails"
@@ -53,7 +53,7 @@ class RideGenerator < RubiGen::Base
53
53
 
54
54
  #m.dependency "install_rubigen_scripts", [destination_root, 'ride'],
55
55
  # :shebang => options[:shebang], :collision => :force
56
- m.file_copy_each %w{RIDE_History.txt RIDE_License.txt RIDE_README.txt .irbrc}
56
+ m.file_copy_each %w{RIDE_History.txt RIDE_License.txt RIDE_README.txt .vimrc .irbrc}
57
57
  m.file_copy_each [%w{ftplugin ruby ruby.vim}, %w{plugin taglist.vim}, %w{syntax eruby.vim}, %w{ftdetect ruby.vim}].map { |vimfile| File.join(".vim", *vimfile) }
58
58
  script_options = { :chmod => 0755, :shebang => options[:shebang] == RideGenerator::DEFAULT_SHEBANG ? nil : options[:shebang] }
59
59
  m.file_copy_each %w{tasks/rspec.rake tasks/ride.rake}
@@ -81,12 +81,12 @@ EOS
81
81
  # opts.on("-a", "--author=\"Your Name\"", String,
82
82
  # "Some comment about this option",
83
83
  # "Default: none") { |options[:author]| }
84
- opts.on("-l", "--language", String, "Language to develop in" "Default: ruby") { |options[:language]| }
85
- opts.on("-t", "--template", String, "Project template" "Default: ramaze (ramaze, rails, newgem are supported)") { |options[:template_type]| }
86
- opts.on("-e", "--editor", String, "Editor to use" "Default: vim") { |options[:editor]| }
87
- opts.on("-s", "--shell", String, "Shell to use" "Default: bash") { |options[:shell]| }
88
- opts.on("-n", "--name", String, "What to name the screen session" "Default: #{@name}") { |options[:screen_name]| }
89
- opts.on("-d", "--debugger", String, "What to use for window 1, debugger", "Default: script/ride-console") { |options[:console_debugger]| }
84
+ opts.on("--language EDITOR", String, "Language to develop in" ,"Default: ruby") { |options[:language]| }
85
+ opts.on("--template TEMPLATE", String, "Project template (support ramaze, rails, newgem)", "Default: ramaze") { |x| options[:project_type] = x }
86
+ opts.on("--editor EDITOR", String, "Editor to use", "Default: vim") { |options[:editor]| }
87
+ opts.on("--shell SHELL", String, "Shell to use", "Default: bash") { |options[:shell]| }
88
+ opts.on("--name NAME", String, "What to name the screen session", "Default: #{@name}") { |options[:screen_name]| }
89
+ opts.on("--debugger SCRIPT", String, "What to use for window 1, debugger", "Default: script/ride-console") { |options[:console_debugger]| }
90
90
  opts.on("-v", "--version", "Show the #{File.basename($0)} version number and quit.")
91
91
  end
92
92
 
@@ -95,7 +95,8 @@ EOS
95
95
  # Templates can access these value via the attr_reader-generated methods, but not the
96
96
  # raw instance variable value.
97
97
  # @author = options[:author]
98
- @template_type = options[:template_type]
98
+ @template_type = options[:project_type]
99
+ puts "Extracted #{template_type} as template_type"
99
100
  @language = options[:language]
100
101
  @main_dir = options[:main_dir]
101
102
  @shell = options[:shell]
@@ -6,4 +6,6 @@ end
6
6
 
7
7
  require "rubygems"
8
8
  require "ride"
9
- require "std_err_hooks"
9
+ if ENV['RIDE_DEBUG']
10
+ require "std_err_hooks"
11
+ end
@@ -0,0 +1,40 @@
1
+ try " read in your vimrc first
2
+ source $REAL_HOME/.vimrc
3
+ catch /E484/
4
+ endtry
5
+
6
+ if has("autocmd")
7
+ " Enabled file type detection
8
+ " Use the default filetype settings from plugins
9
+ " do language-dependent indenting as well.
10
+ filetype plugin on
11
+ filetype indent on
12
+ endif " has ("autocmd")
13
+
14
+ " This section returns to the last place you were in a file
15
+ " When you repoen it. Comment out to disable this behavior
16
+ if has("autocmd")
17
+ au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
18
+ \| execute "normal g'\"" | endif
19
+ endif
20
+
21
+ syntax on
22
+ set backspace=indent,eol,start " more powerful backspacing
23
+ set tabstop=2 " Set the default tabstop
24
+ set shiftwidth=2 " Set the default shift width for indents
25
+ set expandtab " Make tabs into spaces (set by tabstop)
26
+ set smartcase " Do case insensitive matching
27
+ set smarttab " Smarter tab levels
28
+ set ruler " Show ruler
29
+ set textwidth=0 " Don't wrap lines by default
30
+ set pastetoggle=<F6> " F6 will toggle between paste and normal
31
+ " Insert mode
32
+ set history=50 " keep 50 lines of command line history
33
+
34
+ " Extra For Rails
35
+ let g:rubycomplete_rails = 1
36
+
37
+ " set background=dark " If you have a dark background, uncomment this
38
+
39
+ " For our local plugins and files
40
+ set runtimepath+=~/.vim
@@ -2,7 +2,7 @@ module Ride
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 4
5
- TINY = 3
5
+ TINY = 8
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -12,7 +12,7 @@ module RideGeneratorSpecHelper
12
12
  end
13
13
 
14
14
  def full_path(some_path)
15
- File.join(APP_ROOT, some_path)
15
+ File.join(APP_ROOT, @template_type, some_path)
16
16
  end
17
17
  end
18
18
 
@@ -23,7 +23,8 @@ describe "Ride Rails Generator", "when rails application is generated" do
23
23
  include RideGeneratorSpecHelper
24
24
  before(:all) do
25
25
  bare_setup
26
- run_generator('ride', [APP_ROOT], sources, {:console_debugger => 'irb', :template => 'rails', :shell => 'bash', :editor => 'vim'})
26
+ @template_type = 'rails'
27
+ run_generator('ride', [File.join(APP_ROOT,@template_type)], sources, {:console_debugger => 'irb', :project_type => @template_type, :shell => 'bash', :editor => 'vim'})
27
28
  end
28
29
 
29
30
  RideGenerator::BASEDIRS.each do |dir|
@@ -32,7 +33,7 @@ describe "Ride Rails Generator", "when rails application is generated" do
32
33
  end
33
34
  end
34
35
 
35
- %w{RIDE_History.txt RIDE_License.txt RIDE_README.txt .irbrc}.each do |file|
36
+ %w{RIDE_History.txt RIDE_License.txt RIDE_README.txt .vimrc .irbrc}.each do |file|
36
37
  it "should create #{file}" do
37
38
  File.exists?(full_path(file)).should == true
38
39
  end
@@ -82,7 +83,7 @@ describe "Ride Rails Generator", "when rails application is generated" do
82
83
  end
83
84
 
84
85
  after(:all) do
85
- bare_teardown
86
+ #bare_teardown
86
87
  end
87
88
 
88
89
  end
@@ -91,8 +92,9 @@ end
91
92
  describe "Ride Ramaze Generator", "when ramaze application is generated" do
92
93
  include RideGeneratorSpecHelper
93
94
  before(:all) do
95
+ @template_type = 'ramaze'
94
96
  bare_setup
95
- run_generator('ride', [APP_ROOT], sources, {:console_debugger => 'irb', :template => 'ramaze', :shell => 'bash', :editor => 'vim'})
97
+ run_generator('ride', [File.join(APP_ROOT, @template_type)], sources, {:console_debugger => 'irb', :project_type => @template_type, :shell => 'bash', :editor => 'vim'})
96
98
  end
97
99
 
98
100
  RideGenerator::BASEDIRS.each do |dir|
@@ -101,7 +103,7 @@ describe "Ride Ramaze Generator", "when ramaze application is generated" do
101
103
  end
102
104
  end
103
105
 
104
- %w{RIDE_History.txt RIDE_License.txt RIDE_README.txt .irbrc}.each do |file|
106
+ %w{RIDE_History.txt RIDE_License.txt RIDE_README.txt .vimrc .irbrc}.each do |file|
105
107
  it "should create #{file}" do
106
108
  File.exists?(full_path(file)).should == true
107
109
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ride
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - TJ Vanderpoel
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-09 00:00:00 -06:00
12
+ date: 2009-01-24 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -76,6 +76,7 @@ files:
76
76
  - app_generators/ride/templates/RIDE_License.txt
77
77
  - app_generators/ride/templates/RIDE_README.txt
78
78
  - app_generators/ride/templates/.irbrc
79
+ - app_generators/ride/templates/.vimrc
79
80
  - app_generators/ride/templates/config/.screenrc.code.erb
80
81
  - app_generators/ride/templates/config/code_template_ruby.erb
81
82
  - app_generators/ride/templates/config/code_template_rails.erb