architecture-js 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.10
1
+ 0.1.11
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "architecture-js"
8
- s.version = "0.1.10"
8
+ s.version = "0.1.11"
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"]
@@ -63,9 +63,9 @@ module Architect
63
63
 
64
64
  def compile
65
65
  if options[:c] || options[:compress]
66
- ArchitectureJS::Command.compile
67
- else
68
66
  ArchitectureJS::Command.compile({ force_compress: true })
67
+ else
68
+ ArchitectureJS::Command.compile
69
69
  end
70
70
  end
71
71
 
@@ -1,16 +1,6 @@
1
1
  module ArchitectureJS
2
2
  module Helpers
3
3
 
4
- def get_file_name(module_path)
5
- module_path = module_path.split(/[\\\/]/).last
6
- split = module_path.split(/[\.\-\s]/)
7
- module_filename = String.new
8
- split.each do |piece|
9
- module_filename << piece unless piece.match(/^module$|^js$/i)
10
- end
11
- module_filename
12
- end
13
-
14
4
  def array_to_yml(array)
15
5
  yml = array.empty? ? '[]' : %Q{['#{array.join("', '")}']}
16
6
  end
@@ -23,8 +13,7 @@ module ArchitectureJS
23
13
  symbolized_hash
24
14
  end
25
15
 
26
- module_function :get_file_name,
27
- :array_to_yml,
16
+ module_function :array_to_yml,
28
17
  :symbolize_keys
29
18
  end
30
19
  end
@@ -111,11 +111,16 @@ module ArchitectureJS
111
111
 
112
112
  def compile_src_files
113
113
  @src_files.each do |file_path|
114
- file_name = ArchitectureJS::Helpers.get_file_name file_path
114
+ file_name = get_file_name file_path
115
115
  compile_src_file file_path, file_name
116
116
  end
117
117
  end
118
118
 
119
+ def get_file_name(module_path)
120
+ module_file = module_path.split(/[\\\/]/).last
121
+ module_filename = module_file.gsub(/\.js$/, '')
122
+ end
123
+
119
124
  def compile_src_file(file_path, file_name)
120
125
  sprockets = Sprockets::Secretary.new(
121
126
  root: ArchitectureJS::BASE_DIR,
data/spec/cli_spec.rb CHANGED
@@ -5,8 +5,8 @@ describe 'CLI' do
5
5
  @bin = "#{ArchitectureJS::BASE_DIR}/bin/architect"
6
6
  FileUtils.mkdir "#{TMP_DIR}" unless File.exists? "#{TMP_DIR}"
7
7
  suppress_output { %x(cd #{TMP_DIR}; #{@bin} create myapp) }
8
- FileUtils.cp "#{FIXTURES}/lib1.js", "#{TMP_DIR}/lib/lib1.js"
9
- FileUtils.cp "#{FIXTURES}/lib2.js", "#{TMP_DIR}/lib/lib2.js"
8
+ FileUtils.cp "#{FIXTURES}/lib1.js", "#{TMP_DIR}/src/lib1.js"
9
+ FileUtils.cp "#{FIXTURES}/lib2.js", "#{TMP_DIR}/src/lib2.js"
10
10
  FileUtils.cp "#{FIXTURES}/src_file.js", "#{TMP_DIR}/src/myapp.js"
11
11
  end
12
12
 
data/spec/helpers_spec.rb CHANGED
@@ -1,13 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
3
  describe ArchitectureJS::Helpers do
4
- it 'should create a module filename from a POSIX path' do
5
- ArchitectureJS::Helpers.get_file_name('/some/path/some.module.js').should === 'some'
6
- end
7
-
8
- it 'should create a module filename from a Windows path' do
9
- ArchitectureJS::Helpers.get_file_name('D:\\\\some\path\some.module.js').should === 'some'
10
- end
11
4
 
12
5
  it 'should convert an array to yaml notation' do
13
6
  yml = ArchitectureJS::Helpers.array_to_yml ['one', 'two', 'three']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: architecture-js
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-02-04 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fssm
16
- requirement: &70308037156640 !ruby/object:Gem::Requirement
16
+ requirement: &70096504653840 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.2.8.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70308037156640
24
+ version_requirements: *70096504653840
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: jsmin
27
- requirement: &70308037156140 !ruby/object:Gem::Requirement
27
+ requirement: &70096504653360 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.1
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70308037156140
35
+ version_requirements: *70096504653360
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sprockets
38
- requirement: &70308037155640 !ruby/object:Gem::Requirement
38
+ requirement: &70096504652780 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - =
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.0.2
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70308037155640
46
+ version_requirements: *70096504652780
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &70308037155140 !ruby/object:Gem::Requirement
49
+ requirement: &70096504652120 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 2.8.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70308037155140
57
+ version_requirements: *70096504652120
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: bundler
60
- requirement: &70308037154620 !ruby/object:Gem::Requirement
60
+ requirement: &70096504651540 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 1.0.0
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70308037154620
68
+ version_requirements: *70096504651540
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: jeweler
71
- requirement: &70308037154140 !ruby/object:Gem::Requirement
71
+ requirement: &70096504651000 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 1.8.3
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70308037154140
79
+ version_requirements: *70096504651000
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: ZenTest
82
- requirement: &70308037153620 !ruby/object:Gem::Requirement
82
+ requirement: &70096504642800 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 4.6.2
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70308037153620
90
+ version_requirements: *70096504642800
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: autotest-growl
93
- requirement: &70308037153100 !ruby/object:Gem::Requirement
93
+ requirement: &70096504642320 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 0.2.16
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70308037153100
101
+ version_requirements: *70096504642320
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: jsmin
104
- requirement: &70308037152580 !ruby/object:Gem::Requirement
104
+ requirement: &70096504641760 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *70308037152580
112
+ version_requirements: *70096504641760
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: fssm
115
- requirement: &70308037152080 !ruby/object:Gem::Requirement
115
+ requirement: &70096504641240 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '0'
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *70308037152080
123
+ version_requirements: *70096504641240
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: sprockets
126
- requirement: &70308037151600 !ruby/object:Gem::Requirement
126
+ requirement: &70096504640760 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - =
@@ -131,7 +131,7 @@ dependencies:
131
131
  version: 1.0.2
132
132
  type: :runtime
133
133
  prerelease: false
134
- version_requirements: *70308037151600
134
+ version_requirements: *70096504640760
135
135
  description: Architecture.js helps you generate scaffolding, manage third-party packages,
136
136
  compile, and compress your application.
137
137
  email: daytonn@gmail.com
@@ -206,7 +206,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
206
206
  version: '0'
207
207
  segments:
208
208
  - 0
209
- hash: 3452299829619871935
209
+ hash: 25093799947828401
210
210
  required_rubygems_version: !ruby/object:Gem::Requirement
211
211
  none: false
212
212
  requirements: