controller-specific-assets 0.1.2 → 0.1.25

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7773d7c66f63a5f17df1a28db98e8e1649f6b720
4
- data.tar.gz: 3cbbd42dafda9fc0d3f51b57c88bc05de8ee97b4
3
+ metadata.gz: f3ce558f6cfc404a2dbbb93a2aa94236b1c6bb87
4
+ data.tar.gz: 6cebd499a0bc48e6c342163353e96dfa753b9d56
5
5
  SHA512:
6
- metadata.gz: d81a0e3f7aaa0e6589295ddbc3a0186f672d4d046a30208517cd2e333b8722b48a062a58e2a3bb31eeef54c1a726da69cee595994c7b7b0db75022ac66b380de
7
- data.tar.gz: 20c13de71e00513377643027a08256bd081559781e98477643039681728b144c82ad61fe5776ec09a03a40f6fca4e4f2393b3f462434fc438d40a92f24939673
6
+ metadata.gz: 5a758dc80ac311594fb91ad85969be67fdef5d51fed311bc896d0213f38865e9d0a9d01726ab15d95b9c97b908bb7aa7eb0cf09307b1a6393511261923741f95
7
+ data.tar.gz: 2c57e382f031cf0f7e4839a94329a34feaf8d618cb2663f8830f26a73691437259519cf18b6827c6c96e378d3b2897e214add515b9af7118c13aaf6d2d326189
@@ -1,3 +1,3 @@
1
1
  module ControllerSpecificAssets
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.25"
3
3
  end
@@ -0,0 +1,40 @@
1
+ require 'test_helper'
2
+
3
+ class ControllerSpecificAssetsTest < ActiveSupport::TestCase
4
+
5
+ include ActionView::Helpers
6
+ include ControllerSpecificAssetsHelpers
7
+
8
+ def test_if_is_module
9
+ assert_kind_of Module, ControllerSpecificAssets
10
+ end
11
+
12
+ def test_non_existing_javascript_file
13
+ def params
14
+ { :controller => "pages" }
15
+ end
16
+ assert_equal '<script src="/javascripts/application.js"></script>', controller_javascript_tag
17
+ end
18
+
19
+ def test_existing_javascript_file
20
+ def params
21
+ { :controller => "users" }
22
+ end
23
+ assert_equal '<script src="/javascripts/controller_users.js"></script>', controller_javascript_tag
24
+ end
25
+
26
+ def test_non_existing_css_file
27
+ def params
28
+ { :controller => "pages" }
29
+ end
30
+ assert_equal '<link rel="stylesheet" media="screen" href="/stylesheets/application.css" />', controller_stylesheet_tag
31
+ end
32
+
33
+ def test_existing_css_file
34
+ def params
35
+ { :controller => "users" }
36
+ end
37
+ assert_equal '<link rel="stylesheet" media="screen" href="/stylesheets/controller_users.css" />', controller_javascript_tag
38
+ end
39
+
40
+ end
@@ -3,7 +3,7 @@ require File.expand_path('../boot', __FILE__)
3
3
  require 'rails/all'
4
4
 
5
5
  Bundler.require(*Rails.groups)
6
- require "controller_specific_assets"
6
+ require "controller-specific-assets"
7
7
 
8
8
  module Dummy
9
9
  class Application < Rails::Application
@@ -23,4 +23,3 @@ module Dummy
23
23
  config.active_record.raise_in_transactional_callbacks = true
24
24
  end
25
25
  end
26
-
File without changes
@@ -0,0 +1,355 @@
1
+  (0.1ms) begin transaction
2
+ ----------------------------------------
3
+ ControllerSpecificAssetsTest: test_truth
4
+ ----------------------------------------
5
+  (0.3ms) rollback transaction
6
+  (0.1ms) begin transaction
7
+ -----------------------------------------------
8
+ ControllerSpecificAssetsTest: test_if_is_module
9
+ -----------------------------------------------
10
+  (0.1ms) rollback transaction
11
+  (0.1ms) begin transaction
12
+ -----------------------------------------------
13
+ ControllerSpecificAssetsTest: test_if_is_module
14
+ -----------------------------------------------
15
+  (0.1ms) rollback transaction
16
+  (0.1ms) begin transaction
17
+ ---------------------------------------------------------------
18
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
19
+ ---------------------------------------------------------------
20
+  (0.0ms) rollback transaction
21
+  (0.1ms) begin transaction
22
+ ---------------------------------------------------------------
23
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
24
+ ---------------------------------------------------------------
25
+  (0.1ms) rollback transaction
26
+  (0.1ms) begin transaction
27
+ -----------------------------------------------
28
+ ControllerSpecificAssetsTest: test_if_is_module
29
+ -----------------------------------------------
30
+  (0.0ms) rollback transaction
31
+  (0.1ms) begin transaction
32
+ ---------------------------------------------------------------
33
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
34
+ ---------------------------------------------------------------
35
+  (0.0ms) rollback transaction
36
+  (0.1ms) begin transaction
37
+ -----------------------------------------------
38
+ ControllerSpecificAssetsTest: test_if_is_module
39
+ -----------------------------------------------
40
+  (0.0ms) rollback transaction
41
+  (0.2ms) begin transaction
42
+ -----------------------------------------------
43
+ ControllerSpecificAssetsTest: test_if_is_module
44
+ -----------------------------------------------
45
+  (0.1ms) rollback transaction
46
+  (0.0ms) begin transaction
47
+ ---------------------------------------------------------------
48
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
49
+ ---------------------------------------------------------------
50
+  (0.0ms) rollback transaction
51
+  (0.1ms) begin transaction
52
+ -----------------------------------------------
53
+ ControllerSpecificAssetsTest: test_if_is_module
54
+ -----------------------------------------------
55
+  (0.0ms) rollback transaction
56
+  (0.0ms) begin transaction
57
+ ---------------------------------------------------------------
58
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
59
+ ---------------------------------------------------------------
60
+  (0.0ms) rollback transaction
61
+  (0.1ms) begin transaction
62
+ -----------------------------------------------
63
+ ControllerSpecificAssetsTest: test_if_is_module
64
+ -----------------------------------------------
65
+  (0.0ms) rollback transaction
66
+  (0.1ms) begin transaction
67
+ ---------------------------------------------------------------
68
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
69
+ ---------------------------------------------------------------
70
+  (0.0ms) rollback transaction
71
+  (0.1ms) begin transaction
72
+ ---------------------------------------------------------------
73
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
74
+ ---------------------------------------------------------------
75
+  (0.0ms) rollback transaction
76
+  (0.1ms) begin transaction
77
+ -----------------------------------------------
78
+ ControllerSpecificAssetsTest: test_if_is_module
79
+ -----------------------------------------------
80
+  (0.0ms) rollback transaction
81
+  (0.1ms) begin transaction
82
+ -----------------------------------------------
83
+ ControllerSpecificAssetsTest: test_if_is_module
84
+ -----------------------------------------------
85
+  (0.0ms) rollback transaction
86
+  (0.1ms) begin transaction
87
+ ---------------------------------------------------------------
88
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
89
+ ---------------------------------------------------------------
90
+  (0.1ms) rollback transaction
91
+  (0.1ms) begin transaction
92
+ -----------------------------------------------
93
+ ControllerSpecificAssetsTest: test_if_is_module
94
+ -----------------------------------------------
95
+  (0.0ms) rollback transaction
96
+  (0.1ms) begin transaction
97
+ ---------------------------------------------------------------
98
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
99
+ ---------------------------------------------------------------
100
+  (0.1ms) rollback transaction
101
+  (0.1ms) begin transaction
102
+ -----------------------------------------------
103
+ ControllerSpecificAssetsTest: test_if_is_module
104
+ -----------------------------------------------
105
+  (0.1ms) rollback transaction
106
+  (0.1ms) begin transaction
107
+ ---------------------------------------------------------------
108
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
109
+ ---------------------------------------------------------------
110
+  (0.0ms) rollback transaction
111
+  (0.1ms) begin transaction
112
+ -----------------------------------------------
113
+ ControllerSpecificAssetsTest: test_if_is_module
114
+ -----------------------------------------------
115
+  (0.0ms) rollback transaction
116
+  (0.1ms) begin transaction
117
+ ---------------------------------------------------------------
118
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
119
+ ---------------------------------------------------------------
120
+  (0.0ms) rollback transaction
121
+  (0.1ms) begin transaction
122
+ -----------------------------------------------
123
+ ControllerSpecificAssetsTest: test_if_is_module
124
+ -----------------------------------------------
125
+  (0.1ms) rollback transaction
126
+  (0.0ms) begin transaction
127
+ ---------------------------------------------------------------
128
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
129
+ ---------------------------------------------------------------
130
+  (0.0ms) rollback transaction
131
+  (0.1ms) begin transaction
132
+ -----------------------------------------------
133
+ ControllerSpecificAssetsTest: test_if_is_module
134
+ -----------------------------------------------
135
+  (0.4ms) rollback transaction
136
+  (0.1ms) begin transaction
137
+ ---------------------------------------------------------------
138
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
139
+ ---------------------------------------------------------------
140
+  (0.0ms) rollback transaction
141
+  (0.1ms) begin transaction
142
+ -----------------------------------------------
143
+ ControllerSpecificAssetsTest: test_if_is_module
144
+ -----------------------------------------------
145
+  (0.0ms) rollback transaction
146
+  (0.1ms) begin transaction
147
+ ---------------------------------------------------------------
148
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
149
+ ---------------------------------------------------------------
150
+  (0.0ms) rollback transaction
151
+  (0.1ms) begin transaction
152
+ -----------------------------------------------
153
+ ControllerSpecificAssetsTest: test_if_is_module
154
+ -----------------------------------------------
155
+  (0.1ms) rollback transaction
156
+  (0.1ms) begin transaction
157
+ ---------------------------------------------------------------
158
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
159
+ ---------------------------------------------------------------
160
+  (0.0ms) rollback transaction
161
+  (0.1ms) begin transaction
162
+ -----------------------------------------------
163
+ ControllerSpecificAssetsTest: test_if_is_module
164
+ -----------------------------------------------
165
+  (0.0ms) rollback transaction
166
+  (0.1ms) begin transaction
167
+ ---------------------------------------------------------------
168
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
169
+ ---------------------------------------------------------------
170
+  (0.0ms) rollback transaction
171
+  (0.1ms) begin transaction
172
+ ---------------------------------------------------------------
173
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
174
+ ---------------------------------------------------------------
175
+  (0.1ms) rollback transaction
176
+  (0.1ms) begin transaction
177
+ -----------------------------------------------
178
+ ControllerSpecificAssetsTest: test_if_is_module
179
+ -----------------------------------------------
180
+  (0.0ms) rollback transaction
181
+  (0.1ms) begin transaction
182
+ ---------------------------------------------------------------
183
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
184
+ ---------------------------------------------------------------
185
+  (0.1ms) rollback transaction
186
+  (0.1ms) begin transaction
187
+ -----------------------------------------------
188
+ ControllerSpecificAssetsTest: test_if_is_module
189
+ -----------------------------------------------
190
+  (0.1ms) rollback transaction
191
+  (0.1ms) begin transaction
192
+ -----------------------------------------------
193
+ ControllerSpecificAssetsTest: test_if_is_module
194
+ -----------------------------------------------
195
+  (0.1ms) rollback transaction
196
+  (0.0ms) begin transaction
197
+ ---------------------------------------------------------------
198
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
199
+ ---------------------------------------------------------------
200
+  (0.0ms) rollback transaction
201
+  (0.1ms) begin transaction
202
+ ------------------------------------------------------------
203
+ ControllerSpecificAssetsTest: test_correct_js_file_inclusion
204
+ ------------------------------------------------------------
205
+  (0.1ms) rollback transaction
206
+  (0.1ms) begin transaction
207
+ -----------------------------------------------
208
+ ControllerSpecificAssetsTest: test_if_is_module
209
+ -----------------------------------------------
210
+  (0.1ms) rollback transaction
211
+  (0.1ms) begin transaction
212
+ ---------------------------------------------------------------
213
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
214
+ ---------------------------------------------------------------
215
+  (0.0ms) rollback transaction
216
+  (0.1ms) begin transaction
217
+ ---------------------------------------------------------------
218
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
219
+ ---------------------------------------------------------------
220
+  (0.1ms) rollback transaction
221
+  (0.1ms) begin transaction
222
+ -----------------------------------------------
223
+ ControllerSpecificAssetsTest: test_if_is_module
224
+ -----------------------------------------------
225
+  (0.0ms) rollback transaction
226
+  (0.1ms) begin transaction
227
+ -----------------------------------------------
228
+ ControllerSpecificAssetsTest: test_if_is_module
229
+ -----------------------------------------------
230
+  (0.1ms) rollback transaction
231
+  (0.1ms) begin transaction
232
+ ---------------------------------------------------------------
233
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
234
+ ---------------------------------------------------------------
235
+  (0.1ms) rollback transaction
236
+  (0.1ms) begin transaction
237
+ -----------------------------------------------
238
+ ControllerSpecificAssetsTest: test_if_is_module
239
+ -----------------------------------------------
240
+  (0.0ms) rollback transaction
241
+  (0.1ms) begin transaction
242
+ ---------------------------------------------------------------
243
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
244
+ ---------------------------------------------------------------
245
+  (0.1ms) rollback transaction
246
+  (0.2ms) begin transaction
247
+ -----------------------------------------------
248
+ ControllerSpecificAssetsTest: test_if_is_module
249
+ -----------------------------------------------
250
+  (0.1ms) rollback transaction
251
+  (0.1ms) begin transaction
252
+ ---------------------------------------------------------------
253
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
254
+ ---------------------------------------------------------------
255
+  (0.1ms) rollback transaction
256
+  (0.1ms) begin transaction
257
+ ---------------------------------------------------------------
258
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
259
+ ---------------------------------------------------------------
260
+  (0.1ms) rollback transaction
261
+  (0.1ms) begin transaction
262
+ -----------------------------------------------
263
+ ControllerSpecificAssetsTest: test_if_is_module
264
+ -----------------------------------------------
265
+  (0.0ms) rollback transaction
266
+  (0.1ms) begin transaction
267
+ -----------------------------------------------------------
268
+ ControllerSpecificAssetsTest: test_existing_javascript_file
269
+ -----------------------------------------------------------
270
+  (0.1ms) rollback transaction
271
+  (0.2ms) begin transaction
272
+ -----------------------------------------------------------
273
+ ControllerSpecificAssetsTest: test_existing_javascript_file
274
+ -----------------------------------------------------------
275
+  (0.1ms) rollback transaction
276
+  (0.1ms) begin transaction
277
+ -----------------------------------------------
278
+ ControllerSpecificAssetsTest: test_if_is_module
279
+ -----------------------------------------------
280
+  (0.0ms) rollback transaction
281
+  (0.1ms) begin transaction
282
+ ---------------------------------------------------------------
283
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
284
+ ---------------------------------------------------------------
285
+  (0.0ms) rollback transaction
286
+  (0.1ms) begin transaction
287
+ ---------------------------------------------------------------
288
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
289
+ ---------------------------------------------------------------
290
+  (0.1ms) rollback transaction
291
+  (0.1ms) begin transaction
292
+ --------------------------------------------------------
293
+ ControllerSpecificAssetsTest: test_non_existing_css_file
294
+ --------------------------------------------------------
295
+  (0.1ms) rollback transaction
296
+  (0.0ms) begin transaction
297
+ -----------------------------------------------
298
+ ControllerSpecificAssetsTest: test_if_is_module
299
+ -----------------------------------------------
300
+  (0.0ms) rollback transaction
301
+  (0.0ms) begin transaction
302
+ -----------------------------------------------------------
303
+ ControllerSpecificAssetsTest: test_existing_javascript_file
304
+ -----------------------------------------------------------
305
+  (0.0ms) rollback transaction
306
+  (0.1ms) begin transaction
307
+ ----------------------------------------------------
308
+ ControllerSpecificAssetsTest: test_existing_css_file
309
+ ----------------------------------------------------
310
+  (0.1ms) rollback transaction
311
+  (0.1ms) begin transaction
312
+ --------------------------------------------------------
313
+ ControllerSpecificAssetsTest: test_non_existing_css_file
314
+ --------------------------------------------------------
315
+  (0.0ms) rollback transaction
316
+  (0.1ms) begin transaction
317
+ -----------------------------------------------
318
+ ControllerSpecificAssetsTest: test_if_is_module
319
+ -----------------------------------------------
320
+  (0.0ms) rollback transaction
321
+  (0.1ms) begin transaction
322
+ -----------------------------------------------------------
323
+ ControllerSpecificAssetsTest: test_existing_javascript_file
324
+ -----------------------------------------------------------
325
+  (0.0ms) rollback transaction
326
+  (0.0ms) begin transaction
327
+ ---------------------------------------------------------------
328
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
329
+ ---------------------------------------------------------------
330
+  (0.0ms) rollback transaction
331
+  (0.1ms) begin transaction
332
+ -----------------------------------------------------------
333
+ ControllerSpecificAssetsTest: test_existing_javascript_file
334
+ -----------------------------------------------------------
335
+  (0.1ms) rollback transaction
336
+  (0.1ms) begin transaction
337
+ ---------------------------------------------------------------
338
+ ControllerSpecificAssetsTest: test_non_existing_javascript_file
339
+ ---------------------------------------------------------------
340
+  (0.0ms) rollback transaction
341
+  (0.0ms) begin transaction
342
+ -----------------------------------------------
343
+ ControllerSpecificAssetsTest: test_if_is_module
344
+ -----------------------------------------------
345
+  (0.0ms) rollback transaction
346
+  (0.0ms) begin transaction
347
+ --------------------------------------------------------
348
+ ControllerSpecificAssetsTest: test_non_existing_css_file
349
+ --------------------------------------------------------
350
+  (0.0ms) rollback transaction
351
+  (0.1ms) begin transaction
352
+ ----------------------------------------------------
353
+ ControllerSpecificAssetsTest: test_existing_css_file
354
+ ----------------------------------------------------
355
+  (0.1ms) rollback transaction
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: controller-specific-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakub Bilko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-21 00:00:00.000000000 Z
11
+ date: 2015-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -55,11 +55,13 @@ files:
55
55
  - lib/controller_specific_assets/railtie.rb
56
56
  - lib/controller_specific_assets/version.rb
57
57
  - lib/tasks/controller_specific_assets_tasks.rake
58
- - test/controller_specific_assets_test.rb
58
+ - test/controller-specific-assets_test.rb
59
59
  - test/dummy/README.rdoc
60
60
  - test/dummy/Rakefile
61
61
  - test/dummy/app/assets/javascripts/application.js
62
+ - test/dummy/app/assets/javascripts/controller_users.js
62
63
  - test/dummy/app/assets/stylesheets/application.css
64
+ - test/dummy/app/assets/stylesheets/controller_users.css
63
65
  - test/dummy/app/controllers/application_controller.rb
64
66
  - test/dummy/app/helpers/application_helper.rb
65
67
  - test/dummy/app/views/layouts/application.html.erb
@@ -86,6 +88,8 @@ files:
86
88
  - test/dummy/config/locales/en.yml
87
89
  - test/dummy/config/routes.rb
88
90
  - test/dummy/config/secrets.yml
91
+ - test/dummy/db/test.sqlite3
92
+ - test/dummy/log/test.log
89
93
  - test/dummy/public/404.html
90
94
  - test/dummy/public/422.html
91
95
  - test/dummy/public/500.html
@@ -116,9 +120,11 @@ signing_key:
116
120
  specification_version: 4
117
121
  summary: A gem for using controller-specific javascript and css files.
118
122
  test_files:
119
- - test/controller_specific_assets_test.rb
123
+ - test/controller-specific-assets_test.rb
120
124
  - test/dummy/app/assets/javascripts/application.js
125
+ - test/dummy/app/assets/javascripts/controller_users.js
121
126
  - test/dummy/app/assets/stylesheets/application.css
127
+ - test/dummy/app/assets/stylesheets/controller_users.css
122
128
  - test/dummy/app/controllers/application_controller.rb
123
129
  - test/dummy/app/helpers/application_helper.rb
124
130
  - test/dummy/app/views/layouts/application.html.erb
@@ -145,6 +151,8 @@ test_files:
145
151
  - test/dummy/config/routes.rb
146
152
  - test/dummy/config/secrets.yml
147
153
  - test/dummy/config.ru
154
+ - test/dummy/db/test.sqlite3
155
+ - test/dummy/log/test.log
148
156
  - test/dummy/public/404.html
149
157
  - test/dummy/public/422.html
150
158
  - test/dummy/public/500.html
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- class ControllerSpecificAssetsTest < ActiveSupport::TestCase
4
- test "truth" do
5
- assert_kind_of Module, ControllerSpecificAssets
6
- end
7
- end