rails_script 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +18 -0
- data/lib/generators/rails_script/install/install_generator.rb +1 -20
- data/lib/rails_script/version.rb +1 -1
- data/rails_script.gemspec +1 -1
- metadata +3 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: efa4f94ecfe65a5f9bca21a2f2a0508aaa021298c05b2a1454f987832d0f56e2
|
4
|
+
data.tar.gz: 72c2af0cad7d32ce3ac31a8bcb1b7a30a8cc570e335f4f4377a6956278443985
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4e5cc6714820a9858f3352103e158aaad0ed4e65889b84d764ebfb0a42928cda51d506d35fbaafc163ed40d97d1cd048bb71c2ee083dd2205e36eee149374d5
|
7
|
+
data.tar.gz: dfc86aa4f9db0a78ea8572f7415397d22d6c454800df8402b0fc5b32fa2fe3237a8d7809c9a1fb8ae276542160c1f96bf333eda05c9c4f7ac87d5f4069f16c5e
|
data/README.md
CHANGED
@@ -28,6 +28,24 @@ After the generator finishes, you will be prompted to add helper call to your ap
|
|
28
28
|
|
29
29
|
NOTE: Your JS files needed have been included before `include_rails_script`. In other words, you still need `<%= javascript_include_tag "application" %>` in your application layout.
|
30
30
|
|
31
|
+
After including the view helper in your application layout, you will need to require the RailsScript javascript library inside your application.js or application.coffee file before the `require_tree .` line.
|
32
|
+
|
33
|
+
if using javascript (app/assets/javascripts/application.js):
|
34
|
+
```
|
35
|
+
// * other app specific js require lines
|
36
|
+
|
37
|
+
//= require rails_script
|
38
|
+
//= require_tree .
|
39
|
+
```
|
40
|
+
|
41
|
+
if using coffeescript (app/assets/javascripts/application.coffee):
|
42
|
+
```
|
43
|
+
# * other app specific js require lines
|
44
|
+
|
45
|
+
#= require rails_script
|
46
|
+
#= require_tree .
|
47
|
+
```
|
48
|
+
|
31
49
|
## Usage
|
32
50
|
|
33
51
|
### Page (Action) Specific JavaScript
|
@@ -8,25 +8,6 @@ module RailsScript
|
|
8
8
|
template 'global.coffee', 'app/assets/javascripts/global.coffee'
|
9
9
|
end
|
10
10
|
|
11
|
-
def insert_load_order
|
12
|
-
if File.exist?('app/assets/javascripts/application.js')
|
13
|
-
|
14
|
-
if File.readlines('app/assets/javascripts/application.js').grep('//= require_tree .').any?
|
15
|
-
inject_into_file 'app/assets/javascripts/application.js', "//= require rails_script\n", before: '//= require_tree .'
|
16
|
-
else
|
17
|
-
append_file 'app/assets/javascripts/application.js', "\n//= require rails_script"
|
18
|
-
end
|
19
|
-
|
20
|
-
elsif File.exist?('app/assets/javascripts/application.js.coffee')
|
21
|
-
|
22
|
-
if File.readlines('app/assets/javascripts/application.js.coffee').grep('#= require_tree .').any?
|
23
|
-
inject_into_file 'app/assets/javascripts/application.js.coffee', "#= require rails_script\n", before: '#= require_tree .'
|
24
|
-
else
|
25
|
-
append_file 'app/assets/javascripts/application.js.coffee', "\n#= require rails_script"
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
11
|
def insert_layout_javascript
|
31
12
|
say <<-RUBY
|
32
13
|
In order to complete installation, you must include the following helper BEFORE the closing body tag in the application layout:
|
@@ -38,4 +19,4 @@ In order to complete installation, you must include the following helper BEFORE
|
|
38
19
|
|
39
20
|
end
|
40
21
|
end
|
41
|
-
end
|
22
|
+
end
|
data/lib/rails_script/version.rb
CHANGED
data/rails_script.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_script
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Pheasey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -42,9 +42,6 @@ dependencies:
|
|
42
42
|
name: coffee-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '4.0'
|
48
45
|
- - ">="
|
49
46
|
- !ruby/object:Gem::Version
|
50
47
|
version: 4.0.0
|
@@ -52,9 +49,6 @@ dependencies:
|
|
52
49
|
prerelease: false
|
53
50
|
version_requirements: !ruby/object:Gem::Requirement
|
54
51
|
requirements:
|
55
|
-
- - "~>"
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version: '4.0'
|
58
52
|
- - ">="
|
59
53
|
- !ruby/object:Gem::Version
|
60
54
|
version: 4.0.0
|
@@ -121,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
115
|
version: '0'
|
122
116
|
requirements: []
|
123
117
|
rubyforge_project:
|
124
|
-
rubygems_version: 2.
|
118
|
+
rubygems_version: 2.7.8
|
125
119
|
signing_key:
|
126
120
|
specification_version: 4
|
127
121
|
summary: A Rails-centric, object oriented, featherweight framework for writting CoffeeScript
|