Commit c8a1c53e by Tan Phat Nguyen

add config file using figago gem

parent 771a14e4
...@@ -15,4 +15,6 @@ ...@@ -15,4 +15,6 @@
/log/*.log /log/*.log
/tmp /tmp
/public/uploads /public/uploads
# Ignore application configuration
/config/application.yml /config/application.yml
...@@ -19,6 +19,7 @@ gem 'mysql2' ...@@ -19,6 +19,7 @@ gem 'mysql2'
gem 'vacuum' gem 'vacuum'
gem 'kaminari' gem 'kaminari'
gem 'devise' gem 'devise'
gem "figaro"
group :development, :test do group :development, :test do
gem 'sqlite3', '1.3.9' gem 'sqlite3', '1.3.9'
......
...@@ -81,6 +81,8 @@ GEM ...@@ -81,6 +81,8 @@ GEM
i18n (~> 0.5) i18n (~> 0.5)
ffi (1.9.6) ffi (1.9.6)
ffi (1.9.6-x64-mingw32) ffi (1.9.6-x64-mingw32)
figaro (1.0.0)
thor (~> 0.14)
fog (1.23.0) fog (1.23.0)
fog-brightbox fog-brightbox
fog-core (~> 1.23) fog-core (~> 1.23)
...@@ -289,6 +291,7 @@ DEPENDENCIES ...@@ -289,6 +291,7 @@ DEPENDENCIES
coffee-rails (= 4.0.1) coffee-rails (= 4.0.1)
devise devise
faker (= 1.4.2) faker (= 1.4.2)
figaro
fog (= 1.23.0) fog (= 1.23.0)
guard-minitest (= 2.3.1) guard-minitest (= 2.3.1)
jbuilder (= 2.2.3) jbuilder (= 2.2.3)
......
<tr> <tr>
<td><%= product.name %></td> <td><%= product.name %></td>
<td><%= product.price %></td> <td>$<%= product.price %></td>
<td><%= product.description %></td> <td><%=raw product.description %></td>
<td><%= product.category.name %></td> <td><%= product.category.name %></td>
<td><%= image_tag product.photo_url.to_s, width: '140', height: '140', class: 'img-rounded' %></td> <td><%= image_tag product.photo_url.to_s, width: '140', height: '140', class: 'img-rounded' %></td>
<td><%= link_to 'Show', [:admin, product] %></td> <td><%= link_to 'Show', [:admin, product] %></td>
......
<% provide(:title, @product.name) %> <% provide(:title, @product.name) %>
<h1 class='page-header'>Show Product</h1> <h1 class='page-header'>Show Product</h1>
<%= image_tag @product.photo.url, width: '140', height: '140', class: 'img-rounded' %> <br/><br>
<p>Name: <b><%= @product.name%></b></p> <p>Name: <b><%= @product.name%></b></p>
<p>Price: <b>$<%= @product.price%></b></p> <p>Price: <b>$<%= @product.price%></b></p>
<p>Description: <b><%= @product.description%></b></p>
<p>Category: <b><%= @product.category.name%></b></p> <p>Category: <b><%= @product.category.name%></b></p>
<%= image_tag @product.photo.url, width: '140', height: '140', class: 'img-rounded' %> <br/><br> <p>Description: </p><b><div><%=raw @product.description%></div></b>
<%= link_to 'Back', admin_products_path, class: 'btn btn-primary' %> <%= link_to 'Back', admin_products_path, class: 'btn btn-primary' %>
<%= link_to 'Edit', edit_admin_product_path(@product), class: 'btn btn-primary' %> <%= link_to 'Edit', edit_admin_product_path(@product), class: 'btn btn-primary' %>
\ No newline at end of file
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div class='row'> <div class='row'>
<b>Description:</b> <b>Description:</b>
<p></p> <p></p>
<p><%= @product.description %></p> <%=raw @product.description %>
</div> </div>
<div class='row'> <div class='row'>
<%= button_to 'Buy', line_items_path(product_id: @product), class: 'btn btn-default' %> <%= button_to 'Buy', line_items_path(product_id: @product), class: 'btn btn-default' %>
......
...@@ -73,9 +73,9 @@ namespace :db do ...@@ -73,9 +73,9 @@ namespace :db do
def build_request def build_request
@request = Vacuum.new @request = Vacuum.new
@request.configure( @request.configure(
aws_access_key_id: 'AKIAI4FGZR4YFCAP4DVQ', aws_access_key_id: ENV['pusher_aws_access_key_id'],
aws_secret_access_key: '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', aws_secret_access_key: ENV['pusher_aws_secret_access_key'],
associate_tag: 'tag' associate_tag: ENV['pusher_associate_tag']
) )
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment