easy_reports 0.0.22 → 0.0.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +21 -21
  3. data/Gemfile +19 -19
  4. data/MIT-LICENSE +20 -20
  5. data/README.md +31 -31
  6. data/Rakefile +10 -10
  7. data/app/assets/javascripts/application.js +10 -10
  8. data/app/assets/javascripts/bootstrap.js +3 -3
  9. data/app/assets/javascripts/easy_reports/application.js +17 -16
  10. data/app/assets/javascripts/easy_reports/database_configs.js +2 -2
  11. data/app/assets/javascripts/easy_reports/reports.js +2 -2
  12. data/app/assets/stylesheets/application.css +8 -8
  13. data/app/assets/stylesheets/easy_reports/application.css +17 -16
  14. data/app/assets/stylesheets/easy_reports/bootstrap_and_overrides.css.less +29 -29
  15. data/app/assets/stylesheets/easy_reports/dashboard/dashboard_content.css +0 -0
  16. data/app/assets/stylesheets/easy_reports/dashboard/sidebar.css +135 -0
  17. data/app/assets/stylesheets/easy_reports/database_configs.css +4 -4
  18. data/app/assets/stylesheets/easy_reports/reports.css +4 -4
  19. data/app/controllers/easy_reports/application_controller.rb +4 -4
  20. data/app/controllers/easy_reports/dashboard_controller.rb +17 -0
  21. data/app/controllers/easy_reports/database_configs_controller.rb +53 -53
  22. data/app/controllers/easy_reports/reports_controller.rb +56 -57
  23. data/app/helpers/easy_reports/application_helper.rb +4 -4
  24. data/app/helpers/easy_reports/database_configs_helper.rb +4 -4
  25. data/app/helpers/easy_reports/reports_helper.rb +4 -4
  26. data/app/models/easy_reports/database_config.rb +4 -4
  27. data/app/models/easy_reports/report.rb +4 -4
  28. data/app/services/easy_reports/database_mediator.rb +36 -18
  29. data/app/views/easy_reports/dashboard/show.html.slim +3 -0
  30. data/app/views/easy_reports/database_configs/_form.html.slim +33 -33
  31. data/app/views/easy_reports/database_configs/edit.html.slim +8 -8
  32. data/app/views/easy_reports/database_configs/index.html.slim +35 -35
  33. data/app/views/easy_reports/database_configs/new.html.slim +5 -5
  34. data/app/views/easy_reports/database_configs/show.html.slim +27 -27
  35. data/app/views/easy_reports/reports/_form.html.slim +17 -15
  36. data/app/views/easy_reports/reports/edit.html.slim +8 -8
  37. data/app/views/easy_reports/reports/index.html.slim +26 -26
  38. data/app/views/easy_reports/reports/new.html.slim +5 -5
  39. data/app/views/easy_reports/reports/show.html.slim +12 -12
  40. data/app/views/layouts/easy_reports/application.html.slim +15 -0
  41. data/app/views/shared/_header.html.slim +60 -0
  42. data/app/views/shared/_sidebar.html.slim +58 -0
  43. data/bin/rails +12 -12
  44. data/config/locales/en.bootstrap.yml +23 -23
  45. data/config/routes.rb +8 -8
  46. data/db/migrate/20141207141745_create_easy_reports_reports.rb +10 -10
  47. data/db/migrate/20141213173509_create_easy_reports_database_configs.rb +16 -16
  48. data/easy_reports.gemspec +36 -35
  49. data/lib/easy_reports.rb +13 -11
  50. data/lib/easy_reports/engine.rb +5 -5
  51. data/lib/easy_reports/version.rb +3 -3
  52. data/lib/tasks/easy_reports_tasks.rake +4 -4
  53. data/test/controllers/easy_reports/database_configs_controller_test.rb +51 -51
  54. data/test/controllers/easy_reports/reports_controller_test.rb +51 -51
  55. data/test/dummy/Gemfile +16 -16
  56. data/test/dummy/Gemfile.lock +129 -129
  57. data/test/dummy/Rakefile +6 -6
  58. data/test/dummy/app/assets/javascripts/application.js +13 -13
  59. data/test/dummy/app/assets/javascripts/bootstrap.js +4 -4
  60. data/test/dummy/app/assets/stylesheets/application.css +15 -15
  61. data/test/dummy/app/assets/stylesheets/bootstrap_and_overrides.css.less +29 -29
  62. data/test/dummy/app/controllers/application_controller.rb +5 -5
  63. data/test/dummy/app/helpers/application_helper.rb +2 -2
  64. data/test/dummy/app/views/layouts/application.html.erb +14 -14
  65. data/test/dummy/bin/bundle +3 -3
  66. data/test/dummy/bin/rails +4 -4
  67. data/test/dummy/bin/rake +4 -4
  68. data/test/dummy/config.ru +4 -4
  69. data/test/dummy/config/application.rb +23 -23
  70. data/test/dummy/config/boot.rb +5 -5
  71. data/test/dummy/config/database.yml +25 -25
  72. data/test/dummy/config/environment.rb +5 -5
  73. data/test/dummy/config/environments/development.rb +37 -37
  74. data/test/dummy/config/environments/production.rb +82 -82
  75. data/test/dummy/config/environments/test.rb +39 -39
  76. data/test/dummy/config/initializers/assets.rb +8 -8
  77. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -7
  78. data/test/dummy/config/initializers/cookies_serializer.rb +2 -2
  79. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -4
  80. data/test/dummy/config/initializers/inflections.rb +16 -16
  81. data/test/dummy/config/initializers/mime_types.rb +4 -4
  82. data/test/dummy/config/initializers/session_store.rb +3 -3
  83. data/test/dummy/config/initializers/wrap_parameters.rb +14 -14
  84. data/test/dummy/config/locales/en.bootstrap.yml +23 -23
  85. data/test/dummy/config/locales/en.yml +23 -23
  86. data/test/dummy/config/routes.rb +4 -4
  87. data/test/dummy/config/secrets.yml +22 -22
  88. data/test/dummy/db/migrate/20141214161417_create_easy_reports_reports.easy_reports.rb +11 -11
  89. data/test/dummy/db/migrate/20141214161418_create_easy_reports_database_configs.easy_reports.rb +17 -17
  90. data/test/dummy/public/404.html +67 -67
  91. data/test/dummy/public/422.html +67 -67
  92. data/test/dummy/public/500.html +66 -66
  93. data/test/fixtures/easy_reports/database_configs.yml +19 -19
  94. data/test/fixtures/easy_reports/reports.yml +9 -9
  95. data/test/helpers/easy_reports/database_configs_helper_test.rb +6 -6
  96. data/test/helpers/easy_reports/reports_helper_test.rb +6 -6
  97. data/test/models/easy_reports/database_config_test.rb +9 -9
  98. data/test/models/easy_reports/report_test.rb +9 -9
  99. metadata +24 -5
  100. data/app/assets/stylesheets/scaffold.css +0 -56
  101. data/app/views/layouts/easy_reports/application.html.erb +0 -14
@@ -1,23 +1,23 @@
1
- # Sample localization file for English. Add more files in this directory for other locales.
2
- # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
-
4
- en:
5
- breadcrumbs:
6
- application:
7
- root: "Index"
8
- pages:
9
- pages: "Pages"
10
- helpers:
11
- actions: "Actions"
12
- links:
13
- back: "Back"
14
- cancel: "Cancel"
15
- confirm: "Are you sure?"
16
- destroy: "Delete"
17
- new: "New"
18
- edit: "Edit"
19
- titles:
20
- edit: "Edit %{model}"
21
- save: "Save %{model}"
22
- new: "New %{model}"
23
- delete: "Delete %{model}"
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ breadcrumbs:
6
+ application:
7
+ root: "Index"
8
+ pages:
9
+ pages: "Pages"
10
+ helpers:
11
+ actions: "Actions"
12
+ links:
13
+ back: "Back"
14
+ cancel: "Cancel"
15
+ confirm: "Are you sure?"
16
+ destroy: "Delete"
17
+ new: "New"
18
+ edit: "Edit"
19
+ titles:
20
+ edit: "Edit %{model}"
21
+ save: "Save %{model}"
22
+ new: "New %{model}"
23
+ delete: "Delete %{model}"
data/config/routes.rb CHANGED
@@ -1,8 +1,8 @@
1
- EasyReports::Engine.routes.draw do
2
-
3
- root to: 'reports#index'
4
- get 'dashboard', to: 'reports#index', as: 'reports'
5
- resource :report
6
-
7
- resources :database_configs
8
- end
1
+ EasyReports::Engine.routes.draw do
2
+
3
+ root to: 'dashboard#show'
4
+ get 'dashboard', to: 'dashboard#show', as: 'dashboard'
5
+ resource :report
6
+
7
+ resources :database_configs
8
+ end
@@ -1,10 +1,10 @@
1
- class CreateEasyReportsReports < ActiveRecord::Migration
2
- def change
3
- create_table :easy_reports_reports do |t|
4
- t.string :title
5
- t.text :description
6
-
7
- t.timestamps
8
- end
9
- end
10
- end
1
+ class CreateEasyReportsReports < ActiveRecord::Migration
2
+ def change
3
+ create_table :easy_reports_reports do |t|
4
+ t.string :title
5
+ t.text :description
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -1,16 +1,16 @@
1
- class CreateEasyReportsDatabaseConfigs < ActiveRecord::Migration
2
- def change
3
- create_table :easy_reports_database_configs do |t|
4
- t.string :adapter
5
- t.string :encoding
6
- t.integer :pool
7
- t.string :username
8
- t.string :password
9
- t.string :host
10
- t.integer :port
11
- t.string :database_name
12
-
13
- t.timestamps
14
- end
15
- end
16
- end
1
+ class CreateEasyReportsDatabaseConfigs < ActiveRecord::Migration
2
+ def change
3
+ create_table :easy_reports_database_configs do |t|
4
+ t.string :adapter
5
+ t.string :encoding
6
+ t.integer :pool
7
+ t.string :username
8
+ t.string :password
9
+ t.string :host
10
+ t.integer :port
11
+ t.string :database_name
12
+
13
+ t.timestamps
14
+ end
15
+ end
16
+ end
data/easy_reports.gemspec CHANGED
@@ -1,35 +1,36 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
-
5
- # Maintain your gem's version:
6
- require "easy_reports/version"
7
-
8
- # Describe your gem and declare its dependencies:
9
- Gem::Specification.new do |spec|
10
- spec.name = "easy_reports"
11
- spec.version = EasyReports::VERSION
12
- spec.authors = ["Davydenkov Mihail"]
13
- spec.email = ["davydenkov_m@gmail.com"]
14
- spec.summary = %q{Add reports dashboard in your rails app}
15
- spec.description = %q{Rails engine for interactive charts for rails apps.}
16
- spec.homepage = "http://github.com/DavydenkovM/easy_reports.git"
17
- spec.license = "MIT"
18
-
19
- spec.files = `git ls-files -z`.split("\x0")
20
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
22
- spec.require_paths = ["lib"]
23
-
24
- spec.add_dependency "rails", "~> 4.1.8"
25
-
26
- spec.add_development_dependency "bundler", "~> 1.7"
27
- spec.add_development_dependency "rake", "~> 10.0"
28
- spec.add_dependency "slim"
29
- spec.add_dependency "pg"
30
- spec.add_dependency "therubyracer"
31
- spec.add_dependency "less-rails"
32
- spec.add_dependency "jquery-rails"
33
- spec.add_dependency 'twitter-bootstrap-rails'
34
- spec.add_dependency "sequel"
35
- end
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ # Maintain your gem's version:
6
+ require "easy_reports/version"
7
+
8
+ # Describe your gem and declare its dependencies:
9
+ Gem::Specification.new do |spec|
10
+ spec.name = "easy_reports"
11
+ spec.version = EasyReports::VERSION
12
+ spec.authors = ["Davydenkov Mihail"]
13
+ spec.email = ["davydenkov.mihail@gmail.com"]
14
+ spec.summary = %q{Add reports dashboard in your rails app}
15
+ spec.description = %q{Rails engine for interactive charts for rails apps.}
16
+ spec.homepage = "http://github.com/DavydenkovM/easy_reports.git"
17
+ spec.license = "MIT"
18
+
19
+ spec.files = `git ls-files -z`.split("\x0")
20
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
22
+ spec.require_paths = ["lib"]
23
+
24
+ spec.add_dependency "rails", "~> 4.1.8"
25
+
26
+ spec.add_development_dependency "bundler", "~> 1.7"
27
+ spec.add_development_dependency "rake", "~> 10.0"
28
+ spec.add_dependency 'slim'
29
+ spec.add_dependency 'pg'
30
+ spec.add_dependency 'therubyracer'
31
+ spec.add_dependency 'less-rails'
32
+ spec.add_dependency 'jquery-rails'
33
+ spec.add_dependency 'twitter-bootstrap-rails'
34
+ spec.add_dependency 'bootstrap-select-rails'
35
+ spec.add_dependency 'sequel'
36
+ end
data/lib/easy_reports.rb CHANGED
@@ -1,11 +1,13 @@
1
- require 'easy_reports/engine'
2
- require 'easy_reports/version'
3
- require 'sequel'
4
- require 'pg'
5
- require 'therubyracer'
6
- require 'less-rails'
7
- require 'jquery-rails'
8
- require 'twitter-bootstrap-rails'
9
-
10
- module EasyReports
11
- end
1
+ require 'easy_reports/engine'
2
+ require 'easy_reports/version'
3
+ require 'sequel'
4
+ require 'pg'
5
+ require 'therubyracer'
6
+ require 'less-rails'
7
+ require 'jquery-rails'
8
+ require 'twitter-bootstrap-rails'
9
+ require 'bootstrap-select-rails'
10
+ require 'slim'
11
+
12
+ module EasyReports
13
+ end
@@ -1,5 +1,5 @@
1
- module EasyReports
2
- class Engine < ::Rails::Engine
3
- isolate_namespace EasyReports
4
- end
5
- end
1
+ module EasyReports
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace EasyReports
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
- module EasyReports
2
- VERSION = "0.0.22"
3
- end
1
+ module EasyReports
2
+ VERSION = "0.0.24"
3
+ end
@@ -1,4 +1,4 @@
1
- # desc "Explaining what the task does"
2
- # task :easy_reports do
3
- # # Task goes here
4
- # end
1
+ # desc "Explaining what the task does"
2
+ # task :easy_reports do
3
+ # # Task goes here
4
+ # end
@@ -1,51 +1,51 @@
1
- require 'test_helper'
2
-
3
- module EasyReports
4
- class DatabaseConfigsControllerTest < ActionController::TestCase
5
- setup do
6
- @database_config = database_configs(:one)
7
- end
8
-
9
- test "should get index" do
10
- get :index
11
- assert_response :success
12
- assert_not_nil assigns(:database_configs)
13
- end
14
-
15
- test "should get new" do
16
- get :new
17
- assert_response :success
18
- end
19
-
20
- test "should create database_config" do
21
- assert_difference('DatabaseConfig.count') do
22
- post :create, database_config: { adapter: @database_config.adapter, database: @database_config.database, encoding: @database_config.encoding, host: @database_config.host, password: @database_config.password, pool: @database_config.pool, username: @database_config.username }
23
- end
24
-
25
- assert_redirected_to database_config_path(assigns(:database_config))
26
- end
27
-
28
- test "should show database_config" do
29
- get :show, id: @database_config
30
- assert_response :success
31
- end
32
-
33
- test "should get edit" do
34
- get :edit, id: @database_config
35
- assert_response :success
36
- end
37
-
38
- test "should update database_config" do
39
- patch :update, id: @database_config, database_config: { adapter: @database_config.adapter, database: @database_config.database, encoding: @database_config.encoding, host: @database_config.host, password: @database_config.password, pool: @database_config.pool, username: @database_config.username }
40
- assert_redirected_to database_config_path(assigns(:database_config))
41
- end
42
-
43
- test "should destroy database_config" do
44
- assert_difference('DatabaseConfig.count', -1) do
45
- delete :destroy, id: @database_config
46
- end
47
-
48
- assert_redirected_to database_configs_path
49
- end
50
- end
51
- end
1
+ require 'test_helper'
2
+
3
+ module EasyReports
4
+ class DatabaseConfigsControllerTest < ActionController::TestCase
5
+ setup do
6
+ @database_config = database_configs(:one)
7
+ end
8
+
9
+ test "should get index" do
10
+ get :index
11
+ assert_response :success
12
+ assert_not_nil assigns(:database_configs)
13
+ end
14
+
15
+ test "should get new" do
16
+ get :new
17
+ assert_response :success
18
+ end
19
+
20
+ test "should create database_config" do
21
+ assert_difference('DatabaseConfig.count') do
22
+ post :create, database_config: { adapter: @database_config.adapter, database: @database_config.database, encoding: @database_config.encoding, host: @database_config.host, password: @database_config.password, pool: @database_config.pool, username: @database_config.username }
23
+ end
24
+
25
+ assert_redirected_to database_config_path(assigns(:database_config))
26
+ end
27
+
28
+ test "should show database_config" do
29
+ get :show, id: @database_config
30
+ assert_response :success
31
+ end
32
+
33
+ test "should get edit" do
34
+ get :edit, id: @database_config
35
+ assert_response :success
36
+ end
37
+
38
+ test "should update database_config" do
39
+ patch :update, id: @database_config, database_config: { adapter: @database_config.adapter, database: @database_config.database, encoding: @database_config.encoding, host: @database_config.host, password: @database_config.password, pool: @database_config.pool, username: @database_config.username }
40
+ assert_redirected_to database_config_path(assigns(:database_config))
41
+ end
42
+
43
+ test "should destroy database_config" do
44
+ assert_difference('DatabaseConfig.count', -1) do
45
+ delete :destroy, id: @database_config
46
+ end
47
+
48
+ assert_redirected_to database_configs_path
49
+ end
50
+ end
51
+ end
@@ -1,51 +1,51 @@
1
- require 'test_helper'
2
-
3
- module EasyReports
4
- class ReportsControllerTest < ActionController::TestCase
5
- setup do
6
- @report = reports(:one)
7
- end
8
-
9
- test "should get index" do
10
- get :index
11
- assert_response :success
12
- assert_not_nil assigns(:reports)
13
- end
14
-
15
- test "should get new" do
16
- get :new
17
- assert_response :success
18
- end
19
-
20
- test "should create report" do
21
- assert_difference('Report.count') do
22
- post :create, report: { description: @report.description, title: @report.title }
23
- end
24
-
25
- assert_redirected_to report_path(assigns(:report))
26
- end
27
-
28
- test "should show report" do
29
- get :show, id: @report
30
- assert_response :success
31
- end
32
-
33
- test "should get edit" do
34
- get :edit, id: @report
35
- assert_response :success
36
- end
37
-
38
- test "should update report" do
39
- patch :update, id: @report, report: { description: @report.description, title: @report.title }
40
- assert_redirected_to report_path(assigns(:report))
41
- end
42
-
43
- test "should destroy report" do
44
- assert_difference('Report.count', -1) do
45
- delete :destroy, id: @report
46
- end
47
-
48
- assert_redirected_to reports_path
49
- end
50
- end
51
- end
1
+ require 'test_helper'
2
+
3
+ module EasyReports
4
+ class ReportsControllerTest < ActionController::TestCase
5
+ setup do
6
+ @report = reports(:one)
7
+ end
8
+
9
+ test "should get index" do
10
+ get :index
11
+ assert_response :success
12
+ assert_not_nil assigns(:reports)
13
+ end
14
+
15
+ test "should get new" do
16
+ get :new
17
+ assert_response :success
18
+ end
19
+
20
+ test "should create report" do
21
+ assert_difference('Report.count') do
22
+ post :create, report: { description: @report.description, title: @report.title }
23
+ end
24
+
25
+ assert_redirected_to report_path(assigns(:report))
26
+ end
27
+
28
+ test "should show report" do
29
+ get :show, id: @report
30
+ assert_response :success
31
+ end
32
+
33
+ test "should get edit" do
34
+ get :edit, id: @report
35
+ assert_response :success
36
+ end
37
+
38
+ test "should update report" do
39
+ patch :update, id: @report, report: { description: @report.description, title: @report.title }
40
+ assert_redirected_to report_path(assigns(:report))
41
+ end
42
+
43
+ test "should destroy report" do
44
+ assert_difference('Report.count', -1) do
45
+ delete :destroy, id: @report
46
+ end
47
+
48
+ assert_redirected_to reports_path
49
+ end
50
+ end
51
+ end