jlcapps / verso Goto Github PK
View Code? Open in Web Editor NEWThe Verso Ruby Gem
License: MIT License
The Verso Ruby Gem
License: MIT License
Make it work with ruby >= 1.8.7.
The problem is that several classes expose an 'id' attribute of the API resources through #method_missing. So just add an #id method?
There are remaining dependencies on String#parameterize from ActiveSupport::Inflector left over form the extraction from a Rails application. This affects OccupationData.find_by_slugs and Cluster#courses.
Add #slug to Cluster, Pathway, and Occupation as in ProgramArea. Add spec for OccupationData.find_by_slugs.
Some of the test coverage from the integration level of the Web site needs to be ported to the gem, now that it needs to stand alone.
First we'll need support for checking the API version resource. Then we need to check it and issue a warning if the API version has bumped since the gem was released.
To wit:
ruby-1.9.3-p0 :004 > c = Verso::Credential.new(:id => 9999999999999999, :slug => "slug")
=> #<Verso::Credential:0x007fd0fd6ab938 @attrs={:id=>9999999999999999, :slug=>"slug"}>
ruby-1.9.3-p0 :005 > c.title
TypeError: can't convert nil into Hash
from /Users/jlcapps/.rvm/gems/ruby-1.9.3-p0@face/bundler/gems/verso-c4ec6b48d429/lib/verso/http_gettable.rb:16:in `merge!'
from /Users/jlcapps/.rvm/gems/ruby-1.9.3-p0@face/bundler/gems/verso-c4ec6b48d429/lib/verso/http_gettable.rb:16:in `get_attr'
from /Users/jlcapps/.rvm/gems/ruby-1.9.3-p0@face/bundler/gems/verso-c4ec6b48d429/lib/verso/base.rb:32:in `block (3 levels) in attr_reader'
from (irb):5
from /Users/jlcapps/.rvm/gems/ruby-1.9.3-p0@face/gems/railties-3.2.3/lib/rails/commands/console.rb:47:in `start'
from /Users/jlcapps/.rvm/gems/ruby-1.9.3-p0@face/gems/railties-3.2.3/lib/rails/commands/console.rb:8:in `start'
from /Users/jlcapps/.rvm/gems/ruby-1.9.3-p0@face/gems/railties-3.2.3/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
An object that has been fetched might store status code. Prefetch objects could make a HEAD request first and store that code.
Duty areas in the Web API's task list resource now expose an ID just as the tasks do. Add this to the DutyArea class; to specs for DutyArea and TaskList; and to the documentation.
Some nested resources in the API provide a version_date property. All resources set Last-Modified and Expires in headers. version_date and Last-Modified are equivalent.
Providing access to these would be useful for caching in the client.
Only portions of the interface necessary for the Web site have been implemented. Fix that. There may be other inconsistencies as well.
For an example, see Verso::Course#duty_areas
After it has been added to the course resource on api.cteresource.org, of course.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.