modified Gemfile

This commit is contained in:
alan 2015-01-10 17:19:14 +08:00
parent 3ee1f0483f
commit be89ba6684
2 changed files with 88 additions and 144 deletions

View File

@ -2,11 +2,7 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="fce9e1ff-7a81-45bd-a5df-ded2aa145900" name="Default" comment=""> <list default="true" id="fce9e1ff-7a81-45bd-a5df-ded2aa145900" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Gemfile.lock" afterPath="$PROJECT_DIR$/Gemfile.lock" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Gemfile" afterPath="$PROJECT_DIR$/Gemfile" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Gemfile" afterPath="$PROJECT_DIR$/Gemfile" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/stylesheets/application.css" afterPath="$PROJECT_DIR$/public/stylesheets/application.css" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/controllers/courses_controller.rb" afterPath="$PROJECT_DIR$/app/controllers/courses_controller.rb" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/stylesheets/scm.css" afterPath="$PROJECT_DIR$/public/stylesheets/scm.css" />
</list> </list>
<ignored path="trustie.iws" /> <ignored path="trustie.iws" />
<ignored path=".idea/workspace.xml" /> <ignored path=".idea/workspace.xml" />
@ -32,7 +28,7 @@
<file leaf-file-name="courses_controller.rb" pinned="false" current="false" current-in-tab="false"> <file leaf-file-name="courses_controller.rb" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/controllers/courses_controller.rb"> <entry file="file://$PROJECT_DIR$/app/controllers/courses_controller.rb">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="8856" max-vertical-offset="27459"> <state vertical-scroll-proportion="0.0" vertical-offset="9639" max-vertical-offset="27486">
<caret line="357" column="19" selection-start-line="357" selection-start-column="19" selection-end-line="357" selection-end-column="19" /> <caret line="357" column="19" selection-start-line="357" selection-start-column="19" selection-end-line="357" selection-end-column="19" />
<folding /> <folding />
</state> </state>
@ -49,16 +45,36 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="scm.css" pinned="false" current="true" current-in-tab="true"> <file leaf-file-name="scm.css" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/public/stylesheets/scm.css"> <entry file="file://$PROJECT_DIR$/public/stylesheets/scm.css">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.8554604" vertical-offset="146" max-vertical-offset="3024"> <state vertical-scroll-proportion="0.0" vertical-offset="146" max-vertical-offset="3024">
<caret line="35" column="0" selection-start-line="35" selection-start-column="0" selection-end-line="35" selection-end-column="0" /> <caret line="35" column="0" selection-start-line="35" selection-start-column="0" selection-end-line="35" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="Gemfile" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/Gemfile">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-4.4059405" vertical-offset="5949" max-vertical-offset="6858">
<caret line="72" column="0" selection-start-line="72" selection-start-column="0" selection-end-line="72" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="welcome.css" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/public/stylesheets/welcome.css">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="13797">
<caret line="17" column="27" selection-start-line="17" selection-start-column="27" selection-end-line="17" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf> </leaf>
</component> </component>
<component name="FindManager"> <component name="FindManager">
@ -75,6 +91,7 @@
<option value="$PROJECT_DIR$/app/controllers/courses_controller.rb" /> <option value="$PROJECT_DIR$/app/controllers/courses_controller.rb" />
<option value="$PROJECT_DIR$/public/stylesheets/application.css" /> <option value="$PROJECT_DIR$/public/stylesheets/application.css" />
<option value="$PROJECT_DIR$/public/stylesheets/scm.css" /> <option value="$PROJECT_DIR$/public/stylesheets/scm.css" />
<option value="$PROJECT_DIR$/Gemfile" />
</list> </list>
</option> </option>
</component> </component>
@ -110,7 +127,7 @@
<sortByType /> <sortByType />
</navigator> </navigator>
<panes> <panes>
<pane id="RailsProjectView" /> <pane id="Scope" />
<pane id="ProjectPane"> <pane id="ProjectPane">
<subPane> <subPane>
<PATH> <PATH>
@ -163,7 +180,7 @@
</PATH> </PATH>
</subPane> </subPane>
</pane> </pane>
<pane id="Scope" /> <pane id="RailsProjectView" />
</panes> </panes>
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
@ -277,6 +294,30 @@
<breakpoint-manager /> <breakpoint-manager />
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/app/controllers/courses_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="27486">
<caret line="357" column="19" selection-start-line="357" selection-start-column="19" selection-end-line="357" selection-end-column="19" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/stylesheets/application.css">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="52584" max-vertical-offset="78948">
<caret line="1926" column="30" selection-start-line="1926" selection-start-column="30" selection-end-line="1926" selection-end-column="30" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/stylesheets/scm.css">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="146" max-vertical-offset="3024">
<caret line="35" column="0" selection-start-line="35" selection-start-column="0" selection-end-line="35" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/courses_controller.rb"> <entry file="file://$PROJECT_DIR$/app/controllers/courses_controller.rb">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="27459"> <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="27459">
@ -303,12 +344,28 @@
</entry> </entry>
<entry file="file://$PROJECT_DIR$/public/stylesheets/scm.css"> <entry file="file://$PROJECT_DIR$/public/stylesheets/scm.css">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.8554604" vertical-offset="146" max-vertical-offset="3024"> <state vertical-scroll-proportion="0.0" vertical-offset="146" max-vertical-offset="3024">
<caret line="35" column="0" selection-start-line="35" selection-start-column="0" selection-end-line="35" selection-end-column="0" /> <caret line="35" column="0" selection-start-line="35" selection-start-column="0" selection-end-line="35" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/public/stylesheets/welcome.css">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="13797">
<caret line="17" column="27" selection-start-line="17" selection-start-column="27" selection-end-line="17" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Gemfile">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-4.4059405" vertical-offset="5949" max-vertical-offset="6858">
<caret line="72" column="0" selection-start-line="72" selection-start-column="0" selection-end-line="72" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</component> </component>
</project> </project>

155
Gemfile
View File

@ -1,249 +1,136 @@
source 'https://rubygems.org' source 'http://ruby.taobao.org'
#source 'http://ruby.sdutlinux.org/'
unless RUBY_PLATFORM =~ /w32/ unless RUBY_PLATFORM =~ /w32/
5
# unix-like only # unix-like only
6
gem 'iconv' gem 'iconv'
7
gem 'rubyzip' gem 'rubyzip'
8
gem 'zip-zip' gem 'zip-zip'
9
end end
10
11
gem 'seems_rateable', path: 'lib/seems_rateable' gem 'seems_rateable', path: 'lib/seems_rateable'
12
gem "rails", "3.2.13" gem "rails", "3.2.13"
13
gem "jquery-rails", "~> 2.0.2" gem "jquery-rails", "~> 2.0.2"
14
gem "i18n", "~> 0.6.0" gem "i18n", "~> 0.6.0"
15
gem "coderay", "~> 1.0.6" gem "coderay", "~> 1.0.6"
16
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby] gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
17
gem "builder", "3.0.0" gem "builder", "3.0.0"
18
gem 'acts-as-taggable-on', '2.4.1' gem 'acts-as-taggable-on', '2.4.1'
19
gem 'spreadsheet' gem 'spreadsheet'
20
gem 'ruby-ole' gem 'ruby-ole'
21
22
group :development do group :development do
23
gem 'better_errors', path: 'lib/better_errors' gem 'better_errors', path: 'lib/better_errors'
24
gem 'rack-mini-profiler', path: 'lib/rack-mini-profiler' gem 'rack-mini-profiler', path: 'lib/rack-mini-profiler'
25
end end
26
27
group :test do group :test do
28
gem "shoulda", "~> 3.5.0" gem "shoulda", "~> 3.5.0"
29
gem "mocha", "~> 1.1.0" gem "mocha", "~> 1.1.0"
30
gem 'capybara', '~> 2.4.1' gem 'capybara', '~> 2.4.1'
31
gem 'nokogiri', '~> 1.6.3' gem 'nokogiri', '~> 1.6.3'
32
gem 'factory_girl', '~> 4.4.0' gem 'factory_girl', '~> 4.4.0'
33
gem 'selenium-webdriver', '~> 2.42.0' gem 'selenium-webdriver', '~> 2.42.0'
34
35
36
platforms :mri, :mingw do platforms :mri, :mingw do
37
group :rmagick do group :rmagick do
38
# RMagick 2 supports ruby 1.9 # RMagick 2 supports ruby 1.9
39
# RMagick 1 would be fine for ruby 1.8 but Bundler does not support # RMagick 1 would be fine for ruby 1.8 but Bundler does not support
40
# different requirements for the same gem on different platforms # different requirements for the same gem on different platforms
41
gem "rmagick", ">= 2.0.0" gem "rmagick", ">= 2.0.0"
42
end end
43
end end
44
end end
45
46
group :development, :test do group :development, :test do
47
gem "guard-rails", '~> 0.5.3' gem "guard-rails", '~> 0.5.3'
48
gem 'spork-testunit', '~> 0.0.8' gem 'spork-testunit', '~> 0.0.8'
49
gem 'guard-spork', '~> 1.5.1' gem 'guard-spork', '~> 1.5.1'
50
gem 'guard-test', '~> 1.0.0' gem 'guard-test', '~> 1.0.0'
51
gem 'ruby-prof', '~> 0.15.1' unless RUBY_PLATFORM =~ /w32/ gem 'ruby-prof', '~> 0.15.1' unless RUBY_PLATFORM =~ /w32/
52
gem 'pry' gem 'pry'
53
gem 'pry-nav' gem 'pry-nav'
54
55
end end
56
57
58
# Gems used only for assets and not required # Gems used only for assets and not required
59
# in production environments by default. # in production environments by default.
60
group :assets do group :assets do
61
gem 'sass-rails', '~> 3.2.3' gem 'sass-rails', '~> 3.2.3'
62
gem 'coffee-rails', '~> 3.2.1' gem 'coffee-rails', '~> 3.2.1'
63
64
# See https://github.com/sstephenson/execjs#readme for more supported runtimes # See https://github.com/sstephenson/execjs#readme for more supported runtimes
65
gem 'therubyracer', :platforms => :ruby gem 'therubyracer', :platforms => :ruby
66
67
gem 'uglifier', '>= 1.0.3' gem 'uglifier', '>= 1.0.3'
68
end end
69
70
# Optional gem for LDAP authentication # Optional gem for LDAP authentication
71
group :ldap do group :ldap do
72
gem "net-ldap", "~> 0.3.1" gem "net-ldap", "~> 0.3.1"
73
end end
74
75
76
# Optional gem for OpenID authentication # Optional gem for OpenID authentication
77
group :openid do group :openid do
78
gem "ruby-openid", "~> 2.1.4", :require => "openid" gem "ruby-openid", "~> 2.1.4", :require => "openid"
79
gem "rack-openid" gem "rack-openid"
80
end end
81
82
# Optional gem for exporting the gantt to a PNG file, not supported with jruby # Optional gem for exporting the gantt to a PNG file, not supported with jruby
83
platforms :jruby do platforms :jruby do
84
# jruby-openssl is bundled with JRuby 1.7.0 # jruby-openssl is bundled with JRuby 1.7.0
85
gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0' gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0'
86
gem "activerecord-jdbc-adapter", "1.2.5" gem "activerecord-jdbc-adapter", "1.2.5"
87
end end
88
89
# Include database gems for the adapters found in the database # Include database gems for the adapters found in the database
90
# configuration file # configuration file
91
require 'erb' require 'erb'
92
require 'yaml' require 'yaml'
93
database_file = File.join(File.dirname(__FILE__), "config/database.yml") database_file = File.join(File.dirname(__FILE__), "config/database.yml")
94
if File.exist?(database_file) if File.exist?(database_file)
95
database_config = YAML::load(ERB.new(IO.read(database_file)).result) database_config = YAML::load(ERB.new(IO.read(database_file)).result)
96
adapters = database_config.values.map {|c| c['adapter']}.compact.uniq adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
97
if adapters.any? if adapters.any?
98
adapters.each do |adapter| adapters.each do |adapter|
99
case adapter case adapter
100
when 'mysql2' when 'mysql2'
101
gem "mysql2", "= 0.3.11", :platforms => [:mri, :mingw] gem "mysql2", "= 0.3.11", :platforms => [:mri, :mingw]
102
gem "activerecord-jdbcmysql-adapter", :platforms => :jruby gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
103
when 'mysql' when 'mysql'
104
gem "mysql", "~> 2.8.1", :platforms => [:mri, :mingw] gem "mysql", "~> 2.8.1", :platforms => [:mri, :mingw]
105
gem "activerecord-jdbcmysql-adapter", :platforms => :jruby gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
106
when /postgresql/ when /postgresql/
107
gem "pg", ">= 0.11.0", :platforms => [:mri, :mingw] gem "pg", ">= 0.11.0", :platforms => [:mri, :mingw]
108
gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby
109
when /sqlite3/ when /sqlite3/
110
gem "sqlite3", :platforms => [:mri, :mingw] gem "sqlite3", :platforms => [:mri, :mingw]
111
gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
112
when /sqlserver/ when /sqlserver/
113
gem "tiny_tds", "~> 0.5.1", :platforms => [:mri, :mingw] gem "tiny_tds", "~> 0.5.1", :platforms => [:mri, :mingw]
114
gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw] gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw]
115
else else
116
warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems") warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
117
end end
118
end end
119
else else
120
warn("No adapter found in config/database.yml, please configure it first") warn("No adapter found in config/database.yml, please configure it first")
121
end end
122
else else
123
warn("Please configure your config/database.yml first") warn("Please configure your config/database.yml first")
124
end end
125
126
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local") local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
127
if File.exists?(local_gemfile) if File.exists?(local_gemfile)
128
puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v` puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v`
129
instance_eval File.read(local_gemfile) instance_eval File.read(local_gemfile)
130
end end
131
132
# Load plugins' Gemfiles # Load plugins' Gemfiles
133
Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file| Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file|
134
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v` puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
135
instance_eval File.read(file) instance_eval File.read(file)
136 end
end