Skip to content
This repository has been archived by the owner on Apr 19, 2018. It is now read-only.

Commit

Permalink
adds gem 'json' and changes STRIPE_PUBLIC_TEST_KEY to be read from th…
Browse files Browse the repository at this point in the history
…e contents of environment json file
  • Loading branch information
sungchoi committed Sep 23, 2012
1 parent 62ca938 commit 5c2910f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -4,6 +4,7 @@ gem 'rails', '3.2.8'
gem 'pg'
gem 'jquery-rails'
gem 'bcrypt-ruby', '~> 3.0.0'
gem 'json'

group :development, :test do
gem 'shoulda-matchers'
Expand Down
17 changes: 15 additions & 2 deletions Gemfile.lock
Expand Up @@ -44,6 +44,13 @@ GEM
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
factory_girl (4.1.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.1.0)
factory_girl (~> 4.1.0)
railties (>= 3.0.0)
faker (1.1.2)
i18n (~> 0.5)
ffi (1.1.5)
guard (1.3.3)
listen (>= 0.4.2)
Expand All @@ -62,6 +69,7 @@ GEM
railties (>= 3.1.0, < 5.0)
thor (~> 0.14)
json (1.7.5)
libv8 (3.3.10.4)
listen (0.5.1)
mail (2.4.4)
i18n (>= 0.4.0)
Expand Down Expand Up @@ -97,8 +105,6 @@ GEM
rb-fsevent (0.9.1)
rdoc (3.12)
json (~> 1.4)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.11.0)
rspec-core (~> 2.11.0)
rspec-expectations (~> 2.11.0)
Expand All @@ -125,6 +131,8 @@ GEM
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sys-proctable (0.9.1)
therubyracer (0.10.2)
libv8 (~> 3.3.10)
thor (0.16.0)
tilt (1.3.3)
treetop (1.4.10)
Expand All @@ -141,13 +149,18 @@ PLATFORMS
DEPENDENCIES
bcrypt-ruby (~> 3.0.0)
coffee-rails (~> 3.2.1)
execjs
factory_girl_rails
faker
guard-rspec
guard-spork
jquery-rails
json
pg
rails (= 3.2.8)
rb-fsevent
rspec-rails
sass-rails (~> 3.2.3)
shoulda-matchers
therubyracer
uglifier (>= 1.0.3)
3 changes: 3 additions & 0 deletions app/helpers/application_helper.rb
@@ -1,2 +1,5 @@
module ApplicationHelper

ENV = JSON.parse(File.read('/home/dotcloud/environment.json'))

end
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Expand Up @@ -5,7 +5,7 @@
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "https://js.stripe.com/v1/", "application" %>
<%= csrf_meta_tags %>
<%= tag :meta, :name => "stripe-key", :content => STRIPE_PUBLIC_TEST_KEY %>
<%= tag :meta, :name => "stripe-key", :content => ENV['STRIPE_PUBLIC_TEST_KEY'] %>
</head>
<body>

Expand Down

0 comments on commit 5c2910f

Please sign in to comment.