killbill-kpm 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a7288e31013f21acf1e11d7df69ff01fb3b5e67e
4
- data.tar.gz: 3cb3c953099c25e77a71a7b1785d9c816fe389f7
3
+ metadata.gz: e0b526927732b98403f915bb5aa897caa396d5a4
4
+ data.tar.gz: 41ae0a610ab4f829e313c91eb8aaeeefc20d6113
5
5
  SHA512:
6
- metadata.gz: c64bdcf508a90eba5cda657b435f7390afe2b6fdae8da2a6f695b3adefa4680779a3e081ea5d67622493c87790591e0b60774efd08423568d01ecaffcae959fa
7
- data.tar.gz: 44933fb023f1fe5fcb7719246352432d80f521ccced0df76dc812c63eebc4c9153fcad79e21ecab2d0f12c14afc12a8d0a63577417215a7ac33eb1e69c4df58b
6
+ metadata.gz: 9ab11576b74b3e49d69d42ead687b4f41bf1b5587efefa90a5aad62c32cbf5ec8e8e17d0da1d3fc4b8880608958d8f38941d2b4f06aeb5c6f3c049dbd72772f7
7
+ data.tar.gz: 8c4b0903024dddb51e0da765625e23149aaf519fddb2a4b91bb30171ada81428b79d75d98c8736f7fbe66b3f2f2093dd6cafec2ae3df4547fddbc48b186e2fc6
data/README.md CHANGED
@@ -11,4 +11,21 @@ Kill Bill compatibility
11
11
  | KPM UI version | Kill Bill version |
12
12
  | -------------: | ----------------: |
13
13
  | 0.1.y | 0.16.z |
14
- | 0.2.y | 0.18.z |
14
+ | 0.2.y | 0.18.z (Rails 4) |
15
+ | 0.3.y | 0.18.z (Rails 5) |
16
+
17
+ Testing
18
+ -------
19
+
20
+ To run the dummy app:
21
+
22
+ ```
23
+ rails s
24
+ ```
25
+
26
+
27
+ To run tests:
28
+
29
+ ```
30
+ rails t
31
+ ```
data/Rakefile CHANGED
@@ -22,7 +22,7 @@ load 'rails/tasks/statistics.rake'
22
22
 
23
23
 
24
24
 
25
- Bundler::GemHelper.install_tasks
25
+ require 'bundler/gem_tasks'
26
26
 
27
27
  require 'rake/testtask'
28
28
 
@@ -10,15 +10,9 @@
10
10
  // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
- //= require js-routes
14
- //= require moment
15
- //= require spin
16
13
  //= require jquery
17
14
  //= require jquery_ujs
18
15
  //= require twitter/bootstrap
19
16
  //= require dataTables/jquery.dataTables
20
17
  //= require dataTables/bootstrap/3/jquery.dataTables.bootstrap
21
- //= require d3
22
- //= require bootstrap-datepicker
23
- //= require jquery.spin
24
18
  //= require kpm/kpm
@@ -11,9 +11,9 @@
11
11
  * file per style scope.
12
12
  *
13
13
  *= require_self
14
- *= require bootstrap-datepicker3
15
14
  *= require dataTables/jquery.dataTables
16
15
  *= require dataTables/bootstrap/3/jquery.dataTables.bootstrap
16
+ *= require font-awesome
17
17
  *= require bootstrap_and_overrides
18
18
  *= require kpm/kpm
19
19
  */
@@ -1,9 +1,5 @@
1
1
  /*
2
2
  *= require twitter-bootstrap-static/bootstrap
3
- *
4
- * Use Font Awesome icons (default)
5
- * To use Glyphicons sprites instead of Font Awesome, replace with "require twitter-bootstrap-static/sprites"
6
- *= require twitter-bootstrap-static/fontawesome
7
3
  */
8
4
 
9
5
  /* Override Bootstrap 3 font locations */
@@ -50,22 +50,22 @@ module KPM
50
50
 
51
51
  def uninstall_plugin
52
52
  trigger_node_plugin_command('UNINSTALL_PLUGIN')
53
- render :nothing => true
53
+ head :ok
54
54
  end
55
55
 
56
56
  def start_plugin
57
57
  trigger_node_plugin_command('START_PLUGIN')
58
- render :nothing => true
58
+ head :ok
59
59
  end
60
60
 
61
61
  def stop_plugin
62
62
  trigger_node_plugin_command('STOP_PLUGIN')
63
- render :nothing => true
63
+ head :ok
64
64
  end
65
65
 
66
66
  def restart_plugin
67
67
  trigger_node_plugin_command('RESTART_PLUGIN')
68
- render :nothing => true
68
+ head :ok
69
69
  end
70
70
 
71
71
  private
@@ -6,10 +6,8 @@
6
6
  # See also https://github.com/carlhuda/bundler/issues/49
7
7
  require 'jquery-rails'
8
8
  require 'jquery-datatables-rails'
9
- require 'bootstrap-datepicker-rails'
10
- require 'd3_rails'
11
- require 'momentjs-rails'
12
- require 'spinjs-rails'
9
+ require 'font-awesome-rails'
10
+ require 'twitter-bootstrap-rails'
13
11
  require 'killbill_client'
14
12
 
15
13
  module KPM
@@ -1,3 +1,3 @@
1
1
  module KPM
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../../config/application', __FILE__)
2
+ APP_PATH = File.expand_path('../config/application', __dir__)
3
3
  require_relative '../config/boot'
4
4
  require 'rails/commands'
@@ -1,29 +1,38 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'pathname'
3
+ require 'fileutils'
4
+ include FileUtils
3
5
 
4
6
  # path to your application root.
5
- APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
7
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
8
 
7
- Dir.chdir APP_ROOT do
9
+ def system!(*args)
10
+ system(*args) || abort("\n== Command #{args} failed ==")
11
+ end
12
+
13
+ chdir APP_ROOT do
8
14
  # This script is a starting point to setup your application.
9
- # Add necessary setup steps to this file:
15
+ # Add necessary setup steps to this file.
16
+
17
+ puts '== Installing dependencies =='
18
+ system! 'gem install bundler --conservative'
19
+ system('bundle check') || system!('bundle install')
20
+
21
+ # Install JavaScript dependencies if using Yarn
22
+ # system('bin/yarn')
10
23
 
11
- puts "== Installing dependencies =="
12
- system "gem install bundler --conservative"
13
- system "bundle check || bundle install"
14
24
 
15
25
  # puts "\n== Copying sample files =="
16
- # unless File.exist?("config/database.yml")
17
- # system "cp config/database.yml.sample config/database.yml"
26
+ # unless File.exist?('config/database.yml')
27
+ # cp 'config/database.yml.sample', 'config/database.yml'
18
28
  # end
19
29
 
20
30
  puts "\n== Preparing database =="
21
- system "bin/rake db:setup"
31
+ system! 'bin/rails db:setup'
22
32
 
23
33
  puts "\n== Removing old logs and tempfiles =="
24
- system "rm -f log/*"
25
- system "rm -rf tmp/cache"
34
+ system! 'bin/rails log:clear tmp:clear'
26
35
 
27
36
  puts "\n== Restarting application server =="
28
- system "touch tmp/restart.txt"
37
+ system! 'bin/rails restart'
29
38
  end
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+ require 'fileutils'
4
+ include FileUtils
5
+
6
+ # path to your application root.
7
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8
+
9
+ def system!(*args)
10
+ system(*args) || abort("\n== Command #{args} failed ==")
11
+ end
12
+
13
+ chdir APP_ROOT do
14
+ # This script is a way to update your development environment automatically.
15
+ # Add necessary update steps to this file.
16
+
17
+ puts '== Installing dependencies =='
18
+ system! 'gem install bundler --conservative'
19
+ system('bundle check') || system!('bundle install')
20
+
21
+ puts "\n== Updating database =="
22
+ system! 'bin/rails db:migrate'
23
+
24
+ puts "\n== Removing old logs and tempfiles =="
25
+ system! 'bin/rails log:clear tmp:clear'
26
+
27
+ puts "\n== Restarting application server =="
28
+ system! 'bin/rails restart'
29
+ end
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+ VENDOR_PATH = File.expand_path('..', __dir__)
3
+ Dir.chdir(VENDOR_PATH) do
4
+ begin
5
+ exec "yarnpkg #{ARGV.join(" ")}"
6
+ rescue Errno::ENOENT
7
+ $stderr.puts "Yarn executable was not detected in the system."
8
+ $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
9
+ exit 1
10
+ end
11
+ end
@@ -1,32 +1,26 @@
1
- require File.expand_path('../boot', __FILE__)
1
+ require_relative 'boot'
2
2
 
3
- require 'rails/all'
3
+ require 'action_controller/railtie'
4
+ require 'action_view/railtie'
5
+ require 'rails/test_unit/railtie'
6
+ require 'sprockets/railtie'
4
7
 
8
+ # Require the gems listed in Gemfile, including any gems
9
+ # you've limited to :test, :development, or :production.
5
10
  Bundler.require(*Rails.groups)
6
- require "kpm"
7
11
 
8
- require "jquery-rails"
9
- require "twitter-bootstrap-rails"
10
- require "d3_rails"
11
-
12
- require "js-routes"
12
+ #
13
+ # Required to load the KPM UI engine into the dummy app
14
+ #
15
+ require File.expand_path('../../../../lib/kpm.rb', __FILE__)
13
16
 
14
17
  module Dummy
15
18
  class Application < Rails::Application
19
+ # Initialize configuration defaults for originally generated Rails version.
20
+ config.load_defaults 5.1
21
+
16
22
  # Settings in config/environments/* take precedence over those specified here.
17
23
  # Application configuration should go into files in config/initializers
18
24
  # -- all .rb files in that directory are automatically loaded.
19
-
20
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
21
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
22
- # config.time_zone = 'Central Time (US & Canada)'
23
-
24
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
25
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
26
- # config.i18n.default_locale = :de
27
-
28
- # Do not swallow errors in after_commit/after_rollback callbacks.
29
- config.active_record.raise_in_transactional_callbacks = true
30
25
  end
31
26
  end
32
-
@@ -1,5 +1,3 @@
1
- # Set up gems listed in the Gemfile.
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
1
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
3
2
 
4
- require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
- $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
3
+ require 'bundler/setup' # Set up gems listed in the Gemfile.
@@ -1,5 +1,5 @@
1
1
  # Load the Rails application.
2
- require File.expand_path('../application', __FILE__)
2
+ require_relative 'application'
3
3
 
4
4
  # Initialize the Rails application.
5
5
  Rails.application.initialize!
@@ -9,33 +9,46 @@ Rails.application.configure do
9
9
  # Do not eager load code on boot.
10
10
  config.eager_load = false
11
11
 
12
- # Show full error reports and disable caching.
13
- config.consider_all_requests_local = true
14
- config.action_controller.perform_caching = false
12
+ # Show full error reports.
13
+ config.consider_all_requests_local = true
14
+
15
+ # Enable/disable caching. By default caching is disabled.
16
+ if Rails.root.join('tmp/caching-dev.txt').exist?
17
+ config.action_controller.perform_caching = true
18
+
19
+ config.cache_store = :memory_store
20
+ config.public_file_server.headers = {
21
+ 'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
22
+ }
23
+ else
24
+ config.action_controller.perform_caching = false
25
+
26
+ config.cache_store = :null_store
27
+ end
15
28
 
16
29
  # Don't care if the mailer can't send.
17
- config.action_mailer.raise_delivery_errors = false
30
+ # config.action_mailer.raise_delivery_errors = false
31
+
32
+ # config.action_mailer.perform_caching = false
18
33
 
19
34
  # Print deprecation notices to the Rails logger.
20
- config.active_support.deprecation = :log
35
+ # config.active_support.deprecation = :log
21
36
 
22
37
  # Raise an error on page load if there are pending migrations.
23
- config.active_record.migration_error = :page_load
38
+ # config.active_record.migration_error = :page_load
24
39
 
25
40
  # Debug mode disables concatenation and preprocessing of assets.
26
41
  # This option may cause significant delays in view rendering with a large
27
42
  # number of complex assets.
28
43
  config.assets.debug = true
29
44
 
30
- # Asset digests allow you to set far-future HTTP expiration dates on all assets,
31
- # yet still be able to expire them through the digest params.
32
- config.assets.digest = true
33
-
34
- # Adds additional error checking when serving assets at runtime.
35
- # Checks for improperly declared sprockets dependencies.
36
- # Raises helpful error messages.
37
- config.assets.raise_runtime_errors = true
45
+ # Suppress logger output for asset requests.
46
+ config.assets.quiet = true
38
47
 
39
48
  # Raises error for missing translations
40
49
  # config.action_view.raise_on_missing_translations = true
50
+
51
+ # Use an evented file watcher to asynchronously detect changes in source code,
52
+ # routes, locales, etc. This feature depends on the listen gem.
53
+ config.file_watcher = ActiveSupport::EventedFileUpdateChecker
41
54
  end
@@ -14,15 +14,14 @@ Rails.application.configure do
14
14
  config.consider_all_requests_local = false
15
15
  config.action_controller.perform_caching = true
16
16
 
17
- # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
- # Add `rack-cache` to your Gemfile before enabling this.
19
- # For large-scale production use, consider using a caching reverse proxy like
20
- # NGINX, varnish or squid.
21
- # config.action_dispatch.rack_cache = true
17
+ # Attempt to read encrypted secrets from `config/secrets.yml.enc`.
18
+ # Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or
19
+ # `config/secrets.yml.key`.
20
+ config.read_encrypted_secrets = true
22
21
 
23
22
  # Disable serving static files from the `/public` folder by default since
24
23
  # Apache or NGINX already handles this.
25
- config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
24
+ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
26
25
 
27
26
  # Compress JavaScripts and CSS.
28
27
  config.assets.js_compressor = :uglifier
@@ -31,16 +30,20 @@ Rails.application.configure do
31
30
  # Do not fallback to assets pipeline if a precompiled asset is missed.
32
31
  config.assets.compile = false
33
32
 
34
- # Asset digests allow you to set far-future HTTP expiration dates on all assets,
35
- # yet still be able to expire them through the digest params.
36
- config.assets.digest = true
37
-
38
33
  # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
39
34
 
35
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
36
+ # config.action_controller.asset_host = 'http://assets.example.com'
37
+
40
38
  # Specifies the header that your server uses for sending files.
41
39
  # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
42
40
  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
43
41
 
42
+ # Mount Action Cable outside main process or domain
43
+ # config.action_cable.mount_path = nil
44
+ # config.action_cable.url = 'wss://example.com/cable'
45
+ # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
46
+
44
47
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
45
48
  # config.force_ssl = true
46
49
 
@@ -49,16 +52,15 @@ Rails.application.configure do
49
52
  config.log_level = :debug
50
53
 
51
54
  # Prepend all log lines with the following tags.
52
- # config.log_tags = [ :subdomain, :uuid ]
53
-
54
- # Use a different logger for distributed setups.
55
- # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
55
+ config.log_tags = [ :request_id ]
56
56
 
57
57
  # Use a different cache store in production.
58
58
  # config.cache_store = :mem_cache_store
59
59
 
60
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
61
- # config.action_controller.asset_host = 'http://assets.example.com'
60
+ # Use a real queuing backend for Active Job (and separate queues per environment)
61
+ # config.active_job.queue_adapter = :resque
62
+ # config.active_job.queue_name_prefix = "dummy_#{Rails.env}"
63
+ # config.action_mailer.perform_caching = false
62
64
 
63
65
  # Ignore bad email addresses and do not raise email delivery errors.
64
66
  # Set this to true and configure the email server for immediate delivery to raise delivery errors.
@@ -74,6 +76,16 @@ Rails.application.configure do
74
76
  # Use default logging formatter so that PID and timestamp are not suppressed.
75
77
  config.log_formatter = ::Logger::Formatter.new
76
78
 
79
+ # Use a different logger for distributed setups.
80
+ # require 'syslog/logger'
81
+ # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
82
+
83
+ if ENV["RAILS_LOG_TO_STDOUT"].present?
84
+ logger = ActiveSupport::Logger.new(STDOUT)
85
+ logger.formatter = config.log_formatter
86
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
87
+ end
88
+
77
89
  # Do not dump schema after migrations.
78
- config.active_record.dump_schema_after_migration = false
90
+ # config.active_record.dump_schema_after_migration = false
79
91
  end
@@ -12,9 +12,11 @@ Rails.application.configure do
12
12
  # preloads Rails for running tests, you may have to set it to true.
13
13
  config.eager_load = false
14
14
 
15
- # Configure static file server for tests with Cache-Control for performance.
16
- config.serve_static_files = true
17
- config.static_cache_control = 'public, max-age=3600'
15
+ # Configure public file server for tests with Cache-Control for performance.
16
+ config.public_file_server.enabled = true
17
+ config.public_file_server.headers = {
18
+ 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}"
19
+ }
18
20
 
19
21
  # Show full error reports and disable caching.
20
22
  config.consider_all_requests_local = true
@@ -25,14 +27,12 @@ Rails.application.configure do
25
27
 
26
28
  # Disable request forgery protection in test environment.
27
29
  config.action_controller.allow_forgery_protection = false
30
+ # config.action_mailer.perform_caching = false
28
31
 
29
32
  # Tell Action Mailer not to deliver emails to the real world.
30
33
  # The :test delivery method accumulates sent emails in the
31
34
  # ActionMailer::Base.deliveries array.
32
- config.action_mailer.delivery_method = :test
33
-
34
- # Randomize the order test cases are executed.
35
- config.active_support.test_order = :random
35
+ # config.action_mailer.delivery_method = :test
36
36
 
37
37
  # Print deprecation notices to the stderr.
38
38
  config.active_support.deprecation = :stderr
@@ -0,0 +1,6 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # ApplicationController.renderer.defaults.merge!(
4
+ # http_host: 'example.org',
5
+ # https: false
6
+ # )
@@ -3,9 +3,12 @@
3
3
  # Version of your assets, change this if you want to expire all your assets.
4
4
  Rails.application.config.assets.version = '1.0'
5
5
 
6
- # Add additional assets to the asset load path
6
+ # Add additional assets to the asset load path.
7
7
  # Rails.application.config.assets.paths << Emoji.images_path
8
+ # Add Yarn node_modules folder to the asset load path.
9
+ Rails.application.config.assets.paths << Rails.root.join('node_modules')
8
10
 
9
11
  # Precompile additional assets.
10
- # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
11
- # Rails.application.config.assets.precompile += %w( search.js )
12
+ # application.js, application.css, and all non-JS/CSS in the app/assets
13
+ # folder are already added.
14
+ # Rails.application.config.assets.precompile += %w( admin.js admin.css )
@@ -1,3 +1,5 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
+ # Specify a serializer for the signed and encrypted cookie jars.
4
+ # Valid options are :json, :marshal, and :hybrid.
3
5
  Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains migration options to ease your Rails 5.1 upgrade.
4
+ #
5
+ # Once upgraded flip defaults one by one to migrate to the new default.
6
+ #
7
+ # Read the Guide for Upgrading Ruby on Rails for more info on each option.
8
+
9
+ # Make `form_with` generate non-remote forms.
10
+ Rails.application.config.action_view.form_with_generates_remote_forms = false
11
+
12
+ # Unknown asset fallback will return the path passed in when the given
13
+ # asset is not present in the asset pipeline.
14
+ # Rails.application.config.assets.unknown_asset_fallback = false
@@ -5,10 +5,10 @@
5
5
 
6
6
  # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
7
  ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
8
+ wrap_parameters format: [:json]
9
9
  end
10
10
 
11
11
  # To enable root element in JSON for ActiveRecord objects.
12
12
  # ActiveSupport.on_load(:active_record) do
13
- # self.include_root_in_json = true
13
+ # self.include_root_in_json = true
14
14
  # end
@@ -16,6 +16,16 @@
16
16
  #
17
17
  # This would use the information in config/locales/es.yml.
18
18
  #
19
+ # The following keys must be escaped otherwise they will not be retrieved by
20
+ # the default I18n backend:
21
+ #
22
+ # true, false, on, off, yes, no
23
+ #
24
+ # Instead, surround them with single quotes.
25
+ #
26
+ # en:
27
+ # 'true': 'foo'
28
+ #
19
29
  # To learn more, please read the Rails Internationalization guide
20
30
  # available at http://guides.rubyonrails.org/i18n.html.
21
31
 
@@ -5,18 +5,28 @@
5
5
 
6
6
  # Make sure the secret is at least 30 characters and all random,
7
7
  # no regular words or you'll be exposed to dictionary attacks.
8
- # You can use `rake secret` to generate a secure secret key.
8
+ # You can use `rails secret` to generate a secure secret key.
9
9
 
10
10
  # Make sure the secrets in this file are kept private
11
11
  # if you're sharing your code publicly.
12
12
 
13
+ # Shared secrets are available across all environments.
14
+
15
+ # shared:
16
+ # api_key: a1B2c3D4e5F6
17
+
18
+ # Environmental secrets are only available for that specific environment.
19
+
13
20
  development:
14
- secret_key_base: 8ccbf616967018087a9cb2f1b4c2b4743e1325e9919037d961caa253f15e64752ca390b1ed029c6f2c493bb86d18929c38553d452a51379935fc98e59da0eba2
21
+ secret_key_base: d7caac0cf08f36249db501a04cfd7209387362e2b76523bd28456e4ea57b0970e05f3f5c54d8f41a28ed8dcdf811dc11212cad6222654f7077cd56cc4ef049a5
15
22
 
16
23
  test:
17
- secret_key_base: 7cef8be3acaa03d7b323cdd703f4fc31ec659597aee08a0974601e3777832ff61b9866bbe6143efc43e7dfafb3c0f1ec24503ecceb77704712c244acbcaaa410
24
+ secret_key_base: c1a5a88127a62f1309ab4cf6a991e730fdc9cad7981724fd97dac70a0265c374f5001750b5a05309808aa4534534ad2ffac576491e2452582e2c8279a37e16ef
25
+
26
+ # Do not keep production secrets in the unencrypted secrets file.
27
+ # Instead, either read values from the environment.
28
+ # Or, use `bin/rails secrets:setup` to configure encrypted secrets
29
+ # and move the `production:` environment over there.
18
30
 
19
- # Do not keep production secrets in the repository,
20
- # instead read values from the environment.
21
31
  production:
22
32
  secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -1,8 +1,17 @@
1
1
  require 'test_helper'
2
2
 
3
3
  class NavigationTest < ActionDispatch::IntegrationTest
4
- # test "the truth" do
5
- # assert true
6
- # end
4
+
5
+ include KPM::Engine.routes.url_helpers
6
+
7
+ test 'can see the nodes info page' do
8
+ get '/kpm'
9
+ assert_response :success
10
+ end
11
+
12
+ test 'can restart bundle' do
13
+ post '/kpm/nodes_info/plugin/restart?plugin_name=org.apache.felix.shell'
14
+ assert_response :success
15
+ end
7
16
  end
8
17
 
@@ -1,7 +1,8 @@
1
1
  require 'test_helper'
2
2
 
3
3
  class KPMTest < ActiveSupport::TestCase
4
- test "truth" do
4
+
5
+ test 'can load KPM module' do
5
6
  assert_kind_of Module, KPM
6
7
  end
7
8
  end
@@ -2,8 +2,6 @@
2
2
  ENV["RAILS_ENV"] = "test"
3
3
 
4
4
  require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
5
- ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
6
- ActiveRecord::Migrator.migrations_paths << File.expand_path('../../db/migrate', __FILE__)
7
5
  require "rails/test_help"
8
6
 
9
7
  # Filter out Minitest backtrace while allowing backtrace from other libraries
metadata CHANGED
@@ -1,323 +1,141 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill-kpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kill Bill core team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-13 00:00:00.000000000 Z
11
+ date: 2017-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
- version_requirements: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ~>
18
- - !ruby/object:Gem::Version
19
- version: 4.2.1
20
15
  requirement: !ruby/object:Gem::Requirement
21
16
  requirements:
22
- - - ~>
17
+ - - "~>"
23
18
  - !ruby/object:Gem::Version
24
- version: 4.2.1
25
- prerelease: false
19
+ version: '5.1'
26
20
  type: :runtime
27
- - !ruby/object:Gem::Dependency
28
- name: js-routes
21
+ prerelease: false
29
22
  version_requirements: !ruby/object:Gem::Requirement
30
23
  requirements:
31
- - - ~>
24
+ - - "~>"
32
25
  - !ruby/object:Gem::Version
33
- version: '1.1'
34
- requirement: !ruby/object:Gem::Requirement
35
- requirements:
36
- - - ~>
37
- - !ruby/object:Gem::Version
38
- version: '1.1'
39
- prerelease: false
40
- type: :runtime
26
+ version: '5.1'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: jquery-rails
43
- version_requirements: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ~>
46
- - !ruby/object:Gem::Version
47
- version: 3.0.4
48
29
  requirement: !ruby/object:Gem::Requirement
49
30
  requirements:
50
- - - ~>
31
+ - - "~>"
51
32
  - !ruby/object:Gem::Version
52
- version: 3.0.4
53
- prerelease: false
33
+ version: '4.3'
54
34
  type: :runtime
55
- - !ruby/object:Gem::Dependency
56
- name: jquery-datatables-rails
57
- version_requirements: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ~>
60
- - !ruby/object:Gem::Version
61
- version: 3.3.0
62
- requirement: !ruby/object:Gem::Requirement
63
- requirements:
64
- - - ~>
65
- - !ruby/object:Gem::Version
66
- version: 3.3.0
67
35
  prerelease: false
68
- type: :runtime
69
- - !ruby/object:Gem::Dependency
70
- name: money-rails
71
36
  version_requirements: !ruby/object:Gem::Requirement
72
37
  requirements:
73
- - - ~>
38
+ - - "~>"
74
39
  - !ruby/object:Gem::Version
75
- version: 1.3.0
76
- requirement: !ruby/object:Gem::Requirement
77
- requirements:
78
- - - ~>
79
- - !ruby/object:Gem::Version
80
- version: 1.3.0
81
- prerelease: false
82
- type: :runtime
40
+ version: '4.3'
83
41
  - !ruby/object:Gem::Dependency
84
- name: d3_rails
85
- version_requirements: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ~>
88
- - !ruby/object:Gem::Version
89
- version: 3.2.8
42
+ name: jquery-datatables-rails
90
43
  requirement: !ruby/object:Gem::Requirement
91
44
  requirements:
92
- - - ~>
45
+ - - "~>"
93
46
  - !ruby/object:Gem::Version
94
- version: 3.2.8
95
- prerelease: false
47
+ version: '3.3'
96
48
  type: :runtime
97
- - !ruby/object:Gem::Dependency
98
- name: twitter-bootstrap-rails
99
- version_requirements: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ~>
102
- - !ruby/object:Gem::Version
103
- version: 3.2.0
104
- requirement: !ruby/object:Gem::Requirement
105
- requirements:
106
- - - ~>
107
- - !ruby/object:Gem::Version
108
- version: 3.2.0
109
49
  prerelease: false
110
- type: :runtime
111
- - !ruby/object:Gem::Dependency
112
- name: spinjs-rails
113
50
  version_requirements: !ruby/object:Gem::Requirement
114
51
  requirements:
115
- - - ~>
52
+ - - "~>"
116
53
  - !ruby/object:Gem::Version
117
- version: '1.4'
118
- requirement: !ruby/object:Gem::Requirement
119
- requirements:
120
- - - ~>
121
- - !ruby/object:Gem::Version
122
- version: '1.4'
123
- prerelease: false
124
- type: :runtime
54
+ version: '3.3'
125
55
  - !ruby/object:Gem::Dependency
126
- name: bootstrap-datepicker-rails
127
- version_requirements: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ~>
130
- - !ruby/object:Gem::Version
131
- version: 1.4.0
56
+ name: twitter-bootstrap-rails
132
57
  requirement: !ruby/object:Gem::Requirement
133
58
  requirements:
134
- - - ~>
59
+ - - ">="
135
60
  - !ruby/object:Gem::Version
136
- version: 1.4.0
137
- prerelease: false
61
+ version: '0'
138
62
  type: :runtime
139
- - !ruby/object:Gem::Dependency
140
- name: momentjs-rails
141
- version_requirements: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ~>
144
- - !ruby/object:Gem::Version
145
- version: 2.10.6
146
- requirement: !ruby/object:Gem::Requirement
147
- requirements:
148
- - - ~>
149
- - !ruby/object:Gem::Version
150
- version: 2.10.6
151
63
  prerelease: false
152
- type: :runtime
153
- - !ruby/object:Gem::Dependency
154
- name: killbill-client
155
64
  version_requirements: !ruby/object:Gem::Requirement
156
65
  requirements:
157
- - - ~>
158
- - !ruby/object:Gem::Version
159
- version: '1.0'
160
- requirement: !ruby/object:Gem::Requirement
161
- requirements:
162
- - - ~>
66
+ - - ">="
163
67
  - !ruby/object:Gem::Version
164
- version: '1.0'
165
- prerelease: false
166
- type: :runtime
68
+ version: '0'
167
69
  - !ruby/object:Gem::Dependency
168
- name: devise
169
- version_requirements: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ~>
172
- - !ruby/object:Gem::Version
173
- version: 3.4.1
70
+ name: font-awesome-rails
174
71
  requirement: !ruby/object:Gem::Requirement
175
72
  requirements:
176
- - - ~>
73
+ - - "~>"
177
74
  - !ruby/object:Gem::Version
178
- version: 3.4.1
179
- prerelease: false
75
+ version: '4.7'
180
76
  type: :runtime
181
- - !ruby/object:Gem::Dependency
182
- name: cancan
183
- version_requirements: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - ~>
186
- - !ruby/object:Gem::Version
187
- version: 1.6.10
188
- requirement: !ruby/object:Gem::Requirement
189
- requirements:
190
- - - ~>
191
- - !ruby/object:Gem::Version
192
- version: 1.6.10
193
77
  prerelease: false
194
- type: :runtime
195
- - !ruby/object:Gem::Dependency
196
- name: carmen-rails
197
78
  version_requirements: !ruby/object:Gem::Requirement
198
79
  requirements:
199
- - - ~>
200
- - !ruby/object:Gem::Version
201
- version: 1.0.0
202
- requirement: !ruby/object:Gem::Requirement
203
- requirements:
204
- - - ~>
80
+ - - "~>"
205
81
  - !ruby/object:Gem::Version
206
- version: 1.0.0
207
- prerelease: false
208
- type: :runtime
82
+ version: '4.7'
209
83
  - !ruby/object:Gem::Dependency
210
- name: symmetric-encryption
211
- version_requirements: !ruby/object:Gem::Requirement
212
- requirements:
213
- - - ~>
214
- - !ruby/object:Gem::Version
215
- version: 3.6.0
84
+ name: killbill-client
216
85
  requirement: !ruby/object:Gem::Requirement
217
86
  requirements:
218
- - - ~>
87
+ - - "~>"
219
88
  - !ruby/object:Gem::Version
220
- version: 3.6.0
221
- prerelease: false
89
+ version: '1.0'
222
90
  type: :runtime
223
- - !ruby/object:Gem::Dependency
224
- name: fakeweb
91
+ prerelease: false
225
92
  version_requirements: !ruby/object:Gem::Requirement
226
93
  requirements:
227
- - - ~>
94
+ - - "~>"
228
95
  - !ruby/object:Gem::Version
229
- version: '1.3'
230
- requirement: !ruby/object:Gem::Requirement
231
- requirements:
232
- - - ~>
233
- - !ruby/object:Gem::Version
234
- version: '1.3'
235
- prerelease: false
236
- type: :development
96
+ version: '1.0'
237
97
  - !ruby/object:Gem::Dependency
238
98
  name: rake
239
- version_requirements: !ruby/object:Gem::Requirement
240
- requirements:
241
- - - '>='
242
- - !ruby/object:Gem::Version
243
- version: 0.8.7
244
99
  requirement: !ruby/object:Gem::Requirement
245
100
  requirements:
246
- - - '>='
101
+ - - ">="
247
102
  - !ruby/object:Gem::Version
248
- version: 0.8.7
249
- prerelease: false
103
+ version: '0'
250
104
  type: :development
251
- - !ruby/object:Gem::Dependency
252
- name: simplecov
105
+ prerelease: false
253
106
  version_requirements: !ruby/object:Gem::Requirement
254
107
  requirements:
255
- - - '>='
108
+ - - ">="
256
109
  - !ruby/object:Gem::Version
257
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: simplecov
258
113
  requirement: !ruby/object:Gem::Requirement
259
114
  requirements:
260
- - - '>='
115
+ - - ">="
261
116
  - !ruby/object:Gem::Version
262
117
  version: '0'
263
- prerelease: false
264
118
  type: :development
265
- - !ruby/object:Gem::Dependency
266
- name: activerecord-jdbc-adapter
267
- version_requirements: !ruby/object:Gem::Requirement
268
- requirements:
269
- - - ~>
270
- - !ruby/object:Gem::Version
271
- version: 1.3.9
272
- requirement: !ruby/object:Gem::Requirement
273
- requirements:
274
- - - ~>
275
- - !ruby/object:Gem::Version
276
- version: 1.3.9
277
119
  prerelease: false
278
- type: :development
279
- - !ruby/object:Gem::Dependency
280
- name: activerecord-jdbcmysql-adapter
281
120
  version_requirements: !ruby/object:Gem::Requirement
282
121
  requirements:
283
- - - ~>
122
+ - - ">="
284
123
  - !ruby/object:Gem::Version
285
- version: 1.3.9
286
- requirement: !ruby/object:Gem::Requirement
287
- requirements:
288
- - - ~>
289
- - !ruby/object:Gem::Version
290
- version: 1.3.9
291
- prerelease: false
292
- type: :development
124
+ version: '0'
293
125
  - !ruby/object:Gem::Dependency
294
- name: activerecord-jdbcsqlite3-adapter
295
- version_requirements: !ruby/object:Gem::Requirement
296
- requirements:
297
- - - ~>
298
- - !ruby/object:Gem::Version
299
- version: 1.3.9
126
+ name: listen
300
127
  requirement: !ruby/object:Gem::Requirement
301
128
  requirements:
302
- - - ~>
129
+ - - ">="
303
130
  - !ruby/object:Gem::Version
304
- version: 1.3.9
305
- prerelease: false
131
+ version: '0'
306
132
  type: :development
307
- - !ruby/object:Gem::Dependency
308
- name: jdbc-mysql
133
+ prerelease: false
309
134
  version_requirements: !ruby/object:Gem::Requirement
310
135
  requirements:
311
- - - ~>
136
+ - - ">="
312
137
  - !ruby/object:Gem::Version
313
- version: 5.1.25
314
- requirement: !ruby/object:Gem::Requirement
315
- requirements:
316
- - - ~>
317
- - !ruby/object:Gem::Version
318
- version: 5.1.25
319
- prerelease: false
320
- type: :development
138
+ version: '0'
321
139
  description: Rails UI plugin for the KPM plugin.
322
140
  email: killbilling-users@googlegroups.com
323
141
  executables: []
@@ -358,14 +176,16 @@ files:
358
176
  - test/dummy/bin/rails
359
177
  - test/dummy/bin/rake
360
178
  - test/dummy/bin/setup
179
+ - test/dummy/bin/update
180
+ - test/dummy/bin/yarn
361
181
  - test/dummy/config.ru
362
182
  - test/dummy/config/application.rb
363
183
  - test/dummy/config/boot.rb
364
- - test/dummy/config/database.yml
365
184
  - test/dummy/config/environment.rb
366
185
  - test/dummy/config/environments/development.rb
367
186
  - test/dummy/config/environments/production.rb
368
187
  - test/dummy/config/environments/test.rb
188
+ - test/dummy/config/initializers/application_controller_renderer.rb
369
189
  - test/dummy/config/initializers/assets.rb
370
190
  - test/dummy/config/initializers/backtrace_silencers.rb
371
191
  - test/dummy/config/initializers/cookies_serializer.rb
@@ -373,6 +193,7 @@ files:
373
193
  - test/dummy/config/initializers/inflections.rb
374
194
  - test/dummy/config/initializers/killbill_client.rb
375
195
  - test/dummy/config/initializers/mime_types.rb
196
+ - test/dummy/config/initializers/new_framework_defaults_5_1.rb
376
197
  - test/dummy/config/initializers/session_store.rb
377
198
  - test/dummy/config/initializers/wrap_parameters.rb
378
199
  - test/dummy/config/locales/en.yml
@@ -385,55 +206,58 @@ homepage: http://www.killbill.io
385
206
  licenses:
386
207
  - MIT
387
208
  metadata: {}
388
- post_install_message:
209
+ post_install_message:
389
210
  rdoc_options: []
390
211
  require_paths:
391
212
  - lib
392
213
  required_ruby_version: !ruby/object:Gem::Requirement
393
214
  requirements:
394
- - - '>='
215
+ - - ">="
395
216
  - !ruby/object:Gem::Version
396
217
  version: '0'
397
218
  required_rubygems_version: !ruby/object:Gem::Requirement
398
219
  requirements:
399
- - - '>='
220
+ - - ">="
400
221
  - !ruby/object:Gem::Version
401
222
  version: '0'
402
223
  requirements: []
403
- rubyforge_project:
404
- rubygems_version: 2.4.6
405
- signing_key:
224
+ rubyforge_project:
225
+ rubygems_version: 2.6.13
226
+ signing_key:
406
227
  specification_version: 4
407
228
  summary: Kill Bill KPM UI mountable engine
408
229
  test_files:
409
230
  - test/test_helper.rb
410
- - test/kpm_test.rb
411
231
  - test/integration/navigation_test.rb
412
- - test/dummy/Rakefile
413
- - test/dummy/README.rdoc
414
- - test/dummy/config.ru
415
232
  - test/dummy/config/secrets.yml
233
+ - test/dummy/config/locales/en.yml
416
234
  - test/dummy/config/environment.rb
417
235
  - test/dummy/config/routes.rb
418
- - test/dummy/config/database.yml
419
- - test/dummy/config/boot.rb
420
- - test/dummy/config/application.rb
421
- - test/dummy/config/locales/en.yml
422
236
  - test/dummy/config/environments/test.rb
423
237
  - test/dummy/config/environments/production.rb
424
238
  - test/dummy/config/environments/development.rb
239
+ - test/dummy/config/initializers/new_framework_defaults_5_1.rb
425
240
  - test/dummy/config/initializers/inflections.rb
426
241
  - test/dummy/config/initializers/assets.rb
427
242
  - test/dummy/config/initializers/backtrace_silencers.rb
428
243
  - test/dummy/config/initializers/killbill_client.rb
429
244
  - test/dummy/config/initializers/filter_parameter_logging.rb
430
245
  - test/dummy/config/initializers/mime_types.rb
246
+ - test/dummy/config/initializers/application_controller_renderer.rb
431
247
  - test/dummy/config/initializers/cookies_serializer.rb
432
248
  - test/dummy/config/initializers/session_store.rb
433
249
  - test/dummy/config/initializers/wrap_parameters.rb
250
+ - test/dummy/config/boot.rb
251
+ - test/dummy/config/application.rb
252
+ - test/dummy/Rakefile
253
+ - test/dummy/README.rdoc
434
254
  - test/dummy/app/controllers/application_controller.rb
435
255
  - test/dummy/app/helpers/application_helper.rb
256
+ - test/dummy/config.ru
436
257
  - test/dummy/bin/rake
437
258
  - test/dummy/bin/bundle
259
+ - test/dummy/bin/update
438
260
  - test/dummy/bin/setup
261
+ - test/dummy/bin/yarn
439
262
  - test/dummy/bin/rails
263
+ - test/kpm_test.rb
@@ -1,23 +0,0 @@
1
- # SQLite version 3.x
2
- # gem 'activerecord-jdbcsqlite3-adapter'
3
- #
4
- # Configure Using Gemfile
5
- # gem 'activerecord-jdbcsqlite3-adapter'
6
- #
7
- default: &default
8
- adapter: sqlite3
9
-
10
- development:
11
- <<: *default
12
- database: db/development.sqlite3
13
-
14
- # Warning: The database defined as "test" will be erased and
15
- # re-generated from your development database when you run "rake".
16
- # Do not set this db to the same as development or production.
17
- test:
18
- <<: *default
19
- database: db/test.sqlite3
20
-
21
- production:
22
- <<: *default
23
- database: db/production.sqlite3