railsbuilder 0.1.15 → 0.1.16
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +3 -2
- data/lib/railsbuilder.rb +13 -10
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0542d81aceec2bf0ed09cc7705e73e4f0b5efb7f
|
|
4
|
+
data.tar.gz: 7e580cafc11d40047a12d07bd637e8d0db138eaa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ed064ac04fb8209dd9aaa2d276bdc5c2b44a9760556fc3f3c576fcb27a0edc8df041409e4a8a530331887ec734344271e55168efeda7453bc5acf60249aa3b8f
|
|
7
|
+
data.tar.gz: 0f6f804ebbb4f6d52ea520f544ba97efbeb27b6b65c9f5d263939988c7f9956bf0b9f86b2568fe3207b3cb994b2b806e1985eec681f178b992eb61dc0966d2d0
|
checksums.yaml.gz.sig
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
�
|
|
2
|
-
�
|
|
1
|
+
W#��Hӎ0r^���Q�E��{�K�Yo��Q��W���H/�>�L�=�t�1�8��|k!�^ʬ�-�^̰d��?�C]���?�:���:�(���Y��T<�4s3�JR�A%ř�.��`>�^s�fM!��תϳJ�qk�M����)��!�Gq,w9��cNZ���
|
|
2
|
+
�]@��٤r����0c��
|
|
3
|
+
��`O�]c�?BSPL��HK�I��h��gM�:�F[z��t_w��N�}/s��A\�D
|
data/lib/railsbuilder.rb
CHANGED
|
@@ -17,7 +17,7 @@ class RailsBuilder
|
|
|
17
17
|
|
|
18
18
|
def initialize(filepath=nil, journal: false)
|
|
19
19
|
|
|
20
|
-
@config
|
|
20
|
+
@config = RXFHelper.read(filepath)[0].gsub(/^(\s{,5})#/,'\1;') if filepath
|
|
21
21
|
@tmp_path = @journal = journal == true ? Dir.tmpdir : journal if journal
|
|
22
22
|
|
|
23
23
|
patterns = [
|
|
@@ -36,7 +36,7 @@ class RailsBuilder
|
|
|
36
36
|
[:all, /^\s*;/, :comment]
|
|
37
37
|
]
|
|
38
38
|
|
|
39
|
-
xml = parse(patterns, @config
|
|
39
|
+
xml = parse(patterns, @config)
|
|
40
40
|
@doc = Rexle.new xml
|
|
41
41
|
|
|
42
42
|
@parent_path = Dir.pwd
|
|
@@ -44,7 +44,7 @@ class RailsBuilder
|
|
|
44
44
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
-
def build(auto: false)
|
|
47
|
+
def build(auto: false, desc: nil)
|
|
48
48
|
|
|
49
49
|
doc = @doc.root
|
|
50
50
|
@auto_override = auto
|
|
@@ -146,7 +146,7 @@ class RailsBuilder
|
|
|
146
146
|
|
|
147
147
|
shell command
|
|
148
148
|
|
|
149
|
-
trigger = "config:
|
|
149
|
+
trigger = "config: model found for a controller which " + "doesn't yet exist"
|
|
150
150
|
activity = "file: created app/controllers/posts_controller.rb"
|
|
151
151
|
@notifications << [trigger, activity]
|
|
152
152
|
end
|
|
@@ -322,7 +322,7 @@ class RailsBuilder
|
|
|
322
322
|
end # / child iterator
|
|
323
323
|
end
|
|
324
324
|
|
|
325
|
-
snapshot() if @journal and @notifications.any?
|
|
325
|
+
snapshot(desc) if @journal and @notifications.any?
|
|
326
326
|
Dir.chdir @parent_path
|
|
327
327
|
@notifications.to_yaml
|
|
328
328
|
end
|
|
@@ -340,11 +340,11 @@ class RailsBuilder
|
|
|
340
340
|
|
|
341
341
|
level = 0 if a.length < 2
|
|
342
342
|
record = a[level]
|
|
343
|
-
path =
|
|
343
|
+
path = a[level].desc[/^[^;]+/]
|
|
344
344
|
|
|
345
345
|
FileUtils.rm_rf @app_path
|
|
346
346
|
FileUtils.copy_entry File.join(base, path), @app_path, preserve=true
|
|
347
|
-
|
|
347
|
+
a.last.delete
|
|
348
348
|
dx.save
|
|
349
349
|
|
|
350
350
|
path + ' app restored'
|
|
@@ -401,15 +401,18 @@ EOF
|
|
|
401
401
|
end
|
|
402
402
|
end
|
|
403
403
|
|
|
404
|
-
def snapshot()
|
|
404
|
+
def snapshot(desc=nil)
|
|
405
405
|
|
|
406
|
-
d
|
|
406
|
+
d = Time.now.strftime("%d-%b").downcase
|
|
407
|
+
t = Time.now.strftime("%H%M_%S.%2N")
|
|
407
408
|
snapshot_path = File.join(@tmp_path, 'railsbuilder', @app, d,t)
|
|
408
409
|
FileUtils.mkdir_p snapshot_path
|
|
409
410
|
|
|
410
411
|
FileUtils.copy_entry @app_path, snapshot_path, preserve=true
|
|
411
412
|
al = ActivityLogger.new File.join(@tmp_path, 'railsbuilder', @app)
|
|
412
|
-
|
|
413
|
+
s = File.join(d,t)
|
|
414
|
+
s << '; ' + desc if desc
|
|
415
|
+
al.create s
|
|
413
416
|
|
|
414
417
|
self.save snapshot_path
|
|
415
418
|
end
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: railsbuilder
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.16
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
|
31
31
|
bNcCWso1cJhifoTCytPAyf9YVuyU4HjqC3eqx3p00NCg0VoELwMEkyhkpvYOGz2l
|
|
32
32
|
NSkTRB6yCN+xzQ==
|
|
33
33
|
-----END CERTIFICATE-----
|
|
34
|
-
date: 2014-03-
|
|
34
|
+
date: 2014-03-16 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: rails
|
metadata.gz.sig
CHANGED
|
Binary file
|