Skip to content

Commit

Permalink
Update rails dependency to version 4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Dec 2, 2013
1 parent fe8b73b commit 9333b46
Show file tree
Hide file tree
Showing 46 changed files with 326 additions and 244 deletions.
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile ~/.gitignore_global
# git config --global core.excludesfile '~/.gitignore_global'

# Ignore bundler config
# Ignore bundler config.
/.bundle

# Include SimpleCov directory
# Ignore SimpleCov directory.
/coverage

# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal

# Ignore all logfiles and tempfiles.
/log/*.log
Expand Down
7 changes: 6 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
ruby '2.0.0'

gem 'rails', '~> 3.2'
gem 'rails', '~> 4.0.1'
gem 'bootstrap-sass', '~> 2.0'
gem 'haml'
gem 'omniauth'
Expand All @@ -25,3 +25,8 @@ group :test do
gem 'simplecov', :require => false
gem 'webmock'
end

group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', :require => false
end
105 changes: 52 additions & 53 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,43 +1,40 @@
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.15)
actionpack (= 3.2.15)
actionmailer (4.0.1)
actionpack (= 4.0.1)
mail (~> 2.5.4)
actionpack (3.2.15)
activemodel (= 3.2.15)
activesupport (= 3.2.15)
builder (~> 3.0.0)
actionpack (4.0.1)
activesupport (= 4.0.1)
builder (~> 3.1.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.15)
activesupport (= 3.2.15)
builder (~> 3.0.0)
activerecord (3.2.15)
activemodel (= 3.2.15)
activesupport (= 3.2.15)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.15)
activemodel (= 3.2.15)
activesupport (= 3.2.15)
activesupport (3.2.15)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.1)
activesupport (= 4.0.1)
builder (~> 3.1.0)
activerecord (4.0.1)
activemodel (= 4.0.1)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.1)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.1)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
addressable (2.3.5)
arel (3.0.3)
arel (4.0.1)
atomic (1.1.14)
bootstrap-sass (2.3.2.2)
sass (~> 3.2)
buftok (0.2.0)
builder (3.0.4)
coffee-rails (3.2.2)
builder (3.1.4)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
Expand Down Expand Up @@ -65,7 +62,6 @@ GEM
http_parser.rb
http_parser.rb (0.5.3)
i18n (0.6.5)
journey (1.0.4)
json (1.8.1)
mail (2.5.4)
mime-types (~> 1.16)
Expand All @@ -74,6 +70,7 @@ GEM
thread_safe (~> 0.1.3)
metaclass (0.0.1)
mime-types (1.25.1)
minitest (4.7.5)
mocha (0.14.0)
metaclass (~> 0.0.1)
multi_json (1.8.2)
Expand All @@ -91,55 +88,56 @@ GEM
polyglot (0.3.3)
puma (2.6.0)
rack (>= 1.1, < 2.0)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.3)
rack
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (3.2.15)
actionmailer (= 3.2.15)
actionpack (= 3.2.15)
activerecord (= 3.2.15)
activeresource (= 3.2.15)
activesupport (= 3.2.15)
bundler (~> 1.0)
railties (= 3.2.15)
rails (4.0.1)
actionmailer (= 4.0.1)
actionpack (= 4.0.1)
activerecord (= 4.0.1)
activesupport (= 4.0.1)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.1)
sprockets-rails (~> 2.0.0)
rails_12factor (0.0.2)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.1)
rails_stdout_logging (0.0.3)
railties (3.2.15)
actionpack (= 3.2.15)
activesupport (= 3.2.15)
rack-ssl (~> 1.3.2)
railties (4.0.1)
actionpack (= 4.0.1)
activesupport (= 4.0.1)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
thor (>= 0.18.1, < 2.0)
rake (10.1.0)
rdoc (3.12.2)
json (~> 1.4)
rest-client (1.6.7)
mime-types (>= 1.16)
safe_yaml (0.9.7)
sass (3.2.12)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass-rails (4.0.1)
railties (>= 4.0.0, < 5.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sprockets-rails (~> 2.0.0)
sdoc (0.3.20)
json (>= 1.1.3)
rdoc (~> 3.10)
simple_oauth (0.2.0)
simplecov (0.8.2)
docile (~> 1.1.0)
multi_json
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
sprockets (2.2.2)
sprockets (2.10.1)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.0.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
term-ansicolor (1.2.2)
tins (~> 0.8)
thor (0.18.1)
Expand Down Expand Up @@ -181,9 +179,10 @@ DEPENDENCIES
omniauth
omniauth-twitter
puma
rails (~> 3.2)
rails (~> 4.0.1)
rails_12factor
sass-rails
sdoc
simplecov
twitter
uglifier
Expand Down
1 change: 0 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

Expand Down
Empty file added app/assets/images/.keep
Empty file.
9 changes: 4 additions & 5 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.

//= require bootstrap-alert
//= require bootstrap-collapse

//= require_tree ./pages
6 changes: 4 additions & 2 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
class ApplicationController < ActionController::Base
protect_from_forgery
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery :with => :exception

private
private

def client
@client ||= Twitter::REST::Client.new do |config|
Expand Down
Empty file added app/controllers/concerns/.keep
Empty file.
4 changes: 2 additions & 2 deletions app/controllers/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class SessionsController < ApplicationController
def create
session[:access_token] = request.env['omniauth.auth']['credentials']['token']
session[:access_secret] = request.env['omniauth.auth']['credentials']['secret']
redirect_to show_path, notice: "Signed in"
redirect_to show_path, :notice => "Signed in"
end

def show
Expand All @@ -20,6 +20,6 @@ def error

def destroy
reset_session
redirect_to root_path, notice: "Signed out"
redirect_to root_path, :notice => "Signed out"
end
end
Empty file added app/mailers/.keep
Empty file.
Empty file added app/models/.keep
Empty file.
Empty file added app/models/concerns/.keep
Empty file.
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def follow_list(user, list)
users_to_follow = []
cursor = -1
until cursor == 0
list_members = client.list_members(user, list, cursor: cursor, skip_status: true, include_entities: false)
list_members = client.list_members(user, list, :cursor => cursor, :skip_status => true, :include_entities => false)
users_to_follow += list_members.to_a
cursor = list_members.next_cursor
end
Expand Down
3 changes: 3 additions & 0 deletions bin/bundle
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env ruby
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
load Gem.bin_path('bundler', 'bundle')
4 changes: 4 additions & 0 deletions bin/rails
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env ruby
APP_PATH = File.expand_path('../../config/application', __FILE__)
require_relative '../config/boot'
require 'rails/commands'
4 changes: 4 additions & 0 deletions bin/rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env ruby
require_relative '../config/boot'
require 'rake'
Rake.application.run
2 changes: 1 addition & 1 deletion config.ru
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment', __FILE__)
run FollowAll::Application
run Rails.application
45 changes: 3 additions & 42 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,61 +4,22 @@
require 'rails/test_unit/railtie'
require 'sprockets/railtie'

if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require(*Rails.groups(assets: %w(development test)))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env)

module FollowAll
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.

# Custom directories with classes and modules you want to be autoloadable.
# config.autoload_paths += %W(#{config.root}/extras)

# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]

# Activate observers that should always be running.
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer

# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'

# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de

# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"

# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]

# Enable escaping HTML in JSON.
config.active_support.escape_html_entities_in_json = true

# Use SQL instead of Active Record's schema dumper when creating the database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql

# Enforce whitelist mode for mass assignment.
# This will create an empty whitelist of attributes available for mass-assignment for all models
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
# parameters by using an attr_accessible or attr_protected declaration.
# config.active_record.whitelist_attributes = true

# Enable the asset pipeline
config.assets.enabled = true

# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
end
end
2 changes: 0 additions & 2 deletions config/boot.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'rubygems'

# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)

Expand Down
4 changes: 2 additions & 2 deletions config/environment.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Load the rails application
# Load the Rails application.
require File.expand_path('../application', __FILE__)

# Initialize the rails application
# Initialize the Rails application.
FollowAll::Application.initialize!
Loading

0 comments on commit 9333b46

Please sign in to comment.