grape

Intellij IDEA not importing dependencies from @Grab in Groovy project

a 夏天 提交于 2019-12-02 17:25:26
I have a groovy script I am working on, which imports dependencies using the @Grab annotation. This script will run within IDEA, and from the command line. However, within the IDE, the imports are shown in red (as unresolvable), and no auto-completion on the classes so imported is given. I am accessing a corporate repository via a proxy, which has been configured as the Http Proxy within IDEA (the module should be, and is, in my local .m2 repo anyway!) Anyone got any ideas (no pun intended!)? I am using IntelliJ IDEA 12.5 Ultimate (IU-129.1135), JRE 1.7, and Groovy 2.1.6 As stated by

Why does trying to use Grape with Rails fail with “uninitialized constant API”?

≯℡__Kan透↙ 提交于 2019-12-01 11:47:55
问题 I would like someone to explain why this is happening in Rails (4.1.8) with Grape (0.10.1) so this is my API: app/api/root.rb : module API class Root < Grape::API prefix 'api' mount API::V1::Root end end app/api/v1/root.rb : module API::V1 class Root < Grape::API version 'v1' mount API::V1::Users end end app/api/v1/users.rb : module API::V1 class Users < Grape::API format 'json' resource :users do desc "Return list of users" get '/' do User.all end end end end config/routes.rb : Rails

Java核心(四)你不知道的数据集合

谁都会走 提交于 2019-11-29 02:47:53
导读:Map竟然不属于Java集合框架的子集?队列也和List一样属于集合的三大子集之一?更有队列的正确使用姿势,一起来看吧! Java中的集合通常指的是Collection下的三个集合框架List、Set、Queue和Map集合,Map并不属于Collection的子集,而是和它平行的顶级接口。Collection下的子集的关系如文章开头图片所示。 本文的重点将会围绕: 集合的使用、性能、线程安全、差异性、源码解读等几个方面进行介绍。 本文涉及的知识点,分为两部分: 第一部分,Collection所有子集: List => Vector、ArrayList、LinkedList Set => HashSet、TreeSet Queue 第二部分,Map => Hashtable、HashMap、TreeMap、ConcurrentHashMap。 一、List 我们先来看List、Vector、ArrayList、LinkedList,它们之间的继承关系图,如下图: 可以看出Vector、ArrayList、LinkedList,这三者都是实现集合框架中的List,也就是所谓的有序集合,因此具体功能也比较近似,比如都提供按照位置进行定位、添加或者删除的操作,都提供迭代器以遍历其内容等。但因为具体的设计区别,在行为、性能、线程安全等方面,表现又有很大不同。 来看它们的主要方法

groovy grape verbose

倖福魔咒の 提交于 2019-11-29 02:36:58
问题 Is there a way to print Ivy output when using Groovy Grape. when I use Grape, it's just hanging there till finishes downloading all dependencies. I would like to know what it's happening and what it's downloading. Thanks, 回答1: Looks like this might be in Groovy 1.7.6 http://jira.codehaus.org/browse/GROOVY-4014 i.e. -Dgroovy.grape.report.downloads=true in JAVA_OPTS or on the command line 回答2: tim_yates answer is good but if you need to debug a problem with Grapes, then this might be useful:

User Authentication with Grape and Devise

♀尐吖头ヾ 提交于 2019-11-28 16:44:16
I have difficulties to understand and also properly implement User Authentication in APIs. In other words, I have serious problem to understand the integration of Grape API with front-end frameworks such as Backbone.js, AngularJS or Ember.js. I'm trying to pivot all different approaches and read a lot about that, but Google returns me truly bad resources and it seems to me, like there is no really good article on this topic - Rails and User authentication with Devise and front-end frameworks . I will describe my current pivot and I hope you can provide me some feedback on my implementation and