meta tag parsing in Rails [closed] - ruby-on-rails

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I was looking for something to help me parse general meta-tags from websites similar to this github project I found for open graph data. Here's a demo app.
Basically, I'd like to be able to have a user input a URL from a news site and have it retrieve from that the Title, Desc, etc., leaving as little work possible for the user. Before I go roll my own I was wondering if there was a current project / gem that exists similar to the project above? (as it only works with open graph and not general meta-tags)
I also noticed that facebook's linter does this as well even without open graph specific tags.

I would recommend the Nokogiri gem. It is an HTML, XML, etc. parser so you can use it to parse pages on your own. The nice thing about this approach is that it affords you the most flexibility for your specific use case. You can use the gem to parse any meta and header tags as long as you can express them using XPath or CSS3 selectors.

You can also try this free (for most) Open Graph API that I built: http://www.opengraph.io/

Related

Material Design in Dart [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
At the moment I can not find a somewhat up to date version of mdc for dart. I can find for example https://pub.dev/packages/mdc_web and https://github.com/dart-lang/angular_components but both are really far away from an up to date implementation of Material Design.
Is there a library apart from this I can use, so that I can use up to date material design with dart?
The two links you posted have different use cases. The former is for vanilla web dev using Dart, and probably your best bet unless you plan to use AngularDart. Even though it has not been updated in over a year, I don't think there is anything newer. You could try cloning the repo and adding support yourself for the missing or outdated components which you desire.
AngularDart is (in my opinion) a great framework. The latter link you posted is specifically for use with AngularDart. Last update it was 15 days ago. This project is maintained by Google and I think it is safe to say that Google is by far the largest user of AngularDart. Their material design components which you linked to are going to be your best bet in this case.
Generally speaking though, using Dart for web dev never achieved widespread adoption, so there are not large communities with a lot of active package maintainers.

How to create a user/event tracking tool, backed by Ruby on Rails [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
are there any good references to start looking into building a simple but efficient tracking/event tool? Super simple version of a tool like Google Analytics. I am assuming this consist of two separate applications. One for the front-end which gets embedded into the client's website, and a back-end API to handle the events, queue, etc.
Preferred tools for the back-end for me is Rails.
I appreciate the help.
You'd be reinventing the wheel, but you'll need a javascript library to track the user and a rails API. Pretty much what you seem to know you need.
Here's the documentation on building a rails API: https://guides.rubyonrails.org/api_app.html
Refer to the top answer here for the javascript module: User Activity Tracking or Logging with javascript

Rails Create US State Graph [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I have a client that recently decided to add in-site surveys as part of an effort to better understand their user base. They are requesting an export of the survey data, which using Axlsx hasn't been to hard.
However, they've also requested a US Map Graph that displays which users live in which states - kind of like this one. We store the GeoIP of each user's City/State/ZIP, etc. so the data is there, but I'm not sure how I'd go about generating such a graph as part of the Excel output.
Any ideas about this being feasible to spit out in an Excel export? I haven't been able to find much information about creating them in Rails.
EDIT I just want to point out that the actual Excel export works great. What I'm struggling with is getting a graph to come out in a similar format as the above link. I'm already using the axlsx gem to export the data into Excel/creating various graphs. I haven't been able to figure out how to create a US State's graph with it though
You might want to take a look to the gem axlsx,
which is a spreadsheet generator for Ruby. They have a fair amount of examples.
Hope it helps.

Is there a Rails plugin to help me build an API for ember-data's RESTAdapter? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
So I'm going to embark on a project using ember-data, which tells me
The REST adapter assumes that the URLs and JSON associated with each model are conventional; this means that, if you follow the rules, you will not need to configure the adapter or write any code in order to get started.
Right-o! I want to do that. But what I would like to know is: is there a gem out there to help me build this REST API? If so, I could save time and use it instead of reinventing the wheel myself (and misinterpreting the conventions). Alternatively, I could set about developing such a framework as a separate gem!
So far I've seen
https://github.com/emberjs/ember-rails (seems focused on managing the javascript side and asset pipeline)
https://github.com/dgeb/ember_data_example (more an example app than a framework?)
and neither of them appear to be quite what I'm after. Am I wrong here?
(N.B. please consider me aware of the experimental nature of ember-data and the implications associated with it.)
I haven't tried it but this might be what you want: https://github.com/hedtek/ember-generators
If you're referring to the rails backend look at active model serializers (which I believe is a dependency with the ember-rails gem). And then for your controllers use respond_to :json and in your actions do respond_with <your_active_record_model_or_array_of_models>. Hope that helps.

Car make model dropdown web service [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I once found a slick looking car make/model dropdown menu web service that advertised form helpers for Ruby on Rails, have subsequently been unable to find this again by Googling for it.... Anybody know the service I am talking about?
Edmunds provides this data for free through an API. You just have to sign-up to get an API key.
See documentation here:
http://developer.edmunds.com/api-documentation/vehicle/
Sign-up to get a key here: http://developer.edmunds.com/index.html
One example of making the call (many more examples given on their site):
https://api.edmunds.com/api/vehicle/v2/makes?fmt=json&api_key={your API key}
I was looking for exactly this kind of information for motorcycles. From what I can tell the API does not provide motorcycle data, but it seems to have just about everything for cars - Make, Model, Year, Trim, Style, even Maintenance Schedules.
With the json or xml data, you will have to roll your own drop down menus. Edmunds does provide some premade widgets, but they are pretty specific (e.g. return True Market Value), so there is a good chance they won't have exactly what you need.
http://developer.edmunds.com/widgets_and_apps/index.html
It doesn't include form helpers or anything, but here's a Ruby implementation that uses the KBB database to retrieve make/model info:
http://tektastic.com/2008/03/car-or-auto-make-model-year-database.html
I'd probably cron this outside of the app and update the db from time to time, then use collection_select in the app to construct the dropdowns as normal. You could also adapt it to use ActiveResource for live retrieval, but that seems excessive and perhaps bannable by KBB.

Resources