Provide SHOPIFY_SUBDOMAIN
, SHOPIFY_EMAIL
and SHOPIFY_PASSWORD
environment variables, and discount.rb
will configure itself.
Supported APIs are
Discount.find(:all)
Discount.find(:first)
Discount.create(...)
Discount#destroy
class Architecture | |
def roof(architecture) | |
architecture.roof | |
end | |
end | |
class Tudor | |
def desc |
def generate_payfort_signature(p_amount, p_customer_email, p_merchant_reference) | |
#current_return_url = Rails.env.development? ? CONFIG[:PAYFORT_TEST_RETURN_URL] : CONFIG[:PAYFORT_PRODUCTION_RETURN_URL] | |
sig_params = "#{CONFIG[:PAYFORT_SHA_REQUEST_PHARSE]}access_code=#{CONFIG[:PAYFORT_ACCESS_CODE]}amount=#{p_amount}command=#{CONFIG[:PAYFORT_PURCHASE_COMMAND]}currency=#{CONFIG[:PAYFORT_CURRENCY]}customer_email=#{p_customer_email}language=#{CONFIG[:PAYFORT_LANGUAGE]}merchant_identifier=#{CONFIG[:PAYFORT_MERCHANT_IDENTIFIER]}merchant_reference=#{p_merchant_reference}return_url=#{current_return_url_h}#{CONFIG[:PAYFORT_SHA_REQUEST_PHARSE]}" | |
return Digest::SHA256.hexdigest(sig_params) | |
end |
config.action_mailer.default_url_options = {:host => 'localhost:3000'} | |
config.action_mailer.delivery_method = :smtp | |
config.action_mailer.perform_deliveries = true | |
config.action_mailer.raise_delivery_errors = true | |
config.action_mailer.default :charset => "utf-8" | |
config.action_mailer.smtp_settings = { | |
address: "smtp.gmail.com", |
The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.
You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.
:: INSTALL MYSQL , PASSENGER , CONFIGURE APACHE WITH PASSENGER FOR MAC OS SETUP NOTES :: | |
1 - To install mysql in mac os you will need to run the following command :: | |
___________________________________________________ | |
brew install mysql | |
___________________________________________________ | |
== AFTER INSTALLING FINSHED YOU NEED TO READ THE FOLLWING INSTRUCTION |
ERROR :: | |
if you get the following error message when you try to open your app in Heroku :: | |
ActionView::Template::Error (images/apple-touch-icon-144x144-precomposed.png isn't precompiled): | |
=============================================================================================================== | |
SOLUTION :: |
:::::::: Nginx and unicorn Deployment Enviroment :::::::::: | |
Nginx is a pure web server that's intended for serving up static content and/or redirecting the request to another socket to handle the request. | |
Unicorn is a Rack web server and only intended to host a 'Rack App' which is usually generating dynamic content. Rack apps can also serve up static content but it's less efficient than most other traditional web servers. | |
Most RoR setups use a combination of both traditional web servers and Rack servers to apply the best of both of their capabilities. Nginx is incredibly fast at request redirection through proxy balancing and serving up static content. Unicorn is quite capable of processing HTTP headers and balancing inbound requests to Ruby for processing. | |
http://nginx.org/en/docs/ |
Steps to setup rails enviroment to work with RSpec TDD | |
1- include the follwing gems in your gem file :: | |
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | |
group :development, :test do | |
gem 'rspec-rails' | |
gem 'factory_girl_rails' |