netzke-core 0.7.6 → 0.7.7
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +3 -0
- data/README.md +2 -2
- data/Rakefile +18 -37
- data/javascripts/ext.js +3 -4
- data/lib/netzke/core/version.rb +1 -1
- data/lib/netzke/core_ext/string.rb +6 -1
- data/lib/netzke/core_ext/symbol.rb +1 -1
- data/netzke-core.gemspec +8 -9
- data/test/core_test_app/spec/core_ext_spec.rb +16 -0
- metadata +10 -12
data/CHANGELOG.rdoc
CHANGED
data/README.md
CHANGED
@@ -19,9 +19,9 @@ All this provides for fast, low-traffic, robust, highly maintainable application
|
|
19
19
|
|
20
20
|
## Requirements
|
21
21
|
|
22
|
-
* Ruby
|
22
|
+
* Ruby ~> 1.9.2
|
23
23
|
* Rails ~> 3.1.0
|
24
|
-
* Ext JS
|
24
|
+
* Ext JS ~> 4.1.0
|
25
25
|
|
26
26
|
## Getting started
|
27
27
|
|
data/Rakefile
CHANGED
@@ -4,34 +4,18 @@ begin
|
|
4
4
|
Jeweler::Tasks.new do |gemspec|
|
5
5
|
gemspec.version = Netzke::Core::Version::STRING
|
6
6
|
gemspec.name = "netzke-core"
|
7
|
-
gemspec.summary = "Build
|
8
|
-
gemspec.description = "Allows building DRY
|
7
|
+
gemspec.summary = "Build complex Sencha Ext JS Ruby on Rails components with minimum effort"
|
8
|
+
gemspec.description = "Allows building DRY Sencha Ext JS Ruby on Rails applications by enabling modular development"
|
9
9
|
gemspec.email = "nmcoder@gmail.com"
|
10
10
|
gemspec.homepage = "http://netzke.org"
|
11
|
-
gemspec.authors = ["
|
12
|
-
gemspec.add_dependency("activesupport", ">=3.
|
13
|
-
gemspec.post_install_message = <<-MESSAGE
|
14
|
-
|
15
|
-
==========================================================
|
16
|
-
|
17
|
-
Thanks for installing netzke-core!
|
18
|
-
|
19
|
-
Home page: http://netzke.org
|
20
|
-
Google Groups: http://groups.google.com/group/netzke
|
21
|
-
News: http://twitter.com/netzke
|
22
|
-
Tutorials: http://blog.writelesscode.com
|
23
|
-
|
24
|
-
==========================================================
|
25
|
-
|
26
|
-
MESSAGE
|
27
|
-
|
11
|
+
gemspec.authors = ["nomadcoder"]
|
12
|
+
gemspec.add_dependency("activesupport", ">=3.1.0")
|
28
13
|
end
|
29
14
|
Jeweler::GemcutterTasks.new
|
30
15
|
rescue LoadError
|
31
16
|
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
32
17
|
end
|
33
18
|
|
34
|
-
|
35
19
|
require 'rake/testtask'
|
36
20
|
Rake::TestTask.new(:test) do |test|
|
37
21
|
test.libs << 'lib' << 'test'
|
@@ -40,24 +24,21 @@ Rake::TestTask.new(:test) do |test|
|
|
40
24
|
end
|
41
25
|
|
42
26
|
begin
|
43
|
-
require '
|
44
|
-
rescue LoadError
|
45
|
-
require 'rake/rdoctask'
|
46
|
-
end
|
47
|
-
Rake::RDocTask.new do |rdoc|
|
48
|
-
require './lib/netzke/core/version'
|
49
|
-
version = Netzke::Core::Version::STRING
|
27
|
+
require 'yard'
|
50
28
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
rdoc.rdoc_files.include('CHANGELOG*')
|
55
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
56
|
-
end
|
29
|
+
YARD::Rake::YardocTask.new do |t|
|
30
|
+
t.options = ['--title', "Netzke Core #{Netzke::Core::Version::STRING}"]
|
31
|
+
end
|
57
32
|
|
58
|
-
namespace :
|
59
|
-
|
60
|
-
|
61
|
-
|
33
|
+
namespace :yard do
|
34
|
+
desc "Publish docs"
|
35
|
+
task publish: :yard do
|
36
|
+
dir = 'www/api.netzke.org/core'
|
37
|
+
puts "Publishing to fl:#{dir}..."
|
38
|
+
`ssh fl "mkdir -p #{dir}"`
|
39
|
+
`scp -r doc/* fl:#{dir}`
|
40
|
+
end
|
62
41
|
end
|
42
|
+
rescue
|
43
|
+
puts "To enable yard do 'gem install yard'"
|
63
44
|
end
|
data/javascripts/ext.js
CHANGED
@@ -12,15 +12,14 @@ Ext.state.Provider.prototype.set = Ext.emptyFn;
|
|
12
12
|
// Checking Ext JS version: both major and minor versions must be the same
|
13
13
|
(function(){
|
14
14
|
var requiredVersionMajor = 4,
|
15
|
-
requiredVersionMinor =
|
15
|
+
requiredVersionMinor = 1,
|
16
16
|
extVersion = Ext.getVersion('extjs'),
|
17
17
|
currentVersionMajor = extVersion.getMajor(),
|
18
18
|
currentVersionMinor = extVersion.getMinor(),
|
19
|
-
requiredString = "" + requiredVersionMajor + "." + requiredVersionMinor + ".x"
|
20
|
-
currentString = "" + currentVersionMajor + "." + currentVersionMinor + ".x";
|
19
|
+
requiredString = "" + requiredVersionMajor + "." + requiredVersionMinor + ".x";
|
21
20
|
|
22
21
|
if (requiredVersionMajor != currentVersionMajor || requiredVersionMinor != currentVersionMinor) {
|
23
|
-
Netzke.warning("Ext " + requiredString + " required
|
22
|
+
Netzke.warning("Ext JS " + requiredString + " required (you have " + extVersion.toString() + ").");
|
24
23
|
}
|
25
24
|
})();
|
26
25
|
|
data/lib/netzke/core/version.rb
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
class String
|
2
2
|
def jsonify
|
3
|
-
self.
|
3
|
+
if self.index('_') == 0
|
4
|
+
# '_some_string' should become '_someString' and not 'SomeString'
|
5
|
+
'_' + self[1..-1].camelize(:lower)
|
6
|
+
else
|
7
|
+
self.camelize(:lower)
|
8
|
+
end
|
4
9
|
end
|
5
10
|
|
6
11
|
# Converts self to "literal JSON"-string - one that doesn't get quotes appended when being sent "to_json" method
|
data/netzke-core.gemspec
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "netzke-core"
|
8
|
-
s.version = "0.7.
|
8
|
+
s.version = "0.7.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["
|
12
|
-
s.date = "2012-
|
13
|
-
s.description = "Allows building DRY
|
11
|
+
s.authors = ["nomadcoder"]
|
12
|
+
s.date = "2012-10-20"
|
13
|
+
s.description = "Allows building DRY Sencha Ext JS Ruby on Rails applications by enabling modular development"
|
14
14
|
s.email = "nmcoder@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
@@ -224,21 +224,20 @@ Gem::Specification.new do |s|
|
|
224
224
|
"uninstall.rb"
|
225
225
|
]
|
226
226
|
s.homepage = "http://netzke.org"
|
227
|
-
s.post_install_message = "\n==========================================================\n\n Thanks for installing netzke-core!\n\n Home page: http://netzke.org\n Google Groups: http://groups.google.com/group/netzke\n News: http://twitter.com/netzke\n Tutorials: http://blog.writelesscode.com\n\n==========================================================\n\n"
|
228
227
|
s.require_paths = ["lib"]
|
229
228
|
s.rubygems_version = "1.8.10"
|
230
|
-
s.summary = "Build
|
229
|
+
s.summary = "Build complex Sencha Ext JS Ruby on Rails components with minimum effort"
|
231
230
|
|
232
231
|
if s.respond_to? :specification_version then
|
233
232
|
s.specification_version = 3
|
234
233
|
|
235
234
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
236
|
-
s.add_runtime_dependency(%q<activesupport>, [">= 3.
|
235
|
+
s.add_runtime_dependency(%q<activesupport>, [">= 3.1.0"])
|
237
236
|
else
|
238
|
-
s.add_dependency(%q<activesupport>, [">= 3.
|
237
|
+
s.add_dependency(%q<activesupport>, [">= 3.1.0"])
|
239
238
|
end
|
240
239
|
else
|
241
|
-
s.add_dependency(%q<activesupport>, [">= 3.
|
240
|
+
s.add_dependency(%q<activesupport>, [">= 3.1.0"])
|
242
241
|
end
|
243
242
|
end
|
244
243
|
|
@@ -11,4 +11,20 @@ describe "Core extensions" do
|
|
11
11
|
}.deep_each_pair{ |k,v| res[k] = v }
|
12
12
|
res.should == {:one => 1, :three => 3, :four => 4, :six => 6, :eight => 8}
|
13
13
|
end
|
14
|
+
|
15
|
+
it "should jsonify '_meta' to '_meta'" do
|
16
|
+
'_meta'.jsonify.should == '_meta'
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should jsonify '_meta_data' to '_metaData'" do
|
20
|
+
'_meta_data'.jsonify.should == '_metaData'
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should jsonify 'some_property' to 'someProperty'" do
|
24
|
+
'some_property'.jsonify.should == 'someProperty'
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should jsonify :_meta to :_meta" do
|
28
|
+
:_meta.jsonify.should == :_meta
|
29
|
+
end
|
14
30
|
end
|
metadata
CHANGED
@@ -1,28 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: netzke-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
|
-
-
|
8
|
+
- nomadcoder
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
16
|
-
requirement: &
|
16
|
+
requirement: &70172615787600 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 3.
|
21
|
+
version: 3.1.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
25
|
-
description: Allows building DRY
|
24
|
+
version_requirements: *70172615787600
|
25
|
+
description: Allows building DRY Sencha Ext JS Ruby on Rails applications by enabling
|
26
|
+
modular development
|
26
27
|
email: nmcoder@gmail.com
|
27
28
|
executables: []
|
28
29
|
extensions: []
|
@@ -237,10 +238,7 @@ files:
|
|
237
238
|
- uninstall.rb
|
238
239
|
homepage: http://netzke.org
|
239
240
|
licenses: []
|
240
|
-
post_install_message:
|
241
|
-
\ Thanks for installing netzke-core!\n\n Home page: http://netzke.org\n
|
242
|
-
\ Google Groups: http://groups.google.com/group/netzke\n News: http://twitter.com/netzke\n
|
243
|
-
\ Tutorials: http://blog.writelesscode.com\n\n==========================================================\n\n"
|
241
|
+
post_install_message:
|
244
242
|
rdoc_options: []
|
245
243
|
require_paths:
|
246
244
|
- lib
|
@@ -261,5 +259,5 @@ rubyforge_project:
|
|
261
259
|
rubygems_version: 1.8.10
|
262
260
|
signing_key:
|
263
261
|
specification_version: 3
|
264
|
-
summary: Build
|
262
|
+
summary: Build complex Sencha Ext JS Ruby on Rails components with minimum effort
|
265
263
|
test_files: []
|