netzke-core 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -1
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/lib/netzke/core/javascript.rb +1 -1
- data/lib/netzke/core/ruby_ext/string.rb +6 -6
- data/lib/netzke/core/version.rb +1 -1
- data/netzke-core.gemspec +2 -2
- data/test/core_test_app/Gemfile +3 -0
- data/test/core_test_app/Gemfile.lock +8 -2
- data/test/core_test_app/config/application.rb +3 -0
- data/test/core_test_app/spec/core_ext_spec.rb +8 -0
- metadata +2 -2
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
# v0.8.
|
1
|
+
# v0.8.1 - 2012-12-15
|
2
|
+
* bug fix
|
3
|
+
* in production, JS comment stripping could cause modification of form_authenticity_token (issue #43) - by @scho
|
4
|
+
|
5
|
+
# v0.8.0 - 2012-12-09
|
2
6
|
## Misc
|
3
7
|
* many backward-incompatible API changes, see below
|
4
8
|
* major code clean-up and refactor
|
data/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2012
|
1
|
+
Copyright (c) 2012 nomadcoder
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
4
|
|
data/README.md
CHANGED
@@ -365,6 +365,6 @@ For RSpec tests (from `test/core_test_app`):
|
|
365
365
|
* [Twitter](http://twitter.com/netzke) - latest news about the framework
|
366
366
|
|
367
367
|
---
|
368
|
-
Copyright (c) 2008-2012 [
|
368
|
+
Copyright (c) 2008-2012 [nomadcoder](https://twitter.com/nomadcoder), released under the MIT license (see LICENSE).
|
369
369
|
|
370
370
|
**Note** that Ext JS is licensed [differently](http://www.sencha.com/products/extjs/license/), and you may need to purchase a commercial license in order to use it in your projects!
|
@@ -92,7 +92,7 @@ module Netzke::Core
|
|
92
92
|
# It includes JS-classes for the parents, eagerly loaded child components, and itself.
|
93
93
|
def js_missing_code(cached = [])
|
94
94
|
code = dependency_classes.inject("") do |r,k|
|
95
|
-
cached.include?(k.js_config.xtype) ? r : r + k.js_config.code_with_dependencies
|
95
|
+
cached.include?(k.js_config.xtype) ? r : r + k.js_config.code_with_dependencies.strip_js_comments
|
96
96
|
end
|
97
97
|
code.blank? ? nil : code
|
98
98
|
end
|
@@ -11,12 +11,12 @@ class String
|
|
11
11
|
|
12
12
|
# removes JS-comments (both single- and multi-line) from the string
|
13
13
|
def strip_js_comments
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
14
|
+
if defined?(::Rails) && Rails.application.assets.js_compressor
|
15
|
+
compressor = Rails.application.assets.js_compressor
|
16
|
+
compressor.processor.call(nil, self)
|
17
|
+
else
|
18
|
+
self
|
19
|
+
end
|
20
20
|
end
|
21
21
|
|
22
22
|
# "false" => false, "whatever_else" => true
|
data/lib/netzke/core/version.rb
CHANGED
data/netzke-core.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "netzke-core"
|
8
|
-
s.version = "0.8.
|
8
|
+
s.version = "0.8.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["nomadcoder"]
|
12
|
-
s.date = "2012-12-
|
12
|
+
s.date = "2012-12-15"
|
13
13
|
s.description = "Allows building complex RIA by greatly facilitating modular development"
|
14
14
|
s.email = "nmcoder@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
data/test/core_test_app/Gemfile
CHANGED
@@ -52,9 +52,10 @@ GEM
|
|
52
52
|
database_cleaner (0.9.1)
|
53
53
|
diff-lcs (1.1.3)
|
54
54
|
erubis (2.7.0)
|
55
|
-
|
55
|
+
execjs (1.4.0)
|
56
|
+
multi_json (~> 1.0)
|
57
|
+
ffi (1.1.5)
|
56
58
|
gherkin (2.11.5)
|
57
|
-
json (>= 1.4.6)
|
58
59
|
hike (1.2.1)
|
59
60
|
i18n (0.6.1)
|
60
61
|
journey (1.0.4)
|
@@ -124,6 +125,9 @@ GEM
|
|
124
125
|
polyglot
|
125
126
|
polyglot (>= 0.3.1)
|
126
127
|
tzinfo (0.3.35)
|
128
|
+
uglifier (1.3.0)
|
129
|
+
execjs (>= 0.3.0)
|
130
|
+
multi_json (~> 1.0, >= 1.0.2)
|
127
131
|
websocket (1.0.4)
|
128
132
|
xpath (0.1.4)
|
129
133
|
nokogiri (~> 1.3)
|
@@ -136,6 +140,8 @@ DEPENDENCIES
|
|
136
140
|
cucumber
|
137
141
|
cucumber-rails
|
138
142
|
database_cleaner
|
143
|
+
execjs
|
139
144
|
rails (~> 3.2.0)
|
140
145
|
rspec-rails
|
141
146
|
sqlite3
|
147
|
+
uglifier
|
@@ -16,4 +16,12 @@ describe "Core extensions" do
|
|
16
16
|
it "should properly do deep_map" do
|
17
17
|
{a: [1,2,{b:3},{c:[4,5]}], d: 6}.deep_map{|el| el.is_a?(Hash) ? el.merge(e:7) : el + 10}.should == { a: [11,12,{e:7, b:3},{e:7, c:[14,15]}], d: 6}
|
18
18
|
end
|
19
|
+
|
20
|
+
it "should strip js comments" do
|
21
|
+
"var test;//commment".strip_js_comments.should == "var test;"
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should not strip // in strings" do
|
25
|
+
'var someVar = "abc//def";'.strip_js_comments.should == 'var someVar="abc//def";'
|
26
|
+
end
|
19
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: netzke-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|