First arquillian test in PR
by Jason Porter
I have the first, yes it's somewhat basic, Arquillian test in my Pull Request now. Before I continue and move forward, I'm seriously considering pulling in Groovy and Spock (BDD style tests) for some of these functional tests as we're dealing with (or could be) large json strings being returned. Groovy would make it very easy to parse and traverse the json (taken from the Groovydoc):
def slurper = new JsonSlurper()
def result = slurper.parseText('{"person":{"name":"Guillaume","age":33,"pets":["dog","cat"]}}')
assert result.person.name == "Guillaume"
assert result.person.age == 33
assert result.person.pets.size() == 2
assert result.person.pets[0] == "dog"
assert result.person.pets[1] == "cat"
That really makes it easy to verify the return of a json object. You can see a basic Spock test at https://code.google.com/p/spock/. I'd like to hear your thoughts before I move forward.
11 years, 2 months
Quickstart provider and info
by Jason Porter
Here's what I've come up with. Let me know what you think Pete. Everything with sys_ is either recommended or required.
# JSON payload to Searchisko (and mapping)
#
# {
# # Pulled from the file (our names : searchisko mapping)
# header: sys_title
# author: sys_contributors (should be an array)
# level (difficulty?)
# technologies: tags (should be an array)
# summary: sys_description
# target_product: (project?)
# url (build it from output_path): sys_url_view
#
# # Other required searchisko mappings (searchisko : what we send)
# sys_content_content-type: not sure (markdown or html?)
# sys_content (raw markdown or html?)
# sys_type: "quickstart"
# sys_content_type: "quickstart"
# sys_content_provider: whatever-we-name-the-provider
#
# # I think we can pull these from git, like we do currently for the site
# sys_created
# sys_activity_dates
# sys_list_activity_date
# sys_updated
#
# # I don't think we have any way of getting these, should we start adding them? I'm not sure how "required" these are
# sys_project
# sys_project_name
#
# # comments may be great, but we'd need to get them from disqus
# }
11 years, 2 months
Providers, rivers, POST /content/{type}/{contentId}
by Jason Porter
I'm very confused by what all the things in $subject are. When do you use one over the other? Are they all used to put data into the dcp?
I think I'm missing the big picture of how everything fits together in order to make any sort of useful discussion about where I need to go to accomplish what I want to do when talking about adding the meta data about quickstarts into the dcp.
11 years, 2 months
Re: [searchisko-dev] Using Java 7
by Vlastimil Elias
Great, so we can use it, no problem.
Vl.
On 4.10.2013 17:23, Jason Porter wrote:
> No, don't have to use it.
>
> ----- Original Message -----
>> From: "Vlastimil Elias" <velias(a)redhat.com>
>> To: "Jason Porter" <jporter(a)redhat.com>
>> Sent: Friday, October 4, 2013 12:31:26 AM
>> Subject: Re: [searchisko-dev] Using Java 7
>>
>> Hi,
>>
>> Do we really need this?
>> Because then we can't state the Searchisko runs on any of JEE 6
>> compliant container, because JEE 6 requires JavaSE 1.6 if I'm sure ;-)
>>
>> Cheers
>>
>> Vl.
>>
>> On 4.10.2013 01:10, Jason Porter wrote:
>>> Looks like we're running on Java 7 in OpenShift (we have the
>>> .openshift/markers/java7 file). Does anyone have any problems if we make
>>> use of some of the Java 7 features?
>>> _______________________________________________
>>> searchisko-dev mailing list
>>> searchisko-dev(a)lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/searchisko-dev
>> --
>> Vlastimil Elias
>> Senior Software Engineer
>> jboss.org Development Team
>>
>>
--
Vlastimil Elias
Senior Software Engineer
jboss.org Development Team
11 years, 2 months
Using Java 7
by Jason Porter
Looks like we're running on Java 7 in OpenShift (we have the .openshift/markers/java7 file). Does anyone have any problems if we make use of some of the Java 7 features?
11 years, 3 months
Dropping JSONP support
by Lukas Vlcek
Hi,
I am thinking about dropping JSONP support in Searchisko going forward. We do support CORS to certain extent.
My experience with JSONP (from the POW of JS/HTML developer) has been mixed or even worse. On the other hand I think there is quite solid support of CORS these days http://caniuse.com/cors
I think we can expect that web browser clients will be used mostly for search (i.e. GET) operations and not for data PUT/POST anyway.
Here is relevant issue https://github.com/searchisko/searchisko/issues/15
Regards,
Lukas Vlcek
jboss.org Development Team
11 years, 3 months
Dynamically creating tables
by Jason Porter
I have converted everything in the JpaHibernateContentPersistenceService class to use JPA native queries save the table creation and the ListRequest stuff, but that's easy. The table creation is a bit of a problem, because you're not supposed to be doing DDL via JPA. Are these tables actual tables we don't know anything about a deploy time? What's the reason for creating them at runtime?
If we need to create them at runtime then I'm going to have to switch over to injecting the DataSource (which is how it probably should have been done in the first place if you're going to use JDBC) and grabbing a connection that way then doing all the JDBC stuff as normal (try with resources would be helpful here but we're using Java 6. If OpenShift supports Java 7 how about we upgrade?). The problem standing in my way with doing that is that we don't have a common name for the datasource. My suggestion is to create a searchisko-ds.xml file to deploy, standardize the name (SearchiskoDS seems good) and then have maven make the changes to the searchisko-ds.xml file depending on the profile.
Thoughts?
11 years, 3 months