dossier 2.4.0 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. data/README.markdown +28 -3
  2. data/app/views/dossier/reports/show.html.haml +1 -1
  3. data/config/routes.rb +1 -1
  4. data/lib/dossier/query.rb +1 -1
  5. data/lib/dossier/report.rb +4 -0
  6. data/lib/dossier/version.rb +1 -1
  7. data/lib/generators/dossier/views/templates/show.html.haml +21 -0
  8. data/lib/generators/dossier/views/views_generator.rb +12 -0
  9. data/spec/dossier/query_spec.rb +46 -27
  10. data/spec/dossier/report_spec.rb +19 -0
  11. data/spec/dummy/config/database.yml +1 -1
  12. data/spec/dummy/db/test.sqlite3 +0 -0
  13. data/spec/dummy/log/development.log +508 -28
  14. data/spec/dummy/log/test.log +879 -26190
  15. data/spec/dummy/tmp/cache/assets/C35/BF0/sprockets%2F64292e0008108df585a755f2876c7869 +0 -0
  16. data/spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  17. data/spec/dummy/tmp/cache/assets/D00/EF0/sprockets%2F4e1e8b85785ee1929c8e355c96902e9c +0 -0
  18. data/spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  19. data/spec/dummy/tmp/cache/assets/D45/6A0/sprockets%2F22f3562bf7d5e640880df2a5d683f2fc +0 -0
  20. data/spec/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  21. data/spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  22. data/spec/dummy/tmp/cache/assets/DCF/420/sprockets%2F9f127ea0ab7236994d1ceaa7bbea86c8 +0 -0
  23. data/spec/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  24. data/spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  25. data/spec/fixtures/db/mysql2.yml +2 -2
  26. data/spec/generators/dossier/views/views_spec.rb +25 -0
  27. data/spec/spec_helper.rb +1 -0
  28. data/spec/support/factory.rb +2 -2
  29. metadata +55 -15
@@ -1,5 +1,5 @@
1
- adapter: mysql2
2
1
  database: dossier_test
3
2
  host: localhost
4
3
  username: root
5
- password: yePassworde
4
+ password: rubyr3d!
5
+ adapter: mysql2
@@ -0,0 +1,25 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'dossier:views' do
4
+ context "with no arguments or options" do
5
+
6
+ before :each do
7
+ FileUtils.rm_rf("spec/dummy/app/views/dossier/reports/show.html.haml")
8
+ end
9
+
10
+ it "should generate a view file" do
11
+ FileTest.exists?(Rails.root.join("app" "views" "dossier" "show.html.haml"))
12
+ end
13
+ end
14
+
15
+ with_args "account_tracker" do
16
+
17
+ before :each do
18
+ FileUtils.rm_rf("spec/dummy/app/views/dossier/reports/account_tracker.html.haml")
19
+ end
20
+
21
+ it "should generate a edit_account form" do
22
+ FileTest.exists?(Rails.root.join("app" "views" "dossier" "account_tracker.html.haml"))
23
+ end
24
+ end
25
+ end
data/spec/spec_helper.rb CHANGED
@@ -5,6 +5,7 @@ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
5
  require "rails/test_help"
6
6
  require 'rspec/rails'
7
7
  require 'pry'
8
+ require 'genspec'
8
9
 
9
10
  Rails.backtrace_cleaner.remove_silencers!
10
11
 
@@ -10,11 +10,11 @@ module Dossier
10
10
  end
11
11
 
12
12
  def mysql2_client
13
- @mysql2_client ||= Dossier::Client.new(DB_CONFIG[:mysql2])
13
+ @mysql2_client ||= Dossier::Client.new(DB_CONFIG.fetch(:mysql2))
14
14
  end
15
15
 
16
16
  def sqlite3_client
17
- @sqlite3_client ||= Dossier::Client.new(DB_CONFIG[:sqlite3])
17
+ @sqlite3_client ||= Dossier::Client.new(DB_CONFIG.fetch(:sqlite3))
18
18
  end
19
19
 
20
20
  def mysql2_connection
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dossier
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,14 +11,14 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-02-14 00:00:00.000000000 Z
14
+ date: 2013-05-06 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: arel
18
18
  requirement: !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
- - - ~>
21
+ - - ! '>='
22
22
  - !ruby/object:Gem::Version
23
23
  version: '3.0'
24
24
  type: :runtime
@@ -26,7 +26,7 @@ dependencies:
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  none: false
28
28
  requirements:
29
- - - ~>
29
+ - - ! '>='
30
30
  - !ruby/object:Gem::Version
31
31
  version: '3.0'
32
32
  - !ruby/object:Gem::Dependency
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirement: !ruby/object:Gem::Requirement
35
35
  none: false
36
36
  requirements:
37
- - - ~>
37
+ - - ! '>='
38
38
  - !ruby/object:Gem::Version
39
39
  version: '3.2'
40
40
  type: :runtime
@@ -42,7 +42,7 @@ dependencies:
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  none: false
44
44
  requirements:
45
- - - ~>
45
+ - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '3.2'
48
48
  - !ruby/object:Gem::Dependency
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirement: !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
- - - ~>
53
+ - - ! '>='
54
54
  - !ruby/object:Gem::Version
55
55
  version: '3.2'
56
56
  type: :runtime
@@ -58,7 +58,7 @@ dependencies:
58
58
  version_requirements: !ruby/object:Gem::Requirement
59
59
  none: false
60
60
  requirements:
61
- - - ~>
61
+ - - ! '>='
62
62
  - !ruby/object:Gem::Version
63
63
  version: '3.2'
64
64
  - !ruby/object:Gem::Dependency
@@ -66,7 +66,7 @@ dependencies:
66
66
  requirement: !ruby/object:Gem::Requirement
67
67
  none: false
68
68
  requirements:
69
- - - ~>
69
+ - - ! '>='
70
70
  - !ruby/object:Gem::Version
71
71
  version: '3.2'
72
72
  type: :runtime
@@ -74,7 +74,7 @@ dependencies:
74
74
  version_requirements: !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements:
77
- - - ~>
77
+ - - ! '>='
78
78
  - !ruby/object:Gem::Version
79
79
  version: '3.2'
80
80
  - !ruby/object:Gem::Dependency
@@ -82,7 +82,7 @@ dependencies:
82
82
  requirement: !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
- - - ~>
85
+ - - ! '>='
86
86
  - !ruby/object:Gem::Version
87
87
  version: '3.2'
88
88
  type: :runtime
@@ -90,7 +90,7 @@ dependencies:
90
90
  version_requirements: !ruby/object:Gem::Requirement
91
91
  none: false
92
92
  requirements:
93
- - - ~>
93
+ - - ! '>='
94
94
  - !ruby/object:Gem::Version
95
95
  version: '3.2'
96
96
  - !ruby/object:Gem::Dependency
@@ -173,6 +173,22 @@ dependencies:
173
173
  - - ! '>='
174
174
  - !ruby/object:Gem::Version
175
175
  version: 2.12.0
176
+ - !ruby/object:Gem::Dependency
177
+ name: genspec
178
+ requirement: !ruby/object:Gem::Requirement
179
+ none: false
180
+ requirements:
181
+ - - ~>
182
+ - !ruby/object:Gem::Version
183
+ version: 0.2.7
184
+ type: :development
185
+ prerelease: false
186
+ version_requirements: !ruby/object:Gem::Requirement
187
+ none: false
188
+ requirements:
189
+ - - ~>
190
+ - !ruby/object:Gem::Version
191
+ version: 0.2.7
176
192
  description: Easy SQL based report generation with the ability to accept request parameters
177
193
  and render multiple formats.
178
194
  email:
@@ -204,6 +220,8 @@ files:
204
220
  - lib/dossier/version.rb
205
221
  - lib/dossier/xls.rb
206
222
  - lib/dossier.rb
223
+ - lib/generators/dossier/views/templates/show.html.haml
224
+ - lib/generators/dossier/views/views_generator.rb
207
225
  - lib/tasks/dossier_tasks.rake
208
226
  - MIT-LICENSE
209
227
  - Rakefile
@@ -254,6 +272,16 @@ files:
254
272
  - spec/dummy/Rakefile
255
273
  - spec/dummy/README.rdoc
256
274
  - spec/dummy/script/rails
275
+ - spec/dummy/tmp/cache/assets/C35/BF0/sprockets%2F64292e0008108df585a755f2876c7869
276
+ - spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
277
+ - spec/dummy/tmp/cache/assets/D00/EF0/sprockets%2F4e1e8b85785ee1929c8e355c96902e9c
278
+ - spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
279
+ - spec/dummy/tmp/cache/assets/D45/6A0/sprockets%2F22f3562bf7d5e640880df2a5d683f2fc
280
+ - spec/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655
281
+ - spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
282
+ - spec/dummy/tmp/cache/assets/DCF/420/sprockets%2F9f127ea0ab7236994d1ceaa7bbea86c8
283
+ - spec/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994
284
+ - spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af
257
285
  - spec/fixtures/db/mysql2.yml
258
286
  - spec/fixtures/db/mysql2.yml.example
259
287
  - spec/fixtures/db/sqlite3.yml
@@ -265,6 +293,7 @@ files:
265
293
  - spec/fixtures/reports/employee_with_custom_view.html
266
294
  - spec/fixtures/reports/employee_with_footer.html
267
295
  - spec/fixtures/reports/employee_with_parameters.html
296
+ - spec/generators/dossier/views/views_spec.rb
268
297
  - spec/requests/employee_spec.rb
269
298
  - spec/requests/employee_with_custom_client_spec.rb
270
299
  - spec/requests/employee_with_custom_controller_spec.rb
@@ -290,7 +319,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
290
319
  version: '0'
291
320
  segments:
292
321
  - 0
293
- hash: -2757475280969566520
322
+ hash: 2711006704364315577
294
323
  required_rubygems_version: !ruby/object:Gem::Requirement
295
324
  none: false
296
325
  requirements:
@@ -299,10 +328,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
299
328
  version: '0'
300
329
  segments:
301
330
  - 0
302
- hash: -2757475280969566520
331
+ hash: 2711006704364315577
303
332
  requirements: []
304
333
  rubyforge_project:
305
- rubygems_version: 1.8.24
334
+ rubygems_version: 1.8.23
306
335
  signing_key:
307
336
  specification_version: 3
308
337
  summary: SQL based report generation.
@@ -353,6 +382,16 @@ test_files:
353
382
  - spec/dummy/Rakefile
354
383
  - spec/dummy/README.rdoc
355
384
  - spec/dummy/script/rails
385
+ - spec/dummy/tmp/cache/assets/C35/BF0/sprockets%2F64292e0008108df585a755f2876c7869
386
+ - spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
387
+ - spec/dummy/tmp/cache/assets/D00/EF0/sprockets%2F4e1e8b85785ee1929c8e355c96902e9c
388
+ - spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
389
+ - spec/dummy/tmp/cache/assets/D45/6A0/sprockets%2F22f3562bf7d5e640880df2a5d683f2fc
390
+ - spec/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655
391
+ - spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
392
+ - spec/dummy/tmp/cache/assets/DCF/420/sprockets%2F9f127ea0ab7236994d1ceaa7bbea86c8
393
+ - spec/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994
394
+ - spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af
356
395
  - spec/fixtures/db/mysql2.yml
357
396
  - spec/fixtures/db/mysql2.yml.example
358
397
  - spec/fixtures/db/sqlite3.yml
@@ -364,6 +403,7 @@ test_files:
364
403
  - spec/fixtures/reports/employee_with_custom_view.html
365
404
  - spec/fixtures/reports/employee_with_footer.html
366
405
  - spec/fixtures/reports/employee_with_parameters.html
406
+ - spec/generators/dossier/views/views_spec.rb
367
407
  - spec/requests/employee_spec.rb
368
408
  - spec/requests/employee_with_custom_client_spec.rb
369
409
  - spec/requests/employee_with_custom_controller_spec.rb