right-rails 0.6.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +8 -0
- data/README.rdoc +71 -0
- data/Rakefile +144 -14
- data/generators/right_rails/right_rails_generator.rb +18 -21
- data/init.rb +11 -32
- data/lib/generators/right_rails/right_rails_generator.rb +27 -0
- data/lib/generators/right_rails/templates/iframed.html.erb +10 -0
- data/lib/right-rails.rb +1 -1
- data/lib/right_rails/config.rb +278 -0
- data/lib/right_rails/controller_extensions.rb +10 -5
- data/lib/right_rails/helpers/basic.rb +10 -66
- data/lib/right_rails/helpers/forms.rb +141 -139
- data/lib/right_rails/helpers/misc.rb +45 -67
- data/lib/right_rails/helpers/rails.rb +40 -105
- data/lib/right_rails/helpers.rb +364 -1
- data/lib/right_rails/java_script_generator.rb +34 -24
- data/lib/right_rails.rb +6 -1
- data/{images → public/images}/colorpicker.png +0 -0
- data/{images → public/images}/resizable.png +0 -0
- data/public/javascripts/right/autocompleter-src.js +612 -0
- data/public/javascripts/right/autocompleter.js +18 -0
- data/public/javascripts/right/calendar-src.js +1448 -0
- data/public/javascripts/right/calendar.js +36 -0
- data/public/javascripts/right/colorpicker-src.js +967 -0
- data/public/javascripts/right/colorpicker.js +26 -0
- data/{javascripts/right-dnd-src.js → public/javascripts/right/dnd-src.js} +86 -52
- data/public/javascripts/right/dnd.js +20 -0
- data/{javascripts/right-effects-src.js → public/javascripts/right/effects-src.js} +90 -45
- data/public/javascripts/right/effects.js +17 -0
- data/{javascripts/right-ui-i18n-de.js → public/javascripts/right/i18n/de.js} +7 -7
- data/{javascripts/right-ui-i18n-en-us.js → public/javascripts/right/i18n/en-us.js} +1 -1
- data/{javascripts/right-ui-i18n-es.js → public/javascripts/right/i18n/es.js} +7 -7
- data/{javascripts/right-ui-i18n-fr.js → public/javascripts/right/i18n/fr.js} +7 -7
- data/{javascripts/right-ui-i18n-hu.js → public/javascripts/right/i18n/hu.js} +7 -7
- data/{javascripts/right-ui-i18n-jp.js → public/javascripts/right/i18n/jp.js} +7 -7
- data/{javascripts/right-ui-i18n-nl.js → public/javascripts/right/i18n/nl.js} +7 -7
- data/{javascripts/right-ui-i18n-pt-br.js → public/javascripts/right/i18n/pt-br.js} +7 -7
- data/{javascripts/right-ui-i18n-ru.js → public/javascripts/right/i18n/ru.js} +7 -7
- data/{javascripts/right-ui-i18n-ua.js → public/javascripts/right/i18n/ua.js} +17 -12
- data/public/javascripts/right/in-edit-src.js +352 -0
- data/public/javascripts/right/in-edit.js +13 -0
- data/public/javascripts/right/json-src.js +160 -0
- data/public/javascripts/right/json.js +10 -0
- data/public/javascripts/right/lightbox-src.js +881 -0
- data/public/javascripts/right/lightbox.js +24 -0
- data/{javascripts/right-rails-src.js → public/javascripts/right/rails-src.js} +195 -171
- data/public/javascripts/right/rails.js +14 -0
- data/public/javascripts/right/rater-src.js +366 -0
- data/public/javascripts/right/rater.js +13 -0
- data/public/javascripts/right/resizable-src.js +420 -0
- data/public/javascripts/right/resizable.js +15 -0
- data/public/javascripts/right/selectable-src.js +687 -0
- data/public/javascripts/right/selectable.js +22 -0
- data/public/javascripts/right/slider-src.js +377 -0
- data/public/javascripts/right/slider.js +14 -0
- data/public/javascripts/right/sortable-src.js +392 -0
- data/public/javascripts/right/sortable.js +16 -0
- data/public/javascripts/right/tabs-src.js +1123 -0
- data/public/javascripts/right/tabs.js +29 -0
- data/public/javascripts/right/tooltip-src.js +307 -0
- data/public/javascripts/right/tooltip.js +12 -0
- data/public/javascripts/right/uploader-src.js +283 -0
- data/public/javascripts/right/uploader.js +13 -0
- data/{javascripts → public/javascripts}/right-olds-src.js +134 -186
- data/public/javascripts/right-olds.js +18 -0
- data/public/javascripts/right-safe-src.js +161 -0
- data/public/javascripts/right-safe.js +8 -0
- data/{javascripts → public/javascripts}/right-src.js +2558 -1750
- data/public/javascripts/right.js +92 -0
- data/spec/lib/right_rails/config_spec.rb +133 -0
- data/spec/lib/right_rails/controller_extensions_spec.rb +1 -1
- data/spec/lib/right_rails/helpers/basic_spec.rb +77 -66
- data/spec/lib/right_rails/helpers/forms_spec.rb +231 -33
- data/spec/lib/right_rails/helpers/misc_spec.rb +94 -26
- data/spec/lib/right_rails/helpers/rails_spec.rb +42 -7
- data/spec/lib/right_rails/helpers_spec.rb +125 -0
- data/spec/lib/right_rails/java_script_generator_spec.rb +30 -0
- data/spec/rcov.opts +3 -0
- data/spec/spec_helper.rb +12 -7
- metadata +70 -61
- data/README.textile +0 -69
- data/javascripts/right-autocompleter-src.js +0 -318
- data/javascripts/right-autocompleter.js +0 -9
- data/javascripts/right-behavior-src.js +0 -261
- data/javascripts/right-behavior.js +0 -8
- data/javascripts/right-calendar-src.js +0 -946
- data/javascripts/right-calendar.js +0 -9
- data/javascripts/right-colorpicker-src.js +0 -635
- data/javascripts/right-colorpicker.js +0 -9
- data/javascripts/right-dnd.js +0 -9
- data/javascripts/right-effects.js +0 -6
- data/javascripts/right-events-src.js +0 -321
- data/javascripts/right-events.js +0 -6
- data/javascripts/right-in-edit-src.js +0 -194
- data/javascripts/right-in-edit.js +0 -6
- data/javascripts/right-json-src.js +0 -141
- data/javascripts/right-json.js +0 -6
- data/javascripts/right-lightbox-src.js +0 -651
- data/javascripts/right-lightbox.js +0 -9
- data/javascripts/right-olds.js +0 -9
- data/javascripts/right-rails.js +0 -9
- data/javascripts/right-rater-src.js +0 -253
- data/javascripts/right-rater.js +0 -9
- data/javascripts/right-resizable-src.js +0 -336
- data/javascripts/right-resizable.js +0 -9
- data/javascripts/right-selectable-src.js +0 -565
- data/javascripts/right-selectable.js +0 -7
- data/javascripts/right-slider-src.js +0 -288
- data/javascripts/right-slider.js +0 -7
- data/javascripts/right-sortable-src.js +0 -225
- data/javascripts/right-sortable.js +0 -9
- data/javascripts/right-tabs-src.js +0 -937
- data/javascripts/right-tabs.js +0 -6
- data/javascripts/right-tooltips-src.js +0 -195
- data/javascripts/right-tooltips.js +0 -9
- data/javascripts/right-uploader-src.js +0 -167
- data/javascripts/right-uploader.js +0 -9
- data/javascripts/right.js +0 -7
@@ -0,0 +1,125 @@
|
|
1
|
+
require File.dirname(__FILE__) + "/../../spec_helper.rb"
|
2
|
+
|
3
|
+
module I18n
|
4
|
+
end
|
5
|
+
|
6
|
+
describe RightRails::Helpers do
|
7
|
+
before :each do
|
8
|
+
@config = RightRails::Config
|
9
|
+
@config.reset!
|
10
|
+
|
11
|
+
@helper = RightRails::Helpers
|
12
|
+
@context = {}
|
13
|
+
end
|
14
|
+
|
15
|
+
def require_js_module(*list)
|
16
|
+
@helper.require_js_module @context, *list
|
17
|
+
end
|
18
|
+
|
19
|
+
def required_js_files
|
20
|
+
@helper.required_js_files @context
|
21
|
+
end
|
22
|
+
|
23
|
+
def modules_registry
|
24
|
+
@helper.send(:modules_registry_for, @context)
|
25
|
+
end
|
26
|
+
|
27
|
+
describe ".prefix" do
|
28
|
+
it "should be empty in normal mode" do
|
29
|
+
@config.safe_mode = false
|
30
|
+
@helper.prefix.should == ''
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should return 'RightJS.' in safe-mode" do
|
34
|
+
@config.safe_mode = true
|
35
|
+
@helper.prefix.should == 'RightJS.'
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
describe ".html_safe" do
|
40
|
+
it "should always return normal strings" do
|
41
|
+
@helper.html_safe('<b>boo!</b>').should == '<b>boo!</b>'
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe ".require_js_module" do
|
46
|
+
it "should require files one by one" do
|
47
|
+
require_js_module 'one'
|
48
|
+
require_js_module :two
|
49
|
+
|
50
|
+
modules_registry.should == ['one', 'two']
|
51
|
+
end
|
52
|
+
|
53
|
+
it "should skip duplicates" do
|
54
|
+
require_js_module 'one'
|
55
|
+
require_js_module :one
|
56
|
+
|
57
|
+
modules_registry.should == ['one']
|
58
|
+
end
|
59
|
+
|
60
|
+
it "should accept several modules" do
|
61
|
+
require_js_module 'one', 'two', 'two'
|
62
|
+
modules_registry.should == ['one', 'two']
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
describe ".required_js_files" do
|
67
|
+
before :each do
|
68
|
+
@config.swap_builds_and_sources = false
|
69
|
+
end
|
70
|
+
|
71
|
+
it "should include 'right' module first even when nothing set" do
|
72
|
+
required_js_files.first.should == 'right'
|
73
|
+
end
|
74
|
+
|
75
|
+
it "should include the 'right/rails' module when config says so" do
|
76
|
+
@config.include_rails_module = true
|
77
|
+
required_js_files[1].should == 'right/rails'
|
78
|
+
end
|
79
|
+
|
80
|
+
it "should not include the 'right/rails' module if the config doesn't want it" do
|
81
|
+
@config.include_rails_module = false
|
82
|
+
required_js_files.should_not include('right/rails')
|
83
|
+
end
|
84
|
+
|
85
|
+
it "should add the registered modules" do
|
86
|
+
require_js_module 'one', 'two'
|
87
|
+
required_js_files.should == ['right', 'right/rails', 'right/one', 'right/two']
|
88
|
+
end
|
89
|
+
|
90
|
+
it "should swap to the source-files if config asks that and we are in the development-module" do
|
91
|
+
@config.env = 'development'
|
92
|
+
@config.swap_builds_and_sources = true
|
93
|
+
required_js_files.should == ['right-src', 'right/rails-src']
|
94
|
+
end
|
95
|
+
|
96
|
+
it "should not swap to the source files in non-development environments" do
|
97
|
+
@config.env = 'production'
|
98
|
+
@config.swap_builds_and_sources = true
|
99
|
+
required_js_files.should == ['right', 'right/rails']
|
100
|
+
end
|
101
|
+
|
102
|
+
it "should not include nothing but 'right' if config disabled auto-including" do
|
103
|
+
@config.include_scripts_automatically = false
|
104
|
+
require_js_module 'one', 'two'
|
105
|
+
required_js_files.should == ['right']
|
106
|
+
end
|
107
|
+
|
108
|
+
it "should try to include locales when available" do
|
109
|
+
I18n.should_receive(:locale).and_return('boo')
|
110
|
+
@config.should_receive(:public_path).and_return('/public')
|
111
|
+
@config.should_receive(:locales_path).and_return('/public/javascripts/right/i18n')
|
112
|
+
File.should_receive(:exists?).with('/public/javascripts/right/i18n/boo.js').and_return(true)
|
113
|
+
|
114
|
+
required_js_files.should == ['right', 'right/rails', 'right/i18n/boo']
|
115
|
+
end
|
116
|
+
|
117
|
+
it "should not include locales if there are not files for them" do
|
118
|
+
I18n.should_receive(:locale).and_return('boo')
|
119
|
+
@config.should_receive(:locales_path).and_return('/public/javascripts/right/i18n')
|
120
|
+
File.should_receive(:exists?).with('/public/javascripts/right/i18n/boo.js').and_return(false)
|
121
|
+
|
122
|
+
required_js_files.should == ['right', 'right/rails']
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
@@ -32,6 +32,8 @@ end
|
|
32
32
|
|
33
33
|
describe RightRails::JavaScriptGenerator do
|
34
34
|
before :each do
|
35
|
+
RightRails::Config.reset!
|
36
|
+
|
35
37
|
@template = mock()
|
36
38
|
def @template.dom_id(record) "record_#{record.id}" end
|
37
39
|
def @template.escape_javascript(str) str end
|
@@ -97,6 +99,22 @@ describe RightRails::JavaScriptGenerator do
|
|
97
99
|
|
98
100
|
@page.to_s.should == '$("el1").update("text1").show();$("el2").update("text2").highlight();'
|
99
101
|
end
|
102
|
+
|
103
|
+
describe "in safe-mode" do
|
104
|
+
before :each do
|
105
|
+
RightRails::Config.safe_mode = true
|
106
|
+
end
|
107
|
+
|
108
|
+
it "should prefix $ with RightJS." do
|
109
|
+
@page['element-id']
|
110
|
+
@page.to_s.should == 'RightJS.$("element-id");'
|
111
|
+
end
|
112
|
+
|
113
|
+
it "should prefix $$ with RightJS." do
|
114
|
+
@page.find('div#css.rule')
|
115
|
+
@page.to_s.should == 'RightJS.$$("div#css.rule");'
|
116
|
+
end
|
117
|
+
end
|
100
118
|
end
|
101
119
|
|
102
120
|
describe "second level calls" do
|
@@ -226,6 +244,18 @@ describe RightRails::JavaScriptGenerator do
|
|
226
244
|
|
227
245
|
@page.to_s.should == '$$("foo").each(function(a,b){$("element").innerHTML+=a.innerHTML+b+"boo";});alert($("element").innerHTML);'
|
228
246
|
end
|
247
|
+
|
248
|
+
it "should throw an error for unknown data-types" do
|
249
|
+
class Booooooooooo
|
250
|
+
def respond_to?(name)
|
251
|
+
name.to_sym == :to_json ? false : super(name)
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
lambda {
|
256
|
+
@page['element'].insert(Booooooooooo.new)
|
257
|
+
}.should raise_error
|
258
|
+
end
|
229
259
|
end
|
230
260
|
|
231
261
|
describe "RR object method calls generator" do
|
data/spec/rcov.opts
ADDED
data/spec/spec_helper.rb
CHANGED
@@ -6,18 +6,23 @@ require 'action_view'
|
|
6
6
|
require 'action_controller'
|
7
7
|
|
8
8
|
require 'right_rails'
|
9
|
-
require 'right_rails/java_script_generator'
|
10
|
-
require 'right_rails/controller_extensions'
|
11
|
-
require 'right_rails/helpers'
|
12
|
-
require 'right_rails/helpers/basic'
|
13
|
-
require 'right_rails/helpers/rails'
|
14
|
-
require 'right_rails/helpers/forms'
|
15
|
-
require 'right_rails/helpers/misc'
|
16
9
|
|
17
10
|
module Rails
|
18
11
|
class << self
|
12
|
+
def env
|
13
|
+
'production'
|
14
|
+
end
|
15
|
+
|
19
16
|
def root
|
20
17
|
'rails-root'
|
21
18
|
end
|
19
|
+
|
20
|
+
def public_path
|
21
|
+
"#{root}/public"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
module VERSION
|
26
|
+
MAJOR = 2
|
22
27
|
end
|
23
28
|
end
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: right-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
7
|
+
- 1
|
6
8
|
- 0
|
7
|
-
- 6
|
8
9
|
- 0
|
9
|
-
version: 0.
|
10
|
+
version: 1.0.0
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Nikolay Nemshilov
|
@@ -14,11 +15,11 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-
|
18
|
+
date: 2010-09-06 00:00:00 +04:00
|
18
19
|
default_executable:
|
19
20
|
dependencies: []
|
20
21
|
|
21
|
-
description: RightRails
|
22
|
+
description: RightRails is a RubyOnRails plugin for the RightJS JavaScript framework. It has transparent Prototype helpers replacement, a new RJS generator, the most common ajax operations interface and RightJS own features support like remote files uploading handler, UI, plugins, etc.
|
22
23
|
email: nemshilov@gmail.com
|
23
24
|
executables: []
|
24
25
|
|
@@ -40,61 +41,62 @@ files:
|
|
40
41
|
- generators/right_scaffold/templates/view_index.html.erb
|
41
42
|
- generators/right_scaffold/templates/view_new.html.erb
|
42
43
|
- generators/right_scaffold/templates/view_show.html.erb
|
43
|
-
-
|
44
|
-
-
|
45
|
-
- javascripts/right-
|
46
|
-
- javascripts/right
|
47
|
-
- javascripts/right
|
48
|
-
- javascripts/right
|
49
|
-
- javascripts/right
|
50
|
-
- javascripts/right
|
51
|
-
- javascripts/right
|
52
|
-
- javascripts/right
|
53
|
-
- javascripts/right
|
54
|
-
- javascripts/right
|
55
|
-
- javascripts/right
|
56
|
-
- javascripts/right-
|
57
|
-
- javascripts/right
|
58
|
-
- javascripts/right
|
59
|
-
- javascripts/right
|
60
|
-
- javascripts/right
|
61
|
-
- javascripts/right
|
62
|
-
- javascripts/right-
|
63
|
-
- javascripts/right
|
64
|
-
- javascripts/right
|
65
|
-
- javascripts/right-
|
66
|
-
- javascripts/right-
|
67
|
-
- javascripts/right-
|
68
|
-
- javascripts/right
|
69
|
-
- javascripts/right-
|
70
|
-
- javascripts/right
|
71
|
-
- javascripts/right-
|
72
|
-
- javascripts/right
|
73
|
-
- javascripts/right-
|
74
|
-
- javascripts/right
|
75
|
-
- javascripts/right-
|
76
|
-
- javascripts/right
|
77
|
-
- javascripts/right-src.js
|
78
|
-
- javascripts/right
|
79
|
-
- javascripts/right-
|
80
|
-
- javascripts/right
|
81
|
-
- javascripts/right-
|
82
|
-
- javascripts/right
|
83
|
-
- javascripts/right-
|
84
|
-
- javascripts/right
|
85
|
-
- javascripts/right-
|
86
|
-
- javascripts/right
|
87
|
-
- javascripts/right-
|
88
|
-
- javascripts/right
|
89
|
-
- javascripts/right-
|
90
|
-
- javascripts/right-
|
91
|
-
- javascripts/right-
|
92
|
-
- javascripts/right-
|
93
|
-
- javascripts/right-
|
94
|
-
- javascripts/right.js
|
95
|
-
-
|
96
|
-
-
|
44
|
+
- public/images/colorpicker.png
|
45
|
+
- public/images/resizable.png
|
46
|
+
- public/javascripts/right/autocompleter-src.js
|
47
|
+
- public/javascripts/right/autocompleter.js
|
48
|
+
- public/javascripts/right/calendar-src.js
|
49
|
+
- public/javascripts/right/calendar.js
|
50
|
+
- public/javascripts/right/colorpicker-src.js
|
51
|
+
- public/javascripts/right/colorpicker.js
|
52
|
+
- public/javascripts/right/dnd-src.js
|
53
|
+
- public/javascripts/right/dnd.js
|
54
|
+
- public/javascripts/right/effects-src.js
|
55
|
+
- public/javascripts/right/effects.js
|
56
|
+
- public/javascripts/right/i18n/de.js
|
57
|
+
- public/javascripts/right/i18n/en-us.js
|
58
|
+
- public/javascripts/right/i18n/es.js
|
59
|
+
- public/javascripts/right/i18n/fr.js
|
60
|
+
- public/javascripts/right/i18n/hu.js
|
61
|
+
- public/javascripts/right/i18n/jp.js
|
62
|
+
- public/javascripts/right/i18n/nl.js
|
63
|
+
- public/javascripts/right/i18n/pt-br.js
|
64
|
+
- public/javascripts/right/i18n/ru.js
|
65
|
+
- public/javascripts/right/i18n/ua.js
|
66
|
+
- public/javascripts/right/in-edit-src.js
|
67
|
+
- public/javascripts/right/in-edit.js
|
68
|
+
- public/javascripts/right/json-src.js
|
69
|
+
- public/javascripts/right/json.js
|
70
|
+
- public/javascripts/right/lightbox-src.js
|
71
|
+
- public/javascripts/right/lightbox.js
|
72
|
+
- public/javascripts/right/rails-src.js
|
73
|
+
- public/javascripts/right/rails.js
|
74
|
+
- public/javascripts/right/rater-src.js
|
75
|
+
- public/javascripts/right/rater.js
|
76
|
+
- public/javascripts/right/resizable-src.js
|
77
|
+
- public/javascripts/right/resizable.js
|
78
|
+
- public/javascripts/right/selectable-src.js
|
79
|
+
- public/javascripts/right/selectable.js
|
80
|
+
- public/javascripts/right/slider-src.js
|
81
|
+
- public/javascripts/right/slider.js
|
82
|
+
- public/javascripts/right/sortable-src.js
|
83
|
+
- public/javascripts/right/sortable.js
|
84
|
+
- public/javascripts/right/tabs-src.js
|
85
|
+
- public/javascripts/right/tabs.js
|
86
|
+
- public/javascripts/right/tooltip-src.js
|
87
|
+
- public/javascripts/right/tooltip.js
|
88
|
+
- public/javascripts/right/uploader-src.js
|
89
|
+
- public/javascripts/right/uploader.js
|
90
|
+
- public/javascripts/right-olds-src.js
|
91
|
+
- public/javascripts/right-olds.js
|
92
|
+
- public/javascripts/right-safe-src.js
|
93
|
+
- public/javascripts/right-safe.js
|
94
|
+
- public/javascripts/right-src.js
|
95
|
+
- public/javascripts/right.js
|
96
|
+
- lib/generators/right_rails/right_rails_generator.rb
|
97
|
+
- lib/generators/right_rails/templates/iframed.html.erb
|
97
98
|
- lib/right-rails.rb
|
99
|
+
- lib/right_rails/config.rb
|
98
100
|
- lib/right_rails/controller_extensions.rb
|
99
101
|
- lib/right_rails/helpers/basic.rb
|
100
102
|
- lib/right_rails/helpers/forms.rb
|
@@ -103,15 +105,18 @@ files:
|
|
103
105
|
- lib/right_rails/helpers.rb
|
104
106
|
- lib/right_rails/java_script_generator.rb
|
105
107
|
- lib/right_rails.rb
|
108
|
+
- spec/lib/right_rails/config_spec.rb
|
106
109
|
- spec/lib/right_rails/controller_extensions_spec.rb
|
107
110
|
- spec/lib/right_rails/helpers/basic_spec.rb
|
108
111
|
- spec/lib/right_rails/helpers/forms_spec.rb
|
109
112
|
- spec/lib/right_rails/helpers/misc_spec.rb
|
110
113
|
- spec/lib/right_rails/helpers/rails_spec.rb
|
114
|
+
- spec/lib/right_rails/helpers_spec.rb
|
111
115
|
- spec/lib/right_rails/java_script_generator_spec.rb
|
116
|
+
- spec/rcov.opts
|
112
117
|
- spec/spec.opts
|
113
118
|
- spec/spec_helper.rb
|
114
|
-
- README.
|
119
|
+
- README.rdoc
|
115
120
|
- CHANGELOG
|
116
121
|
- MIT-LICENSE
|
117
122
|
- Rakefile
|
@@ -121,30 +126,34 @@ homepage: http://github.com/MadRabbit/right-rails
|
|
121
126
|
licenses: []
|
122
127
|
|
123
128
|
post_install_message: "\n\
|
124
|
-
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< RIGHT RAILS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n\n Please run the following command to copy RightJS scripts and modules in place\n \n script/generate right_rails\n\n\
|
129
|
+
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< RIGHT RAILS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n\n Please run the following command to copy RightJS scripts and modules in place\n \n script/generate right_rails\n \n \e[5m\e[31mNOTE\e[0m\e[0m: will copy over the RightJS 2.0 files!!!\n\n\
|
125
130
|
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< RIGHT RAILS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n "
|
126
131
|
rdoc_options: []
|
127
132
|
|
128
133
|
require_paths:
|
129
134
|
- lib
|
130
135
|
required_ruby_version: !ruby/object:Gem::Requirement
|
136
|
+
none: false
|
131
137
|
requirements:
|
132
138
|
- - ">="
|
133
139
|
- !ruby/object:Gem::Version
|
140
|
+
hash: 3
|
134
141
|
segments:
|
135
142
|
- 0
|
136
143
|
version: "0"
|
137
144
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
138
146
|
requirements:
|
139
147
|
- - ">="
|
140
148
|
- !ruby/object:Gem::Version
|
149
|
+
hash: 3
|
141
150
|
segments:
|
142
151
|
- 0
|
143
152
|
version: "0"
|
144
153
|
requirements: []
|
145
154
|
|
146
155
|
rubyforge_project:
|
147
|
-
rubygems_version: 1.3.
|
156
|
+
rubygems_version: 1.3.7
|
148
157
|
signing_key:
|
149
158
|
specification_version: 3
|
150
159
|
summary: RightJS plugin for Rails
|
data/README.textile
DELETED
@@ -1,69 +0,0 @@
|
|
1
|
-
h1. Welcome To RightRails
|
2
|
-
|
3
|
-
RightRails is a RubyOnRails plugin for RightJS javascript framework.
|
4
|
-
|
5
|
-
It works as a drop in replacement for all the Prototype/Scriptaculous
|
6
|
-
methods, plus it brings some more sweets and routine ajax operations
|
7
|
-
helpers.
|
8
|
-
|
9
|
-
|
10
|
-
h2. Features
|
11
|
-
|
12
|
-
|
13
|
-
* Lightning fast RightJS library
|
14
|
-
* Transparent Prototype/Scriptaculous helpers replacement
|
15
|
-
* More powerful and flexible new JavaScript generator for RJS
|
16
|
-
* Conventional JavaScript interface for the most common AJAX operations
|
17
|
-
* Better controller level access to the rjs generator
|
18
|
-
* New ajax-friendly scaffold generator
|
19
|
-
* Remote files uploading organization
|
20
|
-
* Automatic RightJS modules inclusion handling (including i18n modules)
|
21
|
-
* Additional FormBuilder methods for calendar and autocomplete fields
|
22
|
-
* Underscored and ruby-like aliases for RightJS core methods
|
23
|
-
|
24
|
-
|
25
|
-
h2. Documentation
|
26
|
-
|
27
|
-
See the wiki-pages for the documentation
|
28
|
-
|
29
|
-
<a href="http://wiki.github.com/MadRabbit/right-rails">http://wiki.github.com/MadRabbit/right-rails</a>
|
30
|
-
|
31
|
-
See also the demo application for examples
|
32
|
-
|
33
|
-
<a herf="http://github.com/MadRabbit/right-rails-demo">http://github.com/MadRabbit/right-rails-demo</a>
|
34
|
-
|
35
|
-
|
36
|
-
h3. Usage
|
37
|
-
|
38
|
-
Install the plugin to your rails application
|
39
|
-
|
40
|
-
<pre>script/plugin install git://github.com/MadRabbit/right-rails.git</pre>
|
41
|
-
|
42
|
-
After that run the @right_rails@ generator, which will put all the JavaScripts in place
|
43
|
-
|
44
|
-
<pre>script/generate right_rails</pre>
|
45
|
-
|
46
|
-
And add the following helper to your application layout, this will include all the necessary scripts on your page
|
47
|
-
|
48
|
-
<pre><%= rightjs_scripts %></pre>
|
49
|
-
|
50
|
-
You also will have an ajax-friendly scaffold generator
|
51
|
-
|
52
|
-
<pre>script/generate right_scaffold Zing</pre>
|
53
|
-
|
54
|
-
h4. Ruby Gem
|
55
|
-
|
56
|
-
Ruby gem version is now also available.
|
57
|
-
|
58
|
-
<pre><code>gem install right-rails</code></pre>
|
59
|
-
|
60
|
-
Add the gem into your @config/environment.rb@ file
|
61
|
-
|
62
|
-
<pre><code>Rails::Initializer.run do |config|
|
63
|
-
config.gem 'right-rails'
|
64
|
-
end</code></pre>
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
Copyright (c) 2009-2010 Nikolay V. Nemshilov, released under the MIT license
|