Browse files

remove RepositoryConfig#update_configs_url and Typhoeus gem

  • Loading branch information...
1 parent b98a93b commit 372bae39fecee9649c0f0b15973b99ac1882bf70 @flyerhzm flyerhzm committed Feb 2, 2013
View
1 Gemfile
@@ -22,7 +22,6 @@ gem 'cells'
gem 'exception_notification'
gem 'cancan'
gem 'rails_admin'
-gem 'typhoeus'
gem 'meta-tags', :require => 'meta_tags'
gem 'css_sprite'
gem 'whenever', :require => false
View
4 Gemfile.lock
@@ -388,9 +388,6 @@ GEM
eventmachine (>= 0.12.8)
http_parser.rb (~> 0.5.1)
simple_oauth (~> 0.1.4)
- typhoeus (0.4.2)
- ffi (~> 1.0)
- mime-types (~> 1.18)
tzinfo (0.3.35)
uglifier (1.3.0)
execjs (>= 0.3.0)
@@ -476,7 +473,6 @@ DEPENDENCIES
spork-rails
therubyracer
thin
- typhoeus
uglifier
webmock
whenever
View
1 app/cells/header/display.html.haml
@@ -3,7 +3,6 @@
.container{style: "width:auto;"}
%h3#title
.railsbp_logo
- = link_to "Railsbp", root_path, class: 'brand'
%ul.nav
%li= link_to "Home", root_path
%li= link_to "How it works", page_path("how-it-works")
View
3 app/models/repository.rb
@@ -18,7 +18,6 @@
# builds_count :integer(4) default(0)
# authentication_token :string(255)
# visible :boolean(1) default(FALSE), not null
-# update_configs_url :string(255)
# collaborators_count :integer(4) default(0), not null
# last_build_at :datetime
#
@@ -39,7 +38,7 @@ class Repository < ActiveRecord::Base
scope :visible, where(:visible => true)
- attr_accessible :git_url, :name, :private, :fork, :rails, :description, :github_id, :html_url, :ssh_url, :github_name, :visible, :update_configs_url
+ attr_accessible :git_url, :name, :private, :fork, :rails, :description, :github_id, :html_url, :ssh_url, :github_name, :visible
def clone_url
private? ? ssh_url : git_url
View
7 app/models/repository_configs.rb
@@ -28,11 +28,4 @@ def write(configs)
def read
YAML.load_file(@repository.config_file_path)
end
-
- def notify_remote(configs)
- if @repository.update_configs_url?
- Typhoeus::Request.post(@repository.update_configs_url, :params => {:configs => configs})
- end
- end
- handle_asynchronously :notify_remote
end
View
2 app/views/repositories/edit.html.haml
@@ -17,7 +17,5 @@
= form.input :git_url, input_html: {class: "span5"}
= form.input :ssh_url, input_html: {class: "span5"}
= form.input :visible, label: "Visibility #{link_to '', '#', class: 'question_mark_icon', rel: 'tooltip', title: 'analyze result is visible to everyone if check, otherwise it is accessible only by collaborators'}".html_safe, hint: "if the repository is visible to everyone"
- - if @repository.private?
- = form.input :update_configs_url, label: "Update configs url #{link_to '', '#', class: 'question_mark_icon', rel: 'tooltip', title: 'update configs url is used to update rails_best_practices.yml on proxy server'}".html_safe, input_html: {class: "span5"}
.form-actions
= form.submit class: "btn btn-primary"
View
8 config/initializers/devise.rb
@@ -9,9 +9,6 @@
# Configure the class responsible to send e-mails.
# config.mailer = "Devise::Mailer"
- # Automatically apply schema changes in tableless databases
- config.apply_schema = false
-
# ==> ORM configuration
# Load and configure the ORM. Supports :active_record (default) and
# :mongoid (bson_ext recommended) by default. Other ORMs may be
@@ -111,10 +108,6 @@
# If true, extends the user's remember period when remembered via cookie.
# config.extend_remember_period = false
- # If true, uses the password salt as remember token. This should be turned
- # to false if you are not using database authenticatable.
- config.use_salt_as_remember_token = true
-
# Options to be passed to the created cookie. For instance, you can set
# :secure => true in order to force SSL only cookies.
# config.cookie_options = {}
@@ -212,6 +205,7 @@
# up on your models and hooks.
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
GITHUB_CONFIG = YAML.load_file(Rails.root.join('config', 'github.yml'))[Rails.env]
+ OmniAuth.config.logger = Rails.logger
config.omniauth :github, GITHUB_CONFIG['key'], GITHUB_CONFIG['secret'], :scope => 'repo'
# ==> Warden configuration
View
9 db/migrate/20130202121202_remove_update_configs_url_from_repositories.rb
@@ -0,0 +1,9 @@
+class RemoveUpdateConfigsUrlFromRepositories < ActiveRecord::Migration
+ def up
+ remove_column :repositories, :update_configs_url
+ end
+
+ def down
+ add_column :repositories, :update_configs_url, :string
+ end
+end
View
3 db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20120714133938) do
+ActiveRecord::Schema.define(:version => 20130202121202) do
create_table "builds", :force => true do |t|
t.integer "warning_count"
@@ -97,7 +97,6 @@
t.integer "builds_count", :default => 0
t.string "authentication_token"
t.boolean "visible", :default => false, :null => false
- t.string "update_configs_url"
t.integer "collaborators_count", :default => 0, :null => false
t.datetime "last_build_at"
t.boolean "rails", :default => true

0 comments on commit 372bae3

Please sign in to comment.