Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Upgrade to Rails v2.3.4

  • Loading branch information...
commit f640daa0d0ccfb1e5ef91027a5bbd2539834377d 1 parent 3df2398
@njonsson authored
View
26 app/models/importers/healthengage_importer.rb
@@ -50,19 +50,19 @@ def extract_measurement(cells)
def prepend_event_to_notes(event_id, notes)
event = case event_id
- when '0': nil
- when '1': 'Fasting'
- when '2': 'Before Exercise'
- when '3': 'After Exercise'
- when '4': 'Illness'
- when '5': 'Hypoglycemic'
- when '6': 'Hyperglycemic'
- when '7': 'Carb Intake'
- when '8': 'Insulin Dose'
- when '10': 'Stress'
- when '11': 'Oral Medication'
- when '12': nil # A "See Notes" event
- else "[HealthEngage event #{event_id}]"
+ when '0' then nil
+ when '1' then 'Fasting'
+ when '2' then 'Before Exercise'
+ when '3' then 'After Exercise'
+ when '4' then 'Illness'
+ when '5' then 'Hypoglycemic'
+ when '6' then 'Hyperglycemic'
+ when '7' then 'Carb Intake'
+ when '8' then 'Insulin Dose'
+ when '10' then 'Stress'
+ when '11' then 'Oral Medication'
+ when '12' then nil # A "See Notes" event
+ else "[HealthEngage event #{event_id}]"
end
if event
return event unless notes
View
24 app/models/measurement.rb
@@ -9,22 +9,14 @@ class << self
# to _time_.
def adjusted_date_and_time_slot_of(time)
case time.hour
- when (0...5)
- [time.yesterday.to_date, 'g']
- when (5...8)
- [time.to_date, 'a']
- when (8...11)
- [time.to_date, 'b']
- when (11...14)
- [time.to_date, 'c']
- when (14...17)
- [time.to_date, 'd']
- when (17...20)
- [time.to_date, 'e']
- when (20...23)
- [time.to_date, 'f']
- else
- [time.to_date, 'g']
+ when (0...5) then [time.yesterday.to_date, 'g']
+ when (5...8) then [time.to_date, 'a']
+ when (8...11) then [time.to_date, 'b']
+ when (11...14) then [time.to_date, 'c']
+ when (14...17) then [time.to_date, 'd']
+ when (17...20) then [time.to_date, 'e']
+ when (20...23) then [time.to_date, 'f']
+ else [time.to_date, 'g']
end
end
View
2  config/boot.rb
@@ -82,8 +82,8 @@ def gem_version
end
def load_rubygems
+ min_version = '1.3.2'
require 'rubygems'
- min_version = '1.3.1'
unless rubygems_version >= min_version
$stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
exit 1
View
2  config/environment.rb
@@ -1,7 +1,7 @@
# Be sure to restart your server when you modify this file
# Specifies gem version of Rails to use when vendor/rails is not present
-RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION
+RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
View
2  config/initializers/new_rails_defaults.rb
@@ -11,6 +11,8 @@
ActiveRecord::Base.store_full_sti_class = true
end
+ActionController::Routing.generate_best_match = false
+
# Use ISO 8601 format for JSON serialized times and dates.
ActiveSupport.use_standard_json_time_format = true
View
6 config/routes.rb
@@ -1,4 +1,4 @@
-ActionController::Routing::Routes.draw do |map|
+ActionController::Routing::Routes.draw do |map|
# The priority is based upon order of creation: first created -> highest priority.
# Sample of regular route:
@@ -31,7 +31,7 @@
# end
# You can have the root of your site routed with map.root -- just remember to delete public/index.html.
- # map.root :controller => 'welcome'
+ # map.root :controller => "welcome"
# See how all your routes lay out with "rake routes"
@@ -40,7 +40,7 @@
# Install the default routes as the lowest priority.
# Note: These default routes make all actions in every controller accessible via GET requests. You should
- # consider removing the them or commenting them out if you're using named routes and resources.
+ # consider removing or commenting them out if you're using named routes and resources.
# map.connect ':controller/:action/:id'
# map.connect ':controller/:action/:id.:format'
end
View
7 db/seeds.rb
@@ -0,0 +1,7 @@
+# This file should contain all the record creation needed to seed the database with its default values.
+# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
+#
+# Examples:
+#
+# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
+# Major.create(:name => 'Daley', :city => cities.first)
View
4 script/about
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
+require File.expand_path('../../config/boot', __FILE__)
$LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info"
-require 'commands/about'
View
2  script/console
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
+require File.expand_path('../../config/boot', __FILE__)
require 'commands/console'
View
2  script/dbconsole
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
+require File.expand_path('../../config/boot', __FILE__)
require 'commands/dbconsole'
View
2  script/destroy
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
+require File.expand_path('../../config/boot', __FILE__)
require 'commands/destroy'
View
2  script/generate
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
+require File.expand_path('../../config/boot', __FILE__)
require 'commands/generate'
View
2  script/performance/benchmarker
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../../config/boot'
+require File.expand_path('../../../config/boot', __FILE__)
require 'commands/performance/benchmarker'
View
2  script/performance/profiler
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../../config/boot'
+require File.expand_path('../../../config/boot', __FILE__)
require 'commands/performance/profiler'
View
2  script/plugin
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
+require File.expand_path('../../config/boot', __FILE__)
require 'commands/plugin'
View
2  script/runner
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
+require File.expand_path('../../config/boot', __FILE__)
require 'commands/runner'
View
2  script/server
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
+require File.expand_path('../../config/boot', __FILE__)
require 'commands/server'
2  vendor/rails
@@ -1 +1 @@
-Subproject commit dc88847e5ce392eed210b97525c14fca55852867
+Subproject commit a43ef2436cc6b63af35636127e42495ceb538cee
Please sign in to comment.
Something went wrong with that request. Please try again.