lazy_high_charts 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/GEM_VERSION +1 -1
  4. data/MIT-LICENSE +1 -1
  5. data/README.md +53 -14
  6. data/lib/lazy_high_charts.rb +4 -0
  7. data/spec/dummy_nanoc/.gitignore +3 -0
  8. data/spec/dummy_nanoc/Gemfile +7 -0
  9. data/spec/dummy_nanoc/README.md +18 -0
  10. data/spec/dummy_nanoc/Rules +44 -0
  11. data/spec/dummy_nanoc/content/index.html +7 -0
  12. data/spec/dummy_nanoc/content/stylesheet.css +101 -0
  13. data/spec/dummy_nanoc/layouts/default.html +32 -0
  14. data/spec/dummy_nanoc/lib/default.rb +30 -0
  15. data/spec/dummy_nanoc/nanoc.yaml +59 -0
  16. data/spec/dummy_nanoc/output/index.html +42 -0
  17. data/spec/dummy_nanoc/output/style.css +101 -0
  18. data/spec/dummy_rails/.gitignore +20 -0
  19. data/spec/dummy_rails/Gemfile +20 -0
  20. data/spec/dummy_rails/README.md +9 -0
  21. data/spec/dummy_rails/Rakefile +7 -0
  22. data/spec/dummy_rails/app/assets/javascripts/application.js +20 -0
  23. data/spec/dummy_rails/app/assets/stylesheets/application.css.scss +13 -0
  24. data/spec/dummy_rails/app/controllers/application_controller.rb +83 -0
  25. data/spec/dummy_rails/app/helpers/application_helper.rb +3 -0
  26. data/spec/dummy_rails/app/mailers/.gitkeep +0 -0
  27. data/spec/dummy_rails/app/views/application/charts.erb +10 -0
  28. data/spec/dummy_rails/app/views/layouts/application.html.erb +12 -0
  29. data/spec/dummy_rails/config.ru +4 -0
  30. data/spec/dummy_rails/config/application.rb +25 -0
  31. data/spec/dummy_rails/config/boot.rb +11 -0
  32. data/spec/dummy_rails/config/database.yml +13 -0
  33. data/spec/dummy_rails/config/environment.rb +6 -0
  34. data/spec/dummy_rails/config/environments/development.rb +23 -0
  35. data/spec/dummy_rails/config/environments/production.rb +80 -0
  36. data/spec/dummy_rails/config/environments/test.rb +36 -0
  37. data/spec/dummy_rails/config/initializers/backtrace_silencers.rb +8 -0
  38. data/spec/dummy_rails/config/initializers/inflections.rb +16 -0
  39. data/spec/dummy_rails/config/initializers/mime_types.rb +6 -0
  40. data/spec/dummy_rails/config/initializers/secret_token.rb +8 -0
  41. data/spec/dummy_rails/config/initializers/session_store.rb +9 -0
  42. data/spec/dummy_rails/config/initializers/wrap_parameters.rb +15 -0
  43. data/spec/dummy_rails/config/locales/devise.en.yml +58 -0
  44. data/spec/dummy_rails/config/locales/en.yml +5 -0
  45. data/spec/dummy_rails/config/locales/simple_form.en.yml +26 -0
  46. data/spec/dummy_rails/config/routes.rb +6 -0
  47. data/spec/dummy_rails/db/migrate/20140224051640_create_users.rb +11 -0
  48. data/spec/dummy_rails/db/migrate/20140224063709_add_last_name_to_user.rb +5 -0
  49. data/spec/dummy_rails/db/migrate/20140225014314_create_log_data.rb +12 -0
  50. data/spec/dummy_rails/db/migrate/20140227015551_create_posts.rb +9 -0
  51. data/spec/dummy_rails/db/schema.rb +39 -0
  52. data/spec/dummy_rails/db/schema_migrations.json +1 -0
  53. data/spec/dummy_rails/lib/assets/.gitkeep +0 -0
  54. data/spec/dummy_rails/lib/templates/erb/scaffold/_form.html.erb +13 -0
  55. data/spec/dummy_rails/log/.gitkeep +0 -0
  56. data/spec/dummy_rails/public/404.html +26 -0
  57. data/spec/dummy_rails/public/422.html +26 -0
  58. data/spec/dummy_rails/public/500.html +25 -0
  59. data/spec/dummy_rails/public/favicon.ico +0 -0
  60. data/spec/dummy_rails/script/rails +6 -0
  61. data/spec/dummy_rails/test/fixtures/log_data.yml +9 -0
  62. data/spec/dummy_rails/test/fixtures/posts.yml +11 -0
  63. data/spec/dummy_rails/test/fixtures/users.yml +11 -0
  64. data/spec/dummy_rails/test/models/log_data_test.rb +7 -0
  65. data/spec/dummy_rails/test/models/post_test.rb +7 -0
  66. data/spec/dummy_rails/test/models/user_test.rb +7 -0
  67. data/spec/dummy_sinatra/Gemfile +7 -0
  68. data/spec/dummy_sinatra/README.md +9 -0
  69. data/spec/dummy_sinatra/app.rb +36 -0
  70. data/spec/dummy_sinatra/config.ru +0 -0
  71. data/spec/dummy_sinatra/views/index.erb +2 -0
  72. data/spec/dummy_sinatra/views/layout.erb +13 -0
  73. data/spec/spec_helper.rb +1 -0
  74. metadata +68 -2
@@ -0,0 +1,80 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # Code is not reloaded between requests.
5
+ config.cache_classes = true
6
+
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both thread web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
14
+ config.consider_all_requests_local = false
15
+ config.action_controller.perform_caching = true
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 nginx, varnish or squid.
20
+ # config.action_dispatch.rack_cache = true
21
+
22
+ # Disable Rails's static asset server (Apache or nginx will already do this).
23
+ config.serve_static_assets = false
24
+
25
+ # Compress JavaScripts and CSS.
26
+ config.assets.js_compressor = :uglifier
27
+ # config.assets.css_compressor = :sass
28
+
29
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
30
+ config.assets.compile = false
31
+
32
+ # Generate digests for assets URLs.
33
+ config.assets.digest = true
34
+
35
+ # Version of your assets, change this if you want to expire all your assets.
36
+ config.assets.version = '1.0'
37
+
38
+ # Specifies the header that your server uses for sending files.
39
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
40
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
41
+
42
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
43
+ # config.force_ssl = true
44
+
45
+ # Set to :debug to see everything in the log.
46
+ config.log_level = :info
47
+
48
+ # Prepend all log lines with the following tags.
49
+ # config.log_tags = [ :subdomain, :uuid ]
50
+
51
+ # Use a different logger for distributed setups.
52
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
53
+
54
+ # Use a different cache store in production.
55
+ # config.cache_store = :mem_cache_store
56
+
57
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
58
+ # config.action_controller.asset_host = "http://assets.example.com"
59
+
60
+ # Precompile additional assets.
61
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
62
+ # config.assets.precompile += %w( search.js )
63
+
64
+ # Ignore bad email addresses and do not raise email delivery errors.
65
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
66
+ # config.action_mailer.raise_delivery_errors = false
67
+
68
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
69
+ # the I18n.default_locale when a translation can not be found).
70
+ config.i18n.fallbacks = true
71
+
72
+ # Send deprecation notices to registered listeners.
73
+ config.active_support.deprecation = :notify
74
+
75
+ # Disable automatic flushing of the log to improve performance.
76
+ # config.autoflush_log = false
77
+
78
+ # Use default logging formatter so that PID and timestamp are not suppressed.
79
+ config.log_formatter = ::Logger::Formatter.new
80
+ end
@@ -0,0 +1,36 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
14
+
15
+ # Configure static asset server for tests with Cache-Control for performance.
16
+ config.serve_static_assets = true
17
+ config.static_cache_control = "public, max-age=3600"
18
+
19
+ # Show full error reports and disable caching.
20
+ config.consider_all_requests_local = true
21
+ config.action_controller.perform_caching = false
22
+
23
+ # Raise exceptions instead of rendering exception templates.
24
+ config.action_dispatch.show_exceptions = false
25
+
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
28
+
29
+ # Tell Action Mailer not to deliver emails to the real world.
30
+ # The :test delivery method accumulates sent emails in the
31
+ # ActionMailer::Base.deliveries array.
32
+ config.action_mailer.delivery_method = :test
33
+
34
+ # Print deprecation notices to the stderr.
35
+ config.active_support.deprecation = :stderr
36
+ end
@@ -0,0 +1,8 @@
1
+ # -*- encoding : utf-8 -*-
2
+ # Be sure to restart your server when you modify this file.
3
+
4
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
5
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
6
+
7
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
8
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,16 @@
1
+ # -*- encoding : utf-8 -*-
2
+ # Be sure to restart your server when you modify this file.
3
+
4
+ # Add new inflection rules using the following format
5
+ # (all these examples are active by default):
6
+ # ActiveSupport::Inflector.inflections do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+ #
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -0,0 +1,6 @@
1
+ # -*- encoding : utf-8 -*-
2
+ # Be sure to restart your server when you modify this file.
3
+
4
+ # Add new mime types for use in respond_to blocks:
5
+ # Mime::Type.register "text/richtext", :rtf
6
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,8 @@
1
+ # -*- encoding : utf-8 -*-
2
+ # Be sure to restart your server when you modify this file.
3
+
4
+ # Your secret key for verifying the integrity of signed cookies.
5
+ # If you change this key, all old signed cookies will become invalid!
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ Dummy::Application.config.secret_token = 'c2f6d056efa43437492246c956ff4c82c3b5100e7f5c47dd47617250546dc477fdc51c1b8fad6b94854e0b08cb04a876aa3b8a16800887c7f3df7adb8fe441c1'
@@ -0,0 +1,9 @@
1
+ # -*- encoding : utf-8 -*-
2
+ # Be sure to restart your server when you modify this file.
3
+
4
+ Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
5
+
6
+ # Use the database for sessions instead of the cookie-based default,
7
+ # which shouldn't be used to store highly confidential information
8
+ # (create the session table with "rails generate session_migration")
9
+ # Dummy::Application.config.session_store :active_record_store
@@ -0,0 +1,15 @@
1
+ # -*- encoding : utf-8 -*-
2
+ # Be sure to restart your server when you modify this file.
3
+ #
4
+ # This file contains settings for ActionController::ParamsWrapper which
5
+ # is enabled by default.
6
+
7
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
8
+ ActiveSupport.on_load(:action_controller) do
9
+ wrap_parameters :format => [:json]
10
+ end
11
+
12
+ # Disable root element in JSON by default.
13
+ ActiveSupport.on_load(:active_record) do
14
+ self.include_root_in_json = false
15
+ end
@@ -0,0 +1,58 @@
1
+ # Additional translations at https://github.com/plataformatec/devise/wiki/I18n
2
+
3
+ en:
4
+ errors:
5
+ messages:
6
+ expired: "has expired, please request a new one"
7
+ not_found: "not found"
8
+ already_confirmed: "was already confirmed, please try signing in"
9
+ not_locked: "was not locked"
10
+ not_saved:
11
+ one: "1 error prohibited this %{resource} from being saved:"
12
+ other: "%{count} errors prohibited this %{resource} from being saved:"
13
+
14
+ devise:
15
+ failure:
16
+ already_authenticated: 'You are already signed in.'
17
+ unauthenticated: 'You need to sign in or sign up before continuing.'
18
+ unconfirmed: 'You have to confirm your account before continuing.'
19
+ locked: 'Your account is locked.'
20
+ invalid: 'Invalid email or password.'
21
+ invalid_token: 'Invalid authentication token.'
22
+ timeout: 'Your session expired, please sign in again to continue.'
23
+ inactive: 'Your account was not activated yet.'
24
+ sessions:
25
+ signed_in: 'Signed in successfully.'
26
+ signed_out: 'Signed out successfully.'
27
+ passwords:
28
+ send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
29
+ updated: 'Your password was changed successfully. You are now signed in.'
30
+ updated_not_active: 'Your password was changed successfully.'
31
+ send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
32
+ no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
33
+ confirmations:
34
+ send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
35
+ send_paranoid_instructions: 'If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes.'
36
+ confirmed: 'Your account was successfully confirmed. You are now signed in.'
37
+ registrations:
38
+ signed_up: 'Welcome! You have signed up successfully.'
39
+ signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.'
40
+ signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.'
41
+ signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.'
42
+ updated: 'You updated your account successfully.'
43
+ update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
44
+ destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
45
+ unlocks:
46
+ send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
47
+ unlocked: 'Your account has been unlocked successfully. Please sign in to continue.'
48
+ send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.'
49
+ omniauth_callbacks:
50
+ success: 'Successfully authenticated from %{kind} account.'
51
+ failure: 'Could not authenticate you from %{kind} because "%{reason}".'
52
+ mailer:
53
+ confirmation_instructions:
54
+ subject: 'Confirmation instructions'
55
+ reset_password_instructions:
56
+ subject: 'Reset password instructions'
57
+ unlock_instructions:
58
+ subject: 'Unlock Instructions'
@@ -0,0 +1,5 @@
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
+ hello: "Hello world"
@@ -0,0 +1,26 @@
1
+ en:
2
+ simple_form:
3
+ "yes": 'Yes'
4
+ "no": 'No'
5
+ required:
6
+ text: 'required'
7
+ mark: '*'
8
+ # You can uncomment the line below if you need to overwrite the whole required html.
9
+ # When using html, text and mark won't be used.
10
+ # html: '<abbr title="required">*</abbr>'
11
+ error_notification:
12
+ default_message: "Please review the problems below:"
13
+ # Labels and hints examples
14
+ # labels:
15
+ # defaults:
16
+ # password: 'Password'
17
+ # user:
18
+ # new:
19
+ # email: 'E-mail to sign in.'
20
+ # edit:
21
+ # email: 'E-mail.'
22
+ # hints:
23
+ # defaults:
24
+ # username: 'User name to sign in.'
25
+ # password: 'No special characters, please.'
26
+
@@ -0,0 +1,6 @@
1
+ # -*- encoding : utf-8 -*-
2
+ Rails.application.routes.draw do
3
+
4
+ get '/charts', to: 'application#charts'
5
+ end
6
+
@@ -0,0 +1,11 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table :users do |t|
4
+ t.string :name
5
+ t.boolean :admin
6
+ t.integer :phone
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ class AddLastNameToUser < ActiveRecord::Migration
2
+ def change
3
+ add_column :users, :last_name, :string
4
+ end
5
+ end
@@ -0,0 +1,12 @@
1
+ class CreateLogData < ActiveRecord::Migration
2
+
3
+ def change
4
+
5
+ create_table :log_data do |t|
6
+ t.string :name
7
+ t.string :description
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,9 @@
1
+ class CreatePosts < ActiveRecord::Migration
2
+ def change
3
+ create_table :posts do |t|
4
+ t.string :title
5
+ t.references :user
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,39 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20140227015551) do
15
+
16
+ create_table "log_data", force: true do |t|
17
+ t.string "name"
18
+ t.string "description"
19
+ t.timestamp "created_at"
20
+ t.timestamp "updated_at"
21
+ end
22
+
23
+ create_table "posts", force: true do |t|
24
+ t.string "title"
25
+ t.string "user_id"
26
+ t.timestamp "created_at"
27
+ t.timestamp "updated_at"
28
+ end
29
+
30
+ create_table "users", force: true do |t|
31
+ t.string "name"
32
+ t.boolean "admin"
33
+ t.integer "phone"
34
+ t.timestamp "created_at"
35
+ t.timestamp "updated_at"
36
+ t.string "last_name"
37
+ end
38
+
39
+ end
@@ -0,0 +1 @@
1
+ {"db":{"schema_migrations":[{"version":"20140224051640"},{"version":"20140224063709"},{"version":"20140225014314"},{"version":"20140227015551"}]}}
File without changes
@@ -0,0 +1,13 @@
1
+ <%%= simple_form_for(@<%= singular_table_name %>) do |f| %>
2
+ <%%= f.error_notification %>
3
+
4
+ <div class="form-inputs">
5
+ <%- attributes.each do |attribute| -%>
6
+ <%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %>
7
+ <%- end -%>
8
+ </div>
9
+
10
+ <div class="form-actions">
11
+ <%%= f.button :submit %>
12
+ </div>
13
+ <%% end %>
File without changes
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>