ymdp 0.0.7 → 0.0.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.
Files changed (64) hide show
  1. data/VERSION +1 -1
  2. data/bin/ymdp +51 -0
  3. data/lib/new_application/.base +11 -0
  4. data/lib/new_application/Gemfile +12 -0
  5. data/lib/new_application/Rakefile +3 -0
  6. data/lib/new_application/app/.gitignore +1 -0
  7. data/lib/new_application/app/assets/images/lightbox/lightbox_bg.png +0 -0
  8. data/lib/new_application/app/assets/javascripts/OpenMailIntl.js +291 -0
  9. data/lib/new_application/app/assets/javascripts/controls.js +965 -0
  10. data/lib/new_application/app/assets/javascripts/date.js +104 -0
  11. data/lib/new_application/app/assets/javascripts/dragdrop.js +974 -0
  12. data/lib/new_application/app/assets/javascripts/effects.js +1123 -0
  13. data/lib/new_application/app/assets/javascripts/lowpro.js +320 -0
  14. data/lib/new_application/app/assets/javascripts/prototype.js +4874 -0
  15. data/lib/new_application/app/assets/javascripts/scriptaculous.js +68 -0
  16. data/lib/new_application/app/assets/yrb/en-US/application_en-US.pres +7 -0
  17. data/lib/new_application/app/helpers/application_helper.rb +3 -0
  18. data/lib/new_application/app/javascripts/application.js +580 -0
  19. data/lib/new_application/app/javascripts/debug.js +138 -0
  20. data/lib/new_application/app/javascripts/flash.js +96 -0
  21. data/lib/new_application/app/javascripts/header.js +13 -0
  22. data/lib/new_application/app/javascripts/help.js +76 -0
  23. data/lib/new_application/app/javascripts/i18n.js +235 -0
  24. data/lib/new_application/app/javascripts/launcher.js +159 -0
  25. data/lib/new_application/app/javascripts/logger.js +61 -0
  26. data/lib/new_application/app/javascripts/tag_helper.js +178 -0
  27. data/lib/new_application/app/stylesheets/application.css +0 -0
  28. data/lib/new_application/app/stylesheets/ie.css +0 -0
  29. data/lib/new_application/app/stylesheets/ie6.css +0 -0
  30. data/lib/new_application/app/stylesheets/ie7.css +0 -0
  31. data/lib/new_application/app/stylesheets/ie8.css +0 -0
  32. data/lib/new_application/app/stylesheets/lightbox.css +30 -0
  33. data/lib/new_application/app/stylesheets/non_ie.css +0 -0
  34. data/lib/new_application/app/views/layouts/application.html.haml +35 -0
  35. data/lib/new_application/app/views/shared/_error.html.haml +8 -0
  36. data/lib/new_application/app/views/shared/_flash.html.haml +2 -0
  37. data/lib/new_application/app/views/shared/_javascripts.html.haml +22 -0
  38. data/lib/new_application/app/views/shared/_loading.html.haml +13 -0
  39. data/lib/new_application/app/views/shared/_stylesheets.html.haml +23 -0
  40. data/lib/new_application/config/categories.yml +6 -0
  41. data/lib/new_application/config/config.yml.example +30 -0
  42. data/lib/new_application/config/constants.rb +54 -0
  43. data/lib/new_application/config/servers.yml.example +9 -0
  44. data/lib/new_application/lib/init.rb +13 -0
  45. data/lib/new_application/lib/tasks/environment.rake +4 -0
  46. data/lib/new_application/lib/tasks/keys.rake +235 -0
  47. data/lib/new_application/lib/tasks/setup.rake +13 -0
  48. data/lib/new_application/lib/tasks/ymdp.rake +718 -0
  49. data/lib/new_application/script/build +9 -0
  50. data/lib/new_application/script/config +13 -0
  51. data/lib/new_application/script/destroy +18 -0
  52. data/lib/new_application/script/generate +4 -0
  53. data/lib/new_application/script/gitrm +17 -0
  54. data/lib/new_application/script/growl +6 -0
  55. data/lib/new_application/script/images +48 -0
  56. data/lib/new_application/script/jslint.js +5072 -0
  57. data/lib/new_application/script/langs +31 -0
  58. data/lib/new_application/script/translate +5 -0
  59. data/lib/new_application/script/ymdt +1895 -0
  60. data/lib/new_application/script/ymdt.old +1890 -0
  61. data/lib/new_application/script/yuicompressor-2.4.2.jar +0 -0
  62. data/lib/new_application/ymdp +8 -0
  63. data/ymdp.gemspec +64 -1
  64. metadata +65 -4
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'lib/init'
4
+
5
+ YMDP_ENV = "build"
6
+
7
+ require 'compiler/template_compiler'
8
+
9
+ TemplateCompiler.compile
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ def copy_from_example(filename)
4
+ if File.exists?("./#{filename}")
5
+ puts "#{filename} already exists."
6
+ else
7
+ system "cp ./#{filename}.example ./#{filename}"
8
+ puts "Copied #{filename}.example to #{filename}"
9
+ end
10
+ end
11
+
12
+ copy_from_example("config/config.yml")
13
+ copy_from_example("config/servers.yml")
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ YMDP_ROOT = "."
4
+ APP_DIR = "#{YMDP_ROOT}/app"
5
+ ASSETS_DIR = "#{APP_DIR}/assets"
6
+ VIEWS_DIR = "#{APP_DIR}/views"
7
+ JAVASCRIPTS_DIR = "#{APP_DIR}/javascripts"
8
+ STYLESHEETS_DIR = "#{APP_DIR}/stylesheets"
9
+
10
+ @view = ARGV[0]
11
+
12
+ puts "Destroying #{@view} view..."
13
+
14
+ system "git rm #{VIEWS_DIR}/#{@view}.html*"
15
+
16
+ system "git rm #{JAVASCRIPTS_DIR}/#{@view}.js"
17
+
18
+ system "git rm #{STYLESHEETS_DIR}/#{@view}.css"
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'lib/init'
4
+ require 'commands/generate'
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ status = `git status`
3
+
4
+ deleted_part = false
5
+
6
+ status.split("\n").each do |line|
7
+ if line =~ /Changed but not updated/
8
+ deleted_part ||= true
9
+ end
10
+ if deleted_part
11
+ if line =~ /deleted: /
12
+ filename = line.gsub("# deleted: ", "")
13
+ puts filename
14
+ system "git rm #{filename}"
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require 'g'
5
+
6
+ g "Something requires your attention."
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ count = 0
4
+ used = []
5
+ unused = []
6
+
7
+ Dir["./app/assets/images/**/*"].each do |path|
8
+ puts "Checking #{path}..."
9
+ filename = path.split("/").last
10
+ if filename =~ /(.*)\.(jpg|png|gif)$/
11
+ puts "grep #{filename} ./servers/* -R"
12
+ result = `grep #{filename} ./servers/* -R`
13
+ print result
14
+ if result.length < 1 || result =~ /Binary/
15
+ puts "Adding #{path} to queue to remove..."
16
+ unused << path
17
+ # system "git rm #{path}"
18
+
19
+ count += 1
20
+ else
21
+ used << path
22
+ end
23
+ end
24
+ end
25
+
26
+ puts "Counted #{count} unused files:."
27
+ unused.each do |file|
28
+ puts file
29
+ end
30
+
31
+ if count > 0
32
+ puts "Delete these files?"
33
+ response = gets
34
+
35
+ if response =~ /y/i
36
+ unused.each do |file|
37
+ system "git rm #{file}"
38
+ end
39
+ else
40
+ puts "Cancelled."
41
+ end
42
+
43
+ end
44
+
45
+ puts "The following #{used.size} files were used:"
46
+ used.each do |file|
47
+ puts file
48
+ end