diff --git a/Gemfile b/Gemfile index 9e58ced47..f1cc48b82 100644 --- a/Gemfile +++ b/Gemfile @@ -67,8 +67,8 @@ gem 'deep_cloneable', '~> 2.1.1' gem 'digidoc_client', '~> 0.2.1' # epp + repp client -# gem 'depp', github: 'domify/depp' -gem 'depp', path: '/home/martin/projects/depp' +gem 'depp', github: 'domify/depp', ref: '730b264929613033d334a636a29b04a39693b107' +# gem 'depp', path: '/home/martin/projects/depp' group :development do # dev tools diff --git a/Gemfile.lock b/Gemfile.lock index 52bddf3ad..65d3ba8e6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,20 +9,11 @@ GIT request_store (~> 1.1.0) GIT - remote: git://github.com/haml/html2haml.git - revision: 6984f50bdbbd6291535027726a5697f28778ee8d - ref: 6984f50bdbbd6291535027726a5697f28778ee8d + remote: git://github.com/domify/depp.git + revision: 730b264929613033d334a636a29b04a39693b107 + ref: 730b264929613033d334a636a29b04a39693b107 specs: - html2haml (2.0.0.beta.2) - erubis (~> 2.7.0) - haml (~> 4.0.0) - nokogiri (~> 1.6.0) - ruby_parser (~> 3.5) - -PATH - remote: /home/martin/projects/depp - specs: - depp (0.0.1) + depp (0.0.2) coderay (>= 1.1.0) coffee-rails (>= 4.1.0) countries (>= 0.9.3) @@ -36,6 +27,17 @@ PATH uglifier (>= 2.6.1) uuidtools (>= 2.1.4) +GIT + remote: git://github.com/haml/html2haml.git + revision: 6984f50bdbbd6291535027726a5697f28778ee8d + ref: 6984f50bdbbd6291535027726a5697f28778ee8d + specs: + html2haml (2.0.0.beta.2) + erubis (~> 2.7.0) + haml (~> 4.0.0) + nokogiri (~> 1.6.0) + ruby_parser (~> 3.5) + GEM remote: https://rubygems.org/ specs: diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index aa4db3b42..57a8f0c3c 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -48,6 +48,13 @@ class ApplicationController < ActionController::Base end end + def depp_current_user + @depp_current_user ||= Depp::User.new( + tag: current_user.username, + password: current_user.password + ) + end + def api_user_log_str(user) if user.present? "#{user.id}-api-#{user.username}" diff --git a/app/helpers/current_user_helper.rb b/app/helpers/current_user_helper.rb new file mode 100644 index 000000000..80b97c998 --- /dev/null +++ b/app/helpers/current_user_helper.rb @@ -0,0 +1,2 @@ +module CurrentUserHelper +end