fanforce-app-factory 2.0.0.rc35 → 2.0.0.rc36
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/Rakefile +1 -1
- data/lib/fanforce/app_factory/cli/lib/scaffolding.rb +3 -3
- data/lib/fanforce/app_factory/cli/lib/scaffolding_file.rb +8 -8
- data/lib/fanforce/app_factory/scaffolding/assets/js/controllers/initialize.txt +2 -0
- data/lib/fanforce/app_factory/scaffolding/assets/js/scripts/initialize.txt +2 -0
- data/lib/fanforce/app_factory/version.rb +1 -1
- metadata +3 -3
- data/lib/fanforce/app_factory/scaffolding/assets/js/controllers/readme +0 -2
- data/lib/fanforce/app_factory/scaffolding/assets/js/scripts/readme +0 -2
data/Rakefile
CHANGED
@@ -30,7 +30,7 @@ namespace :scaffolding do
|
|
30
30
|
|
31
31
|
Dir.glob("#{scaffolding_dir}/**/*", File::FNM_DOTMATCH).each do |scaffold_filepath|
|
32
32
|
next if scaffold_filepath =~ /\.registry$/
|
33
|
-
next if scaffold_filepath =~ /\/
|
33
|
+
next if scaffold_filepath =~ /\/initialize\.txt/
|
34
34
|
next if File.directory?(scaffold_filepath)
|
35
35
|
|
36
36
|
file_parts = scaffold_filepath.split('/')
|
@@ -33,8 +33,8 @@ class Fanforce::AppFactory::CLI::Scaffolding
|
|
33
33
|
if File.directory?(file.scaffold_filepath)
|
34
34
|
directory_exists = File.directory?(file.filepath)
|
35
35
|
change_data[file.filepath] = {status: directory_exists ? :exists : :missing}
|
36
|
-
if directory_exists and File.exists?("#{file.scaffold_filepath}
|
37
|
-
change_data["#{file.filepath}
|
36
|
+
if directory_exists and File.exists?("#{file.scaffold_filepath}initialize.txt") and Dir.glob("#{file.filepath}*").size == 0
|
37
|
+
change_data["#{file.filepath}initialize.txt"] = {status: :missing}
|
38
38
|
end
|
39
39
|
next
|
40
40
|
end
|
@@ -63,7 +63,7 @@ class Fanforce::AppFactory::CLI::Scaffolding
|
|
63
63
|
def files
|
64
64
|
Dir.glob("#{self.class.dir}/**/*", File::FNM_DOTMATCH).inject([]) do |files, scaffold_filepath|
|
65
65
|
next files if scaffold_filepath =~ /\.registry$/
|
66
|
-
next files if scaffold_filepath =~ /\/
|
66
|
+
next files if scaffold_filepath =~ /\/initialize\.txt$/
|
67
67
|
next files if scaffold_filepath =~ /\/\.\.?$/
|
68
68
|
scaffold_filepath = "#{scaffold_filepath}/" if File.directory?(scaffold_filepath) and scaffold_filepath !~ /\/$/
|
69
69
|
files << Fanforce::AppFactory::CLI::ScaffoldingFile.new(scaffold_filepath, app)
|
@@ -19,8 +19,8 @@ class Fanforce::AppFactory::CLI::ScaffoldingFile
|
|
19
19
|
def create
|
20
20
|
if File.directory?(scaffold_filepath)
|
21
21
|
Dir.mkdir(filepath)
|
22
|
-
if File.exists?("#{scaffold_filepath}
|
23
|
-
File.open("#{filepath}
|
22
|
+
if File.exists?("#{scaffold_filepath}initialize.txt")
|
23
|
+
File.open("#{filepath}initialize.txt", 'w') {|f| f.write(File.open("#{scaffold_filepath}initialize.txt").read) }
|
24
24
|
end
|
25
25
|
|
26
26
|
log "#{'Created'.format(:green,:bold)} #{relativepath}"
|
@@ -38,20 +38,20 @@ class Fanforce::AppFactory::CLI::ScaffoldingFile
|
|
38
38
|
def update
|
39
39
|
if File.directory?(scaffold_filepath)
|
40
40
|
created_dir = false
|
41
|
-
|
41
|
+
added_initialize_file = false
|
42
42
|
if !File.directory?(filepath)
|
43
43
|
Dir.mkdir(filepath)
|
44
44
|
log "#{'Created'.format(:green,:bold)} #{relativepath}"
|
45
45
|
created_dir = true
|
46
46
|
end
|
47
47
|
|
48
|
-
if File.exists?("#{scaffold_filepath}
|
49
|
-
File.open("#{filepath}
|
50
|
-
log "#{'Added'.format(:green,:bold)} #{relativepath}
|
51
|
-
|
48
|
+
if File.exists?("#{scaffold_filepath}initialize.txt") and Dir.glob("#{filepath}*").size == 0
|
49
|
+
File.open("#{filepath}initialize.txt", 'w') {|f| f.write(File.open("#{scaffold_filepath}initialize.txt").read) }
|
50
|
+
log "#{'Added'.format(:green,:bold)} #{relativepath}initialize.txt" if !created_dir
|
51
|
+
added_initialize_file = true
|
52
52
|
end
|
53
53
|
|
54
|
-
return (created_dir ||
|
54
|
+
return (created_dir || added_initialize_file) ? true : false
|
55
55
|
end
|
56
56
|
|
57
57
|
is_missing = is_missing?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fanforce-app-factory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.rc36
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -463,7 +463,7 @@ files:
|
|
463
463
|
- lib/fanforce/app_factory/scaffolding/assets/js/._fembedded-app.coffee.registry
|
464
464
|
- lib/fanforce/app_factory/scaffolding/assets/js/._fembedded.js.registry
|
465
465
|
- lib/fanforce/app_factory/scaffolding/assets/js/._promotional.js.registry
|
466
|
-
- lib/fanforce/app_factory/scaffolding/assets/js/controllers/
|
466
|
+
- lib/fanforce/app_factory/scaffolding/assets/js/controllers/initialize.txt
|
467
467
|
- lib/fanforce/app_factory/scaffolding/assets/js/fembedded-app.coffee
|
468
468
|
- lib/fanforce/app_factory/scaffolding/assets/js/fembedded.js
|
469
469
|
- lib/fanforce/app_factory/scaffolding/assets/js/lib/._cookie.coffee.registry
|
@@ -473,7 +473,7 @@ files:
|
|
473
473
|
- lib/fanforce/app_factory/scaffolding/assets/js/lib/filters.coffee
|
474
474
|
- lib/fanforce/app_factory/scaffolding/assets/js/lib/utils.coffee
|
475
475
|
- lib/fanforce/app_factory/scaffolding/assets/js/promotional.js
|
476
|
-
- lib/fanforce/app_factory/scaffolding/assets/js/scripts/
|
476
|
+
- lib/fanforce/app_factory/scaffolding/assets/js/scripts/initialize.txt
|
477
477
|
- lib/fanforce/app_factory/scaffolding/config.json
|
478
478
|
- lib/fanforce/app_factory/scaffolding/config.ru
|
479
479
|
- lib/fanforce/app_factory/scaffolding/favicon.ico
|