joosy-rails 1.0.0.RC1 → 1.0.0.RC2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f842e383f19d59b9662049c1965f5a2ee017dfd8
4
- data.tar.gz: d5de3abe46de6cca0a897efa31f719ff58f17399
3
+ metadata.gz: 73e469ca51f70d87a3d65bdde8a773366b367fa1
4
+ data.tar.gz: 8ad792f9790dcd09e6bff2b4b92b3952e3945601
5
5
  SHA512:
6
- metadata.gz: 936a23da4bdcce1a2d8b663f94201f00913edc3f8255a13d0850c55d97b8f9f06213ca7b6ce649505564d961b7a98fc5d16aabb1af2050e41a1bdd04778cbd19
7
- data.tar.gz: 120fe3d4024f5a5bc5e40c41b7812c6b1f52380eb60f4b115602fc027bcb3e35c43366970211a86557174e1d9e0b6c4dd91ad2c961b7cbab2a3422e6d8b524eb
6
+ metadata.gz: 3fb360fd6ec8830ed731b83217a491bacaa05b6db561bada55445f770f638338375a3a007371d0e391563df911022318944484294e4646148eb0e2c27b6c6f76
7
+ data.tar.gz: 32e7b9f944ecf177b0438f0a4eb6ed8e1d162fe8c6ff272e6c92fe28fc4225a24c248338ee78c2d71b8c250aeb614e4357d103cdbae2e172e24d59d6d92c717f
data/README.md CHANGED
@@ -1,18 +1,21 @@
1
1
  # Joosy::Rails
2
2
 
3
- ![Joosy](http://f.cl.ly/items/2N2J453J2B353F1A0t0I/joocy1.1.png)
4
-
5
- Rails ties for the [Joosy](http://joosy.ws) Framework
3
+ <a href="http://joosy.ws"><img src="http://f.cl.ly/items/3X0f2K1z3r1X3K162W2c/logo.png" align="right" /></a>
6
4
 
7
5
  [![Gem Version](https://badge.fury.io/rb/joosy-rails.png)](http://badge.fury.io/rb/joosy-rails)
8
- [![Dependency Status](https://gemnasium.com/joosy/rails.png)](https://gemnasium.com/joosy/rails)
6
+ [![Dependency Status](https://gemnasium.com/joosy/joosy-rails.png)](https://gemnasium.com/joosy/joosy-rails)
7
+
8
+ The bindings between **[Joosy](http://joosy.ws) framework** and [Rails](http://rubyonrails.org).
9
+
10
+ If you are seeking for information about Joosy, start with [official site](http://joosy.ws), [guides](http://guides.joosy.ws) or [central repository](https://github.com/joosy/joosy/).
9
11
 
10
- On the menu:
12
+ ## Capabilities
11
13
 
12
14
  * Full assets integration
13
15
  * Generators
14
16
  * Built-in serving controller
15
17
  * Routes helpers
18
+ * Automatic Joosy Resources generation
16
19
 
17
20
  ## Installation
18
21
 
@@ -28,20 +31,35 @@ And then execute:
28
31
 
29
32
  ### Generators
30
33
 
31
- * `rails g joosy:application :name` – generates basic application and patches routes to make it loadable straight away.<br>
32
- **:name** can (and in most cases should) be ommited.<br>
34
+ #### rails g joosy:application (NAME)
35
+
36
+ Generates basic application and patches route to make it loadable straight away.
37
+
38
+ By default an application will be generated directly at `app/assets/javascripts`. If you want to isolate it a bit more, pass in the `NAME` argument &mdash; then it will appear at `app/assets/javascripts/NAME`.
39
+
40
+ #### rails g joosy:layout NAME (APPLICATION)
41
+
42
+ Generates Joosy layout. `NAME` can contain slashes to automatically generate corresponding path and namespace.
43
+
44
+ Note that if the application was initially generated with the usage of `NAME` option, you should pass it here as the second parameter (APPLICATION).
45
+
46
+ #### rails g joosy:page NAME (APPLICATION)
33
47
 
34
- * `rails g joosy:layout :name (:application)` generates new `Joosy.Layout`.<br>
35
- **:name** can include any namespace (i.e. 'deeply/nested/layout').<br>
36
- **:application** is a name of an application.<br>
48
+ Generates Joosy page. `NAME` can contain slashes to automatically generate corresponding path and namespace.
37
49
 
38
- * `rails g joosy:page :name (:application)` generates new `Joosy.Page`.<br>
39
- **:name** can include any namespace (i.e. 'deeply/nested/page').<br>
40
- **:application** is a name of an application.<br>
50
+ Note that if the application was initially generated with the usage of `NAME` option, you should pass it here as the second parameter (APPLICATION).
41
51
 
42
- * `rails g joosy:widget :name (:application)` – generates new `Joosy.Widget`.<br>
43
- **:name** can include any namespace (i.e. 'deeply/nested/widget').<br>
44
- **:application** is a name of an application.
52
+ #### rails g joosy:widget NAME (APPLICATION)
53
+
54
+ Generates Joosy widget. `NAME` can contain slashes to automatically generate corresponding path and namespace.
55
+
56
+ Note that if the application was initially generated with the usage of `NAME` option, you should pass it here as the second parameter (APPLICATION).
57
+
58
+ #### rails g joosy:controller NAME (--copy)
59
+
60
+ Generates a controller serving Joosy application using the NAME given.
61
+
62
+ By default a controller will inherit from internal `Joosy::Rails::ServeController`. If instead you want to patch it from the ground, use `--copy` option that will make generator to create raw controller that inherits from `ActionController::Base`.
45
63
 
46
64
  ### Serving controller and helpers
47
65
 
@@ -51,12 +69,14 @@ This gem provides `joosy` routing helper which can be used in the following way:
51
69
  joosy '/', application: 'dummy'
52
70
  ```
53
71
 
54
- This will map your `dummy` Joosy application to the root url. Note that `application` option is optional and can be ommited just like `:name` option of the application generator.
72
+ This will map your `dummy` Joosy application to the root url. The `application` option is optional. It should reflect path to application from `app/assets/javascript` (use the value that you passed into the NAME of `rails g joosy:application`).
73
+
74
+ ## Maintainers
75
+
76
+ * Boris Staal, [@inossidabile](http://staal.io)
77
+
78
+ ## License
55
79
 
56
- ## Contributing
80
+ Copyright 2013 [Boris Staal](http://staal.io)
57
81
 
58
- 1. Fork it
59
- 2. Create your feature branch (`git checkout -b my-new-feature`)
60
- 3. Commit your changes (`git commit -am 'Add some feature'`)
61
- 4. Push to the branch (`git push origin my-new-feature`)
62
- 5. Create new Pull Request
82
+ It is free software, and may be redistributed under the terms of MIT license.
@@ -1,5 +1,11 @@
1
1
  #= require ./resource_loader
2
2
 
3
+ <%
4
+ Joosy::Rails::Engine.route_dependencies.each do |path|
5
+ depend_on path
6
+ end
7
+ %>
8
+
3
9
  routes = <%= Joosy::Rails::Engine.resources.to_json %>
4
10
 
5
11
  Joosy.ResourceLoader.loadResources routes
@@ -1,3 +1,5 @@
1
+ #= require joosy/resources
2
+
1
3
  Joosy.ResourceLoader =
2
4
  defineResource: (name, path, parent) ->
3
5
  class @[name] extends parent
data/joosy-rails.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ['lib']
20
20
 
21
- spec.add_dependency 'joosy', '>= 1.2.0.alpha.63'
21
+ spec.add_dependency 'joosy', '>= 1.2.0.beta.1'
22
22
  spec.add_dependency 'sprockets'
23
23
  spec.add_dependency 'execjs'
24
24
  spec.add_dependency 'activesupport'
@@ -9,6 +9,16 @@ module Joosy
9
9
  initializer 'joosy.extend.sprockets' do |app|
10
10
  Joosy.assets_paths.each{|p| app.assets.append_path p}
11
11
  end
12
+
13
+ initializer 'joosy.routing' do |app|
14
+ app.routes.prepend do
15
+ Engine.resources = []
16
+ end
17
+ end
18
+
19
+ def route_dependencies
20
+ ::Rails.application.routes_reloader.paths
21
+ end
12
22
  end
13
23
  end
14
24
  end
@@ -1,5 +1,5 @@
1
1
  module Joosy
2
2
  module Rails
3
- VERSION = "1.0.0.RC1"
3
+ VERSION = "1.0.0.RC2"
4
4
  end
5
5
  end
@@ -7,10 +7,12 @@ module Joosy
7
7
 
8
8
  def create_application
9
9
  dependencies = <<-COFFEE
10
+ #= require hamlcoffee
10
11
  #= require jquery
11
- #= require jquery.form
12
+ #= require joosy
13
+ #= require joosy/resources
14
+ #= require joosy/railties
12
15
  #= require sugar
13
- #= require hamlcoffee
14
16
  COFFEE
15
17
 
16
18
  @options = {
@@ -29,7 +31,7 @@ module Joosy
29
31
  index = ::Rails.root.join('app/assets/javascripts/application.js')
30
32
 
31
33
  if File.exists?(index)
32
- copy_file index, 'app/assets/javascripts/application.old.js'
34
+ copy_file index, 'app/assets/javascripts/application.js-old'
33
35
  remove_file index
34
36
  end
35
37
  end
@@ -2,8 +2,8 @@ require_relative './base'
2
2
 
3
3
  module Joosy
4
4
  module Generators
5
- class LayoutGenerator < Entity
5
+ class PageGenerator < Entity
6
6
  self.kind = 'page'
7
7
  end
8
8
  end
9
- end
9
+ end
@@ -2,8 +2,8 @@ require_relative './base'
2
2
 
3
3
  module Joosy
4
4
  module Generators
5
- class LayoutGenerator < Entity
5
+ class WidgetGenerator < Entity
6
6
  self.kind = 'widget'
7
7
  end
8
8
  end
9
- end
9
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: joosy-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.RC1
4
+ version: 1.0.0.RC2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boris Staal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-20 00:00:00.000000000 Z
11
+ date: 2013-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: joosy
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.2.0.alpha.63
19
+ version: 1.2.0.beta.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '>='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.2.0.alpha.63
26
+ version: 1.2.0.beta.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sprockets
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -162,3 +162,4 @@ signing_key:
162
162
  specification_version: 4
163
163
  summary: Joosy Rails ties
164
164
  test_files: []
165
+ has_rdoc: