From 3baba9c95e1d75a1064207af1dfdc9ac71db10e4 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 27 Apr 2015 11:56:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86gemfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + Gemfile | 47 +------------------------------------------- lib/tasks/ctags.rake | 4 ++++ 3 files changed, 6 insertions(+), 46 deletions(-) create mode 100644 lib/tasks/ctags.rake diff --git a/.gitignore b/.gitignore index 96788ad9a..5e8a94339 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ vendor/cache /files /public/images/avatars /public/files +/tags diff --git a/Gemfile b/Gemfile index d5fe6c581..0103a18b5 100644 --- a/Gemfile +++ b/Gemfile @@ -6,6 +6,7 @@ unless RUBY_PLATFORM =~ /w32/ gem 'iconv' end +gem "mysql2", "= 0.3.18" gem 'redis-rails' gem 'rubyzip' gem 'delayed_job_active_record'#, :group => :production @@ -22,9 +23,6 @@ gem "builder", "3.0.0" gem 'acts-as-taggable-on', '2.4.1' gem 'spreadsheet' gem 'ruby-ole' -#gem 'email_verifier', path: 'lib/email_verifier' -gem 'rufus-scheduler' -#gem 'dalli', path: 'lib/dalli-2.7.2' gem 'rails_kindeditor',path:'lib/rails_kindeditor' group :development do gem 'grape-swagger' @@ -84,56 +82,13 @@ group :openid do gem "rack-openid" end -# Optional gem for exporting the gantt to a PNG file, not supported with jruby -platforms :jruby do - # jruby-openssl is bundled with JRuby 1.7.0 - gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0' - gem "activerecord-jdbc-adapter", "1.2.5" -end -# Include database gems for the adapters found in the database -# configuration file -require 'erb' -require 'yaml' database_file = File.join(File.dirname(__FILE__), "config/database.yml") if File.exist?(database_file) - database_config = YAML::load(ERB.new(IO.read(database_file)).result) - adapters = database_config.values.map {|c| c['adapter']}.compact.uniq - if adapters.any? - adapters.each do |adapter| - case adapter - when 'mysql2' - gem "mysql2", "= 0.3.18", :platforms => [:mri, :mingw] - gem "activerecord-jdbcmysql-adapter", :platforms => :jruby - when 'mysql' - gem "mysql", "~> 2.8.1", :platforms => [:mri, :mingw] - gem "activerecord-jdbcmysql-adapter", :platforms => :jruby - when /postgresql/ - gem "pg", ">= 0.11.0", :platforms => [:mri, :mingw] - gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby - when /sqlite3/ - gem "sqlite3", :platforms => [:mri, :mingw] - gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby - when /sqlserver/ - gem "tiny_tds", "~> 0.5.1", :platforms => [:mri, :mingw] - gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw] - else - warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems") - end - end - else - warn("No adapter found in config/database.yml, please configure it first") - end else warn("Please configure your config/database.yml first") end -local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local") -if File.exists?(local_gemfile) - puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v` - instance_eval File.read(local_gemfile) -end - # Load plugins' Gemfiles Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file| puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v` diff --git a/lib/tasks/ctags.rake b/lib/tasks/ctags.rake new file mode 100644 index 000000000..c62d634dc --- /dev/null +++ b/lib/tasks/ctags.rake @@ -0,0 +1,4 @@ +desc "rerun ctags on current project" +task :ctags do + %x{ ctags --exclude=.git --exclude='*.log' -R * `bundle show --paths` } +end