Giter VIP home page Giter VIP logo

wagon's Introduction

Wagon

Gem Version Code Climate Build Status Coverage Status Join the chat at https://gitter.im/locomotivecms/wagon

Wagon is a command line tool that let's you develop for Locomotive right on your local machine.

With Wagon, you can generate the scaffolding for a new Locomotive site and start adding the content types and templates you need using any text editor. And thanks to Wagon's built-in web server, you can preview the site with your computer's web browser.

Wagon can also deploy sites to any Locomotive Engine using the wagon deploy command. Your changes will immediately be reflected on that site without restarting or making any changes to the Engine server app.

To help you work faster, Wagon comes with support for tools like SASS, LESS, HAML, and CoffeeScript. It also works well with source version control systems like git and svn.

Note: The previous version of Wagon (v1.5.8) is available in the v1.5.x branch

Documentation

Please, visit the documentation website of Locomotive.

https://doc.locomotivecms.com

Note: The documentation for the previous version (v1.5.x) is available here.

Developers / Contributors

Get the development version of the Steam gem

$ git clone git://github.com/locomotivecms/steam.git

Note: If you want to contribute, you may consider to fork it instead

Get the source of Wagon

$ git clone git://github.com/locomotivecms/wagon.git
$ cd wagon

Note: Again, if you want to contribute, you may consider to fork it instead

Modify the Gemfile to change the link to the steam gem which should point to your local installation of Steam.

$ bundle install

Test it

Run the spec tests

$ bundle exec rake spec

Run the server with a default site

$ bundle exec bin/wagon serve spec/fixtures/default

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Contact

Feel free to contact me (didier at nocoffee dot fr).

Copyright (c) 2020 NoCoffee, released under the MIT license

wagon's People

Contributors

abrthel avatar adam-pl avatar boie0025 avatar cappadona avatar chrisjeon avatar clecoufl avatar demental avatar did avatar dustb0wl avatar gfzdw avatar gitter-badger avatar gridar avatar jaredklewis avatar jase-k avatar jloosfelt avatar joel avatar kevin-cantwell avatar luketroberts avatar manuchap avatar papipo avatar pgrimaud avatar rottame avatar sebastienbeau avatar vddgil avatar warp avatar westonganger avatar youroff avatar yrb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wagon's Issues

Pushing with -o does not seem to work anymore

It was very useful to only push a specific assets.

bundle exec wagon push production -r theme_assets -o stylesheets/styles.css
-> wagon push requires at least 1 argument: "wagon push ENV [PATH]".

By the way it would help a lot if we could use wildcards ("*") in the path we specify in the -o parameter.
And in the editor I have never succeeded to push a specific page, what is the expected syntax (I would say the page fullpath) ?

Could not find task "server".

Here's what I did:
Forked & cloned mounter to locomotivecms/gems/mounter.
Forked & cloned builder to locomotivecms/builder.
Switched to wip branch.
Bundled.
Started a rc13 instance (just in case).
Typed: bundle exec bin/builder server ../gems/mounter/spec/fixtures/default
-> Could not find task "server".

Can't wait to try this one out 👍

with_scope not working

I want to make a nav that has vertical dividers as done by Bootstrap so I'm trying to manually build the markup.

The current code reads:

    {% with_scope listed?: true %}
    {% for page in site.pages %}
    <li class="divider-vertical"></li>
    <li>
        <a href="/{{ page.fullpath }}">{{ page.title }}</a>
    </li>
    {% endfor %}
    {% endwith_scope %}

The with_scope is not utilised at all.

Can't read params in wagon

I tried this both on wagon and locomotive, it works on locomotive

In any view, try to display a param value

{{params['q']}}

Try on your browser: http://0.0.0.0:3333/page?q=test
In wagon it does not display "test"

wagon(1.0.2) generates html page without header

Using bundle exec wagon generate page test generates:

haml->no

TEST LIQUID

haml->yes


---
title: Test

# TODO: explain it
listed: true

# TODO: explain it
published: true

# TODO: explain it
# position: 1

# TODO: explain it
# redirect_url: "<url to a page or to a remote url>"

# TODO: explain it
# content_type: "<slug of one of the content types>"

# TODO: explain it
# editable_elements:
#   'some_block/some_slug': "<text>"
#   'some_block/some_slug': "<relative path to the file under the public/samples folder>"

---
{% extends parent %}

{% block main %}

%p Hello world

{% endblock %}

The public_submission_url should work in wagon

It would help a lot if the public submission url would simulate the normal behavior (it returns a 301 redirection).

The .json would return a mock of the given content_type, with fake data, or errors for the required fields.

It would allow to code the ajax part of the forms.

What do you think about this ?

Generate a localized page

Generating page with builder add 3 pages in app/views/pages folder
Do you think it's normal ?

1.9.3-p194@adagp|chussenot:~/Sites/adagp/builder/adagp $ bin/builder generate page my_page
Do you prefer a HAML template ? y
Is your page localized ? y
What are the locales other than the default one (comma separated) ? fr,en
create app/views/pages/my_page.liquid.haml
create app/views/pages/my_page.fr.liquid.haml
create app/views/pages/my_page.en.liquid.haml

allow scss for fonts/all

@mixin bulletproof-font-face($name, $file-name) {
  @font-face {
    font-family: $name;
    src: url("#{$file-name}.eot");
    src: local('?'),
      url("#{$file-name}.woff") format("woff"),
      url("#{$file-name}.otf") format("opentype"),
      url("#{$file-name}.ttf") format("truetype");
    }
  @media screen and (max-device-width: 480px) {
    @font-face {
      font-family: $name;
      src: url("#{$file-name}.woff") format("woff"),
      url("#{$file-name}.otf") format("opentype"),
      url("#{$file-name}.ttf") format("truetype");
  }}
}

Source: http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/

would be nice to use to be able to use something like that without manual scss to css conversion.

Templates order when pushing

I have the following structure:

index
  mypage (extends other_template)
  other_template (extends index)

When I push the site with the builder, it tries to create mypage first and fails because other_template isn't created yet.

Do we need to set manually the positions or is it supposed to guess the right order to push pages ?

upgrade from editor to wagon causes Heroku error

Perhaps not a wagon issue, but creating the issue just in case.

I followed the upgrade guides to upgrade our staging site and while the site functions, we get this error with a wagon push staging -f:

en
    updating alivecor...........................................................[error]
      error => Expected(201) <=> Actual(422 Unprocessable Entity)
  request => {:connect_timeout=>60, :headers=>{"Accept"=>"application/json", "Accept-Encoding"=>"gzip", "Authorization"=>"Basic OjA5YWI3MTc1ZjA3NTUzOTQxOTMwMWZlYzk1MDhiZDMxNWQzMWNhYWE=", "User-Agent"=>"heroku-rb/0.1.8", "X-Heroku-API-Version"=>"3", "X-Ruby-Version"=>"1.9.3", "X-Ruby-Platform"=>"x86_64-linux", "Host"=>"api.heroku.com:443", "Content-Length"=>0}, :instrumentor_name=>"excon", :mock=>false, :read_timeout=>60, :retry_limit=>4, :ssl_ca_file=>"/app/vendor/bundle/ruby/1.9.1/gems/excon-0.13.4/data/cacert.pem", :ssl_verify_peer=>true, :write_timeout=>60, :host=>"api.heroku.com", :path=>"/apps/alivecorcms/domains", :port=>"443", :query=>{"domain_name[domain]"=>"alivecorcms-staging.herokuapp.com"}, :scheme=>"https", :expects=>201, :method=>:post}  response => #<Excon::Response:0x00000006e86998 @body="{\"id\":\"invalid_params\",\"error\":\"alivecorcms-staging.herokuapp.com is currently in use by another app.\"}", @headers={"Cache-Control"=>"no-transform", "Content-Type"=>"application/json;charset=utf-8", "Date"=>"Fri, 03 May 2013 23:54:01 GMT", "Status"=>"422 Unprocessable Entity", "Strict-Transport-Security"=>"max-age=31536000", "X-Content-Type-Options"=>"nosniff", "X-RateLimit-Limit"=>"486", "X-RateLimit-Remaining"=>"485", "X-Runtime"=>"0.121965971", "Content-Length"=>"103", "Connection"=>"keep-alive"}, @status=422>  en-UK
    updating alivecor...........................................................[error]
      error => Expected(201) <=> Actual(422 Unprocessable Entity)
  request => {:connect_timeout=>60, :headers=>{"Accept"=>"application/json", "Accept-Encoding"=>"gzip", "Authorization"=>"Basic OjA5YWI3MTc1ZjA3NTUzOTQxOTMwMWZlYzk1MDhiZDMxNWQzMWNhYWE=", "User-Agent"=>"heroku-rb/0.1.8", "X-Heroku-API-Version"=>"3", "X-Ruby-Version"=>"1.9.3", "X-Ruby-Platform"=>"x86_64-linux", "Host"=>"api.heroku.com:443", "Content-Length"=>0}, :instrumentor_name=>"excon", :mock=>false, :read_timeout=>60, :retry_limit=>4, :ssl_ca_file=>"/app/vendor/bundle/ruby/1.9.1/gems/excon-0.13.4/data/cacert.pem", :ssl_verify_peer=>true, :write_timeout=>60, :host=>"api.heroku.com", :path=>"/apps/alivecorcms/domains", :port=>"443", :query=>{"domain_name[domain]"=>"alivecorcms-staging.herokuapp.com"}, :scheme=>"https", :expects=>201, :method=>:post}  response => #<Excon::Response:0x000000067d2d68 @body="{\"id\":\"invalid_params\",\"error\":\"alivecorcms-staging.herokuapp.com is currently in use by another app.\"}", @headers={"Cache-Control"=>"no-transform", "Content-Type"=>"application/json;charset=utf-8", "Date"=>"Fri, 03 May 2013 23:54:01 GMT", "Status"=>"422 Unprocessable Entity", "Strict-Transport-Security"=>"max-age=31536000", "X-Content-Type-Options"=>"nosniff", "X-RateLimit-Limit"=>"486", "X-RateLimit-Remaining"=>"484", "X-Runtime"=>"0.094448117", "Content-Length"=>"103", "Connection"=>"keep-alive"}, @status=422>

BTW, multisite is enabled and the alivecorcms-staging.herokuapp.com domain is in the backoffice UI.

wagon push isn't actually updating theme assets

When I wagon push, S3 reports that the CSS file was updated, but the file is not the new content, it's an old version. Not sure how to debug this one at all. Let me know if I can provide any helpful info.

I am using wagon 1.0.1

wagon push: multi locale content entries fails

Locomotive::Mounter::Models::ContentEntry#set_slug
fails with undefined method 'permalink!' when used via be wagon push ENV

# Sets the slug of the instance by using the value of the highlighted field
# (if available). If a sibling content instance has the same permalink then a
# unique one will be generated.
# It applies that to every translated version of the content entry.
def set_slug
  self.translated_in.each do |locale|
    Locomotive::Mounter.with_locale(locale) do
      # first attempt from the label
      if self._slug.blank?
        self._slug = self._label.try(:dup)
      end

      # from the content type itself
      if self._slug.blank?
        self._slug = self.content_type.send(:label_to_slug)
      end

      self._slug.permalink!

      self._slug = self.next_unique_slug if self.slug_already_taken?
    end
  end

  self.fill_with_default_slug
end

self._slug is a Hash when it fails, it succeeds with single locale content entries (when it's a String).

Backtrace from wagon.log

undefined method `permalink!' for #<Hash:0x007f827917e320>
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/models/content_entry.rb:235:in `block (2 levels) in set_slug'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter.rb:90:in `with_locale'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/models/content_entry.rb:224:in `block in set_slug'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/models/content_entry.rb:223:in `each'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/models/content_entry.rb:223:in `set_slug'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/models/content_type.rb:75:in `block in build_entry'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/models/content_type.rb:60:in `tap'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/models/content_type.rb:60:in `build_entry'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/reader/file_system/content_entries_reader.rb:74:in `add'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/reader/file_system/content_entries_reader.rb:29:in `block (2 levels) in fetch_from_filesystem'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/reader/file_system/content_entries_reader.rb:28:in `each'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/reader/file_system/content_entries_reader.rb:28:in `each_with_index'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/reader/file_system/content_entries_reader.rb:28:in `block in fetch_from_filesystem'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/reader/file_system/content_entries_reader.rb:21:in `each'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/reader/file_system/content_entries_reader.rb:21:in `fetch_from_filesystem'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/reader/file_system/content_entries_reader.rb:13:in `read'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/reader/runner.rb:76:in `block (2 levels) in build_mounting_point'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/reader/runner.rb:73:in `each'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/reader/runner.rb:73:in `block in build_mounting_point'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/reader/runner.rb:70:in `tap'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/reader/runner.rb:70:in `build_mounting_point'
  gems/locomotivecms_mounter-1.0.2/lib/locomotive/mounter/reader/runner.rb:29:in `run!'
  gems/locomotivecms_wagon-1.0.1/lib/locomotive/wagon.rb:154:in `require_mounter'
  gems/locomotivecms_wagon-1.0.1/lib/locomotive/wagon.rb:59:in `push'
  gems/locomotivecms_wagon-1.0.1/lib/locomotive/wagon/cli.rb:172:in `push'
  gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
  gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
  gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
  gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
  gems/locomotivecms_wagon-1.0.1/bin/wagon:9:in `<top (required)>'
  bin/wagon:23:in `load'
  bin/wagon:23:in `<main>'

Not sure if it's a mounter or a wagon issue.

content type

---
name: Magazine
description: Articles...
slug: magazine
label_field_name: title
order_by: 512b647bc086453dc300000e
order_direction: desc
fields:
- title:
    label: title
    type: string
    required: true
    localized: true
- author:
    label: author
    type: string
- text:
    label: text
    type: text
    required: true
    localized: true
    text_formatting: html
- icon:
    label: icon
    type: file
    hint: upload in highest resolution possible, will be down scaled and optimized
      automatically
    required: true
- publish_date:
    label: publish_date
    type: date
    required: true

content entries

---
- works
    _slug: works
    author: Someone
    text:
      en: ! ""
    publish_date: 04/16/2013
- fails
    _slug:
      en: fails
      it: fails
      fr: fails
      de: fails
    title:
      it: Fail
      fr: Fail
      de: Fail
    author: Someone
    text:
      en: ! ""
      it: ! ""
      fr: ! ""
      de: ! ""
    publish_date: 03.04.2013

(both YAML files were created via wagon pull)

Allow to init a site with a template url

For the moment you can init a site with a given template:

builder init my_first_site -t bootstrap

You should be able to provide the url of a git repo:

builder init my_first_site -t [email protected]:jloosfelt/locomotivecms_blog.git

To discuss: which protocole : git/https/ssh?

Can't make localized content_type_template work

In a multilingual site ([en, fr]), I have a "posts" content type (with no localization but I'm not sure it matters).

The url /posts/post-1 works well but in french (/fr/posts/post-1), it will return a blank page. I would expect to display the same page as in default language.

When I try to create a localized template for posts posts/content_type_template.fr.liquid.haml, I get this error:

TypeError at /posts/post-1
can't convert nil into String
/usr/local/opt/rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/locomotivecms_mounter-1.0.0.alpha4/lib/locomotive/mounter/models/page.rb: in join, line 72

crash when uploading assets

Hi,

I am trying to use wagon for the following site https://github.com/applidget/mobicheckin-website-templates

And I get a strange error when it starts uploading assets. I've tried debugger wagon but I end up in some difficult debugging use case where it crashing while evaluating a Proc ...

Anyway, here is what wagon tells me:

Blocking Error: undefined method `path' for false:FalseClass

Here is the stacktrace:

    Logfile created on 2013-04-03 18:05:17 +0200 by logger.rb/1.2.8
["~/.rvm/gems/ruby-1.9.3-p0/gems/httmultiparty-0.3.9/lib/httmultiparty.rb:30:in `file_to_upload_io'", "~/.rvm/gems/ruby-1.9.3-p0/gems/httmultiparty-0.3.9/lib/httmultiparty.rb:14:in `block (2 levels) in <module:HTTMultiParty>'", "~/.rvm/gems/ruby-1.9.3-p0/gems/httmultiparty-0.3.9/lib/httmultiparty.rb:12:in `map'", "~/.rvm/gems/ruby-1.9.3-p0/gems/httmultiparty-0.3.9/lib/httmultiparty.rb:12:in `block in <module:HTTMultiParty>'", "~/.rvm/gems/ruby-1.9.3-p0/gems/httparty-0.10.2/lib/httparty/request.rb:132:in `call'", "~/.rvm/gems/ruby-1.9.3-p0/gems/httparty-0.10.2/lib/httparty/request.rb:132:in `normalize_query'", "~/.rvm/gems/ruby-1.9.3-p0/gems/httparty-0.10.2/lib/httparty/request.rb:115:in `body'", "~/.rvm/gems/ruby-1.9.3-p0/gems/httparty-0.10.2/lib/httparty/request.rb:144:in `setup_raw_request'", "~/.rvm/gems/ruby-1.9.3-p0/gems/httparty-0.10.2/lib/httparty/request.rb:88:in `perform'", "~/.rvm/gems/ruby-1.9.3-p0/gems/locomotivecms_mounter-1.0.1/lib/locomotive/mounter/extensions/httmultiparty.rb:18:in `perform_request'", "~/.rvm/gems/ruby-1.9.3-p0/gems/httmultiparty-0.3.9/lib/httmultiparty.rb:86:in `post'", "~/.rvm/gems/ruby-1.9.3-p0/gems/locomotivecms_mounter-1.0.1/lib/locomotive/mounter/writer/api/base.rb:80:in `post'", "~/.rvm/gems/ruby-1.9.3-p0/gems/locomotivecms_mounter-1.0.1/lib/locomotive/mounter/writer/api/theme_assets_writer.rb:54:in `block in write'", "~/.rvm/gems/ruby-1.9.3-p0/gems/locomotivecms_mounter-1.0.1/lib/locomotive/mounter/writer/api/theme_assets_writer.rb:35:in `each'", "~/.rvm/gems/ruby-1.9.3-p0/gems/locomotivecms_mounter-1.0.1/lib/locomotive/mounter/writer/api/theme_assets_writer.rb:35:in `write'", "~/.rvm/gems/ruby-1.9.3-p0/gems/locomotivecms_mounter-1.0.1/lib/locomotive/mounter/writer/runner.rb:56:in `block in write_all'", "~/.rvm/gems/ruby-1.9.3-p0/gems/locomotivecms_mounter-1.0.1/lib/locomotive/mounter/writer/runner.rb:51:in `each'", "~/.rvm/gems/ruby-1.9.3-p0/gems/locomotivecms_mounter-1.0.1/lib/locomotive/mounter/writer/runner.rb:51:in `write_all'", "~/.rvm/gems/ruby-1.9.3-p0/gems/locomotivecms_mounter-1.0.1/lib/locomotive/mounter/writer/runner.rb:29:in `run!'", "~/.rvm/gems/ruby-1.9.3-p0/gems/locomotivecms_wagon-1.0.0/lib/locomotive/wagon.rb:69:in `push'", "~/.rvm/gems/ruby-1.9.3-p0/gems/locomotivecms_wagon-1.0.0/lib/locomotive/wagon/cli.rb:172:in `push'", "~/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'", "~/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'", "~/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'", "~/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'", "~/.rvm/gems/ruby-1.9.3-p0/gems/locomotivecms_wagon-1.0.0/bin/wagon:9:in `<top (required)>'", "~/.rvm/gems/ruby-1.9.3-p0/bin/wagon:23:in `load'", "~/.rvm/gems/ruby-1.9.3-p0/bin/wagon:23:in `<top (required)>'", "~/.rvm/gems/ruby-1.9.3-p0/gems/debugger-1.5.0/bin/rdebug:124:in `debug_load'", "~/.rvm/gems/ruby-1.9.3-p0/gems/debugger-1.5.0/bin/rdebug:124:in `debug_program'", "~/.rvm/gems/ruby-1.9.3-p0/gems/debugger-1.5.0/bin/rdebug:394:in `<top (required)>'", "~/.rvm/gems/ruby-1.9.3-p0/bin/rdebug:23:in `load'", "~/.rvm/gems/ruby-1.9.3-p0/bin/rdebug:23:in `<main>'"]

Any clue about what is happening ? I usually debug wagon myself to check what is wrong with my site but this times it looks really strange ..

Wagon won't push .svgz files

These are font file formats, necessary for cross-browser @font-face implementation. I don't believe these file types are any less secure than any other font formats?

How can I run bundle exec outside of its own dir?

I'm doing a lot of testing on wagon but I'm stuck with this issue:
I can run wagon without compiling it from its own dir:

bundle exec bin/wagon serve ../sites/mysite/

This works fine but if I want to test push a site on a local engine I have to be in its own dir (right?).
I've tried this solution from stack overflow with no avail:

BUNDLE_GEMFILE=/path/to/Gemfile bundle exec /path/to/runmyapp

I even tried to compile wagon and install it but it doesn't work either.

logs:

wagon: $ bundle exec bin/wagon push -t development -r all ../sites/mysite/
wagon push requires at least 1 argument: "wagon push ENV [PATH]".

mysite: $ BUNDLE_GEMFILE=../../wagon/Gemfile bundle exec ../../bin/wagon --help

bundler: command not found: ../../bin/wagon
Install missing gem executables with `bundle install`

wagon: $ bundle exec bin/wagon generate page ../sites/mysite/
The path does not point to a LocomotiveCMS site

Liquid pages not rendered

I generated every template in both haml & liquid.
Liquid sites are not rendered although wagon log says so:

Started GET "/" at 2013-03-29 17:19:45 +0100
Detecting locale EN
Found page "Index" [/index]
  Rendered liquid page template
Completed 200 OK in 2.44ms

...but I get a blank page.

foundation zepto / jquery detector broken

foundation haml template produces

    :javascript
      document.write('<script src=' +
      ('__proto__' in {} ? '{{ site.root }}javascripts/vendor/zepto' : '{{ site.root }}javascripts/vendor/jquery') +
      '.js><\/script>')

which does not work properly after a wagon push.

javascript_url should be used:

    :javascript
      document.write('<script src=' +
      ('__proto__' in {} ? '{{ 'vendor/zepto.js' | javascript_url }}' : '{{ 'vendor/jquery.js' | javascript_url }}') +
      '><\/script>')

however javascript_url does not seem to be supported with wagon serve.

i can work around the problem by using jQuery only for now but would be nice to fix.

Nice!

I understand this will replace locomotive_editor, right?

Untranslated content type: content entries slugs are blank

I have a post content type which has no translated field and content entries.

When I switch to french (english being the default language), and I list the content entries, they are listed but the content entry "_slug" method returns blank.

Reference to Builder in Wagon

Resizing on the fly doesn't work for me, and in the error message it refers to a Builder class:

Locomotive::Builder::Logger.error "Unable to resize on the fly: #{source.inspect}"

L:20 in lib/locomotive/wagon/misc/dragonfly.rb

wagon pull Blocking Error: "\x89" from ASCII-8BIT to UTF-8

01:14 ~/Sites/bp/site [master]$ be wagon pull production
Blocking Error: "\x89" from ASCII-8BIT to UTF-8
01:19 ~/Sites/bp/site [master]$ be wagon version
1.0.1

it seems to choke on config/translations.yml, content after pull:

#<Enumerator:0x007fb4246f1eb0>

Using locomotivehosting.com

The path does not point to a LocomotiveCMS site

hello,
I try wagon deployed on heroku and I get this error => The path Does not developed to a website LocomotiveCMS
But I have followed the instructions
deploy.yml file

production: host: toto.herokuapp.com email: toto@toto password: toto

I then run the command
bundle exec wagon push -r all -t production -f

he told The path Does not developed to a website LocomotiveCMS

thks

Pushing site

Pushing ContentEntries:

en

updating advertising / advanced-targeting...................................[done]
updating advertising / analytics............................................[done]
updating advertising / simple-setup.........................................[done]
updating advertising / volume...............................................[done]
updating companies / applibot...............................................[done]
updating companies / gameloft...............................................[done]
updating companies / kabam..................................................[done]
updating companies / ngmoco.................................................[done]
updating companies / pocket-gems............................................[done]
updating companies / storm8.................................................[done]
updating companies / tinyco.................................................[done]
updating jobs / server-side-developer.......................................[done]
updating jobs / sdk-developer...............................................[done]
updating jobs / sales-manager...............................................[done]
updating monetization / app-monetization....................................[done]
updating monetization / how-it-works........................................[done]
updating monetization / easy-sdk-integration................................[done]
updating monetization / reports-analytics...................................[done]
updating our_work / monetization............................................[done]
updating our_work / advertising.............................................[done]
updating our_work / global-network..........................................[done]
updating questions / revmob-works-with-4-main-ad-units-described-below......[done]
updating questions / how-do-i-maximize-my-app-s-revenues....................[done]
updating questions / what-does-ecpm-mean-do-you-pay-per-impressions-or-per-installs

Blocking Error: negative argument

Missing --version option

The --version or -v option is not present in this gem. This is particularly important since the gem will probably evolve a lot in the next few weeks

Wagon assume `identify` is in `/usr/local/bin/`

Hi,
When doing a wagon push, wagon fail when trying to upload images :

> error => Command failed (/usr/local/bin/identify '/var/http/locomotive/tmp/uploads/20130508-1513-21922-7571/lc_logo.png') with exit status 127

Wagon should not assert the path to binary, at least on Archlinux and Debian the path is /usr/bin/.
It should try to discover it (which %s), or ask the user (config file ?) where it can find the imagemagick binary.

Regards.

nav tag and bootstrap trick

Since I haven't been able to implement the nav tag properly (either bug or misuse) with bootstrap responsive here's my workaround (here the "Groupes" model has a templatized unique page and is the only dropdown portion of the menu:

in index:

{% include 'navbar' %}

in navbar snippet:

<div class='navbar'>
  <div class='navbar-inner'>
    <div class='container'>
      <a class='btn btn-navbar' data-target='.nav-collapse' data-toggle='collapse'>
        <span class='icon-bar'></span>
        <span class='icon-bar'></span>
        <span class='icon-bar'></span>
      </a>
      <a class='brand' href='/'>{{ site.name }}</a>
      <div class='nav-collapse collapse'>
        <ul class="nav">
          <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              Groupes
            <b class="caret"></b>
            </a>
            <ul class="dropdown-menu">
              {% for groupe in contents.groupes %}
              <li><a href="{{ groupe._slug }}">{{ groupe.name }}</a></li>
              {% endfor %}
            </ul>
          </li>
        </ul>
        <ul class="nav">
          {% nav site, exclude: 'groupes', no_wrapper: true %}
        </ul>
      </div>
    </div>
  </div>
</div>

Normal:
capture decran 2013-05-08 a 14 35 51

Responsive:
capture decran 2013-05-08 a 14 36 07

Indentation inconsistances between generators

I noticed that, against ruby/haml indentation good practice of using two actual spaces for tabs, some haml generators (404 pages, content_types, snippets, pages) use four spaces wide tabs that might lead to unnecessary problems, especially with buffer unaware editors.

Wagon push may still not be updating CSS

I am cautious to bring this issue up again. If for no other reason than I hate to be annoying.

I am seeing the same behavior, but oddly it is intermittent.

Under some conditions that I cannot seem to isolate, wagon push will properly skip assets that have not been updated. In this case it never reliably updates CSS file(s). In some other cases it reports that it is updating everything and CSS is still not updated.

In short, I cannot use wagon to update CSS changes. Is it because I am compiling CSS with an outside program and not Compass? Can someone else verify this?

Here is my situation: I host Locomotive locally with v2.0.3 and am using Wagon 1.0.2.

I write SCSS and use Codekit to compile it to the public/stylesheets directory.

In all cases I am always issuing the push command with the "force" flag:

wagon push development -f

wagon push -r all becomes useless

It seems that wagon push production will push all the site, so the --ressource=all becomes useless.
I suggest that push should push all the site by default (except data which stays -d), and the -r options limits the ressource type to be pushed.

Defining page slug causes error on second time push "slug => is already taken"

I think it tries to recreate the page and runs into an error because it already exists. Only happens when defining a slug.

* Pushing Pages
  en
    updating index..............................................................[done]
    updating 404................................................................[done]
    creating belverzoek      slug => is already taken

This kills the push, thus preventing updating the website.

force to push theme_assets

i'm trying to force to push theme assets (fonts, js, css) and i've got a blocking error on /fonts folder

1.9.3-p194@adagp|chussenot:~/Sites/adagp/builder/adagp $ bundle exec builder push staging -r theme_assets --force

  • Pushing Site
    fr
    updating site..............................................................[done]
    en
    updating site..............................................................[done]
  • Pushing ThemeAssets
    updating /fonts/font-blackcn-webfont.woff

Blocking Error: source => Nouveau fichier n'a pas l'extension original


i send logs by mail

Asset not found for sass and javascript

Hello,

here I used car and I have a problem with the assets.
I want to load a stylesheet sass like this.

{{'main' | stylesheet_tag }} {{'test' | javascript_tag }}

what is the problem?

thanks

"gem install locomotivecms_wagon" fail, json compilation error (ruby 2.0.0)

Hi,
Trying to install locomotivecms_wagon fail with ruby 2.0.0-p0 (see below).
The same tentative with 1.9.3-p392 succeed.
I am running on Arch Linux up to date.

Regards

Edit: The problem seems to be the json version (1.6.8 is old), trying to do "gem install json" on ruby 2.0.0-p0 succeed.

Building native extensions.  This could take a while...
ERROR:  Error installing locomotivecms_wagon:
        ERROR: Failed to build gem native extension.

    /usr/bin/ruby extconf.rb
creating Makefile

make
compiling generator.c
In file included from /usr/include/assert.h:36:0,
                 from ../fbuffer/fbuffer.h:5,
                 from generator.c:1:
/usr/include/features.h:330:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^
In file included from generator.c:2:0:
generator.c: In function ‘cState_aref’:
generator.h:96:27: warning: variable ‘state’ set but not used [-Wunused-but-set-variable]
     JSON_Generator_State *state;              \
                           ^
generator.c:632:5: note: in expansion of macro ‘GET_STATE’
     GET_STATE(self);
     ^
generator.c: In function ‘isArrayOrObject’:
generator.c:867:22: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
     return *p == '[' && *q == ']' || *p == '{' && *q == '}';
                      ^
linking shared-object json/ext/generator.so

make install
/usr/bin/install -c -m 0755 generator.so /home/lainux/.gem/ruby/2.0.0/gems/json-1.6.8/ext/json/ext/json/ext
/usr/bin/install: cannot create regular file ‘/home/lainux/.gem/ruby/2.0.0/gems/json-1.6.8/ext/json/ext/json/ext’: No such file or directory
make: *** [install-so] Error 1

Gem files will remain installed in /home/lainux/.gem/ruby/2.0.0/gems/json-1.6.8 for inspection.
Results logged to /home/lainux/.gem/ruby/2.0.0/gems/json-1.6.8/ext/json/ext/generator/gem_make.out

gem haml/stringex dependency problem

When bundling the engine (rc13) with the local wagon gem (1.0.0.alpha8):

------------------------------------------------------------------------------------------- 22:58:33
engine: bundle
Fetching gem metadata from http://rubygems.org/........
Fetching gem metadata from http://rubygems.org/..
Bundler could not find compatible versions for gem "haml":
  In snapshot (Gemfile.lock):
    haml (3.1.7)

  In Gemfile:
    locomotivecms_wagon (>= 0) ruby depends on
      haml (= 3.2.0.rc.2) ruby

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

------------------------------------------------------------------------------------------- 23:27:32
engine: bundle update
Fetching gem metadata from http://rubygems.org/........
Fetching gem metadata from http://rubygems.org/..
Bundler could not find compatible versions for gem "stringex":
  In Gemfile:
    locomotivecms_wagon (>= 0) ruby depends on
      stringex (~> 1.4.0) ruby

    locomotive_cms (>= 0) ruby depends on
      stringex (1.5.1)


------------------------------------------------------------------------------------------- 23:30:05

Seems like it's a mounter dependency.
(Sorry to sound noobish but I'm not a ruby programmer. I kinda suss my way around code. Let me know if my comments are irrelevant and I'll stick with typos)

Wagon won't create nested pages

I have a directory structure like this:

--staff
----bio.liquid.haml
----bio
------content_type_template.liquid.haml

If I push pages to the engine I receive this error:

Blocking Error: We are unable to find the parent page for staff/bio/content-type-template

If I temporarily remove the "bio" directory and allow wagon to push staff/bio.liquid.haml, I can then put the bio directory back and push successfully. Is this a bug or user error? :-)

Love Locomotive btw... Thanks for your hard work!

"wagon serve" on clean install complain about missing dependancy on Linux

Hi,
When launching the server with the default configuration (just after a clean install, I bundle install, and bundle exec wagon serve, no modification made), I got some warning about a missing dependancy ( gem 'rb-inotify', '~> 0.9' ) in the default Gemfile.
I only have a working linux (Archlinux) here, so I am not able to determine if it is a specific need of my system :)

Regards.

$ bundle exec wagon serve
[Listen warning]:
  Missing dependency 'rb-inotify' (version '~> 0.9')!
  Please add the following to your Gemfile to satisfy the dependency:
    gem 'rb-inotify', '~> 0.9'

  For a better performance, it's recommended that you satisfy the missing dependency.
  Listen will be polling changes. Learn more at https://github.com/guard/listen#polling-fallback.

[Listen warning]:
  Missing dependency 'rb-inotify' (version '~> 0.9')!
  Please add the following to your Gemfile to satisfy the dependency:
    gem 'rb-inotify', '~> 0.9'

  For a better performance, it's recommended that you satisfy the missing dependency.
  Listen will be polling changes. Learn more at https://github.com/guard/listen#polling-fallback.

[Listen warning]:
  Missing dependency 'rb-inotify' (version '~> 0.9')!
  Please add the following to your Gemfile to satisfy the dependency:
    gem 'rb-inotify', '~> 0.9'

  For a better performance, it's recommended that you satisfy the missing dependency.
  Listen will be polling changes. Learn more at https://github.com/guard/listen#polling-fallback.

[Listen warning]:
  Missing dependency 'rb-inotify' (version '~> 0.9')!
  Please add the following to your Gemfile to satisfy the dependency:
    gem 'rb-inotify', '~> 0.9'

  For a better performance, it's recommended that you satisfy the missing dependency.
  Listen will be polling changes. Learn more at https://github.com/guard/listen#polling-fallback.

>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3333, CTRL+C to stop

Wagon renders different nav html with {% nav %} tag

Unless I am doing something wrong, when I use wagon this is the markup rendered:

<ul id="nav" class="">
  <li id="home-link" class="link on first "><a href="/home">Home </a></li>
  <li id="menu-link" class="link  "><a href="/menu">Menu </a></li>
  <li id="about-link" class="link  "><a href="/about">About </a></li>
  <li id="news-link" class="link last "><a href="/news">News &amp; Events </a></li>
</ul>

When I push to my dev server this is what I get:

<nav id="nav">
  <ul>
    <li id="home-link" class="link first"><a href="/home">Home</a></li>
    <li id="menu-link" class="link "><a href="/menu">Menu</a></li>
    <li id="about-link" class="link "><a href="/about">About</a></li>
    <li id="news-link" class="link on last"><a href="/news">News &amp; Events</a></li>
  </ul>
</nav>

Anyone else seeing this?

Pushing translations: do not update existing translations

Every time you push a site with wagon, every translation will be updated.

There is a high risk that you erase what an author has changed in the backoffice.

I think that a basic push should preserve existing translations.

We must be very careful with the content written by authors.
A tempting solution to force the update would be to use the -f parameter, but it is dangerous as we generally use it to force the update of existing pages or resources which are in our git repos.
For this reason I would propose a new specific parameter:
bundle exec wagon push development --force-translations

Define order in pages

Is there a way to define a numerical order for the pages? For example:


---
title: Contact
published: true
listed: true
order: 1

---

Gem activesupport dependency problem

I have this error on my wagon site when I bundle updated

Bundler could not find compatible versions for gem "activesupport":
  In Gemfile:
    locomotivecms_wagon (>= 0) ruby depends on
      activesupport (~> 3.2.5) ruby

    locomotivecms_wagon (>= 0) ruby depends on
      activesupport (4.0.0.beta1)

A workaround is to fix activesupport version in the wagon Gemfile 👍

gem 'activesupport', '3.2.12'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.