rails_script 2.0.3 → 2.0.4

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
- SHA1:
3
- metadata.gz: ad9a43ebdd24310f667ceb91cb964775d860437a
4
- data.tar.gz: 6b6dd0a9a25b5d3e5a77276bd3fa3a1a66c8f0af
2
+ SHA256:
3
+ metadata.gz: efa4f94ecfe65a5f9bca21a2f2a0508aaa021298c05b2a1454f987832d0f56e2
4
+ data.tar.gz: 72c2af0cad7d32ce3ac31a8bcb1b7a30a8cc570e335f4f4377a6956278443985
5
5
  SHA512:
6
- metadata.gz: b85a064617aaf75b0604e751b391b59d41f5d1d01425774c5dce8c8c08f71ebdd62d2845841d85efefb5f38abd4afbfa5658aa8b06123fc269915eb6f31c0028
7
- data.tar.gz: 476db3123edb931e6e2c12a3e075a549af875221825f24bd90abbd79514f2bcdc145a6ab49d7cf6398cae3a3d87278801332f012ba11c476f8089e0b6a176f67
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
@@ -1,3 +1,3 @@
1
1
  module RailsScript
2
- VERSION = '2.0.3'
2
+ VERSION = '2.0.4'
3
3
  end
@@ -21,5 +21,5 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency 'bundler', '~> 1.6'
22
22
  spec.add_development_dependency 'rake', '~> 0'
23
23
 
24
- spec.add_dependency 'coffee-rails', '~> 4.0', '>= 4.0.0'
24
+ spec.add_dependency 'coffee-rails', '>= 4.0.0'
25
25
  end
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.3
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: 2016-06-15 00:00:00.000000000 Z
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.4.8
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