architecture-js 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/architecture-js.gemspec +1 -1
- data/lib/architecture-js/architect.rb +2 -2
- data/lib/architecture-js.rb +0 -15
- data/spec/architecture-js_spec.rb +2 -2
- metadata +20 -20
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.3
|
data/architecture-js.gemspec
CHANGED
@@ -75,7 +75,7 @@ module Architect
|
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
-
project = ArchitectureJS::
|
78
|
+
project = ArchitectureJS::Blueprint.new_from_config(project_path)
|
79
79
|
|
80
80
|
config = {
|
81
81
|
arguments: @args,
|
@@ -88,7 +88,7 @@ module Architect
|
|
88
88
|
end
|
89
89
|
|
90
90
|
def compile
|
91
|
-
project = ArchitectureJS::
|
91
|
+
project = ArchitectureJS::Blueprint.new_from_config(File.expand_path(Dir.getwd))
|
92
92
|
project.config[:output] = 'compressed' if options[:c] || options[:compress]
|
93
93
|
project.update
|
94
94
|
end
|
data/lib/architecture-js.rb
CHANGED
@@ -20,20 +20,6 @@ module ArchitectureJS
|
|
20
20
|
ArchitectureJS::BLUEPRINTS[name] = constructor
|
21
21
|
end
|
22
22
|
|
23
|
-
def create_project_from_config(project_dir = nil)
|
24
|
-
project_dir ||= File.expand_path(Dir.getwd)
|
25
|
-
conf_file = get_config_file project_dir
|
26
|
-
raise "<project_name>.blueprint was not found in #{project_dir}" if conf_file.nil?
|
27
|
-
|
28
|
-
config = YAML.load_file("#{project_dir}/#{conf_file}")
|
29
|
-
config = ArchitectureJS::Helpers::symbolize_keys config
|
30
|
-
|
31
|
-
raise "The config file does not contain a project name" if config[:name].nil?
|
32
|
-
raise "#{config[:blueprint]} is not isntalled. Try gem install #{config[:blueprint]}-architecture" if ArchitectureJS::BLUEPRINTS[config[:blueprint]].nil?
|
33
|
-
|
34
|
-
project = ArchitectureJS::BLUEPRINTS[config[:blueprint]].new(config, project_dir)
|
35
|
-
end
|
36
|
-
|
37
23
|
def get_config_file(path)
|
38
24
|
(Dir.entries(path).select { |f| f.match /\.blueprint$/ })[0]
|
39
25
|
end
|
@@ -41,7 +27,6 @@ module ArchitectureJS
|
|
41
27
|
module_function :base_directory,
|
42
28
|
:lib_directory,
|
43
29
|
:register_blueprint,
|
44
|
-
:create_project_from_config,
|
45
30
|
:get_config_file
|
46
31
|
end
|
47
32
|
|
@@ -27,7 +27,7 @@ describe ArchitectureJS do
|
|
27
27
|
before :each do
|
28
28
|
FileUtils.mkdir("#{TMP_DIR}")
|
29
29
|
FileUtils.cp "#{FIXTURES}/existing.blueprint", "#{TMP_DIR}/myapp.blueprint"
|
30
|
-
suppress_output { @project = ArchitectureJS::
|
30
|
+
suppress_output { @project = ArchitectureJS::Blueprint.new_from_config(TMP_DIR) }
|
31
31
|
end
|
32
32
|
|
33
33
|
after :each do
|
@@ -36,7 +36,7 @@ describe ArchitectureJS do
|
|
36
36
|
|
37
37
|
it "should raise an error if there is no .blueprint file" do
|
38
38
|
FileUtils.rm_rf "#{TMP_DIR}/myapp.blueprint"
|
39
|
-
lambda { ArchitectureJS::
|
39
|
+
lambda { ArchitectureJS::Blueprint.new_from_config TMP_DIR }.should raise_error
|
40
40
|
end
|
41
41
|
|
42
42
|
it 'should set defaults from config file' do
|
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.3.
|
4
|
+
version: 0.3.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-02-27 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fssm
|
16
|
-
requirement: &
|
16
|
+
requirement: &70169273824760 !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: *
|
24
|
+
version_requirements: *70169273824760
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: jsmin
|
27
|
-
requirement: &
|
27
|
+
requirement: &70169273824240 !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: *
|
35
|
+
version_requirements: *70169273824240
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70169273823760 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 2.8.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70169273823760
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bundler
|
49
|
-
requirement: &
|
49
|
+
requirement: &70169273823280 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.0.0
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70169273823280
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: jeweler
|
60
|
-
requirement: &
|
60
|
+
requirement: &70169273822800 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 1.8.3
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70169273822800
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: ZenTest
|
71
|
-
requirement: &
|
71
|
+
requirement: &70169273822320 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 4.6.2
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70169273822320
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: autotest-growl
|
82
|
-
requirement: &
|
82
|
+
requirement: &70169273821840 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 0.2.16
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70169273821840
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: jsmin
|
93
|
-
requirement: &
|
93
|
+
requirement: &70169273821340 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70169273821340
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: fssm
|
104
|
-
requirement: &
|
104
|
+
requirement: &70169273820860 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70169273820860
|
113
113
|
description: Architecture.js helps you generate scaffolding, manage third-party packages,
|
114
114
|
compile, and compress your application.
|
115
115
|
email: daytonn@gmail.com
|
@@ -225,7 +225,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
225
225
|
version: '0'
|
226
226
|
segments:
|
227
227
|
- 0
|
228
|
-
hash: -
|
228
|
+
hash: -2593387987785440315
|
229
229
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
230
230
|
none: false
|
231
231
|
requirements:
|