grape

    0熱度

    1回答

    我想在grape-api中使用Rails activerecord-session_store會話。 但下面代碼中的env['rack.session'][:foo]爲空。 請告訴我如何解決。 class API < Grape::API use ActionDispatch::Session::ActiveRecordStore ~~ get :ping do

    1熱度

    1回答

    我正嘗試使用沒有葡萄api寶石的葡萄實體。所以只需將它用作原始軌道控制器的序列化程序即可。 當試圖通過做介紹我的資源: present User.all, with: Entities::User 我得到了present方法是不確定的 我怎麼想使用實體呈現這些資源?該文件說,使用present

    1熱度

    1回答

    在我的Jenkins構建中,我有一個Groovy腳本(因爲我使用的是管道插件),我試圖使用OkHttpClient進行API調用。 我有以下的葡萄代碼,我從here有: @Grapes( @Grab(group='com.squareup.okhttp', module='okhttp', version='2.7.5') ) 對於這一點,我得到: General error dur

    2熱度

    2回答

    有沒有什麼辦法可以在Rails和Grape中使用公共頭文件,所以我不需要一遍又一遍地指定相同的頭文件? namespace :user do desc 'Return a user.', { headers: { "Authorization" => { description: "Some Token", required: true

    1熱度

    1回答

    我也跟着一步本教程一步:https://wildandcrazytutorials.wordpress.com/2016/03/05/how-to-build-a-grape-standalone-rest-api/ 但是我得到的錯誤: Puma starting in single mode... Version 3.6.2 (ruby 2.2.2-p95), codename: Sleepy

    0熱度

    1回答

    我想下載jar以下模塊。 進口jenkins.model.Jenkins 我試圖下載詹金斯核心,但我面對的問題。它說沒有找到罐子。 @Grapes([ @Grab(group='org.jenkins-ci.main', module='jenkins-core', version='2.9') ]) 有誰請幫我在得到正確的罐子 感謝,

    0熱度

    1回答

    對於我的一種方法,以下方法無效。我幾乎複製所有直接從官方文檔的: params do requires :authenticationType, type: Array[String], values: ['LOCAL', 'AD'] given authenticationType: ->(val) { val == 'LOCAL' } do requires :admin, ty

    1熱度

    1回答

    哈希陣列我真的很新的傢伙Rails的,在我的項目,我想提出一個JSON字符串葡萄API。正如你所看到的,我的JSON有一個包含許多對象的user數組。我怎樣才能在我的葡萄中定義它? 謝謝 { "users":[ { "first_name":"Brittany", "last_name":"Chen", "email":"[email

    0熱度

    1回答

    它可以使用葡萄下載從Maven的中央的依賴: @Grab(group='org.apache.commons', module='commons-lang3', version='3.4') 的Grab註釋中指定的jar一個type做同樣的事情: @Grab(group='org.apache.commons', module='commons-lang3', version='3.4', typ

    0熱度

    1回答

    我有一個要求,其中用戶可以在該格式通過URL: http:site.com/[action]/[subject]?[option]=[value] 例如所有的下面是有效的網址: http://example.com/trigger/a/b/c http://example.com/trigger/a http://example.com/trigger/a/b?something=value