From 1be355fd5fd9e593d91191ceb8edd240f6faf7af Mon Sep 17 00:00:00 2001 From: Ryan Angilly Date: Sat, 30 May 2015 09:42:28 -0600 Subject: [PATCH 1/3] Update therubyracer so it's installs on OSX Yosemite --- Gemfile | 2 +- Gemfile.lock | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 793980c..795411b 100644 --- a/Gemfile +++ b/Gemfile @@ -58,7 +58,7 @@ group :development do # Deploy with Capistrano gem 'capistrano' gem 'rvm-capistrano' - gem 'therubyracer' + gem 'therubyracer', '0.12.2' gem 'thin' gem 'debugger' end diff --git a/Gemfile.lock b/Gemfile.lock index 6c3a7c3..9d646da 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -160,7 +160,7 @@ GEM kgio (2.8.0) launchy (2.2.0) addressable (~> 2.3) - libv8 (3.11.8.13) + libv8 (3.16.14.7) mail (2.5.3) i18n (>= 0.4.0) mime-types (~> 1.16) @@ -227,7 +227,7 @@ GEM rake (10.0.4) rdoc (3.12.2) json (~> 1.4) - ref (1.0.2) + ref (1.0.5) responders (0.9.3) railties (~> 3.1) rest-client (1.6.7) @@ -259,8 +259,8 @@ GEM multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - therubyracer (0.11.4) - libv8 (~> 3.11.8.12) + therubyracer (0.12.2) + libv8 (~> 3.16.14.0) ref thin (1.5.1) daemons (>= 1.0.9) @@ -339,9 +339,12 @@ DEPENDENCIES seed-fu (~> 2.2.0) simple-navigation-bootstrap simple_form - therubyracer + therubyracer (= 0.12.2) thin turbo-sprockets-rails3 twitter uglifier (= 1.0.3) unicorn + +BUNDLED WITH + 1.10.1 From a8c39133de01c47f531c7df1b73dbe2363e2e70d Mon Sep 17 00:00:00 2001 From: Ryan Angilly Date: Sat, 30 May 2015 09:44:45 -0600 Subject: [PATCH 2/3] rvm-cap should not be auto-required by Gemfile --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 795411b..41cdf29 100644 --- a/Gemfile +++ b/Gemfile @@ -57,7 +57,7 @@ end group :development do # Deploy with Capistrano gem 'capistrano' - gem 'rvm-capistrano' + gem 'rvm-capistrano', require: false gem 'therubyracer', '0.12.2' gem 'thin' gem 'debugger' From 057f53cfc82446393c54ceeb9a3cd47f31154657 Mon Sep 17 00:00:00 2001 From: Ryan Angilly Date: Sat, 30 May 2015 10:00:22 -0600 Subject: [PATCH 3/3] Add Ramen --- Gemfile | 3 ++ Gemfile.lock | 3 ++ config/initializers/config.rb | 4 +++ config/initializers/ramen.rb | 54 +++++++++++++++++++++++++++++++++++ 4 files changed, 64 insertions(+) create mode 100644 config/initializers/ramen.rb diff --git a/Gemfile b/Gemfile index 41cdf29..983c232 100644 --- a/Gemfile +++ b/Gemfile @@ -28,6 +28,9 @@ gem 'simple-navigation-bootstrap' # make beautifull with awesome icons gem 'font-awesome-sass-rails' +# Ramen +gem 'ramen-rails', '~>0.4.0' + # HAML gem 'haml-rails' diff --git a/Gemfile.lock b/Gemfile.lock index 9d646da..178f9ed 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -225,6 +225,8 @@ GEM thor (>= 0.14.6, < 2.0) raindrops (0.10.0) rake (10.0.4) + ramen-rails (0.4.0) + activesupport (>= 3.0) rdoc (3.12.2) json (~> 1.4) ref (1.0.5) @@ -330,6 +332,7 @@ DEPENDENCIES pg (= 0.14.0) rabl rails (= 3.2.13) + ramen-rails (~> 0.4.0) responders rmagick rolify (= 3.1.0) diff --git a/config/initializers/config.rb b/config/initializers/config.rb index e06c542..e23cbcb 100644 --- a/config/initializers/config.rb +++ b/config/initializers/config.rb @@ -16,6 +16,10 @@ def load_env(filename) configatron.secret_token = ENV['SECRET_TOKEN'] configatron.session_store = ENV['SESSION_STORE'] +# Ramen +configatron.ramen.organization_id = ENV['RAMEN_ORGANIZATION_ID'] +configatron.ramen.organization_secret = ENV['RAMEN_ORGANIZATION_SECRET'] + # Email configatron.email.delivery_method = ( ENV['EMAIL_DELIVERY_METHOD'] || "smtp" ).to_sym configatron.email.enable_starttls_auto = ENV['EMAIL_START_SSL'] diff --git a/config/initializers/ramen.rb b/config/initializers/ramen.rb new file mode 100644 index 0000000..f6a474d --- /dev/null +++ b/config/initializers/ramen.rb @@ -0,0 +1,54 @@ +RamenRails.config do |config| + # Your Ramen Organization ID + config.organization_id = configatron.ramen.organization_id + + # Your Ramen Organization Secret + config.organization_secret = configatron.ramen.organization_secret + + + ## Important note regarding `-> {}` vs. `Proc.new {}` + ## + ## Use `Proc.new {}` and not `-> {}`. There's some inconsistency + ## in how instance_eval works across Ruby versions that will bite + ## you in the butt otherwise. + + + ## How we access the currently logged in user. This object + ## should respond to #email(String), #id(String), + ## #created_at(Time) and #name(String) + # + # config.current_user = Proc.new { current_user } + + + ## How we access the labels for the currently logged in user. + ## This is an array of strings. + # + # config.current_user_labels = Proc.new { current_user.labels.map(&:name) } + + + ## How we access the current user "value". This is + ## a Float. It can represent whatever you want. + ## + ## If config.current_user is empty, this will be ignored + # + # config.current_user_value = Proc.new { current_user_value } + + + ## Custom Links to add to the Ramen Tray + ## You can add up to 3. Each requires a `title`. + ## Each requires a `callback` or an `href`. + ## Links w/ `href` will have target="_blank". + ## `callback` is a *string*, not a JS closure even + ## if you override these values in your markup. + # + # config.custom_links = [ + # { + # title: "Submit a bug", + # callback: "$('#submit_bug').modal('show')" #<-- String! + # }, + # { + # title: "Knowledge Base", + # href: "/knowedge_base" + # } + # ] +end