From eaedf19e2e54ccb9933caa8dc21df13e48609b18 Mon Sep 17 00:00:00 2001 From: jessib Date: Mon, 7 Oct 2013 09:44:16 -0700 Subject: Updates to billing/README file. --- billing/README.rdoc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/billing/README.rdoc b/billing/README.rdoc index 357c02e..30ca0d6 100644 --- a/billing/README.rdoc +++ b/billing/README.rdoc @@ -2,18 +2,19 @@ This project rocks and uses MIT-LICENSE. +The gem leap_web_billing will need to be included in whatever environment you are running, and billing will also need to be included in the configuration for that environment. You can set billing to be included in config/defaults.yml, by making sure the payment key is set to an array including billing (by default it will be set for the test environment, so you can look at that.) + To set up your own Braintree Sandbox, create an account at: https://www.braintreepayments.com/get-started -Login. +Login to the Braintree Sandbox. In the top right, navigate to your username, and then 'My User' -> 'API Keys' Click the button to generate a new API key, and then click the 'View' link to the right of the key. -There is a section to copy a snippet of code. Select 'Ruby' in the dropdown, and then the button to the right to copy this code to your clipboard. -Then, paste the contents of the clipboard into config/initializers/braintree.rb - -You should not check the private key into version control. +There is a section to copy a snippet of code. The simplest way to get this working is to select 'Ruby' in the dropdown, and then the button to the right to copy this code to your clipboard, and then paste the contents of the clipboard into billing/config/initializers/braintree.rb +However, you should not check the private key into version control, so you should not check in this file. +The better way to do this is to leave billing/config/initializers/braintree.rb as is, and instead set the braintree variables for the appropriate environment in config/config.yml, which is excluded from version control. Now, you should be able to add charges to your own Sandbox when you run the webapp locally. -- cgit v1.2.3 From 95a5324f12c6f9c44021a93bcd2a45c05bba3f88 Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 9 Oct 2013 19:36:11 +0200 Subject: Fix couchrest model migrations to work with latest version Also we now depend upon couchrest model ~> 2.0.0. The beta2 still has the old naming scheme for CouchRest::Model::Utils::Migrate --- core/leap_web_core.gemspec | 2 +- core/lib/extensions/couchrest.rb | 36 +++++++++++++++++++----------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/core/leap_web_core.gemspec b/core/leap_web_core.gemspec index f391f00..e98c892 100644 --- a/core/leap_web_core.gemspec +++ b/core/leap_web_core.gemspec @@ -18,7 +18,7 @@ Gem::Specification.new do |s| s.add_dependency "rails", "~> 3.2.11" s.add_dependency "couchrest", "~> 1.1.3" - s.add_dependency "couchrest_model", "~> 2.0.0.beta2" + s.add_dependency "couchrest_model", "~> 2.0.0" s.add_dependency "couchrest_session_store", "~> 0.2.0" s.add_dependency "json" diff --git a/core/lib/extensions/couchrest.rb b/core/lib/extensions/couchrest.rb index 176184f..91dfc1c 100644 --- a/core/lib/extensions/couchrest.rb +++ b/core/lib/extensions/couchrest.rb @@ -42,30 +42,32 @@ module CouchRest end - class Migrate - def self.load_all_models_with_engines - self.load_all_models_without_engines - return unless defined?(Rails) - Dir[Rails.root + 'app/models/**/*.rb'].each do |path| - require path + module Utils + module Migrate + def self.load_all_models_with_engines + self.load_all_models_without_engines + return unless defined?(Rails) + Dir[Rails.root + 'app/models/**/*.rb'].each do |path| + require path + end + Dir[Rails.root + '*/app/models/**/*.rb'].each do |path| + require path + end end - Dir[Rails.root + '*/app/models/**/*.rb'].each do |path| - require path + + def self.all_models_and_proxies + callbacks = migrate_each_model(find_models) + callbacks += migrate_each_proxying_model(find_proxying_models) + cleanup(callbacks) end - end - def self.all_models_and_proxies - callbacks = migrate_each_model(find_models) - callbacks += migrate_each_proxying_model(find_proxying_models) - cleanup(callbacks) - end + class << self + alias_method_chain :load_all_models, :engines + end - class << self - alias_method_chain :load_all_models, :engines end - end end -- cgit v1.2.3 From d6491496704b3909a93b5883f049becb408e0e47 Mon Sep 17 00:00:00 2001 From: Azul Date: Thu, 10 Oct 2013 10:13:55 +0200 Subject: Version 0.2.4 --- lib/leap_web/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/leap_web/version.rb b/lib/leap_web/version.rb index e582308..a55c2ca 100644 --- a/lib/leap_web/version.rb +++ b/lib/leap_web/version.rb @@ -1,3 +1,3 @@ module LeapWeb - VERSION = "0.2.2" unless defined?(LeapWeb::VERSION) + VERSION = "0.2.4" unless defined?(LeapWeb::VERSION) end -- cgit v1.2.3