diff --git a/.gitignore b/.gitignore index 2f9e7515d..bb4b68554 100644 --- a/.gitignore +++ b/.gitignore @@ -17,8 +17,6 @@ /public/cache/* /config/newrelic.yml /public/images/avatars/* -/Gemfile -/Gemfile.lock /db/schema.rb /Gemfile.lock /lib/plugins/acts_as_versioned/test/debug.log diff --git a/Gemfile b/Gemfile new file mode 100644 index 000000000..8033bf210 --- /dev/null +++ b/Gemfile @@ -0,0 +1,117 @@ +source 'https://ruby.taobao.org/' + +unless RUBY_PLATFORM =~ /w32/ + # unix-like only + gem 'iconv' + if RUBY_PLATFORM =~ /darwin/ + gem "rmagick", "= 2.15.4" ## osx must be this version + elsif RUBY_PLATFORM =~ /linux/ + gem "rmagick", "~> 2.13.1" ## centos yum install ImageMagick-devel + end + gem 'certified' + gem 'net-ssh', '2.9.1' + gem 'jenkins_api_client' + gem 'nokogiri' +end + +gem 'wechat',path: 'lib/wechat' +gem 'grack', path:'lib/grack' +gem 'gitlab', path: 'lib/gitlab-cli' +gem 'rest-client' +gem "mysql2", "= 0.3.18" +gem 'redis-rails' +gem 'rubyzip' +gem 'delayed_job_active_record'#, :group => :production +gem 'daemons' +gem 'grape', '~> 0.9.0' +gem 'grape-entity', '= 0.4.5' +gem 'rack-cors', :require => 'rack/cors' +gem 'seems_rateable', '~> 1.0.13' +gem 'rails', '~> 3.2' +gem "jquery-rails", "~> 2.0.2" +gem "i18n", "~> 0.6.0" +gem 'coderay', '~> 1.1.0' +gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby] +gem "builder", "3.0.0" +gem 'acts-as-taggable-on', '2.4.1' +gem 'spreadsheet' +gem 'ruby-ole' +gem 'rails_kindeditor',path:'lib/rails_kindeditor' +gem 'binding_of_caller' +gem 'chinese_pinyin' +# gem 'sunspot_rails', '~> 1.3.3' +# gem 'sunspot_solr' +# gem 'sunspot' +# gem 'progress_bar' +gem 'ansi' + +gem 'kaminari' +gem 'elasticsearch-model' +gem 'elasticsearch-rails' + +#rails 3.2.22.2 bug +# gem "test-unit", "~>3.0" + +### profile +# gem 'oneapm_rpm' +# gem 'therubyracer' + +group :development do + gem 'grape-swagger' + gem 'better_errors', '~> 1.1.0' + # gem "query_reviewer" + gem 'rack-mini-profiler', '~> 0.9.3' + if RUBY_PLATFORM =~ /w32/ + gem 'win32console' + end + + if RUBY_PLATFORM =~ /darwin/ + gem 'puma' +end +end + +group :development, :test do + if RUBY_VERSION >= '2.0.0' + gem 'pry-byebug' + gem "test-unit", "~>3.0" + end + gem 'rspec-rails', '~> 3.0' + gem 'factory_girl_rails' +end + +# Gems used only for assets and not required +# in production environments by default. +group :assets do + gem 'sass-rails', '~> 3.2.3' + gem 'coffee-rails', '~> 3.2.1' + + # See https://github.com/sstephenson/execjs#readme for more supported runtimes + # gem 'therubyracer', :platforms => :ruby + + gem 'uglifier', '>= 1.0.3' +end + +# Optional gem for LDAP authentication +group :ldap do + gem "net-ldap", "~> 0.3.1" +end + + +# Optional gem for OpenID authentication +group :openid do + gem "ruby-openid", "~> 2.1.4", :require => "openid" + gem "rack-openid" +end + + +database_file = File.join(File.dirname(__FILE__), "config/database.yml") +if File.exist?(database_file) +else + warn("Please configure your config/database.yml first") +end + +# Load plugins' Gemfiles +Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file| + puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v` + instance_eval File.read(file) +end diff --git a/app/views/challenges/_form.html.erb b/app/views/challenges/_form.html.erb index 5cdcefa42..ababe3b8e 100644 --- a/app/views/challenges/_form.html.erb +++ b/app/views/challenges/_form.html.erb @@ -56,6 +56,7 @@
  • + <%#= f.text_area :ready_knowledge, :placeholder => "请输入完成当前任务依赖的知识点或者其它相关信息,指导学员完成任务" %>
    <%#= f.kindeditor :ready_knowledge, :placeholder => "请输入完成当前任务依赖的知识点或者其它相关信息,指导学员完成任务", :width=>'87.5%', :height => 159, :resizeType => 0, :no_label => true %> diff --git a/app/views/challenges/show.html.erb b/app/views/challenges/show.html.erb index cc1f9a982..0e3e60090 100644 --- a/app/views/challenges/show.html.erb +++ b/app/views/challenges/show.html.erb @@ -2,14 +2,11 @@ <%= stylesheet_link_tag "/assets/codemirror/codemirror" %> <%= stylesheet_link_tag "/assets/kindeditor/plugins/code/previewcode" %> - - - - - - - - + +<%= stylesheet_link_tag '/editormd/css/editormd','/editormd/css/editormd.min' %> +<%= javascript_include_tag '/editormd/lib/marked.min.js','/editormd/lib/prettify.min.js','/editormd/lib/raphael.min.js','/editormd/lib/underscore.min.js','/editormd/lib/sequence-diagram.min.js', + '/editormd/lib/flowchart.min.js','/editormd/lib/jquery.flowchart.min.js','/editormd/editormd.js'%> +