benignware-jquery-rails 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +30 -0
- data/lib/benignware-jquery-rails/version.rb +1 -1
- metadata +3 -3
data/Rakefile
CHANGED
@@ -1 +1,31 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
+
|
3
|
+
task :submodule do
|
4
|
+
sh 'git submodule update --init' unless File.exist?('checkview/README.md')
|
5
|
+
end
|
6
|
+
|
7
|
+
desc "Remove the vendor directory"
|
8
|
+
task :clean do
|
9
|
+
rm_rf 'vendor'
|
10
|
+
end
|
11
|
+
|
12
|
+
desc "Generate the JavaScript assets"
|
13
|
+
task :javascripts => :submodule do
|
14
|
+
target_dir = "vendor/assets/javascripts/benignware"
|
15
|
+
mkdir_p target_dir
|
16
|
+
Rake.rake_output_message 'Generating javascripts'
|
17
|
+
Dir.glob("checkview/src/js/*.js").each do |path|
|
18
|
+
basename = File.basename(path)
|
19
|
+
dep_modules = get_js_dependencies(basename).map(&method(:remove_js_extension))
|
20
|
+
File.open("#{target_dir}/#{basename}", "w") do |out|
|
21
|
+
dep_modules.each do |mod|
|
22
|
+
out.write("//= require #{mod}\n")
|
23
|
+
end
|
24
|
+
out.write("\n") unless dep_modules.empty?
|
25
|
+
source_code = File.read(path)
|
26
|
+
source_code.gsub!('@VERSION', version)
|
27
|
+
protect_copyright_notice(source_code)
|
28
|
+
out.write(source_code)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: benignware-jquery-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2013-10-18 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
16
|
-
requirement: &
|
16
|
+
requirement: &70242681900500 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
version: '5.0'
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
|
-
version_requirements: *
|
27
|
+
version_requirements: *70242681900500
|
28
28
|
description: gem description
|
29
29
|
email:
|
30
30
|
- mail@benignware.com
|