wiselinks 0.7.3 → 1.0.0
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.
- data/Gemfile.lock +16 -16
- data/README.md +36 -37
- data/lib/assets/javascripts/_link.js.coffee +19 -4
- data/lib/assets/javascripts/_page.js.coffee +2 -6
- data/lib/assets/javascripts/_request_manager.js.coffee +11 -12
- data/lib/assets/javascripts/lib/native.history.js +3337 -0
- data/lib/assets/javascripts/wiselinks.js.coffee +4 -1
- data/lib/wiselinks/version.rb +3 -3
- data/wiselinks.gemspec +3 -3
- metadata +80 -45
- checksums.yaml +0 -7
- data/build/wiselinks-0.7.3.js +0 -3541
- data/build/wiselinks-0.7.3.min.js +0 -72
- data/build/wiselinks-0.7.3.min.js.gz +0 -0
- data/lib/assets/javascripts/lib/_history.adapter.jquery.js +0 -76
- data/lib/assets/javascripts/lib/_history.html4.js +0 -621
- data/lib/assets/javascripts/lib/_history.js +0 -1946
- data/lib/assets/javascripts/lib/_json2.js +0 -486
- data/lib/wiselinks/builder.rb +0 -104
data/lib/wiselinks/builder.rb
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
|
|
3
|
-
require 'closure-compiler'
|
|
4
|
-
require 'coffeelint'
|
|
5
|
-
|
|
6
|
-
require 'wiselinks/version'
|
|
7
|
-
|
|
8
|
-
module Wiselinks
|
|
9
|
-
class Builder
|
|
10
|
-
include Rake::DSL if defined? Rake::DSL
|
|
11
|
-
|
|
12
|
-
class << self
|
|
13
|
-
attr_accessor :instance
|
|
14
|
-
|
|
15
|
-
def install
|
|
16
|
-
self.new.install
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def install
|
|
22
|
-
# desc "Build #{self.name}-#{self.version} CoffeeScript sources."
|
|
23
|
-
# task 'build' do
|
|
24
|
-
# Rake::Task["coffee:lint"].invoke
|
|
25
|
-
# Rake::Task["coffee:build"].invoke
|
|
26
|
-
# end
|
|
27
|
-
|
|
28
|
-
namespace :coffee do
|
|
29
|
-
desc "Run CoffeeLint over #{self.name}-#{self.version} sources."
|
|
30
|
-
task 'lint' do
|
|
31
|
-
Coffeelint.lint_dir(self.sources) do |filename, lint_report|
|
|
32
|
-
Coffeelint.display_test_results(filename, lint_report)
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
desc "Build #{self.name}-#{self.version} CoffeeScript sources."
|
|
37
|
-
task 'build' do
|
|
38
|
-
system("rm ./build/*")
|
|
39
|
-
|
|
40
|
-
system("echo '#{self.declaration}' > ./build/#{self.name_with_version}.js")
|
|
41
|
-
system("coffee -o ./build -j temp.js -c #{self.coffee_sources.join(' ')}")
|
|
42
|
-
system("cat ./build/temp.js >> ./build/#{self.name_with_version}.js")
|
|
43
|
-
|
|
44
|
-
self.js_sources.each do |file|
|
|
45
|
-
system("cat #{file} >> ./build/#{self.name_with_version}.js")
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
# Minimize
|
|
49
|
-
#
|
|
50
|
-
system("java -jar ./compiler.jar --charset UTF-8 --js ./build/#{self.name_with_version}.js --js_output_file=./build/#{self.name_with_version}.min.js")
|
|
51
|
-
|
|
52
|
-
# Gzip
|
|
53
|
-
#
|
|
54
|
-
system("gzip -c ./build/#{self.name_with_version}.min.js > ./build/#{self.name_with_version}.min.js.gz")
|
|
55
|
-
|
|
56
|
-
system("rm ./build/temp.js")
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
protected
|
|
63
|
-
|
|
64
|
-
def sources
|
|
65
|
-
File.expand_path('../../assets/javascripts', __FILE__)
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
def js_sources
|
|
69
|
-
Dir.glob(File.join(self.sources, "**/*.js"))
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
def coffee_sources
|
|
73
|
-
Dir.glob(File.join(self.sources, "**/*.js.coffee"))
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
def version
|
|
77
|
-
self.specification.version
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
def declaration
|
|
81
|
-
<<-EOS
|
|
82
|
-
/**
|
|
83
|
-
* #{self.name.capitalize}-#{self.version}
|
|
84
|
-
* @copyright 2012-#{Date.today.year} #{self.specification.authors.join(', ')}
|
|
85
|
-
* @preserve https://github.com/igor-alexandrov/wiselinks
|
|
86
|
-
*/
|
|
87
|
-
EOS
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
def name
|
|
91
|
-
self.specification.name
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
def name_with_version
|
|
95
|
-
[self.name, self.version].join('-')
|
|
96
|
-
end
|
|
97
|
-
|
|
98
|
-
def specification
|
|
99
|
-
@specification ||= Gem.loaded_specs['wiselinks']
|
|
100
|
-
end
|
|
101
|
-
end
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
Wiselinks::Builder.install
|