colibri-software / locomotive_plugins Goto Github PK
View Code? Open in Web Editor NEWThis gem is used to develop plugins for Locomotive CMS
This gem is used to develop plugins for Locomotive CMS
Is there anyway to use the plugins and wagon?
Have you used this gem in a production environment. Will the changes to locomotivecms v3 change this gem structure?
Hi
I'm coding a plugin with colibri-software's plugin supported engine & inside it i'm using a restful api client for interacting with locomotivecms web service but right at starting , web server (puma) encounter to this error:
! Unable to load application: Errno::ECONNREFUSED: Connection refused - connect(2)
/home/kwair/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/net/http.rb:763:in `initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)
I use httparty & rest-client and both of them have this problem. another thing that i have to mention is there is not any problem in shell and through curl , httparty , rest-client & also Advanced Rest client extention of chrome every thing works fine.
in my plugin at first i include this items:
require 'locomotive_plugins'
require "PLUGIN_NAME/version"
require 'uri'
require 'httparty'
require 'locomotive/mounter'
and then code my client same Didier's code sample at (https://gist.github.com/did/725202d5f4417cbbbc72/revisions) this way:
$api_base_url = "ADDRESS"
$api_key = "MY API CODE"
Locomotive::Mounter::EngineApi.set_token(uri: "http://#{$api_base_url}/locomotive/api", api_key: $api_key)
attributes = {
title: 'Hello world',
content: 'Lorem ipsum'
}
query = { query: { 'content_entry' => attributes } }
response = Locomotive::Mounter::EngineApi.post("/content_types/posts/entries.json", query)
if response.success?
puts "article created"
else
puts "failed to create an article"
end
Another official code sample with get & put also encountered to this error.
I test both localhost on my laptop(linux mint 17) and also domain name on my server(centos6) for $api_base_url.
please advice me to pass this big problem.
Thanks
Hello,
This gem restricts ruby version to 1.9.
I am currently developing a rails 3.2 / ruby 2 locomotive_cms app...
Is 1.9 an absolute necessity?
Thank you,
Mark
On the wiki page I read: "To install the plugin in LocomotiveCMS, simply create a LocomotiveCMS app and add your plugin gem to the app's Gemfile in the locomotive_plugins group."
The problem is that the URL "create a LocomotiveCMS app" return a 404. I would like to know how to create an app because that's where the creation of my plugin goes wrong.
Also see: http://stackoverflow.com/questions/17367518/how-to-setup-a-basic-locomotive-cms-plugin
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.