view_assets 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +59 -0
  4. data/lib/tasks/view_assets_tasks.rake +22 -0
  5. data/lib/view_assets.rb +35 -0
  6. data/lib/view_assets/assets_finder.rb +232 -0
  7. data/lib/view_assets/css_assets.rb +21 -0
  8. data/lib/view_assets/directives.rb +108 -0
  9. data/lib/view_assets/error.rb +6 -0
  10. data/lib/view_assets/js_assets.rb +21 -0
  11. data/lib/view_assets/version.rb +3 -0
  12. data/test/dummy/README.rdoc +261 -0
  13. data/test/dummy/Rakefile +7 -0
  14. data/test/dummy/app/assets/javascripts/application.js +15 -0
  15. data/test/dummy/app/assets/javascripts/bar.js +2 -0
  16. data/test/dummy/app/assets/javascripts/foo.js +2 -0
  17. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  18. data/test/dummy/app/assets/stylesheets/bar.css +4 -0
  19. data/test/dummy/app/assets/stylesheets/foo.css +4 -0
  20. data/test/dummy/app/controllers/application_controller.rb +3 -0
  21. data/test/dummy/app/controllers/bar_controller.rb +7 -0
  22. data/test/dummy/app/controllers/foo_controller.rb +7 -0
  23. data/test/dummy/app/helpers/application_helper.rb +3 -0
  24. data/test/dummy/app/helpers/bar_helper.rb +2 -0
  25. data/test/dummy/app/helpers/foo_helper.rb +2 -0
  26. data/test/dummy/app/views/bar/index.html.erb +2 -0
  27. data/test/dummy/app/views/bar/show.html.erb +2 -0
  28. data/test/dummy/app/views/foo/index.html.erb +2 -0
  29. data/test/dummy/app/views/foo/show.html.erb +2 -0
  30. data/test/dummy/app/views/layouts/application.html.erb +15 -0
  31. data/test/dummy/config.ru +4 -0
  32. data/test/dummy/config/application.rb +59 -0
  33. data/test/dummy/config/boot.rb +10 -0
  34. data/test/dummy/config/database.yml +25 -0
  35. data/test/dummy/config/environment.rb +5 -0
  36. data/test/dummy/config/environments/development.rb +40 -0
  37. data/test/dummy/config/environments/production.rb +67 -0
  38. data/test/dummy/config/environments/test.rb +37 -0
  39. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  40. data/test/dummy/config/initializers/inflections.rb +15 -0
  41. data/test/dummy/config/initializers/mime_types.rb +5 -0
  42. data/test/dummy/config/initializers/secret_token.rb +7 -0
  43. data/test/dummy/config/initializers/session_store.rb +8 -0
  44. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  45. data/test/dummy/config/locales/en.yml +5 -0
  46. data/test/dummy/config/routes.rb +66 -0
  47. data/test/dummy/db/development.sqlite3 +0 -0
  48. data/test/dummy/log/development.log +883 -0
  49. data/test/dummy/public/404.html +26 -0
  50. data/test/dummy/public/422.html +26 -0
  51. data/test/dummy/public/500.html +25 -0
  52. data/test/dummy/public/app/javascripts/application.js +2 -0
  53. data/test/dummy/public/app/javascripts/bar/index/index.js +0 -0
  54. data/test/dummy/public/app/javascripts/bar/index/others.js +0 -0
  55. data/test/dummy/public/app/javascripts/bar/show.js +0 -0
  56. data/test/dummy/public/app/javascripts/foo/index/index.js +0 -0
  57. data/test/dummy/public/app/javascripts/foo/index/others.js +0 -0
  58. data/test/dummy/public/app/javascripts/foo/show.js +1 -0
  59. data/test/dummy/public/app/stylesheets/application.css +0 -0
  60. data/test/dummy/public/app/stylesheets/bar/index/index.css +0 -0
  61. data/test/dummy/public/app/stylesheets/bar/index/others.css +0 -0
  62. data/test/dummy/public/app/stylesheets/bar/show.css +0 -0
  63. data/test/dummy/public/app/stylesheets/foo/index/index.css +0 -0
  64. data/test/dummy/public/app/stylesheets/foo/index/others.css +0 -0
  65. data/test/dummy/public/app/stylesheets/foo/show.css +0 -0
  66. data/test/dummy/public/favicon.ico +0 -0
  67. data/test/dummy/public/lib/javascripts/lib1.js +0 -0
  68. data/test/dummy/public/lib/javascripts/lib2.js +0 -0
  69. data/test/dummy/public/lib/stylesheets/lib1.css +0 -0
  70. data/test/dummy/public/lib/stylesheets/lib2.css +0 -0
  71. data/test/dummy/public/vendor/javascripts/vendor1.js +0 -0
  72. data/test/dummy/public/vendor/javascripts/vendor2.js +0 -0
  73. data/test/dummy/public/vendor/stylesheets/vendor1.css +0 -0
  74. data/test/dummy/public/vendor/stylesheets/vendor2.css +0 -0
  75. data/test/dummy/script/rails +6 -0
  76. data/test/dummy/test/functional/bar_controller_test.rb +14 -0
  77. data/test/dummy/test/functional/foo_controller_test.rb +14 -0
  78. data/test/dummy/test/unit/helpers/bar_helper_test.rb +4 -0
  79. data/test/dummy/test/unit/helpers/foo_helper_test.rb +4 -0
  80. data/test/test_helper.rb +15 -0
  81. data/test/view_assets_test.rb +7 -0
  82. metadata +230 -0
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
@@ -0,0 +1,2 @@
1
+ //= require_vendor vendor1
2
+ //= require_lib lib1
File without changes
@@ -0,0 +1 @@
1
+ //= require index/others
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,14 @@
1
+ require 'test_helper'
2
+
3
+ class BarControllerTest < ActionController::TestCase
4
+ test "should get index" do
5
+ get :index
6
+ assert_response :success
7
+ end
8
+
9
+ test "should get show" do
10
+ get :show
11
+ assert_response :success
12
+ end
13
+
14
+ end
@@ -0,0 +1,14 @@
1
+ require 'test_helper'
2
+
3
+ class FooControllerTest < ActionController::TestCase
4
+ test "should get index" do
5
+ get :index
6
+ assert_response :success
7
+ end
8
+
9
+ test "should get show" do
10
+ get :show
11
+ assert_response :success
12
+ end
13
+
14
+ end
@@ -0,0 +1,4 @@
1
+ require 'test_helper'
2
+
3
+ class BarHelperTest < ActionView::TestCase
4
+ end
@@ -0,0 +1,4 @@
1
+ require 'test_helper'
2
+
3
+ class FooHelperTest < ActionView::TestCase
4
+ end
@@ -0,0 +1,15 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
6
+
7
+ Rails.backtrace_cleaner.remove_silencers!
8
+
9
+ # Load support files
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
11
+
12
+ # Load fixtures from the engine
13
+ if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
15
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class ViewAssetsTest < ActiveSupport::TestCase
4
+ test "truth" do
5
+ assert_kind_of Module, ViewAssets
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,230 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: view_assets
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Van Hu
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-01-03 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 3.2.8
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 3.2.8
30
+ - !ruby/object:Gem::Dependency
31
+ name: sqlite3
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ description: Instead of using the default assets managing style in rails 3.2, this
47
+ gem will introduce a new way to manage your assets. This is still a prototype, the
48
+ fullfledged version will publish soon.
49
+ email:
50
+ - bom.d.van@gmail.com
51
+ executables: []
52
+ extensions: []
53
+ extra_rdoc_files: []
54
+ files:
55
+ - lib/tasks/view_assets_tasks.rake
56
+ - lib/view_assets/assets_finder.rb
57
+ - lib/view_assets/css_assets.rb
58
+ - lib/view_assets/directives.rb
59
+ - lib/view_assets/error.rb
60
+ - lib/view_assets/js_assets.rb
61
+ - lib/view_assets/version.rb
62
+ - lib/view_assets.rb
63
+ - MIT-LICENSE
64
+ - Rakefile
65
+ - README.rdoc
66
+ - test/dummy/app/assets/javascripts/application.js
67
+ - test/dummy/app/assets/javascripts/bar.js
68
+ - test/dummy/app/assets/javascripts/foo.js
69
+ - test/dummy/app/assets/stylesheets/application.css
70
+ - test/dummy/app/assets/stylesheets/bar.css
71
+ - test/dummy/app/assets/stylesheets/foo.css
72
+ - test/dummy/app/controllers/application_controller.rb
73
+ - test/dummy/app/controllers/bar_controller.rb
74
+ - test/dummy/app/controllers/foo_controller.rb
75
+ - test/dummy/app/helpers/application_helper.rb
76
+ - test/dummy/app/helpers/bar_helper.rb
77
+ - test/dummy/app/helpers/foo_helper.rb
78
+ - test/dummy/app/views/bar/index.html.erb
79
+ - test/dummy/app/views/bar/show.html.erb
80
+ - test/dummy/app/views/foo/index.html.erb
81
+ - test/dummy/app/views/foo/show.html.erb
82
+ - test/dummy/app/views/layouts/application.html.erb
83
+ - test/dummy/config/application.rb
84
+ - test/dummy/config/boot.rb
85
+ - test/dummy/config/database.yml
86
+ - test/dummy/config/environment.rb
87
+ - test/dummy/config/environments/development.rb
88
+ - test/dummy/config/environments/production.rb
89
+ - test/dummy/config/environments/test.rb
90
+ - test/dummy/config/initializers/backtrace_silencers.rb
91
+ - test/dummy/config/initializers/inflections.rb
92
+ - test/dummy/config/initializers/mime_types.rb
93
+ - test/dummy/config/initializers/secret_token.rb
94
+ - test/dummy/config/initializers/session_store.rb
95
+ - test/dummy/config/initializers/wrap_parameters.rb
96
+ - test/dummy/config/locales/en.yml
97
+ - test/dummy/config/routes.rb
98
+ - test/dummy/config.ru
99
+ - test/dummy/db/development.sqlite3
100
+ - test/dummy/log/development.log
101
+ - test/dummy/public/404.html
102
+ - test/dummy/public/422.html
103
+ - test/dummy/public/500.html
104
+ - test/dummy/public/app/javascripts/application.js
105
+ - test/dummy/public/app/javascripts/bar/index/index.js
106
+ - test/dummy/public/app/javascripts/bar/index/others.js
107
+ - test/dummy/public/app/javascripts/bar/show.js
108
+ - test/dummy/public/app/javascripts/foo/index/index.js
109
+ - test/dummy/public/app/javascripts/foo/index/others.js
110
+ - test/dummy/public/app/javascripts/foo/show.js
111
+ - test/dummy/public/app/stylesheets/application.css
112
+ - test/dummy/public/app/stylesheets/bar/index/index.css
113
+ - test/dummy/public/app/stylesheets/bar/index/others.css
114
+ - test/dummy/public/app/stylesheets/bar/show.css
115
+ - test/dummy/public/app/stylesheets/foo/index/index.css
116
+ - test/dummy/public/app/stylesheets/foo/index/others.css
117
+ - test/dummy/public/app/stylesheets/foo/show.css
118
+ - test/dummy/public/favicon.ico
119
+ - test/dummy/public/lib/javascripts/lib1.js
120
+ - test/dummy/public/lib/javascripts/lib2.js
121
+ - test/dummy/public/lib/stylesheets/lib1.css
122
+ - test/dummy/public/lib/stylesheets/lib2.css
123
+ - test/dummy/public/vendor/javascripts/vendor1.js
124
+ - test/dummy/public/vendor/javascripts/vendor2.js
125
+ - test/dummy/public/vendor/stylesheets/vendor1.css
126
+ - test/dummy/public/vendor/stylesheets/vendor2.css
127
+ - test/dummy/Rakefile
128
+ - test/dummy/README.rdoc
129
+ - test/dummy/script/rails
130
+ - test/dummy/test/functional/bar_controller_test.rb
131
+ - test/dummy/test/functional/foo_controller_test.rb
132
+ - test/dummy/test/unit/helpers/bar_helper_test.rb
133
+ - test/dummy/test/unit/helpers/foo_helper_test.rb
134
+ - test/test_helper.rb
135
+ - test/view_assets_test.rb
136
+ homepage: https://github.com/bom-d-van/view_assets
137
+ licenses: []
138
+ post_install_message:
139
+ rdoc_options: []
140
+ require_paths:
141
+ - lib
142
+ required_ruby_version: !ruby/object:Gem::Requirement
143
+ none: false
144
+ requirements:
145
+ - - ! '>='
146
+ - !ruby/object:Gem::Version
147
+ version: '0'
148
+ required_rubygems_version: !ruby/object:Gem::Requirement
149
+ none: false
150
+ requirements:
151
+ - - ! '>='
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ requirements: []
155
+ rubyforge_project:
156
+ rubygems_version: 1.8.24
157
+ signing_key:
158
+ specification_version: 3
159
+ summary: A new method to manage assets in a rails project.
160
+ test_files:
161
+ - test/dummy/app/assets/javascripts/application.js
162
+ - test/dummy/app/assets/javascripts/bar.js
163
+ - test/dummy/app/assets/javascripts/foo.js
164
+ - test/dummy/app/assets/stylesheets/application.css
165
+ - test/dummy/app/assets/stylesheets/bar.css
166
+ - test/dummy/app/assets/stylesheets/foo.css
167
+ - test/dummy/app/controllers/application_controller.rb
168
+ - test/dummy/app/controllers/bar_controller.rb
169
+ - test/dummy/app/controllers/foo_controller.rb
170
+ - test/dummy/app/helpers/application_helper.rb
171
+ - test/dummy/app/helpers/bar_helper.rb
172
+ - test/dummy/app/helpers/foo_helper.rb
173
+ - test/dummy/app/views/bar/index.html.erb
174
+ - test/dummy/app/views/bar/show.html.erb
175
+ - test/dummy/app/views/foo/index.html.erb
176
+ - test/dummy/app/views/foo/show.html.erb
177
+ - test/dummy/app/views/layouts/application.html.erb
178
+ - test/dummy/config/application.rb
179
+ - test/dummy/config/boot.rb
180
+ - test/dummy/config/database.yml
181
+ - test/dummy/config/environment.rb
182
+ - test/dummy/config/environments/development.rb
183
+ - test/dummy/config/environments/production.rb
184
+ - test/dummy/config/environments/test.rb
185
+ - test/dummy/config/initializers/backtrace_silencers.rb
186
+ - test/dummy/config/initializers/inflections.rb
187
+ - test/dummy/config/initializers/mime_types.rb
188
+ - test/dummy/config/initializers/secret_token.rb
189
+ - test/dummy/config/initializers/session_store.rb
190
+ - test/dummy/config/initializers/wrap_parameters.rb
191
+ - test/dummy/config/locales/en.yml
192
+ - test/dummy/config/routes.rb
193
+ - test/dummy/config.ru
194
+ - test/dummy/db/development.sqlite3
195
+ - test/dummy/log/development.log
196
+ - test/dummy/public/404.html
197
+ - test/dummy/public/422.html
198
+ - test/dummy/public/500.html
199
+ - test/dummy/public/app/javascripts/application.js
200
+ - test/dummy/public/app/javascripts/bar/index/index.js
201
+ - test/dummy/public/app/javascripts/bar/index/others.js
202
+ - test/dummy/public/app/javascripts/bar/show.js
203
+ - test/dummy/public/app/javascripts/foo/index/index.js
204
+ - test/dummy/public/app/javascripts/foo/index/others.js
205
+ - test/dummy/public/app/javascripts/foo/show.js
206
+ - test/dummy/public/app/stylesheets/application.css
207
+ - test/dummy/public/app/stylesheets/bar/index/index.css
208
+ - test/dummy/public/app/stylesheets/bar/index/others.css
209
+ - test/dummy/public/app/stylesheets/bar/show.css
210
+ - test/dummy/public/app/stylesheets/foo/index/index.css
211
+ - test/dummy/public/app/stylesheets/foo/index/others.css
212
+ - test/dummy/public/app/stylesheets/foo/show.css
213
+ - test/dummy/public/favicon.ico
214
+ - test/dummy/public/lib/javascripts/lib1.js
215
+ - test/dummy/public/lib/javascripts/lib2.js
216
+ - test/dummy/public/lib/stylesheets/lib1.css
217
+ - test/dummy/public/lib/stylesheets/lib2.css
218
+ - test/dummy/public/vendor/javascripts/vendor1.js
219
+ - test/dummy/public/vendor/javascripts/vendor2.js
220
+ - test/dummy/public/vendor/stylesheets/vendor1.css
221
+ - test/dummy/public/vendor/stylesheets/vendor2.css
222
+ - test/dummy/Rakefile
223
+ - test/dummy/README.rdoc
224
+ - test/dummy/script/rails
225
+ - test/dummy/test/functional/bar_controller_test.rb
226
+ - test/dummy/test/functional/foo_controller_test.rb
227
+ - test/dummy/test/unit/helpers/bar_helper_test.rb
228
+ - test/dummy/test/unit/helpers/foo_helper_test.rb
229
+ - test/test_helper.rb
230
+ - test/view_assets_test.rb