tidyflash 0.9.6 → 0.9.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/Assets/TidyHome.ai +1162 -2
  2. data/Gemfile +4 -0
  3. data/Gemfile.lock +26 -0
  4. data/Manifest +32 -11
  5. data/README +27 -14
  6. data/Rakefile +3 -3
  7. data/bin/tidyflash +58 -8
  8. data/{lib/script/server → bin/tidyflash-server} +0 -0
  9. data/lib/{script → tidy}/bwlimit.rb +0 -0
  10. data/lib/tidy/compile.rb +9 -9
  11. data/lib/tidy/server.rb +11 -0
  12. data/lib/tidy/template_binding.rb +2 -0
  13. data/lib/tidy/version.rb +1 -1
  14. data/templates/eclipsify/eclipsify.rb +12 -0
  15. data/templates/project/Gemfile +3 -0
  16. data/templates/project/project.rb +13 -12
  17. data/templates/project/rakefile.rb +6 -4
  18. data/templates/project/src/app/helpers/Typography.as +1 -1
  19. data/templates/project/src/app/views/PreloaderView.as +1 -0
  20. data/templates/project/src/library/fonts/Fonts.as +40 -0
  21. data/templates/project/src/library/images/README.txt +11 -0
  22. data/{lib/tasks/deploy.rb → templates/project/tasks/deploy.rake} +0 -0
  23. data/templates/project/tasks/library.rake +33 -0
  24. data/templates/scaffold/scaffold.rb +1 -1
  25. data/templates/{swfobject → web}/bin/index.html +0 -0
  26. data/templates/{swfobject → web}/bin/js/swfobject.js +0 -0
  27. data/templates/web/web.rb +13 -0
  28. data/test/test_tidy_project.rb +42 -47
  29. data/tidyflash.gemspec +10 -20
  30. data/{bin/test_project.axml → tools/TidyHarness/bin/tidy_harness.axml} +8 -8
  31. data/tools/TidyHarness/bin/tidy_harness.swf +0 -0
  32. data/tools/TidyHarness/config/templates/air.axml.erb +19 -0
  33. data/tools/TidyHarness/rakefile.rb +37 -0
  34. data/tools/TidyHarness/script/fcsh/rakefile.rb +6 -0
  35. data/tools/TidyHarness/src/app/helpers/Colours.as +1 -0
  36. data/tools/TidyHarness/src/app/helpers/Debug.as +17 -0
  37. data/tools/TidyHarness/src/app/helpers/Style.as +20 -0
  38. data/tools/TidyHarness/src/app/helpers/Typography.as +71 -0
  39. data/tools/TidyHarness/src/app/models/App.as +21 -0
  40. data/tools/TidyHarness/src/app/models/FlashVars.as +1 -0
  41. data/tools/TidyHarness/src/app/views/MainView.as +55 -0
  42. data/tools/TidyHarness/src/app/views/PreloaderView.as +36 -0
  43. data/tools/TidyHarness/src/app/views/ViewBase.as +19 -0
  44. data/{templates/project → tools/TidyHarness}/src/assets/fonts/Fonts.as +1 -1
  45. data/{lib → tools/TidyHarness}/tasks/assets.rb +1 -1
  46. data/tools/TidyHarness/tasks/deploy.rb +21 -0
  47. metadata +60 -103
  48. data/lib/script/generate +0 -124
  49. data/lib/script/server.rb +0 -20
  50. data/templates/swfobject/swfobject.rb +0 -12
metadata CHANGED
@@ -1,114 +1,61 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: tidyflash
3
- version: !ruby/object:Gem::Version
4
- hash: 55
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 9
9
- - 6
10
- version: 0.9.6
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.8
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Michael Forrest
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-01-04 00:00:00 +00:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- name: sprout
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
33
- type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: sprout-flex4sdk-tool
37
- prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
47
- type: :runtime
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: sprout-as3-bundle
51
- prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
53
- none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
61
- type: :runtime
62
- version_requirements: *id003
12
+ date: 2011-08-16 00:00:00.000000000Z
13
+ dependencies: []
63
14
  description: Tidy Flash - an ActionScript framework for people who love Ruby
64
15
  email: mf@grimaceworks.com
65
- executables:
66
- - test_project.axml
16
+ executables:
67
17
  - tidyflash
18
+ - tidyflash-server
68
19
  extensions: []
69
-
70
- extra_rdoc_files:
20
+ extra_rdoc_files:
71
21
  - README
72
- - bin/test_project.axml
73
22
  - bin/tidyflash
74
- - lib/script/bwlimit.rb
75
- - lib/script/generate
76
- - lib/script/server
77
- - lib/script/server.rb
78
- - lib/tasks/assets.rb
79
- - lib/tasks/deploy.rb
23
+ - bin/tidyflash-server
80
24
  - lib/tidy/air_packager.rb
81
25
  - lib/tidy/axml.rb
26
+ - lib/tidy/bwlimit.rb
82
27
  - lib/tidy/compile.rb
83
28
  - lib/tidy/demo_config.rb
84
29
  - lib/tidy/generate.rb
30
+ - lib/tidy/server.rb
85
31
  - lib/tidy/template.rb
86
32
  - lib/tidy/template_binding.rb
87
33
  - lib/tidy/templates/demo_config.as.erb
88
34
  - lib/tidy/version.rb
89
35
  - lib/tidy_project.rb
90
- files:
36
+ files:
37
+ - Assets/TidyHome.ai
38
+ - Gemfile
39
+ - Gemfile.lock
91
40
  - Manifest
92
41
  - README
93
42
  - Rakefile
94
- - bin/test_project.axml
95
43
  - bin/tidyflash
96
- - lib/script/bwlimit.rb
97
- - lib/script/generate
98
- - lib/script/server
99
- - lib/script/server.rb
100
- - lib/tasks/assets.rb
101
- - lib/tasks/deploy.rb
44
+ - bin/tidyflash-server
102
45
  - lib/tidy/air_packager.rb
103
46
  - lib/tidy/axml.rb
47
+ - lib/tidy/bwlimit.rb
104
48
  - lib/tidy/compile.rb
105
49
  - lib/tidy/demo_config.rb
106
50
  - lib/tidy/generate.rb
51
+ - lib/tidy/server.rb
107
52
  - lib/tidy/template.rb
108
53
  - lib/tidy/template_binding.rb
109
54
  - lib/tidy/templates/demo_config.as.erb
110
55
  - lib/tidy/version.rb
111
56
  - lib/tidy_project.rb
57
+ - templates/eclipsify/eclipsify.rb
58
+ - templates/project/Gemfile
112
59
  - templates/project/config/templates/air.axml.erb
113
60
  - templates/project/project.rb
114
61
  - templates/project/rakefile.rb
@@ -122,57 +69,67 @@ files:
122
69
  - templates/project/src/app/views/MainView.as
123
70
  - templates/project/src/app/views/PreloaderView.as
124
71
  - templates/project/src/app/views/ViewBase.as
125
- - templates/project/src/assets/fonts/Fonts.as
72
+ - templates/project/src/library/fonts/Fonts.as
73
+ - templates/project/src/library/images/README.txt
74
+ - templates/project/tasks/deploy.rake
75
+ - templates/project/tasks/library.rake
126
76
  - templates/scaffold/bin/xml/__model.xml
127
77
  - templates/scaffold/scaffold.rb
128
78
  - templates/scaffold/src/models/__Model.as
129
79
  - templates/scaffold/src/views/__model/__ModelDetailView.as
130
80
  - templates/scaffold/src/views/__model/__ModelListItemView.as
131
81
  - templates/scaffold/src/views/__model/__ModelListView.as
132
- - templates/swfobject/bin/index.html
133
- - templates/swfobject/bin/js/swfobject.js
134
- - templates/swfobject/swfobject.rb
82
+ - templates/web/bin/index.html
83
+ - templates/web/bin/js/swfobject.js
84
+ - templates/web/web.rb
135
85
  - test/test_tidy_project.rb
86
+ - tools/TidyHarness/bin/tidy_harness.axml
87
+ - tools/TidyHarness/bin/tidy_harness.swf
88
+ - tools/TidyHarness/config/templates/air.axml.erb
89
+ - tools/TidyHarness/rakefile.rb
90
+ - tools/TidyHarness/script/fcsh/rakefile.rb
91
+ - tools/TidyHarness/src/app/helpers/Colours.as
92
+ - tools/TidyHarness/src/app/helpers/Debug.as
93
+ - tools/TidyHarness/src/app/helpers/Style.as
94
+ - tools/TidyHarness/src/app/helpers/Typography.as
95
+ - tools/TidyHarness/src/app/models/App.as
96
+ - tools/TidyHarness/src/app/models/FlashVars.as
97
+ - tools/TidyHarness/src/app/views/MainView.as
98
+ - tools/TidyHarness/src/app/views/PreloaderView.as
99
+ - tools/TidyHarness/src/app/views/ViewBase.as
100
+ - tools/TidyHarness/src/assets/fonts/Fonts.as
101
+ - tools/TidyHarness/tasks/assets.rb
102
+ - tools/TidyHarness/tasks/deploy.rb
136
103
  - tidyflash.gemspec
137
- has_rdoc: true
138
104
  homepage: http://github.com/michaelforrest/tidy
139
105
  licenses: []
140
-
141
106
  post_install_message:
142
- rdoc_options:
107
+ rdoc_options:
143
108
  - --line-numbers
144
109
  - --inline-source
145
110
  - --title
146
111
  - Tidyflash
147
112
  - --main
148
113
  - README
149
- require_paths:
114
+ require_paths:
150
115
  - lib
151
- required_ruby_version: !ruby/object:Gem::Requirement
116
+ required_ruby_version: !ruby/object:Gem::Requirement
152
117
  none: false
153
- requirements:
154
- - - ">="
155
- - !ruby/object:Gem::Version
156
- hash: 3
157
- segments:
158
- - 0
159
- version: "0"
160
- required_rubygems_version: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ! '>='
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ required_rubygems_version: !ruby/object:Gem::Requirement
161
123
  none: false
162
- requirements:
163
- - - ">="
164
- - !ruby/object:Gem::Version
165
- hash: 11
166
- segments:
167
- - 1
168
- - 2
169
- version: "1.2"
124
+ requirements:
125
+ - - ! '>='
126
+ - !ruby/object:Gem::Version
127
+ version: '1.2'
170
128
  requirements: []
171
-
172
129
  rubyforge_project: tidyflash
173
- rubygems_version: 1.3.7
130
+ rubygems_version: 1.8.6
174
131
  signing_key:
175
132
  specification_version: 3
176
133
  summary: Tidy Flash - an ActionScript framework for people who love Ruby
177
- test_files:
134
+ test_files:
178
135
  - test/test_tidy_project.rb
data/lib/script/generate DELETED
@@ -1,124 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require 'rubygems'
3
- require 'activesupport'
4
- LANGUAGE = 'as3' #TODO: un-hard-code
5
- SCRIPT_PATH = File.join("script", LANGUAGE)
6
- def available_templates
7
- Dir.entries(SCRIPT_PATH).collect{|e| e unless e[0]==46}.compact
8
- end
9
-
10
- module LBi
11
- require 'erb'
12
- require 'fileutils'
13
- class Template
14
- attr_reader :args
15
- def initialize(params)
16
- @template_id = params[:template_id]
17
- @force = params[:force]
18
- @args = params[:args].collect{|arg| arg unless arg.match("--")}
19
-
20
- create_template_binding
21
- copy_files if @template_binding.valid?
22
- end
23
- def create_template_binding
24
- require template_class
25
- # the get_template_binding method is placed
26
- # in the included template class
27
- @template_binding = get_template_binding(self)
28
- @template_binding.init!
29
- end
30
-
31
- def template_path
32
- File.join(SCRIPT_PATH,@template_id)
33
- end
34
-
35
- def template_class
36
- File.join(template_path,"#{@template_id}.rb")
37
- end
38
-
39
- def copy_files
40
- pattern = File.join(template_path,"**/*")
41
- files = Dir.glob(pattern)
42
- files.each do |filename|
43
- copy_file(filename) unless filename == template_class
44
- end
45
- end
46
-
47
- def copy_file(filename)
48
- if File.directory?(filename)
49
-
50
- make_dirs(get_destination filename)
51
- return
52
- end
53
- contents = IO.read(filename)
54
- destination = get_destination(filename)
55
- make_dirs(File.split(destination)[0])
56
-
57
- result = File.extname(filename) == ".erb" ? contents : ERB.new(contents,0,"%").result(@template_binding.get_binding)
58
- force = @force unless @force.nil?
59
- if File.exists?(destination)
60
- if(force.nil?)
61
- puts "overwrite #{destination}? (yN)"
62
- force = $stdin.gets.chomp.downcase == "y"
63
- end
64
- unless force
65
- puts "skipping #{destination}"
66
- else
67
- File.delete(destination)
68
- write_result(result,destination)
69
- end
70
- else
71
- write_result(result,destination)
72
- end
73
- end
74
-
75
- def write_result result,destination
76
- File.open(destination,'a') do |file|
77
- file << result
78
- end
79
- puts("created " + destination)
80
- end
81
-
82
- def make_dirs(dir)
83
- FileUtils.mkdir_p(dir) unless File.exists? dir
84
- end
85
-
86
- def get_destination(file)
87
- @template_binding.get_destination file.gsub(template_path,".")
88
- end
89
- end
90
- class TemplateBinding
91
- def initialize(template)
92
- @template = template
93
- @is_valid = true
94
- end
95
- def init!
96
- #override this method to do extra curricular template activities
97
- end
98
- def valid?
99
- @is_valid
100
- end
101
- def get_binding
102
- return binding
103
- end
104
- def get_destination path
105
- path
106
- end
107
- #COMMON stuff for templates
108
- def credit
109
- "Generated with Tidy Flash"
110
- end
111
- end
112
- end
113
- params = {:force=>ARGV.find{|a| a=="--force"}!=nil, :template_id=>ARGV.shift, :args=>ARGV}
114
-
115
- unless params[:template_id].nil?
116
- LBi::Template.new(params)
117
- else
118
- puts <<-MSG
119
- Please provide a template name, e.g.
120
- $ ruby script/lbi/generate carousel
121
- Available templates: #{available_templates.join(",")}
122
- MSG
123
- end
124
-
data/lib/script/server.rb DELETED
@@ -1,20 +0,0 @@
1
- #!/usr/local/bin/ruby
2
- require 'webrick'
3
- include WEBrick
4
-
5
- s = HTTPServer.new(
6
- :Port => 2000,
7
- :DocumentRoot => File.join(File.dirname(__FILE__), "..", "bin"),
8
- :MimeTypes => {:js=>"text/javascript"}
9
- )
10
-
11
- ## mount subdirectories
12
- #s.mount("/ipr", HTTPServlet::FileHandler, "/proj/ipr/public_html")
13
- #s.mount("/~gotoyuzo",
14
- # HTTPServlet::FileHandler, "/home/gotoyuzo/public_html",
15
- # true) #<= allow to show directory index.
16
- #system_mime_table = Utils::load_mime_types('/etc/mime.types')
17
-
18
-
19
- trap("INT"){ s.shutdown }
20
- s.start()
@@ -1,12 +0,0 @@
1
- def get_template_binding(template)
2
- Swfobject.new(template)
3
- end
4
-
5
- class Swfobject < LBi::TemplateBinding
6
- def initialize(params)
7
- super(params)
8
- @swf_name = params.args[0]
9
- end
10
- def init!
11
- end
12
- end