payola_spy 0.0.1

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.
Files changed (74) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +34 -0
  4. data/app/assets/javascripts/payola_spy/application.js +15 -0
  5. data/app/assets/javascripts/payola_spy/stripe_webhooks.js +2 -0
  6. data/app/assets/javascripts/payola_spy/subscriptions.js +2 -0
  7. data/app/assets/stylesheets/payola_spy/application.css.scss +18 -0
  8. data/app/assets/stylesheets/payola_spy/stripe_webhooks.css +4 -0
  9. data/app/assets/stylesheets/payola_spy/subscriptions.css +4 -0
  10. data/app/controllers/payola_spy/application_controller.rb +4 -0
  11. data/app/controllers/payola_spy/stripe_webhooks_controller.rb +13 -0
  12. data/app/controllers/payola_spy/subscriptions_controller.rb +13 -0
  13. data/app/helpers/payola_spy/application_helper.rb +4 -0
  14. data/app/helpers/payola_spy/stripe_webhooks_helper.rb +4 -0
  15. data/app/helpers/payola_spy/subscriptions_helper.rb +4 -0
  16. data/app/views/kaminari/bootstrap/_first_page.html.erb +3 -0
  17. data/app/views/kaminari/bootstrap/_gap.html.erb +3 -0
  18. data/app/views/kaminari/bootstrap/_last_page.html.erb +3 -0
  19. data/app/views/kaminari/bootstrap/_next_page.html.erb +3 -0
  20. data/app/views/kaminari/bootstrap/_page.html.erb +9 -0
  21. data/app/views/kaminari/bootstrap/_paginator.html.erb +15 -0
  22. data/app/views/kaminari/bootstrap/_prev_page.html.erb +3 -0
  23. data/app/views/layouts/payola_spy/_header.html.erb +21 -0
  24. data/app/views/layouts/payola_spy/application.html.erb +15 -0
  25. data/app/views/payola_spy/stripe_webhooks/index.html.erb +20 -0
  26. data/app/views/payola_spy/stripe_webhooks/show.html.erb +16 -0
  27. data/app/views/payola_spy/subscriptions/index.html.erb +22 -0
  28. data/app/views/payola_spy/subscriptions/show.html.erb +15 -0
  29. data/config/routes.rb +7 -0
  30. data/lib/payola_spy/engine.rb +5 -0
  31. data/lib/payola_spy/version.rb +3 -0
  32. data/lib/payola_spy.rb +5 -0
  33. data/lib/tasks/payola_spy_tasks.rake +4 -0
  34. data/test/controllers/payola_spy/stripe_webhooks_controller_test.rb +16 -0
  35. data/test/controllers/payola_spy/subscriptions_controller_test.rb +16 -0
  36. data/test/dummy/README.rdoc +28 -0
  37. data/test/dummy/Rakefile +6 -0
  38. data/test/dummy/app/assets/javascripts/application.js +13 -0
  39. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  40. data/test/dummy/app/controllers/application_controller.rb +5 -0
  41. data/test/dummy/app/helpers/application_helper.rb +2 -0
  42. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  43. data/test/dummy/bin/bundle +3 -0
  44. data/test/dummy/bin/rails +4 -0
  45. data/test/dummy/bin/rake +4 -0
  46. data/test/dummy/config/application.rb +23 -0
  47. data/test/dummy/config/boot.rb +5 -0
  48. data/test/dummy/config/database.yml +25 -0
  49. data/test/dummy/config/environment.rb +5 -0
  50. data/test/dummy/config/environments/development.rb +37 -0
  51. data/test/dummy/config/environments/production.rb +78 -0
  52. data/test/dummy/config/environments/test.rb +39 -0
  53. data/test/dummy/config/initializers/assets.rb +8 -0
  54. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  55. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  56. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  57. data/test/dummy/config/initializers/inflections.rb +16 -0
  58. data/test/dummy/config/initializers/mime_types.rb +4 -0
  59. data/test/dummy/config/initializers/session_store.rb +3 -0
  60. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  61. data/test/dummy/config/locales/en.yml +23 -0
  62. data/test/dummy/config/routes.rb +4 -0
  63. data/test/dummy/config/secrets.yml +22 -0
  64. data/test/dummy/config.ru +4 -0
  65. data/test/dummy/public/404.html +67 -0
  66. data/test/dummy/public/422.html +67 -0
  67. data/test/dummy/public/500.html +66 -0
  68. data/test/dummy/public/favicon.ico +0 -0
  69. data/test/helpers/payola_spy/stripe_webhooks_helper_test.rb +6 -0
  70. data/test/helpers/payola_spy/subscriptions_helper_test.rb +6 -0
  71. data/test/integration/navigation_test.rb +10 -0
  72. data/test/payola_spy_test.rb +7 -0
  73. data/test/test_helper.rb +17 -0
  74. metadata +240 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7e08e63166a356ea882975b103a0c256988a7ca0
4
+ data.tar.gz: ec30487440f2fc745cb3a26aac34c396c0be1166
5
+ SHA512:
6
+ metadata.gz: 0a7a9f34c97177de9bcf73f8a38cd90fb3956e3ee166f9b79d05b19d5f932e786a04a469b17246d4e33bcc6c0f9a99045cd66e53727c012c7b855b77823aab25
7
+ data.tar.gz: 7d35cae6626ba834db987c214435fefaa95e8dedee22697de1fe74a7c808823cb271e38f8ae680de24acee47a4bb46ac645f9d40d89fcead9768eef04bf4245a
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2015 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,34 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'PayolaSpy'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+
21
+
22
+ Bundler::GemHelper.install_tasks
23
+
24
+ require 'rake/testtask'
25
+
26
+ Rake::TestTask.new(:test) do |t|
27
+ t.libs << 'lib'
28
+ t.libs << 'test'
29
+ t.pattern = 'test/**/*_test.rb'
30
+ t.verbose = false
31
+ end
32
+
33
+
34
+ task default: :test
@@ -0,0 +1,15 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
14
+ //= require jquery
15
+ //= require bootstrap
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,18 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
16
+
17
+ @import "bootstrap-sprockets";
18
+ @import "bootstrap";
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,4 @@
1
+ module PayolaSpy
2
+ class ApplicationController < ActionController::Base
3
+ end
4
+ end
@@ -0,0 +1,13 @@
1
+ require_dependency "payola_spy/application_controller"
2
+
3
+ module PayolaSpy
4
+ class StripeWebhooksController < ApplicationController
5
+ def index
6
+ @stripe_webhooks = Payola::StripeWebhook.order("created_at desc").page params[:page]
7
+ end
8
+
9
+ def show
10
+ @stripe_webhook = Payola::StripeWebhook.find params[:id]
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require_dependency "payola_spy/application_controller"
2
+
3
+ module PayolaSpy
4
+ class SubscriptionsController < ApplicationController
5
+ def index
6
+ @subscriptions = Payola::Subscription.order("created_at desc").page params[:page]
7
+ end
8
+
9
+ def show
10
+ @subscription = Payola::Subscription.find_by_guid! params[:id]
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,4 @@
1
+ module PayolaSpy
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module PayolaSpy
2
+ module StripeWebhooksHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module PayolaSpy
2
+ module SubscriptionsHelper
3
+ end
4
+ end
@@ -0,0 +1,3 @@
1
+ <li>
2
+ <%= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote %>
3
+ </li>
@@ -0,0 +1,3 @@
1
+ <li class='disabled'>
2
+ <%= content_tag :a, raw(t 'views.pagination.truncate') %>
3
+ </li>
@@ -0,0 +1,3 @@
1
+ <li>
2
+ <%= link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote} %>
3
+ </li>
@@ -0,0 +1,3 @@
1
+ <li>
2
+ <%= link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote %>
3
+ </li>
@@ -0,0 +1,9 @@
1
+ <% if page.current? %>
2
+ <li class='active'>
3
+ <%= content_tag :a, page, remote: remote, rel: (page.next? ? 'next' : (page.prev? ? 'prev' : nil)) %>
4
+ </li>
5
+ <% else %>
6
+ <li>
7
+ <%= link_to page, url, remote: remote, rel: (page.next? ? 'next' : (page.prev? ? 'prev' : nil)) %>
8
+ </li>
9
+ <% end %>
@@ -0,0 +1,15 @@
1
+ <%= paginator.render do -%>
2
+ <ul class="pagination">
3
+ <%= first_page_tag unless current_page.first? %>
4
+ <%= prev_page_tag unless current_page.first? %>
5
+ <% each_page do |page| -%>
6
+ <% if page.left_outer? || page.right_outer? || page.inside_window? -%>
7
+ <%= page_tag page %>
8
+ <% elsif !page.was_truncated? -%>
9
+ <%= gap_tag %>
10
+ <% end -%>
11
+ <% end -%>
12
+ <%= next_page_tag unless current_page.last? %>
13
+ <%= last_page_tag unless current_page.last? %>
14
+ </ul>
15
+ <% end -%>
@@ -0,0 +1,3 @@
1
+ <li>
2
+ <%= link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote %>
3
+ </li>
@@ -0,0 +1,21 @@
1
+ <!-- Static navbar -->
2
+ <nav class="navbar navbar-default navbar-static-top">
3
+ <div class="container">
4
+ <div class="navbar-header">
5
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
6
+ <span class="sr-only">Toggle navigation</span>
7
+ <span class="icon-bar"></span>
8
+ <span class="icon-bar"></span>
9
+ <span class="icon-bar"></span>
10
+ </button>
11
+ <%= link_to "PayolaSpy", payola_spy.root_path, class: 'navbar-brand' %>
12
+ </div>
13
+ <div id="navbar" class="navbar-collapse collapse">
14
+
15
+ <ul class="nav navbar-nav navbar-right">
16
+ <li><%= link_to "Subscriptions", subscriptions_path %></li>
17
+ <li><%= link_to "Stripe Webhooks", stripe_webhooks_path %></li>
18
+ </ul>
19
+ </div><!--/.nav-collapse -->
20
+ </div>
21
+ </nav>
@@ -0,0 +1,15 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>PayolaSpy</title>
5
+ <%= stylesheet_link_tag "payola_spy/application", media: "all" %>
6
+ <%= javascript_include_tag "payola_spy/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+ <%= render 'layouts/payola_spy/header' %>
11
+ <div class="container">
12
+ <%= yield %>
13
+ </div>
14
+ </body>
15
+ </html>
@@ -0,0 +1,20 @@
1
+ <h1>StripeWebhooks (<%= @stripe_webhooks.total_count %> total)</h1>
2
+
3
+ <table class="table table-hover table-striped">
4
+ <tr>
5
+ <th>Id</th>
6
+ <th>Date</th>
7
+ <th>Stripe ID</th>
8
+ </tr>
9
+ <% @stripe_webhooks.each do |stripe_webhook| %>
10
+ <tr>
11
+ <td><%= link_to stripe_webhook.id, stripe_webhook_path(stripe_webhook.id) %></td>
12
+ <td><%= time_ago_in_words(stripe_webhook.created_at) %> ago</td>
13
+ <td><%= stripe_webhook.stripe_id %></td>
14
+ </tr>
15
+ <% end %>
16
+ </table>
17
+ <nav>
18
+ <%= paginate @stripe_webhooks, :theme => 'bootstrap' %>
19
+ </nav>
20
+
@@ -0,0 +1,16 @@
1
+ <h1>Stripe Webhook #<%= @stripe_webhook.id %></h1>
2
+ <table class="table table-hover table-striped">
3
+ <tr>
4
+ <th>Attribute</th>
5
+ <th>Value</th>
6
+ </tr>
7
+ <% @stripe_webhook.attributes.sort.each do |key,value| %>
8
+ <tr>
9
+ <td><%= key %></td>
10
+ <td><%= value %></td>
11
+ </tr>
12
+ <% end %>
13
+ </table>
14
+
15
+ <%= link_to "Back", stripe_webhooks_path, :class => 'btn btn-primary' %>
16
+
@@ -0,0 +1,22 @@
1
+ <h1>Subscriptions (<%= @subscriptions.total_count %> total)</h1>
2
+ <table class="table table-hover table-striped">
3
+ <tr>
4
+ <th>Guid</th>
5
+ <th>Date</th>
6
+ <th>State</th>
7
+ <th>Email</th>
8
+ <th class="text-right">Amount</th>
9
+ </tr>
10
+ <% @subscriptions.each do |subscription| %>
11
+ <tr>
12
+ <td><%= link_to subscription.guid, subscription_path(subscription.guid) %></td>
13
+ <td><%= time_ago_in_words(subscription.created_at) %> ago</td>
14
+ <td><%= subscription.state %></td>
15
+ <td><%= subscription.email %></td>
16
+ <td class="text-right"><%= subscription.amount %></td>
17
+ </tr>
18
+ <% end %>
19
+ </table>
20
+ <nav>
21
+ <%= paginate @subscriptions, :theme => 'bootstrap' %>
22
+ </nav>
@@ -0,0 +1,15 @@
1
+ <h1>Subscriptions #<%= @subscription.guid %></h1>
2
+ <table class="table table-hover table-striped">
3
+ <tr>
4
+ <th>Attribute</th>
5
+ <th>Value</th>
6
+ </tr>
7
+ <% @subscription.attributes.sort.each do |key,value| %>
8
+ <tr>
9
+ <td><%= key %></td>
10
+ <td><%= value %></td>
11
+ </tr>
12
+ <% end %>
13
+ </table>
14
+
15
+ <%= link_to "Back", subscriptions_path, :class => 'btn btn-primary' %>
data/config/routes.rb ADDED
@@ -0,0 +1,7 @@
1
+ PayolaSpy::Engine.routes.draw do
2
+
3
+ resources :subscriptions, :only => [:index,:show]
4
+ resources :stripe_webhooks, :only => [:index,:show]
5
+
6
+ root 'subscriptions#index'
7
+ end
@@ -0,0 +1,5 @@
1
+ module PayolaSpy
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace PayolaSpy
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module PayolaSpy
2
+ VERSION = "0.0.1"
3
+ end
data/lib/payola_spy.rb ADDED
@@ -0,0 +1,5 @@
1
+ require "payola_spy/engine"
2
+ require 'kaminari'
3
+
4
+ module PayolaSpy
5
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :payola_spy do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,16 @@
1
+ require 'test_helper'
2
+
3
+ module PayolaSpy
4
+ class StripeWebhooksControllerTest < ActionController::TestCase
5
+ test "should get index" do
6
+ get :index
7
+ assert_response :success
8
+ end
9
+
10
+ test "should get show" do
11
+ get :show
12
+ assert_response :success
13
+ end
14
+
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ require 'test_helper'
2
+
3
+ module PayolaSpy
4
+ class SubscriptionsControllerTest < ActionController::TestCase
5
+ test "should get index" do
6
+ get :index
7
+ assert_response :success
8
+ end
9
+
10
+ test "should get show" do
11
+ get :show
12
+ assert_response :success
13
+ end
14
+
15
+ end
16
+ end
@@ -0,0 +1,28 @@
1
+ == README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
25
+
26
+
27
+ Please feel free to use a different markup language if you do not plan to run
28
+ <tt>rake doc:app</tt>.
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+
6
+ Rails.application.load_tasks
@@ -0,0 +1,13 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,5 @@
1
+ class ApplicationController < ActionController::Base
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
5
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
+ <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,23 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require(*Rails.groups)
6
+ require "payola_spy"
7
+
8
+ module Dummy
9
+ class Application < Rails::Application
10
+ # Settings in config/environments/* take precedence over those specified here.
11
+ # Application configuration should go into files in config/initializers
12
+ # -- all .rb files in that directory are automatically loaded.
13
+
14
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
15
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
16
+ # config.time_zone = 'Central Time (US & Canada)'
17
+
18
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
+ # config.i18n.default_locale = :de
21
+ end
22
+ end
23
+
@@ -0,0 +1,5 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
+ $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ #
7
+ default: &default
8
+ adapter: sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ development:
13
+ <<: *default
14
+ database: db/development.sqlite3
15
+
16
+ # Warning: The database defined as "test" will be erased and
17
+ # re-generated from your development database when you run "rake".
18
+ # Do not set this db to the same as development or production.
19
+ test:
20
+ <<: *default
21
+ database: db/test.sqlite3
22
+
23
+ production:
24
+ <<: *default
25
+ database: db/production.sqlite3
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -0,0 +1,37 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
+
12
+ # Show full error reports and disable caching.
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send.
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger.
20
+ config.active_support.deprecation = :log
21
+
22
+ # Raise an error on page load if there are pending migrations.
23
+ config.active_record.migration_error = :page_load
24
+
25
+ # Debug mode disables concatenation and preprocessing of assets.
26
+ # This option may cause significant delays in view rendering with a large
27
+ # number of complex assets.
28
+ config.assets.debug = true
29
+
30
+ # Adds additional error checking when serving assets at runtime.
31
+ # Checks for improperly declared sprockets dependencies.
32
+ # Raises helpful error messages.
33
+ config.assets.raise_runtime_errors = true
34
+
35
+ # Raises error for missing translations
36
+ # config.action_view.raise_on_missing_translations = true
37
+ end