tidyflash 0.1

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 (42) hide show
  1. data/Manifest +40 -0
  2. data/README +4 -0
  3. data/Rakefile +15 -0
  4. data/bin/test_project.axml +19 -0
  5. data/bin/tidyflash +33 -0
  6. data/lib/script/bwlimit.rb +305 -0
  7. data/lib/script/generate +124 -0
  8. data/lib/script/server +4 -0
  9. data/lib/script/server.rb +20 -0
  10. data/lib/tasks/assets.rb +133 -0
  11. data/lib/tasks/demo_config.rb +27 -0
  12. data/lib/tasks/deploy.rb +21 -0
  13. data/lib/tidy/axml.rb +31 -0
  14. data/lib/tidy/compile.rb +97 -0
  15. data/lib/tidy/generate.rb +20 -0
  16. data/lib/tidy/template.rb +84 -0
  17. data/lib/tidy/template_binding.rb +26 -0
  18. data/lib/tidy/templates/air.axml.erb +19 -0
  19. data/lib/tidy/templates/demo_config.as.erb +7 -0
  20. data/lib/tidy_project.rb +26 -0
  21. data/templates/project/project.rb +17 -0
  22. data/templates/project/rakefile.rb +29 -0
  23. data/templates/project/script/fcsh/rakefile.rb +3 -0
  24. data/templates/project/src/app/helpers/Colours.as +1 -0
  25. data/templates/project/src/app/helpers/Debug.as +17 -0
  26. data/templates/project/src/app/helpers/Typography.as +1 -0
  27. data/templates/project/src/app/models/App.as +21 -0
  28. data/templates/project/src/app/models/FlashVars.as +1 -0
  29. data/templates/project/src/app/views/MainView.as +16 -0
  30. data/templates/project/src/app/views/PreloaderView.as +36 -0
  31. data/templates/scaffold/bin/xml/__model.xml +0 -0
  32. data/templates/scaffold/scaffold.rb +41 -0
  33. data/templates/scaffold/src/models/__Model.as +11 -0
  34. data/templates/scaffold/src/views/__model/__ModelDetailView.as +0 -0
  35. data/templates/scaffold/src/views/__model/__ModelListItemView.as +0 -0
  36. data/templates/scaffold/src/views/__model/__ModelListView.as +0 -0
  37. data/templates/swfobject/bin/index.html +16 -0
  38. data/templates/swfobject/bin/js/swfobject.js +5 -0
  39. data/templates/swfobject/swfobject.rb +12 -0
  40. data/test/test_tidy_project.rb +67 -0
  41. data/tidyflash.gemspec +32 -0
  42. metadata +125 -0
@@ -0,0 +1,67 @@
1
+ require "test/unit"
2
+ require "open3"
3
+ require 'ftools'
4
+ class TestTidyProject < Test::Unit::TestCase
5
+ TEST_PROJECT_NAME = "TestProject"
6
+ TEST_PROJECT_FILE_NAME = "test_project"
7
+ def setup
8
+ lib_path = File.expand_path('lib', __FILE__)
9
+ $:.unshift(lib_path) unless $:.include?(lib_path)
10
+ require 'tidy/compile'
11
+
12
+ Dir.chdir "tmp" do
13
+ puts `rm -fr #{TEST_PROJECT_NAME}`
14
+ require '../lib/tidy_project'
15
+ TidyProject.new(TEST_PROJECT_NAME)
16
+ end
17
+ end
18
+
19
+ #def test_add_libs
20
+ # in_project_folder do
21
+ # assert File.exists?('script'), "No script folder"
22
+ # assert File.exists?('rakefile.rb'), "No rakefile"
23
+ # assert_match "test_project", File.read('rakefile.rb')
24
+ # assert File.exists?('tasks'), "should be some tasks"
25
+ # assert File.exists?('bin'), "should be an empty bin folder"
26
+ # end
27
+ #
28
+ #end
29
+ def test_fcsh
30
+ in_project_folder do
31
+ Tidy::Compile.air(:main=>'src/app/views/MainView.as',
32
+ :output=>TEST_PROJECT_FILE_NAME
33
+ #:do_not_launch=>true
34
+ )
35
+ end
36
+ end
37
+ #def test_build
38
+ #
39
+ # in_project_folder do
40
+ # #puts `rake`
41
+ # Tidy::Compile.air(:main=>'src/app/views/MainView.as',
42
+ # :output=>TEST_PROJECT_FILE_NAME
43
+ # #:do_not_launch=>true
44
+ # )
45
+ # assert File.exists?("bin/#{TEST_PROJECT_FILE_NAME}.swf"), "Rake did not produce swf file"
46
+ # end
47
+ #end
48
+ #def test_rake
49
+ #
50
+ # in_project_folder do
51
+ # command = "rake --trace"
52
+ # stdin, stdout, stderr = Open3.popen3(command)
53
+ # stdout_text = stdout.read
54
+ # stderr_text = stdout.read
55
+ # puts "#{stdout_text}\n#{stderr_text}"
56
+ # assert_no_match /rake aborted/, stderr_text
57
+ # assert File.exists?("bin/#{TEST_PROJECT_FILE_NAME}.swf"), "Rake did not produce swf file"
58
+ # end
59
+ #end
60
+
61
+ private
62
+ def in_project_folder
63
+ Dir.chdir "tmp/#{TEST_PROJECT_NAME}" do
64
+ yield
65
+ end
66
+ end
67
+ end
data/tidyflash.gemspec ADDED
@@ -0,0 +1,32 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{tidyflash}
5
+ s.version = "0.1"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Michael Forrest"]
9
+ s.date = %q{2010-04-15}
10
+ s.description = %q{Tidy Flash - an ActionScript framework for people who love Ruby}
11
+ s.email = %q{mf@grimaceworks.com}
12
+ s.executables = ["test_project.axml", "tidyflash"]
13
+ s.extra_rdoc_files = ["README", "bin/test_project.axml", "bin/tidyflash", "lib/script/bwlimit.rb", "lib/script/generate", "lib/script/server", "lib/script/server.rb", "lib/tasks/assets.rb", "lib/tasks/demo_config.rb", "lib/tasks/deploy.rb", "lib/tidy/axml.rb", "lib/tidy/compile.rb", "lib/tidy/generate.rb", "lib/tidy/template.rb", "lib/tidy/template_binding.rb", "lib/tidy/templates/air.axml.erb", "lib/tidy/templates/demo_config.as.erb", "lib/tidy_project.rb"]
14
+ s.files = ["Manifest", "README", "Rakefile", "bin/test_project.axml", "bin/tidyflash", "lib/script/bwlimit.rb", "lib/script/generate", "lib/script/server", "lib/script/server.rb", "lib/tasks/assets.rb", "lib/tasks/demo_config.rb", "lib/tasks/deploy.rb", "lib/tidy/axml.rb", "lib/tidy/compile.rb", "lib/tidy/generate.rb", "lib/tidy/template.rb", "lib/tidy/template_binding.rb", "lib/tidy/templates/air.axml.erb", "lib/tidy/templates/demo_config.as.erb", "lib/tidy_project.rb", "templates/project/project.rb", "templates/project/rakefile.rb", "templates/project/script/fcsh/rakefile.rb", "templates/project/src/app/helpers/Colours.as", "templates/project/src/app/helpers/Debug.as", "templates/project/src/app/helpers/Typography.as", "templates/project/src/app/models/App.as", "templates/project/src/app/models/FlashVars.as", "templates/project/src/app/views/MainView.as", "templates/project/src/app/views/PreloaderView.as", "templates/scaffold/bin/xml/__model.xml", "templates/scaffold/scaffold.rb", "templates/scaffold/src/models/__Model.as", "templates/scaffold/src/views/__model/__ModelDetailView.as", "templates/scaffold/src/views/__model/__ModelListItemView.as", "templates/scaffold/src/views/__model/__ModelListView.as", "templates/swfobject/bin/index.html", "templates/swfobject/bin/js/swfobject.js", "templates/swfobject/swfobject.rb", "test/test_tidy_project.rb", "tidyflash.gemspec"]
15
+ s.homepage = %q{http://github.com/michaelforrest/tidy}
16
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Tidyflash", "--main", "README"]
17
+ s.require_paths = ["lib"]
18
+ s.rubyforge_project = %q{tidyflash}
19
+ s.rubygems_version = %q{1.3.6}
20
+ s.summary = %q{Tidy Flash - an ActionScript framework for people who love Ruby}
21
+ s.test_files = ["test/test_tidy_project.rb"]
22
+
23
+ if s.respond_to? :specification_version then
24
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
25
+ s.specification_version = 3
26
+
27
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
28
+ else
29
+ end
30
+ else
31
+ end
32
+ end
metadata ADDED
@@ -0,0 +1,125 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tidyflash
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ version: "0.1"
9
+ platform: ruby
10
+ authors:
11
+ - Michael Forrest
12
+ autorequire:
13
+ bindir: bin
14
+ cert_chain: []
15
+
16
+ date: 2010-04-15 00:00:00 +01:00
17
+ default_executable:
18
+ dependencies: []
19
+
20
+ description: Tidy Flash - an ActionScript framework for people who love Ruby
21
+ email: mf@grimaceworks.com
22
+ executables:
23
+ - test_project.axml
24
+ - tidyflash
25
+ extensions: []
26
+
27
+ extra_rdoc_files:
28
+ - README
29
+ - bin/test_project.axml
30
+ - bin/tidyflash
31
+ - lib/script/bwlimit.rb
32
+ - lib/script/generate
33
+ - lib/script/server
34
+ - lib/script/server.rb
35
+ - lib/tasks/assets.rb
36
+ - lib/tasks/demo_config.rb
37
+ - lib/tasks/deploy.rb
38
+ - lib/tidy/axml.rb
39
+ - lib/tidy/compile.rb
40
+ - lib/tidy/generate.rb
41
+ - lib/tidy/template.rb
42
+ - lib/tidy/template_binding.rb
43
+ - lib/tidy/templates/air.axml.erb
44
+ - lib/tidy/templates/demo_config.as.erb
45
+ - lib/tidy_project.rb
46
+ files:
47
+ - Manifest
48
+ - README
49
+ - Rakefile
50
+ - bin/test_project.axml
51
+ - bin/tidyflash
52
+ - lib/script/bwlimit.rb
53
+ - lib/script/generate
54
+ - lib/script/server
55
+ - lib/script/server.rb
56
+ - lib/tasks/assets.rb
57
+ - lib/tasks/demo_config.rb
58
+ - lib/tasks/deploy.rb
59
+ - lib/tidy/axml.rb
60
+ - lib/tidy/compile.rb
61
+ - lib/tidy/generate.rb
62
+ - lib/tidy/template.rb
63
+ - lib/tidy/template_binding.rb
64
+ - lib/tidy/templates/air.axml.erb
65
+ - lib/tidy/templates/demo_config.as.erb
66
+ - lib/tidy_project.rb
67
+ - templates/project/project.rb
68
+ - templates/project/rakefile.rb
69
+ - templates/project/script/fcsh/rakefile.rb
70
+ - templates/project/src/app/helpers/Colours.as
71
+ - templates/project/src/app/helpers/Debug.as
72
+ - templates/project/src/app/helpers/Typography.as
73
+ - templates/project/src/app/models/App.as
74
+ - templates/project/src/app/models/FlashVars.as
75
+ - templates/project/src/app/views/MainView.as
76
+ - templates/project/src/app/views/PreloaderView.as
77
+ - templates/scaffold/bin/xml/__model.xml
78
+ - templates/scaffold/scaffold.rb
79
+ - templates/scaffold/src/models/__Model.as
80
+ - templates/scaffold/src/views/__model/__ModelDetailView.as
81
+ - templates/scaffold/src/views/__model/__ModelListItemView.as
82
+ - templates/scaffold/src/views/__model/__ModelListView.as
83
+ - templates/swfobject/bin/index.html
84
+ - templates/swfobject/bin/js/swfobject.js
85
+ - templates/swfobject/swfobject.rb
86
+ - test/test_tidy_project.rb
87
+ - tidyflash.gemspec
88
+ has_rdoc: true
89
+ homepage: http://github.com/michaelforrest/tidy
90
+ licenses: []
91
+
92
+ post_install_message:
93
+ rdoc_options:
94
+ - --line-numbers
95
+ - --inline-source
96
+ - --title
97
+ - Tidyflash
98
+ - --main
99
+ - README
100
+ require_paths:
101
+ - lib
102
+ required_ruby_version: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ segments:
107
+ - 0
108
+ version: "0"
109
+ required_rubygems_version: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - ">="
112
+ - !ruby/object:Gem::Version
113
+ segments:
114
+ - 1
115
+ - 2
116
+ version: "1.2"
117
+ requirements: []
118
+
119
+ rubyforge_project: tidyflash
120
+ rubygems_version: 1.3.6
121
+ signing_key:
122
+ specification_version: 3
123
+ summary: Tidy Flash - an ActionScript framework for people who love Ruby
124
+ test_files:
125
+ - test/test_tidy_project.rb