joosy-rails 1.0.0.RC1 → 1.0.0.RC2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +43 -23
- data/app/assets/javascripts/joosy/railties.coffee.erb +6 -0
- data/app/assets/javascripts/joosy/resource_loader.coffee +2 -0
- data/joosy-rails.gemspec +1 -1
- data/lib/joosy/rails/engine.rb +10 -0
- data/lib/joosy/rails/version.rb +1 -1
- data/lib/rails/generators/joosy/application_generator.rb +5 -3
- data/lib/rails/generators/joosy/page_generator.rb +2 -2
- data/lib/rails/generators/joosy/widget_generator.rb +2 -2
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73e469ca51f70d87a3d65bdde8a773366b367fa1
|
4
|
+
data.tar.gz: 8ad792f9790dcd09e6bff2b4b92b3952e3945601
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fb360fd6ec8830ed731b83217a491bacaa05b6db561bada55445f770f638338375a3a007371d0e391563df911022318944484294e4646148eb0e2c27b6c6f76
|
7
|
+
data.tar.gz: 32e7b9f944ecf177b0438f0a4eb6ed8e1d162fe8c6ff272e6c92fe28fc4225a24c248338ee78c2d71b8c250aeb614e4357d103cdbae2e172e24d59d6d92c717f
|
data/README.md
CHANGED
@@ -1,18 +1,21 @@
|
|
1
1
|
# Joosy::Rails
|
2
2
|
|
3
|
-
|
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
|
-
|
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
|
-
|
32
|
-
|
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 — 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
|
-
|
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
|
-
|
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
|
-
|
43
|
-
|
44
|
-
|
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.
|
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
|
-
|
80
|
+
Copyright 2013 [Boris Staal](http://staal.io)
|
57
81
|
|
58
|
-
|
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.
|
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.
|
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'
|
data/lib/joosy/rails/engine.rb
CHANGED
@@ -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
|
data/lib/joosy/rails/version.rb
CHANGED
@@ -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
|
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
|
34
|
+
copy_file index, 'app/assets/javascripts/application.js-old'
|
33
35
|
remove_file index
|
34
36
|
end
|
35
37
|
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.
|
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-
|
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.
|
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.
|
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:
|