Merge branch 'master' into rspec

This commit is contained in:
benji 2015-09-12 11:30:09 +02:00
commit 48aaaa354d
7 changed files with 47 additions and 46 deletions

View file

@ -60,6 +60,11 @@ group :development do
gem 'capistrano-passenger'
end
group :development, :test do
gem 'pry-rails'
gem 'pry-byebug'
end
# Airbrake
gem 'airbrake'

View file

@ -89,6 +89,7 @@ GEM
climate_control (>= 0.0.3, < 1.0)
codeclimate-test-reporter (0.4.7)
simplecov (>= 0.7.1, < 1.0.0)
coderay (1.1.0)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
@ -157,6 +158,7 @@ GEM
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
method_source (0.8.2)
mime-types (2.4.3)
mini_portile (0.6.2)
minitest (5.5.1)
@ -195,6 +197,20 @@ GEM
activesupport (>= 3.0.0)
cocaine (~> 0.5.3)
mime-types
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry (0.10.1-x64-mingw32)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
win32console (~> 1.3)
pry-byebug (3.0.1)
byebug (~> 3.4)
pry (~> 0.10)
pry-rails (0.3.4)
pry (>= 0.9.10)
rack (1.6.0)
rack-test (0.6.3)
rack (>= 1.0)
@ -303,6 +319,7 @@ GEM
warden (1.2.3)
rack (>= 1.0)
will_paginate (3.0.7)
win32console (1.3.2)
xpath (2.0.0)
nokogiri (~> 1.3)
@ -341,6 +358,8 @@ DEPENDENCIES
omniauth-oauth2
paper_trail (~> 4.0.0.beta)
paperclip
pry-byebug
pry-rails
rails (= 4.2)
responders (~> 2.0)
rspec-rails

View file

@ -76,8 +76,12 @@ class FormattedFormBuilder < ActionView::Helpers::FormBuilder
def submit_with_format(name = nil, options = {})
options[:class] = submit_class unless options[:class]
content_tag :div, class: submit_wrapper_class do
submit_without_format(name, options)
content = submit_without_format(name, options)
if options[:skip_wrapper]
content
else
content_tag :div, content, class: submit_wrapper_class
end
end

View file

@ -1,24 +0,0 @@
class Webhook
DEFAULT_USERNAME = "Tab"
attr_accessor :hook
def initialize(attributes = {})
options = {
channel: (attributes[:channel]),
username: (attributes[:username] || DEFAULT_USERNAME),
icon_url: attributes[:icon_url],
icon_emoji: attributes[:icon_emoji]
}
self.hook = Tarumi::Bot.new(
"zeuswpi",
Rails.application.secrets.zeus_token,
options
)
end
def ping(text)
self.hook.ping(text)
end
end

View file

@ -4,7 +4,7 @@
<span class="input-group-addon">&euro;</span>
<%= content_tag :span, "", id: "order_price", class: "input-group-addon" %>
<span class="input-group-btn">
<%= f.submit "Order!", class: "btn btn-primary big-form-button" %>
<%= f.submit "Order!", class: "btn btn-primary big-form-button", skip_wrapper: true %>
</span>
</div>
</div>

View file

@ -14,12 +14,10 @@ development:
secret_key_base: 5d40610321e19e4f71ee2ba8af4f426fe15096c405da3800c6b33bed6779f2d11f55a0edc455974b19a01fd71f6cd508dba980305dbc55ff82521a2d12f891d8
omniauth_client_id: tomtest
omniauth_client_secret: blargh
zeus_token: "token"
access_token: "token"
test:
secret_key_base: 961437e28e7d6055ffaad9cf1f8d614354f57f10cb2d7601c9d6ede72a03b9c9535ad9e63507e3eb31252c4895970a63117493408f2e9a46c7a0c4a5a7836b81
zeus_token: "token"
access_token: "token"
# Do not keep production secrets in the repository,
@ -28,5 +26,4 @@ production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
omniauth_client_id: ""
omniauth_client_secret: ""
zeus_token: ""
access_token: ""

View file

@ -49,41 +49,41 @@ ActiveRecord::Schema.define(version: 20150911195029) do
add_index "orders", ["user_id"], name: "index_orders_on_user_id"
create_table "products", force: :cascade do |t|
t.string "name", null: false
t.integer "price_cents", default: 0, null: false
t.string "name", limit: 255, null: false
t.integer "price_cents", default: 0, null: false
t.datetime "created_at"
t.datetime "updated_at"
t.string "avatar_file_name"
t.string "avatar_content_type"
t.string "avatar_file_name", limit: 255
t.string "avatar_content_type", limit: 255
t.integer "avatar_file_size"
t.datetime "avatar_updated_at"
t.integer "category", default: 0
t.integer "stock", default: 0, null: false
t.integer "category", default: 0
t.integer "stock", default: 0, null: false
t.integer "calories"
t.boolean "deleted", default: false
t.boolean "deleted", default: false
end
create_table "users", force: :cascade do |t|
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", default: 0, null: false
t.integer "sign_in_count", default: 0, null: false
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.string "current_sign_in_ip", limit: 255
t.string "last_sign_in_ip", limit: 255
t.boolean "admin"
t.integer "dagschotel_id"
t.string "avatar_file_name"
t.string "avatar_content_type"
t.string "avatar_file_name", limit: 255
t.string "avatar_content_type", limit: 255
t.integer "avatar_file_size"
t.datetime "avatar_updated_at"
t.integer "orders_count", default: 0
t.boolean "koelkast", default: false
t.integer "orders_count", default: 0
t.boolean "koelkast", default: false
t.string "provider"
t.string "uid"
t.string "encrypted_password", default: "", null: false
t.boolean "private", default: false
t.string "encrypted_password", default: "", null: false
t.boolean "private", default: false
end
add_index "users", ["koelkast"], name: "index_users_on_koelkast"