architecture-js 0.5.7 → 0.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/architecture-js.gemspec +1 -1
- data/lib/architecture-js/architect.rb +7 -9
- data/lib/architecture-js/blueprint.rb +2 -2
- data/lib/architecture-js/watcher.rb +5 -5
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.8
|
data/architecture-js.gemspec
CHANGED
@@ -87,8 +87,7 @@ module Architect
|
|
87
87
|
def watch
|
88
88
|
@project = ArchitectureJS::Blueprint.new_from_config(@root)
|
89
89
|
@project.update
|
90
|
-
@watcher = @project.watch
|
91
|
-
puts ArchitectureJS::Notification.log "architect is watching for changes. Type 'quit' to stop."
|
90
|
+
@watcher = @project.watch("architect is watching for changes. Type 'quit' to stop.")
|
92
91
|
start_interactive_session
|
93
92
|
rescue Exception => e
|
94
93
|
puts ArchitectureJS::Notification.error e.message
|
@@ -112,12 +111,12 @@ module Architect
|
|
112
111
|
|
113
112
|
private
|
114
113
|
def start_interactive_session
|
115
|
-
command = ''
|
114
|
+
@command = ''
|
116
115
|
|
117
|
-
while not command =~ /^quit$/
|
116
|
+
while not @command =~ /^quit$/
|
118
117
|
print ArchitectureJS::Notification.prompt
|
119
|
-
command = gets.chomp
|
120
|
-
args = command.split(/\s/)
|
118
|
+
@command = gets.chomp
|
119
|
+
args = @command.split(/\s/)
|
121
120
|
parse_command args
|
122
121
|
|
123
122
|
case @command
|
@@ -132,13 +131,12 @@ module Architect
|
|
132
131
|
puts ' help - show this menu'
|
133
132
|
puts ' quit - stop watching for changes'
|
134
133
|
when /compile|generate|templates|src_files/
|
135
|
-
|
136
134
|
if @command == :generate
|
137
135
|
parse_arguments args
|
138
|
-
parse_generate_options
|
136
|
+
parse_generate_options
|
139
137
|
else
|
140
138
|
args = args.drop 1
|
141
|
-
parse_interactive_options
|
139
|
+
parse_interactive_options args
|
142
140
|
parse_arguments args
|
143
141
|
end
|
144
142
|
|
@@ -6,8 +6,8 @@ module ArchitectureJS
|
|
6
6
|
def initialize(project)
|
7
7
|
@project = project
|
8
8
|
@listener = Listen.to(@project.root)
|
9
|
-
@listener.ignore(/#{@project.config[:build_dir]}
|
10
|
-
.filter(/\.jst
|
9
|
+
@listener.ignore(/#{@project.config[:build_dir]}/)
|
10
|
+
.filter(/\.jst?$|\.blueprint$/)
|
11
11
|
.change do |modified, added, removed|
|
12
12
|
update_files(modified, "modified") if modified.length > 0
|
13
13
|
update_files(added, "added") if added.length > 0
|
@@ -15,8 +15,9 @@ module ArchitectureJS
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
-
def watch
|
18
|
+
def watch(message = false)
|
19
19
|
@listener.start(false)
|
20
|
+
puts ArchitectureJS::Notification.log message if message
|
20
21
|
self
|
21
22
|
end
|
22
23
|
|
@@ -30,8 +31,7 @@ module ArchitectureJS
|
|
30
31
|
files.each do |f|
|
31
32
|
f = File.basename f
|
32
33
|
if action == "deleted"
|
33
|
-
FileUtils.rm_rf("#{@project.root}/#{f}")
|
34
|
-
puts "remove #{@project.root}/#{f}"
|
34
|
+
FileUtils.rm_rf("#{@project.root}/#{@project.config[:build_dir]}/#{f}") if File.exists? "#{@project.root}/#{@project.config[:build_dir]}/#{f}"
|
35
35
|
end
|
36
36
|
|
37
37
|
puts "\n" << ArchitectureJS::Notification.event("#{f} was #{action}")
|
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.5.
|
4
|
+
version: 0.5.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -243,7 +243,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
243
243
|
version: '0'
|
244
244
|
segments:
|
245
245
|
- 0
|
246
|
-
hash:
|
246
|
+
hash: 3997393681716254954
|
247
247
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
248
248
|
none: false
|
249
249
|
requirements:
|