You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whimsical.apache.org by Craig Russell <ap...@gmail.com> on 2017/11/17 00:36:08 UTC

More high level design on project/icla

I think the invitation form is pretty much done.

The interview is next on my list. The inviter has provided the email address and public name. It's important that the email address be valid, and many times the email known to the inviter is not the email that the invitee wants to use. So the first thing is for the user to validate the email address.

Please confirm that this is the email address to be used for official communications.

(the email to which the invitation was sent)

If the user changes the email address, a dialog will pop up:

You will receive another invitation sent to <new email>

(Confirm) or (Cancel)

Confirm will write the stash file with "invalid" written in it, create a new stash file with the new email address, and send email with the new stash information.

This can continue but usually, the second time the email will be confirmed and the rest of the dialog will continue with the three questions and finally the legal name, address, country phone number form.

I'd like to get as much information about the invitee as is possible from the browser. I understand we can get IP address. Can we get country, city, GPS? These I would include on the actual icla:

signed: Jim Bob Hacker                            Date: 18-Nov-2017
IP: 222.43.43.99 Sao Paolo Brazil

It would be nice to continue to develop this application even after the multi-page form with email is complete. Can we perhaps use a url like whimsy.apache.org/project/icla?mock=true to use the mock-send code, but if mock=true is omitted use the email route? I'm afraid I don't have the skill set to do this part without some guidance.

Craig L Russell
Secretary, Apache Software Foundation
clr@apache.org http://db.apache.org/jdo


Re: More high level design on project/icla

Posted by Sam Ruby <ru...@intertwingly.net>.
On Thu, Nov 16, 2017 at 10:47 PM, Craig Russell <ap...@gmail.com> wrote:
> I found this:
>
> http://geoiplookup.net/xml-api/
>
> http://api.geoiplookup.net/?query=73.15.26.163
> The XML result is as follows:
>
> <results>
> <result>
> <ip>73.15.26.163</ip>
> <host>73.15.26.163</host>
> <isp>Comcast Cable</isp>
> <city>San José</city>
> <countrycode>US</countrycode>
> <countryname>United States</countryname>
> <latitude>37.34220</latitude>
> <longitude>-121.88330</longitude>
> </result>
> </results>
>
> Sounds exactly like what we (I) want. Just need to figure out how to change San José to San José.

An XML parser should be able to do that for you.
http://www.nokogiri.org/ is what other parts of Whimsy uses.  Example
usage:

doc = Nokogiri.parse('<results><city>X</city></results>')
puts doc.at('city').text
==> X

> Craig

- Sam Ruby

>> On Nov 16, 2017, at 7:35 PM, Sam Ruby <ru...@intertwingly.net> wrote:
>>
>> On Thu, Nov 16, 2017 at 7:36 PM, Craig Russell <ap...@gmail.com> wrote:
>>>
>>> I'd like to get as much information about the invitee as is possible from the browser. I understand we can get IP address. Can we get country, city, GPS?
>>
>> There appears to be a tool named 'geoiplookup' that can be installed
>> on macs with brew and on ubuntu with apt-get.  I don't know anything
>> about it.
>
> Craig L Russell
> Secretary, Apache Software Foundation
> clr@apache.org http://db.apache.org/jdo
>

Re: More high level design on project/icla

Posted by Craig Russell <ap...@gmail.com>.
I found this:

http://geoiplookup.net/xml-api/

http://api.geoiplookup.net/?query=73.15.26.163 
The XML result is as follows:

<results>
<result>
<ip>73.15.26.163</ip>
<host>73.15.26.163</host>
<isp>Comcast Cable</isp>
<city>San José</city>
<countrycode>US</countrycode>
<countryname>United States</countryname>
<latitude>37.34220</latitude>
<longitude>-121.88330</longitude>
</result>
</results>

Sounds exactly like what we (I) want. Just need to figure out how to change San José to San José.

Craig

> On Nov 16, 2017, at 7:35 PM, Sam Ruby <ru...@intertwingly.net> wrote:
> 
> On Thu, Nov 16, 2017 at 7:36 PM, Craig Russell <ap...@gmail.com> wrote:
>> 
>> I'd like to get as much information about the invitee as is possible from the browser. I understand we can get IP address. Can we get country, city, GPS?
> 
> There appears to be a tool named 'geoiplookup' that can be installed
> on macs with brew and on ubuntu with apt-get.  I don't know anything
> about it.

Craig L Russell
Secretary, Apache Software Foundation
clr@apache.org http://db.apache.org/jdo


Re: More high level design on project/icla

Posted by Sam Ruby <ru...@intertwingly.net>.
On Thu, Nov 16, 2017 at 7:36 PM, Craig Russell <ap...@gmail.com> wrote:
>
> I'd like to get as much information about the invitee as is possible from the browser. I understand we can get IP address. Can we get country, city, GPS?

There appears to be a tool named 'geoiplookup' that can be installed
on macs with brew and on ubuntu with apt-get.  I don't know anything
about it.

> It would be nice to continue to develop this application even after the multi-page form with email is complete. Can we perhaps use a url like whimsy.apache.org/project/icla?mock=true to use the mock-send code, but if mock=true is omitted use the email route? I'm afraid I don't have the skill set to do this part without some guidance.

the sinatrarb site appears to be down at the moment, otherwise I would
have provided a canonical link to the documentation.

The TL;DR is to go into www/project/icla/main.rb, and somewhere within
the get '/invite' do... end block, add @mock=params['mock'].

Then go into www/project/icla/views/app.html.rb, and add ", mock:
@mock" to the line near the bottom that starts with _Main.

Then go into www/project/icla/views/main.js, and add ", mock: @@mock"
to the call to Vue.createElement.

At this point, you should be able to refer to the value of @@mock from
any of the files within the www/project/icla/views/pages directory.

> Craig L Russell
> Secretary, Apache Software Foundation
> clr@apache.org http://db.apache.org/jdo

- Sam Ruby

P.S.  Yes, the first two additions have only one @, and the last two
have two @@ signs.