modjs-architecture 0.6.7 → 0.6.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/lib/modjs-architecture.rb +3 -4
- data/lib/modjs-architecture/helpers/existence.js +2 -2
- data/lib/modjs-architecture/lib/mod.js +1 -1
- data/modjs-architecture.gemspec +2 -2
- data/spec/fixtures/myapp.js +1 -1
- data/spec/fixtures/update.js +1 -1
- data/spec/javascripts/dom_spec.js +1 -1
- data/spec/javascripts/existence_spec.js +6 -6
- data/spec/modjs-architecture_spec.rb +4 -0
- metadata +3 -3
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.8
|
data/lib/modjs-architecture.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'ejs'
|
2
2
|
|
3
3
|
module ArchitectureJS
|
4
4
|
class Generator
|
@@ -101,12 +101,11 @@ module ModJS
|
|
101
101
|
|
102
102
|
ArchitectureJS::Notification.log "#{app_file} updated"
|
103
103
|
compile_application_file tmp_file
|
104
|
-
FileUtils.
|
104
|
+
FileUtils.mv tmp_file, app_file
|
105
105
|
end
|
106
106
|
|
107
107
|
def write_temp_file
|
108
|
-
|
109
|
-
tmp_file = "#{@root}/#{tmp_name}.js"
|
108
|
+
tmp_file = "#{@root}/#{@config[:name].downcase}.js"
|
110
109
|
|
111
110
|
File.open(tmp_file, "w+") do |file|
|
112
111
|
write_dependencies file
|
@@ -69,9 +69,9 @@ isDate = function(suspect) {
|
|
69
69
|
return isTypeof(Date, suspect);
|
70
70
|
};
|
71
71
|
|
72
|
-
//###
|
72
|
+
//### isBool
|
73
73
|
// Alias method for Boolean detection
|
74
|
-
|
74
|
+
isBool = function(suspect) {
|
75
75
|
return isTypeof(Boolean, suspect);
|
76
76
|
};
|
77
77
|
|
data/modjs-architecture.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "modjs-architecture"
|
8
|
-
s.version = "0.6.
|
8
|
+
s.version = "0.6.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Dayton Nolan"]
|
12
|
-
s.date = "2012-06-
|
12
|
+
s.date = "2012-06-15"
|
13
13
|
s.description = "Mod.js is a modular javascript library that provides a base application strucure to build large javascript applications. Mod.js is designed to work with architecture.js."
|
14
14
|
s.email = "daytonn@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
data/spec/fixtures/myapp.js
CHANGED
data/spec/fixtures/update.js
CHANGED
@@ -111,12 +111,12 @@ describe("Mod.js", function() {
|
|
111
111
|
expect(isDate(empty_string)).toBeFalsy();
|
112
112
|
});
|
113
113
|
|
114
|
-
it("should test for boolean values with
|
115
|
-
expect(
|
116
|
-
expect(
|
117
|
-
expect(
|
118
|
-
expect(
|
119
|
-
expect(
|
114
|
+
it("should test for boolean values with isBool", function() {
|
115
|
+
expect(isBool).toBeTruthy();
|
116
|
+
expect(isBool(bool_true)).toBeTruthy();
|
117
|
+
expect(isBool(bool_false)).toBeTruthy();
|
118
|
+
expect(isBool(one)).toBeFalsy();
|
119
|
+
expect(isBool(zero)).toBeFalsy();
|
120
120
|
});
|
121
121
|
|
122
122
|
it("should test for RegEx objects with isRegExp", function() {
|
@@ -96,6 +96,10 @@ describe ModJS::Blueprint do
|
|
96
96
|
File.exists?("#{TMP_DIR}/application/myapp.js").should be_true
|
97
97
|
end
|
98
98
|
|
99
|
+
it "should have moved the application file from the root folder" do
|
100
|
+
File.exists?("#{TMP_DIR}/myapp.js").should_not be_true
|
101
|
+
end
|
102
|
+
|
99
103
|
it 'should compile the test module' do
|
100
104
|
File.exists?("#{TMP_DIR}/application/test.js").should be_true
|
101
105
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modjs-architecture
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.8
|
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-06-
|
12
|
+
date: 2012-06-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: architecture-js
|
@@ -209,7 +209,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
209
209
|
version: '0'
|
210
210
|
segments:
|
211
211
|
- 0
|
212
|
-
hash:
|
212
|
+
hash: 693958384355217922
|
213
213
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
214
214
|
none: false
|
215
215
|
requirements:
|