torba-rails 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/README.md +1 -1
  4. data/Rakefile +1 -1
  5. data/lib/torba/rails.rb +3 -3
  6. data/test/4.1/Gemfile +7 -0
  7. data/test/4.1/Gemfile.lock +113 -0
  8. data/test/4.1/Rakefile +6 -0
  9. data/test/4.1/Torbafile +8 -0
  10. data/test/4.1/app/assets/javascripts/application.js +2 -0
  11. data/test/4.1/app/assets/stylesheets/application.scss +6 -0
  12. data/test/4.1/app/controllers/application_controller.rb +5 -0
  13. data/test/4.1/app/helpers/application_helper.rb +2 -0
  14. data/test/4.1/app/views/layouts/application.html.erb +14 -0
  15. data/test/4.1/bin/bundle +3 -0
  16. data/test/4.1/bin/rails +4 -0
  17. data/test/4.1/bin/rake +9 -0
  18. data/test/4.1/config/application.rb +25 -0
  19. data/test/4.1/config/boot.rb +4 -0
  20. data/test/4.1/config/environment.rb +5 -0
  21. data/test/4.1/config/environments/development.rb +31 -0
  22. data/test/4.1/config/environments/production.rb +75 -0
  23. data/test/4.1/config/environments/test.rb +34 -0
  24. data/test/4.1/config/initializers/assets.rb +8 -0
  25. data/test/4.1/config/initializers/cookies_serializer.rb +3 -0
  26. data/test/4.1/config/initializers/filter_parameter_logging.rb +4 -0
  27. data/test/4.1/config/initializers/session_store.rb +3 -0
  28. data/test/4.1/config/initializers/wrap_parameters.rb +14 -0
  29. data/test/4.1/config/locales/en.yml +23 -0
  30. data/test/4.1/config/routes.rb +56 -0
  31. data/test/4.1/config/secrets.yml +22 -0
  32. data/test/4.1/config.ru +4 -0
  33. data/test/acceptance_test.rb +1 -1
  34. data/test/compiled_assets/4.1/application-959396ba4d98dd11cf6ac10b43f7fa97.js +1 -0
  35. data/test/compiled_assets/4.1/application-b93806e6555eb26989308c4d06311423.css +1 -0
  36. data/test/compiled_assets/4.1/trumbowyg/icons-2x-0977e4f2195ed320a8dcc57e194af523.png +0 -0
  37. data/test/compiled_assets/4.1/trumbowyg/icons-60fe5a8fdf8b247fe07ca2454df66f80.png +0 -0
  38. data/torba-rails.gemspec +1 -1
  39. metadata +64 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01b6c3577cb9d061eb867c3163227e5be3fae9c5
4
- data.tar.gz: bf9f1c67a94004096714ebd28941b094996b57c2
3
+ metadata.gz: 981cd8ea885a6e8ba1a44fed014840c60cb45969
4
+ data.tar.gz: b666342634267351cd25f18f9dd6fce158d3f20c
5
5
  SHA512:
6
- metadata.gz: 0bf77c82ea973080c6504224348ddc7d673204158a18856acc18349db95ea71a7ddbbd7271e3ff274981ff8b32b400f9ee3e91f5a8cf6947dda501d0a0098b40
7
- data.tar.gz: b5c494929426b215f47599f41d2b47dc6cf9ccf200f37ddf6583524e1fedd03d9b5d144cb77c5b9c736dd5fe4dbd2049972c86809815b319aa6ec79256df2d0e
6
+ metadata.gz: 68f3edd0ce2257ed2b5b738f2ef37c8bcc07c52ad78ec99a4940c2660f5bb380942094c6ad6c73c598d5329255d99f58200bce9593f5d5c79cb306998896b074
7
+ data.tar.gz: c3997338dc61a69ff134e79a533e26b9ff92e39f1ef16178978a9ba7349e9e47aceaf442eba80740dbed07cb8f4410416ccafb6c1eff6a69970f0bb94ec4d0e8
data/CHANGELOG.md CHANGED
@@ -1 +1,7 @@
1
1
  ## Unreleased
2
+
3
+ ## Version 1.0.1
4
+
5
+ ### Bug fixes
6
+
7
+ * Fix `config.assets.paths` were populated too late when precompiling assets.
data/README.md CHANGED
@@ -11,7 +11,7 @@ Production ready.
11
11
 
12
12
  ## Documentation
13
13
 
14
- [Released version](http://rubydoc.info/gems/torba-rails/1.0.0)
14
+ [Released version](http://rubydoc.info/gems/torba-rails/1.0.1)
15
15
 
16
16
  ## Installation
17
17
 
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  require "bundler/gem_tasks"
2
2
 
3
- rails_versions = %w[3.2 4.2 5.0]
3
+ rails_versions = %w[3.2 4.1 4.2 5.0]
4
4
 
5
5
  task :bundle do
6
6
  rails_versions.each do |version|
data/lib/torba/rails.rb CHANGED
@@ -16,14 +16,14 @@ module Torba
16
16
  if Engine.serve_static_files?
17
17
  require "torba/verify"
18
18
  Engine.setup
19
+ elsif defined?(Rake) && Rake.application.top_level_tasks.include?("assets:precompile")
20
+ Engine.setup
19
21
  end
20
22
  end
21
23
 
22
24
  rake_tasks do
23
25
  require "torba/rake_task"
24
- Torba::RakeTask.new("torba:pack", :before => "assets:precompile") do
25
- Engine.setup
26
- end
26
+ Torba::RakeTask.new("torba:pack", :before => "assets:precompile")
27
27
  end
28
28
  end
29
29
  end
data/test/4.1/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rails', '4.1.15'
4
+ gem 'sass-rails', '~> 4.0.3'
5
+ gem 'uglifier', '>= 1.3.0'
6
+ gem 'coffee-rails', '~> 4.0.0'
7
+ gem 'torba-rails', path: '../..'
@@ -0,0 +1,113 @@
1
+ PATH
2
+ remote: ../..
3
+ specs:
4
+ torba-rails (1.0.0)
5
+ railties (>= 3.2)
6
+ torba (~> 1.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (4.1.15)
12
+ actionpack (= 4.1.15)
13
+ actionview (= 4.1.15)
14
+ mail (~> 2.5, >= 2.5.4)
15
+ actionpack (4.1.15)
16
+ actionview (= 4.1.15)
17
+ activesupport (= 4.1.15)
18
+ rack (~> 1.5.2)
19
+ rack-test (~> 0.6.2)
20
+ actionview (4.1.15)
21
+ activesupport (= 4.1.15)
22
+ builder (~> 3.1)
23
+ erubis (~> 2.7.0)
24
+ activemodel (4.1.15)
25
+ activesupport (= 4.1.15)
26
+ builder (~> 3.1)
27
+ activerecord (4.1.15)
28
+ activemodel (= 4.1.15)
29
+ activesupport (= 4.1.15)
30
+ arel (~> 5.0.0)
31
+ activesupport (4.1.15)
32
+ i18n (~> 0.6, >= 0.6.9)
33
+ json (~> 1.7, >= 1.7.7)
34
+ minitest (~> 5.1)
35
+ thread_safe (~> 0.1)
36
+ tzinfo (~> 1.1)
37
+ arel (5.0.1.20140414130214)
38
+ builder (3.2.2)
39
+ coffee-rails (4.0.1)
40
+ coffee-script (>= 2.2.0)
41
+ railties (>= 4.0.0, < 5.0)
42
+ coffee-script (2.4.1)
43
+ coffee-script-source
44
+ execjs
45
+ coffee-script-source (1.10.0)
46
+ erubis (2.7.0)
47
+ execjs (2.6.0)
48
+ hike (1.2.3)
49
+ i18n (0.7.0)
50
+ json (1.8.3)
51
+ mail (2.6.4)
52
+ mime-types (>= 1.16, < 4)
53
+ mime-types (3.0)
54
+ mime-types-data (~> 3.2015)
55
+ mime-types-data (3.2016.0221)
56
+ minitest (5.8.4)
57
+ multi_json (1.11.2)
58
+ rack (1.5.5)
59
+ rack-test (0.6.3)
60
+ rack (>= 1.0)
61
+ rails (4.1.15)
62
+ actionmailer (= 4.1.15)
63
+ actionpack (= 4.1.15)
64
+ actionview (= 4.1.15)
65
+ activemodel (= 4.1.15)
66
+ activerecord (= 4.1.15)
67
+ activesupport (= 4.1.15)
68
+ bundler (>= 1.3.0, < 2.0)
69
+ railties (= 4.1.15)
70
+ sprockets-rails (~> 2.0)
71
+ railties (4.1.15)
72
+ actionpack (= 4.1.15)
73
+ activesupport (= 4.1.15)
74
+ rake (>= 0.8.7)
75
+ thor (>= 0.18.1, < 2.0)
76
+ rake (11.1.2)
77
+ sass (3.2.19)
78
+ sass-rails (4.0.5)
79
+ railties (>= 4.0.0, < 5.0)
80
+ sass (~> 3.2.2)
81
+ sprockets (~> 2.8, < 3.0)
82
+ sprockets-rails (~> 2.0)
83
+ sprockets (2.12.4)
84
+ hike (~> 1.2)
85
+ multi_json (~> 1.0)
86
+ rack (~> 1.0)
87
+ tilt (~> 1.1, != 1.3.0)
88
+ sprockets-rails (2.3.3)
89
+ actionpack (>= 3.0)
90
+ activesupport (>= 3.0)
91
+ sprockets (>= 2.8, < 4.0)
92
+ thor (0.19.1)
93
+ thread_safe (0.3.5)
94
+ tilt (1.4.1)
95
+ torba (1.0.0)
96
+ thor (~> 0.19.1)
97
+ tzinfo (1.2.2)
98
+ thread_safe (~> 0.1)
99
+ uglifier (3.0.0)
100
+ execjs (>= 0.3.0, < 3)
101
+
102
+ PLATFORMS
103
+ ruby
104
+
105
+ DEPENDENCIES
106
+ coffee-rails (~> 4.0.0)
107
+ rails (= 4.1.15)
108
+ sass-rails (~> 4.0.3)
109
+ torba-rails!
110
+ uglifier (>= 1.3.0)
111
+
112
+ BUNDLED WITH
113
+ 1.10.6
data/test/4.1/Rakefile ADDED
@@ -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,8 @@
1
+ gh_release "trumbowyg",
2
+ source: "torba-rb/Trumbowyg",
3
+ tag: "1.1.6",
4
+ import: %w[
5
+ dist/trumbowyg.js
6
+ dist/ui/trumbowyg.css
7
+ dist/ui/images/
8
+ ]
@@ -0,0 +1,2 @@
1
+ //= require trumbowyg/trumbowyg
2
+ //= require_tree .
@@ -0,0 +1,6 @@
1
+ /*
2
+ *= require_self
3
+ *= require_tree .
4
+ */
5
+
6
+ @import "trumbowyg/trumbowyg";
@@ -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>TorbaTest</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'
data/test/4.1/bin/rake ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+ begin
3
+ load File.expand_path('../spring', __FILE__)
4
+ rescue LoadError => e
5
+ raise unless e.message.include?('spring')
6
+ end
7
+ require_relative '../config/boot'
8
+ require 'rake'
9
+ Rake.application.run
@@ -0,0 +1,25 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require "rails"
4
+ require "action_controller/railtie"
5
+ require "sprockets/railtie"
6
+
7
+ # Require the gems listed in Gemfile, including any gems
8
+ # you've limited to :test, :development, or :production.
9
+ Bundler.require(*Rails.groups)
10
+
11
+ module TorbaTest
12
+ class Application < Rails::Application
13
+ # Settings in config/environments/* take precedence over those specified here.
14
+ # Application configuration should go into files in config/initializers
15
+ # -- all .rb files in that directory are automatically loaded.
16
+
17
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
18
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
19
+ # config.time_zone = 'Central Time (US & Canada)'
20
+
21
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
22
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
23
+ # config.i18n.default_locale = :de
24
+ end
25
+ end
@@ -0,0 +1,4 @@
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'])
@@ -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,31 @@
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
+ # Print deprecation notices to the Rails logger.
17
+ config.active_support.deprecation = :log
18
+
19
+ # Debug mode disables concatenation and preprocessing of assets.
20
+ # This option may cause significant delays in view rendering with a large
21
+ # number of complex assets.
22
+ config.assets.debug = true
23
+
24
+ # Adds additional error checking when serving assets at runtime.
25
+ # Checks for improperly declared sprockets dependencies.
26
+ # Raises helpful error messages.
27
+ config.assets.raise_runtime_errors = true
28
+
29
+ # Raises error for missing translations
30
+ # config.action_view.raise_on_missing_translations = true
31
+ end
@@ -0,0 +1,75 @@
1
+ Rails.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 threaded 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
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
36
+
37
+ # Specifies the header that your server uses for sending files.
38
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
39
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
40
+
41
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
42
+ # config.force_ssl = true
43
+
44
+ # Set to :debug to see everything in the log.
45
+ config.log_level = :info
46
+
47
+ # Prepend all log lines with the following tags.
48
+ # config.log_tags = [ :subdomain, :uuid ]
49
+
50
+ # Use a different logger for distributed setups.
51
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
52
+
53
+ # Use a different cache store in production.
54
+ # config.cache_store = :mem_cache_store
55
+
56
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
57
+ # config.action_controller.asset_host = "http://assets.example.com"
58
+
59
+ # Ignore bad email addresses and do not raise email delivery errors.
60
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
61
+ # config.action_mailer.raise_delivery_errors = false
62
+
63
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
64
+ # the I18n.default_locale when a translation cannot be found).
65
+ config.i18n.fallbacks = true
66
+
67
+ # Send deprecation notices to registered listeners.
68
+ config.active_support.deprecation = :notify
69
+
70
+ # Disable automatic flushing of the log to improve performance.
71
+ # config.autoflush_log = false
72
+
73
+ # Use default logging formatter so that PID and timestamp are not suppressed.
74
+ config.log_formatter = ::Logger::Formatter.new
75
+ end
@@ -0,0 +1,34 @@
1
+ Rails.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
+ # Print deprecation notices to the stderr.
30
+ config.active_support.deprecation = :stderr
31
+
32
+ # Raises error for missing translations
33
+ # config.action_view.raise_on_missing_translations = true
34
+ end
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = '1.0'
5
+
6
+ # Precompile additional assets.
7
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
8
+ # Rails.application.config.assets.precompile += %w( search.js )
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.session_store :cookie_store, key: '_torba_test_session'
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,56 @@
1
+ Rails.application.routes.draw do
2
+ # The priority is based upon order of creation: first created -> highest priority.
3
+ # See how all your routes lay out with "rake routes".
4
+
5
+ # You can have the root of your site routed with "root"
6
+ # root 'welcome#index'
7
+
8
+ # Example of regular route:
9
+ # get 'products/:id' => 'catalog#view'
10
+
11
+ # Example of named route that can be invoked with purchase_url(id: product.id)
12
+ # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
13
+
14
+ # Example resource route (maps HTTP verbs to controller actions automatically):
15
+ # resources :products
16
+
17
+ # Example resource route with options:
18
+ # resources :products do
19
+ # member do
20
+ # get 'short'
21
+ # post 'toggle'
22
+ # end
23
+ #
24
+ # collection do
25
+ # get 'sold'
26
+ # end
27
+ # end
28
+
29
+ # Example resource route with sub-resources:
30
+ # resources :products do
31
+ # resources :comments, :sales
32
+ # resource :seller
33
+ # end
34
+
35
+ # Example resource route with more complex sub-resources:
36
+ # resources :products do
37
+ # resources :comments
38
+ # resources :sales do
39
+ # get 'recent', on: :collection
40
+ # end
41
+ # end
42
+
43
+ # Example resource route with concerns:
44
+ # concern :toggleable do
45
+ # post 'toggle'
46
+ # end
47
+ # resources :posts, concerns: :toggleable
48
+ # resources :photos, concerns: :toggleable
49
+
50
+ # Example resource route within a namespace:
51
+ # namespace :admin do
52
+ # # Directs /admin/products/* to Admin::ProductsController
53
+ # # (app/controllers/admin/products_controller.rb)
54
+ # resources :products
55
+ # end
56
+ end
@@ -0,0 +1,22 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
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
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: 3c3d4f90a7f43a6ff4aa84bbc404d6d0294e494046c4b310714de80aac2dbcaa6c2b11e83821e3216442c318fc3c2b83d1090a558fc878488efd4c67a6551195
15
+
16
+ test:
17
+ secret_key_base: 5a3daec7e70d5b20a8f7385a1d2bee36951ade36ef335dcb4513b7b4172a58f9e355719edcbdd04aa1be24a324753f45ca49920f25d5e883554ca3ebdb5a5730
18
+
19
+ # Do not keep production secrets in the repository,
20
+ # instead read values from the environment.
21
+ production:
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
@@ -40,7 +40,7 @@ module Torba
40
40
  def test_assets_precompile
41
41
  out, err, status = run_project_cmd(%{bundle exec rake assets:precompile}, "RAILS_ENV" => "production")
42
42
  assert status.success?, err
43
- assets_version = (rails_version == "3.2") ? "3.2" : "4.2+"
43
+ assets_version = (rails_version > "4.1") ? "4.2+" : rails_version
44
44
  assert_dir_included "test/compiled_assets/#{assets_version}", "test/#{rails_version}/public/assets"
45
45
  end
46
46
 
@@ -0,0 +1 @@
1
+ jQuery.trumbowyg={langs:{en:{viewHTML:"View HTML",formatting:"Formatting",p:"Paragraph",blockquote:"Quote",code:"Code",header:"Header",bold:"Bold",italic:"Italic",strikethrough:"Stroke",underline:"Underline",strong:"Strong",em:"Emphasis",del:"Deleted",unorderedList:"Unordered list",orderedList:"Ordered list",insertImage:"Insert Image",insertVideo:"Insert Video",link:"Link",createLink:"Insert link",unlink:"Remove link",justifyLeft:"Align Left",justifyCenter:"Align Center",justifyRight:"Align Right",justifyFull:"Align Justify",horizontalRule:"Insert horizontal rule",fullscreen:"fullscreen",close:"Close",submit:"Confirm",reset:"Cancel",invalidUrl:"Invalid URL",required:"Required",description:"Description",title:"Title",text:"Text"}},opts:{},btnsGrps:{design:["bold","italic","underline","strikethrough"],semantic:["strong","em","del"],justify:["justifyLeft","justifyCenter","justifyRight","justifyFull"],lists:["unorderedList","orderedList"]}},function(e,t,n,o){"use strict";n.fn.trumbowyg=function(e,t){if(e===Object(e)||!e)return this.each(function(){n(this).data("trumbowyg")||n(this).data("trumbowyg",new i(this,e))});if(1===this.length)try{var o=n(this).data("trumbowyg");switch(e){case"openModal":return o.openModal(t.title,t.content);case"closeModal":return o.closeModal();case"openModalInsert":return o.openModalInsert(t.title,t.fields,t.callback);case"saveSelection":return o.saveSelection();case"getSelection":return o.selection;case"getSelectedText":return o.selection+"";case"restoreSelection":return o.restoreSelection();case"destroy":return o.destroy();case"empty":return o.empty();case"lang":return o.lang;case"duration":return o.o.duration;case"html":return o.html(t)}}catch(r){}return!1};var i=function(e,o){var i=this;i.doc=e.ownerDocument||t,i.$e=n(e),i.$creator=n(e),o=n.extend(!0,{},o,n.trumbowyg.opts),"undefined"==typeof o.lang||"undefined"==typeof n.trumbowyg.langs[o.lang]?i.lang=n.trumbowyg.langs.en:i.lang=n.extend(!0,{},n.trumbowyg.langs.en,n.trumbowyg.langs[o.lang]),i.o=n.extend(!0,{},{lang:"en",dir:"ltr",duration:200,mobile:!1,tablet:!0,closable:!1,fullscreenable:!0,fixedBtnPane:!1,fixedFullWidth:!1,autogrow:!1,prefix:"trumbowyg-",convertLink:!0,semantic:!1,resetCss:!1,btns:["viewHTML","|","formatting","|",n.trumbowyg.btnsGrps.design,"|","link","|","insertImage","|",n.trumbowyg.btnsGrps.justify,"|",n.trumbowyg.btnsGrps.lists,"|","horizontalRule"],btnsAdd:[],btnsDef:{viewHTML:{func:"toggle"},p:{func:"formatBlock"},blockquote:{func:"formatBlock"},h1:{func:"formatBlock",title:i.lang.header+" 1"},h2:{func:"formatBlock",title:i.lang.header+" 2"},h3:{func:"formatBlock",title:i.lang.header+" 3"},h4:{func:"formatBlock",title:i.lang.header+" 4"},bold:{},italic:{},underline:{},strikethrough:{},strong:{func:"bold"},em:{func:"italic"},del:{func:"strikethrough"},createLink:{},unlink:{},insertImage:{},justifyLeft:{},justifyCenter:{},justifyRight:{},justifyFull:{},unorderedList:{func:"insertUnorderedList"},orderedList:{func:"insertOrderedList"},horizontalRule:{func:"insertHorizontalRule"},formatting:{dropdown:["p","blockquote","h1","h2","h3","h4"]},link:{dropdown:["createLink","unlink"]}}},o),i.o.semantic&&!o.btns?i.o.btns=["viewHTML","|","formatting","|",n.trumbowyg.btnsGrps.semantic,"|","link","|","insertImage","|",n.trumbowyg.btnsGrps.justify,"|",n.trumbowyg.btnsGrps.lists,"|","horizontalRule"]:o&&o.btns&&(i.o.btns=o.btns),i.init()};i.prototype={init:function(){var e=this;return e.height=e.$e.css("height"),e.isEnabled()?void e.buildEditor(!0):(e.buildEditor(),e.buildBtnPane(),e.fixedBtnPaneEvents(),void e.buildOverlay())},buildEditor:function(e){var t=this,o=t.o.prefix,i="";if(e!==!0)t.$box=n("<div/>",{"class":o+"box "+o+t.o.lang+" trumbowyg"}),t.isTextarea=!0,t.$e.is("textarea")?t.$editor=n("<div/>"):(t.$editor=t.$e,t.$e=t.buildTextarea().val(t.$e.val()),t.isTextarea=!1),t.$creator.is("[placeholder]")&&t.$editor.attr("placeholder",t.$creator.attr("placeholder")),t.$e.hide().addClass(o+"textarea"),t.isTextarea?(i=t.$e.val(),t.$box.insertAfter(t.$e).append(t.$editor).append(t.$e)):(i=t.$editor.html(),t.$box.insertAfter(t.$editor).append(t.$e).append(t.$editor),t.syncCode()),t.$editor.addClass(o+"editor").attr("contenteditable",!0).attr("dir",t.lang._dir||t.o.dir).html(i),t.o.resetCss&&t.$editor.addClass(o+"reset-css"),t.o.autogrow||n.each([t.$editor,t.$e],function(e,n){n.css({height:t.height,overflow:"auto"})}),t.o.semantic&&(t.$editor.html(t.$editor.html().replace("<br>","</p><p>").replace("&nbsp;","")),t.semanticCode()),t.$editor.on("dblclick","img",function(e){var o=n(this);t.openModalInsert(t.lang.insertImage,{url:{label:"URL",value:o.attr("src"),required:!0},alt:{label:"description",value:o.attr("alt")}},function(e){o.attr({src:e.url,alt:e.alt})}),e.stopPropagation()}).on("keyup",function(e){t.semanticCode(!1,13===e.which)}).on("focus",function(){t.$creator.trigger("tbwfocus")}).on("blur",function(){t.syncCode(),t.$creator.trigger("tbwblur")});else if(!t.$e.is("textarea")){var r=t.buildTextarea().val(t.$e.val());t.$e.hide().after(r)}},buildTextarea:function(){return n("<textarea/>",{name:this.$e.attr("id"),height:this.height})},buildBtnPane:function(){var t=this,i=t.o.prefix;if(t.o.btns!==!1){t.$btnPane=n("<ul/>",{"class":i+"button-pane"}),n.each(t.o.btns.concat(t.o.btnsAdd),function(e,r){try{var a=r.split("btnGrp-");a[1]!==o&&(r=n.trumbowyg.btnsGrps[a[1]])}catch(s){}n.isArray(r)||(r=[r]),n.each(r,function(e,o){try{var r=n("<li/>");"|"===o?r.addClass(i+"separator"):t.isSupportedBtn(o)&&r.append(t.buildBtn(o)),t.$btnPane.append(r)}catch(a){}})});var r=n("<li/>",{"class":i+"not-disable "+i+"buttons-right"});t.o.fullscreenable&&r.append(t.buildRightBtn("fullscreen").on("click",function(){var o=i+"fullscreen";t.$box.toggleClass(o),t.$box.hasClass(o)?(n("body").css("overflow","hidden"),n.each([t.$editor,t.$e],function(){n(this).css({height:"calc(100% - 35px)",overflow:"auto"})}),t.$btnPane.css("width","100%")):(n("body").css("overflow","auto"),t.$box.removeAttr("style"),t.o.autogrow||n.each([t.$editor,t.$e],function(){n(this).css("height",t.height)})),n(e).trigger("scroll")})),t.o.closable&&r.append(t.buildRightBtn("close").on("click",function(){t.$box.hasClass(i+"fullscreen")&&n("body").css("overflow","auto"),t.destroy()})),r.not(":empty")&&t.$btnPane.append(r),t.$box.prepend(t.$btnPane)}},buildBtn:function(e){var t=this,o=t.o.prefix,i=t.o.btnsDef[e],r=i.dropdown,a=t.lang[e]||e,s=n("<button/>",{type:"button","class":o+e+"-button"+(i.ico?" "+o+i.ico+"-button":""),text:i.text||i.title||a,title:i.title||i.text||a,mousedown:function(a){return r&&!t.$box.find("."+e+"-"+o+"dropdown").is(":hidden")||n("body",t.doc).trigger("mousedown"),!t.$btnPane.hasClass(o+"disable")||n(this).hasClass(o+"active")||n(this).parent().hasClass(o+"not-disable")?(t.execCmd((r?"dropdown":!1)||i.func||e,i.param||e),a.stopPropagation(),void a.preventDefault()):!1}});if(r){s.addClass(o+"open-dropdown");var l=o+"dropdown",d=n("<div/>",{"class":e+"-"+l+" "+l+" "+o+"fixed-top"});n.each(r,function(e,n){t.o.btnsDef[n]&&t.isSupportedBtn(n)&&d.append(t.buildSubBtn(n))}),t.$box.append(d.hide())}return s},buildSubBtn:function(e){var t=this,o=t.o.btnsDef[e];return n("<button/>",{type:"button",text:o.text||o.title||t.lang[e]||e,style:o.style||null,mousedown:function(i){n("body",t.doc).trigger("mousedown"),t.execCmd(o.func||e,o.param||e),i.stopPropagation()}})},buildRightBtn:function(e){return n("<button/>",{type:"button","class":this.o.prefix+e+"-button",title:this.lang[e],text:this.lang[e]})},isSupportedBtn:function(e){var t=this.o.btnsDef[e];return"function"!=typeof t.isSupported||t.isSupported()},buildOverlay:function(){var e=this;return e.$overlay=n("<div/>",{"class":e.o.prefix+"overlay"}).css({top:e.$btnPane.outerHeight(),height:parseInt(e.$editor.outerHeight())+1+"px"}).appendTo(e.$box),e.$overlay},showOverlay:function(){var t=this;n(e).trigger("scroll"),t.$overlay.fadeIn(t.o.duration),t.$box.addClass(t.o.prefix+"box-blur")},hideOverlay:function(){var e=this;e.$overlay.fadeOut(e.o.duration/4),e.$box.removeClass(e.o.prefix+"box-blur")},fixedBtnPaneEvents:function(){var t=this,o=t.o.fixedFullWidth;t.o.fixedBtnPane&&(t.isFixed=!1,n(e).on("scroll resize",function(){if(t.$box){t.syncCode();var i=n(e).scrollTop(),r=t.$box.offset().top+1,a=i-r>0&&i-r-parseInt(t.height)<0,s=t.$btnPane,l=s.css("height"),d=s.outerHeight();a?(t.isFixed||(t.isFixed=!0,s.css({position:"fixed",top:0,left:o?"0":"auto",zIndex:7}),n([t.$editor,t.$e]).css({marginTop:l})),s.css({width:o?"100%":parseInt(t.$box.css("width"))-1+"px"}),n("."+t.o.prefix+"fixed-top",t.$box).css({position:o?"fixed":"absolute",top:o?d:parseInt(d)+(i-r)+"px",zIndex:15})):t.isFixed&&(t.isFixed=!1,s.removeAttr("style"),n([t.$editor,t.$e]).css({marginTop:0}),n("."+t.o.prefix+"fixed-top",t.$box).css({position:"absolute",top:d}))}}))},destroy:function(){var e=this,t=e.o.prefix,n=e.height,o=e.html();e.isTextarea?e.$box.after(e.$e.css({height:n}).val(o).removeClass(t+"textarea").show()):e.$box.after(e.$editor.css({height:n}).removeClass(t+"editor").removeAttr("contenteditable").html(o).show()),e.$box.remove(),e.$creator.removeData("trumbowyg")},empty:function(){this.$e.val(""),this.syncCode(!0)},toggle:function(){var e=this,t=e.o.prefix;e.semanticCode(!1,!0),e.$editor.toggle(),e.$e.toggle(),e.$btnPane.toggleClass(t+"disable"),e.$btnPane.find("."+t+"viewHTML-button").toggleClass(t+"active")},dropdown:function(t){var o=this,i=o.doc,r=o.o.prefix,a=o.$box.find("."+t+"-"+r+"dropdown"),s=o.$btnPane.find("."+r+t+"-button");if(a.is(":hidden")){var l=s.offset().left;s.addClass(r+"active"),a.css({position:"absolute",top:o.$btnPane.outerHeight(),left:o.o.fixedFullWidth&&o.isFixed?l+"px":l-o.$btnPane.offset().left+"px"}).show(),n(e).trigger("scroll"),n("body",i).on("mousedown",function(){n("."+r+"dropdown",i).hide(),n("."+r+"active",i).removeClass(r+"active"),n("body",i).off("mousedown")})}else n("body",i).trigger("mousedown")},html:function(e){var t=this;return e?(t.$e.val(e),t.syncCode(!0),t):t.$e.val()},syncCode:function(e){var t=this;!e&&t.$editor.is(":visible")?t.$e.val(t.$editor.html()):t.$editor.html(t.$e.val()),t.o.autogrow&&(t.height=t.$editor.css("height"),t.$e.css({height:t.height}))},semanticCode:function(e,t){var o=this;o.syncCode(e),o.o.semantic&&(o.semanticTag("b","strong"),o.semanticTag("i","em"),o.semanticTag("strike","del"),t&&(o.$editor.contents().filter(function(){return 3===this.nodeType&&n.trim(this.nodeValue).length>0}).wrap("<p></p>").end().filter("br").remove(),o.saveSelection(),o.semanticTag("div","p"),o.restoreSelection()),o.$e.val(o.$editor.html()))},semanticTag:function(e,t){n(e,this.$editor).each(function(){n(this).replaceWith(function(){return"<"+t+">"+n(this).html()+"</"+t+">"})})},createLink:function(){var e=this;e.saveSelection(),e.openModalInsert(e.lang.createLink,{url:{label:"URL",value:"http://",required:!0},title:{label:e.lang.title,value:e.selection},text:{label:e.lang.text,value:e.selection}},function(t){e.execCmd("createLink",t.url);var o=n('a[href="'+t.url+'"]:not([title])',e.$box);return t.text.length>0&&o.text(t.text),t.title.length>0&&o.attr("title",t.title),!0})},insertImage:function(){var e=this;e.saveSelection(),e.openModalInsert(e.lang.insertImage,{url:{label:"URL",value:"http://",required:!0},alt:{label:e.lang.description,value:e.selection}},function(t){return e.execCmd("insertImage",t.url),n('img[src="'+t.url+'"]:not([alt])',e.$box).attr("alt",t.alt),!0})},execCmd:function(e,t){var n=this;"dropdown"!=e&&n.$editor.focus();try{n[e](t)}catch(o){try{e(t,n)}catch(i){"insertHorizontalRule"==e?t=null:"formatBlock"==e&&(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>0)&&(t="<"+t+">"),n.doc.execCommand(e,!1,t)}}n.syncCode()},openModal:function(t,o){var i=this,r=i.o.prefix;if(n("."+r+"modal-box",i.$box).size()>0)return!1;i.saveSelection(),i.showOverlay(),i.$btnPane.addClass(r+"disable");var a=n("<div/>",{"class":r+"modal "+r+"fixed-top"}).css({top:parseInt(i.$btnPane.css("height"))+1+"px"}).appendTo(i.$box);i.$overlay.one("click",function(e){e.preventDefault(),a.trigger(r+"cancel")});var s=n("<form/>",{action:"",html:o}).on("submit",function(e){e.preventDefault(),a.trigger(r+"confirm")}).on("reset",function(e){e.preventDefault(),a.trigger(r+"cancel")}),l=n("<div/>",{"class":r+"modal-box",html:s}).css({top:"-"+parseInt(i.$btnPane.outerHeight())+"px",opacity:0}).appendTo(a).animate({top:0,opacity:1},i.o.duration/2);return n("<span/>",{text:t,"class":r+"modal-title"}).prependTo(l),l.find("input:first").focus(),i.buildModalBtn("submit",l),i.buildModalBtn("reset",l),n(e).trigger("scroll"),a},buildModalBtn:function(e,t){var o=this,i=o.o.prefix;return n("<button/>",{"class":i+"modal-button "+i+"modal-"+e,type:e,text:o.lang[e]||e}).appendTo(t.find("form"))},closeModal:function(){var e=this,t=e.o.prefix;e.$btnPane.removeClass(t+"disable"),e.$overlay.off();var o=n("."+t+"modal-box",e.$box);o.animate({top:"-"+o.css("height")},e.o.duration/2,function(){n(this).parent().remove(),e.hideOverlay()})},openModalInsert:function(e,t,i){var r=this,a=r.o.prefix,s=r.lang,l="";for(var d in t){var c=t[d],u=c.label===o?s[d]?s[d]:d:s[c.label]?s[c.label]:c.label;c.name===o&&(c.name=d),c.pattern||"url"!==d||(c.pattern=/^(http|https):\/\/([\w~#!:.?+=&%@!\-\/]+)$/,c.patternError=s.invalidUrl),l+='<label><input type="'+(c.type||"text")+'" name="'+c.name+'" value="'+(c.value||"")+'"><span class="'+a+'input-infos"><span>'+u+"</span></span></label>"}return r.openModal(e,l).on(a+"confirm",function(){var e=n(this).find("form"),o=!0,s={};for(var l in t){var d=n('input[name="'+l+'"]',e);s[l]=n.trim(d.val()),t[l].required&&""===s[l]?(o=!1,r.addErrorOnModalField(d,r.lang.required)):t[l].pattern&&!t[l].pattern.test(s[l])&&(o=!1,r.addErrorOnModalField(d,t[l].patternError))}o&&(r.restoreSelection(),i(s,t)&&(r.syncCode(),r.closeModal(),n(this).off(a+"confirm")))}).one(a+"cancel",function(){n(this).off(a+"confirm"),r.closeModal(),r.restoreSelection()})},addErrorOnModalField:function(e,t){var o=this.o.prefix,i=e.parent();e.on("change keyup",function(){i.removeClass(o+"input-error")}),i.addClass(o+"input-error").find("input+span").append(n("<span/>",{"class":o+"msg-error",text:t}))},saveSelection:function(){var t=this,n=t.doc;if(t.selection=null,e.getSelection){var o=e.getSelection();o.getRangeAt&&o.rangeCount&&(t.selection=o.getRangeAt(0))}else n.selection&&n.selection.createRange&&(t.selection=n.selection.createRange())},restoreSelection:function(){var t=this,n=t.selection;if(n)if(e.getSelection){var o=e.getSelection();o.removeAllRanges(),o.addRange(n)}else t.doc.selection&&n.select&&n.select()},isEnabled:function(){var e=new RegExp("(iPad|webOS)"),t=new RegExp("(iPhone|iPod|Android|BlackBerry|Windows Phone|ZuneWP7)"),n=navigator.userAgent;return this.o.tablet===!0&&e.test(n)||this.o.mobile===!0&&t.test(n)}}}(window,document,jQuery);
@@ -0,0 +1 @@
1
+ .trumbowyg-box,.trumbowyg-editor{display:block;position:relative;border:1px solid #DDD;width:96%;min-height:300px;margin:17px auto}.trumbowyg-box .trumbowyg-editor{margin:0 auto}.trumbowyg-box.trumbowyg-fullscreen{background:#FEFEFE}.trumbowyg-editor,.trumbowyg-textarea{position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1% 2%;min-height:300px;width:100%;border-style:none;resize:none;outline:none}.trumbowyg-box-blur .trumbowyg-editor *{color:transparent !important;text-shadow:0 0 7px #333}.trumbowyg-box-blur .trumbowyg-editor img{opacity:0.2}.trumbowyg-textarea{position:relative;display:block;overflow:auto;border:none;white-space:normal}.trumbowyg-editor[contenteditable=true]:empty:before{content:attr(placeholder);color:#999}.trumbowyg-button-pane{position:relative;width:100%;background:#ecf0f1;border-bottom:1px solid #d7e0e2;margin:0;padding:0;list-style-type:none;line-height:10px;-webkit-backface-visibility:hidden;backface-visibility:hidden}.trumbowyg-button-pane li{display:inline-block;text-align:center;overflow:hidden}.trumbowyg-button-pane li.trumbowyg-separator{width:1px;background:#d7e0e2;margin:0 5px;height:35px}.trumbowyg-button-pane.trumbowyg-disable li:not(.trumbowyg-not-disable) button:not(.trumbowyg-active){opacity:0.2;cursor:default}.trumbowyg-button-pane.trumbowyg-disable li.trumbowyg-separator{background:#e3e9eb}.trumbowyg-button-pane:not(.trumbowyg-disable) li button:hover,.trumbowyg-button-pane:not(.trumbowyg-disable) li button:focus,.trumbowyg-button-pane li button.trumbowyg-active,.trumbowyg-button-pane li.trumbowyg-not-disable button:hover,.trumbowyg-button-pane li.trumbowyg-not-disable button:focus{background-color:#FFF;outline:none}.trumbowyg-button-pane li .trumbowyg-open-dropdown:after{display:block;content:" ";position:absolute;top:25px;right:3px;height:0;width:0;border:3px solid transparent;border-top-color:#555}.trumbowyg-button-pane .trumbowyg-buttons-right{float:right;width:auto}.trumbowyg-button-pane .trumbowyg-buttons-right button{float:left}.trumbowyg-dropdown{width:200px;border:1px solid #ecf0f1;padding:5px 0;border-top:none;background:#FFF;margin-left:-1px;-webkit-box-shadow:rgba(0,0,0,0.1) 0 2px 3px;box-shadow:rgba(0,0,0,0.1) 0 2px 3px}.trumbowyg-dropdown button{display:block;width:100%;height:35px;line-height:35px;text-decoration:none;background:#FFF;padding:0 14px;color:#333;border:none;cursor:pointer;text-align:left;font-size:15px;-webkit-transition:all 0.15s;-o-transition:all 0.15s;transition:all 0.15s}.trumbowyg-dropdown button:hover,.trumbowyg-dropdown button:focus{background:#ecf0f1}.trumbowyg-modal{position:absolute;top:0;left:50%;margin-left:-260px;width:520px;height:290px;overflow:hidden}.trumbowyg-modal-box{position:absolute;top:0;left:50%;margin-left:-250px;width:500px;height:275px;z-index:1;background-color:#FFF;text-align:center;-webkit-box-shadow:rgba(0,0,0,0.2) 0 2px 3px;box-shadow:rgba(0,0,0,0.2) 0 2px 3px;-webkit-backface-visibility:hidden;backface-visibility:hidden}.trumbowyg-modal-box .trumbowyg-modal-title{font-size:24px;font-weight:bold;margin:0 0 20px;padding:15px 0 13px;display:block;border-bottom:1px solid #EEE;color:#333;background:#fbfcfc}.trumbowyg-modal-box .trumbowyg-progress{width:100%;background:#F00;height:3px;position:absolute;top:58px}.trumbowyg-modal-box .trumbowyg-progress .trumbowyg-progress-bar{background:#2BC06A;height:100%;-webkit-transition:width 0.15s linear;-o-transition:width 0.15s linear;transition:width 0.15s linear}.trumbowyg-modal-box label{display:block;position:relative;margin:15px 12px;height:27px;line-height:27px;overflow:hidden}.trumbowyg-modal-box label .trumbowyg-input-infos{display:block;text-align:left;height:25px;line-height:25px;-webkit-transition:all 0.15;-o-transition:all 0.15;transition:all 0.15}.trumbowyg-modal-box label .trumbowyg-input-infos span{display:block;color:#859fa5;background-color:#fbfcfc;border:1px solid #DEDEDE;padding:0 2%;width:19.5%}.trumbowyg-modal-box label .trumbowyg-input-infos span.trumbowyg-msg-error{color:#e74c3c}.trumbowyg-modal-box label.trumbowyg-input-error input,.trumbowyg-modal-box label.trumbowyg-input-error textarea{border:1px solid #e74c3c}.trumbowyg-modal-box label.trumbowyg-input-error .trumbowyg-input-infos{margin-top:-27px}.trumbowyg-modal-box label input{position:absolute;top:0;right:0;height:25px;line-height:25px;border:1px solid #DEDEDE;background:transparent;width:72%;padding:0 2%;margin:0 0 0 23%;-webkit-transition:all 0.15s;-o-transition:all 0.15s;transition:all 0.15s}.trumbowyg-modal-box label input:hover,.trumbowyg-modal-box label input:focus{outline:none;border:1px solid #95a5a6}.trumbowyg-modal-box label input:focus{background:rgba(230,230,255,0.1)}.trumbowyg-modal-box .error{margin-top:25px;display:block;color:red}.trumbowyg-modal-box .trumbowyg-modal-button{position:absolute;bottom:10px;right:0;text-decoration:none;color:#FFF;display:block;width:100px;height:35px;line-height:33px;margin:0 10px;background-color:#333;border:none;border-top:none;cursor:pointer;font-family:"Trebuchet MS", Helvetica, Verdana, sans-serif;font-size:16px;-webkit-transition:all 0.15s;-o-transition:all 0.15s;transition:all 0.15s}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit{right:110px;background:#2bc069}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:hover,.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:focus{background:#40d47d;outline:none}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:active{background:#25a259}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset{color:#555;background:#e6e6e6}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:hover,.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:focus{background:#fbfbfb;outline:none}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:active{background:#d4d4d4}.trumbowyg-overlay{position:absolute;background-color:rgba(255,255,255,0.5);width:100%;left:0;display:none}.trumbowyg-fullscreen{position:fixed;top:0;left:0;width:100%;height:100%;margin:0;padding:0;z-index:99999}.trumbowyg-fullscreen.trumbowyg-box,.trumbowyg-fullscreen .trumbowyg-editor{border:none}.trumbowyg-fullscreen .trumbowyg-overlay{height:100% !important}.trumbowyg-editor object,.trumbowyg-editor embed,.trumbowyg-editor video,.trumbowyg-editor img{width:auto;max-width:100%}.trumbowyg-editor video,.trumbowyg-editor img{height:auto}.trumbowyg-editor img{cursor:move}.trumbowyg-editor.trumbowyg-reset-css{background:#FEFEFE !important;font-family:"Trebuchet MS", Helvetica, Verdana, sans-serif !important;font-size:14px !important;line-height:1.45em !important;white-space:normal !important;color:#333}.trumbowyg-editor.trumbowyg-reset-css a{color:#15c !important;text-decoration:underline !important}.trumbowyg-editor.trumbowyg-reset-css div,.trumbowyg-editor.trumbowyg-reset-css p,.trumbowyg-editor.trumbowyg-reset-css ul,.trumbowyg-editor.trumbowyg-reset-css ol,.trumbowyg-editor.trumbowyg-reset-css blockquote{-webkit-box-shadow:none !important;box-shadow:none !important;background:none !important;margin:0 !important;margin-bottom:15px !important;line-height:1.4em !important;font-family:"Trebuchet MS", Helvetica, Verdana, sans-serif !important;font-size:14px !important;border:none}.trumbowyg-editor.trumbowyg-reset-css iframe,.trumbowyg-editor.trumbowyg-reset-css object,.trumbowyg-editor.trumbowyg-reset-css hr{margin-bottom:15px !important}.trumbowyg-editor.trumbowyg-reset-css blockquote{margin-left:32px !important;font-style:italic !important;color:#555}.trumbowyg-editor.trumbowyg-reset-css ul,.trumbowyg-editor.trumbowyg-reset-css ol{padding-left:20px !important}.trumbowyg-editor.trumbowyg-reset-css ul ul,.trumbowyg-editor.trumbowyg-reset-css ol ol,.trumbowyg-editor.trumbowyg-reset-css ul ol,.trumbowyg-editor.trumbowyg-reset-css ol ul{border:none;margin:2px !important;padding:0 !important;padding-left:24px !important}.trumbowyg-editor.trumbowyg-reset-css hr{display:block;height:1px;border:none;border-top:1px solid #CCC}.trumbowyg-editor.trumbowyg-reset-css h1,.trumbowyg-editor.trumbowyg-reset-css h2,.trumbowyg-editor.trumbowyg-reset-css h3,.trumbowyg-editor.trumbowyg-reset-css h4{color:#111;background:none;margin:0 !important;padding:0 !important;font-weight:bold}.trumbowyg-editor.trumbowyg-reset-css h1{font-size:32px !important;line-height:38px !important;margin-bottom:20px !important}.trumbowyg-editor.trumbowyg-reset-css h2{font-size:26px !important;line-height:34px !important;margin-bottom:15px !important}.trumbowyg-editor.trumbowyg-reset-css h3{font-size:22px !important;line-height:28px !important;margin-bottom:7px !important}.trumbowyg-editor.trumbowyg-reset-css h4{font-size:16px !important;line-height:22px !important;margin-bottom:7px !important}.trumbowyg-button-pane li button{display:block;position:relative;text-indent:-9999px;width:35px;height:35px;overflow:hidden;background:transparent url("/assets/trumbowyg/icons-60fe5a8fdf8b247fe07ca2454df66f80.png") no-repeat;border:none;cursor:pointer;-webkit-transition:background-color 0.15s, background-image 0.15s, opacity 0.15s;-o-transition:background-color 0.15s, background-image 0.15s, opacity 0.15s;transition:background-color 0.15s, background-image 0.15s, opacity 0.15s}.trumbowyg-button-pane li button.trumbowyg-viewHTML-button{background-position:5px -545px}.trumbowyg-button-pane li button.trumbowyg-formatting-button{background-position:5px -120px}.trumbowyg-button-pane li button.trumbowyg-bold-button,.trumbowyg-button-pane li button.trumbowyg-strong-button{background-position:5px -45px}.trumbowyg-button-pane li button.trumbowyg-italic-button,.trumbowyg-button-pane li button.trumbowyg-em-button{background-position:5px 5px}.trumbowyg-button-pane li button.trumbowyg-underline-button{background-position:5px -470px}.trumbowyg-button-pane li button.trumbowyg-strikethrough-button,.trumbowyg-button-pane li button.trumbowyg-del-button{background-position:5px -445px}.trumbowyg-button-pane li button.trumbowyg-link-button{background-position:5px -345px}.trumbowyg-button-pane li button.trumbowyg-insertImage-button{background-position:5px -245px}.trumbowyg-button-pane li button.trumbowyg-justifyLeft-button{background-position:5px -320px}.trumbowyg-button-pane li button.trumbowyg-justifyCenter-button{background-position:5px -70px}.trumbowyg-button-pane li button.trumbowyg-justifyRight-button{background-position:5px -395px}.trumbowyg-button-pane li button.trumbowyg-justifyFull-button{background-position:5px -295px}.trumbowyg-button-pane li button.trumbowyg-unorderedList-button{background-position:5px -495px}.trumbowyg-button-pane li button.trumbowyg-orderedList-button{background-position:5px -370px}.trumbowyg-button-pane li button.trumbowyg-horizontalRule-button{background-position:5px -220px}.trumbowyg-button-pane li button.trumbowyg-fullscreen-button{background-position:5px -170px}.trumbowyg-button-pane li button.trumbowyg-close-button{background-position:5px -95px}.trumbowyg-fullscreen .trumbowyg-button-pane li button.trumbowyg-fullscreen-button{background-position:5px -145px}.trumbowyg-button-pane li:first-child button{margin-left:6px}.trumbowyg-button-pane li:last-child button{margin-right:6px}.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-bold-button,.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-strong-button{background-position:5px -195px}.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-underline-button{background-position:5px -420px}.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-strikethrough-button,.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-del-button{background-position:5px -270px}@media only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 4 / 3), only screen and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx){.trumbowyg-button-pane li button{-webkit-background-size:25px 575px !important;background-size:25px 575px !important;background-image:url("/assets/trumbowyg/icons-2x-0977e4f2195ed320a8dcc57e194af523.png") !important}.trumbowyg-button-pane li button.trumbowyg-viewHTML-button{background-position:5px -545px}.trumbowyg-button-pane li button.trumbowyg-formatting-button{background-position:5px -120px}.trumbowyg-button-pane li button.trumbowyg-bold-button,.trumbowyg-button-pane li button.trumbowyg-strong-button{background-position:5px -45px}.trumbowyg-button-pane li button.trumbowyg-italic-button,.trumbowyg-button-pane li button.trumbowyg-em-button{background-position:5px 5px}.trumbowyg-button-pane li button.trumbowyg-underline-button{background-position:5px -470px}.trumbowyg-button-pane li button.trumbowyg-strikethrough-button,.trumbowyg-button-pane li button.trumbowyg-del-button{background-position:5px -445px}.trumbowyg-button-pane li button.trumbowyg-link-button{background-position:5px -345px}.trumbowyg-button-pane li button.trumbowyg-insertImage-button{background-position:5px -245px}.trumbowyg-button-pane li button.trumbowyg-justifyLeft-button{background-position:5px -320px}.trumbowyg-button-pane li button.trumbowyg-justifyCenter-button{background-position:5px -70px}.trumbowyg-button-pane li button.trumbowyg-justifyRight-button{background-position:5px -395px}.trumbowyg-button-pane li button.trumbowyg-justifyFull-button{background-position:5px -295px}.trumbowyg-button-pane li button.trumbowyg-unorderedList-button{background-position:5px -495px}.trumbowyg-button-pane li button.trumbowyg-orderedList-button{background-position:5px -370px}.trumbowyg-button-pane li button.trumbowyg-horizontalRule-button{background-position:5px -220px}.trumbowyg-button-pane li button.trumbowyg-fullscreen-button{background-position:5px -170px}.trumbowyg-button-pane li button.trumbowyg-close-button{background-position:5px -95px}.trumbowyg-fullscreen .trumbowyg-button-pane li a.trumbowyg-fullscreen-button{background-position:5px -145px}.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-bold-button,.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-strong-button{background-position:5px -195px}.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-underline-button{background-position:5px -420px}.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-strikethrough-button,.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-del-button{background-position:5px -270px}}
data/torba-rails.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "torba-rails"
3
- spec.version = "1.0.0"
3
+ spec.version = "1.0.1"
4
4
  spec.authors = ["Andrii Malyshko"]
5
5
  spec.email = ["mail@nashbridges.me"]
6
6
  spec.description = "Torba + Rails integration"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: torba-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrii Malyshko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-10 00:00:00.000000000 Z
11
+ date: 2016-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: torba
@@ -135,6 +135,33 @@ files:
135
135
  - test/3.2/config/locales/en.yml
136
136
  - test/3.2/config/routes.rb
137
137
  - test/3.2/script/rails
138
+ - test/4.1/Gemfile
139
+ - test/4.1/Gemfile.lock
140
+ - test/4.1/Rakefile
141
+ - test/4.1/Torbafile
142
+ - test/4.1/app/assets/javascripts/application.js
143
+ - test/4.1/app/assets/stylesheets/application.scss
144
+ - test/4.1/app/controllers/application_controller.rb
145
+ - test/4.1/app/helpers/application_helper.rb
146
+ - test/4.1/app/views/layouts/application.html.erb
147
+ - test/4.1/bin/bundle
148
+ - test/4.1/bin/rails
149
+ - test/4.1/bin/rake
150
+ - test/4.1/config.ru
151
+ - test/4.1/config/application.rb
152
+ - test/4.1/config/boot.rb
153
+ - test/4.1/config/environment.rb
154
+ - test/4.1/config/environments/development.rb
155
+ - test/4.1/config/environments/production.rb
156
+ - test/4.1/config/environments/test.rb
157
+ - test/4.1/config/initializers/assets.rb
158
+ - test/4.1/config/initializers/cookies_serializer.rb
159
+ - test/4.1/config/initializers/filter_parameter_logging.rb
160
+ - test/4.1/config/initializers/session_store.rb
161
+ - test/4.1/config/initializers/wrap_parameters.rb
162
+ - test/4.1/config/locales/en.yml
163
+ - test/4.1/config/routes.rb
164
+ - test/4.1/config/secrets.yml
138
165
  - test/4.2/Gemfile
139
166
  - test/4.2/Gemfile.lock
140
167
  - test/4.2/Rakefile
@@ -198,6 +225,10 @@ files:
198
225
  - test/compiled_assets/3.2/application-406b208e73b83fe37135274c5157c8e3.css
199
226
  - test/compiled_assets/3.2/trumbowyg/icons-0b2826fbd974348c269c2b8017a14314.png
200
227
  - test/compiled_assets/3.2/trumbowyg/icons-2x-cc69d8bc62651602e75c2f7097cf5187.png
228
+ - test/compiled_assets/4.1/application-959396ba4d98dd11cf6ac10b43f7fa97.js
229
+ - test/compiled_assets/4.1/application-b93806e6555eb26989308c4d06311423.css
230
+ - test/compiled_assets/4.1/trumbowyg/icons-2x-0977e4f2195ed320a8dcc57e194af523.png
231
+ - test/compiled_assets/4.1/trumbowyg/icons-60fe5a8fdf8b247fe07ca2454df66f80.png
201
232
  - test/compiled_assets/4.2+/application-7cdb22c682ee9bf44774492034be6952becd2c75184c101017152af1476b12a8.css
202
233
  - test/compiled_assets/4.2+/application-c7e50f0b91ececdd620e1c86789b65677d9bbe0f35ab4717a9a522e6c89a56f9.js
203
234
  - test/compiled_assets/4.2+/trumbowyg/icons-2x-39fe92cd396082eb94f0c92103537209ba97ffa3079377bbe55fea857abe5341.png
@@ -252,6 +283,33 @@ test_files:
252
283
  - test/3.2/config/locales/en.yml
253
284
  - test/3.2/config/routes.rb
254
285
  - test/3.2/script/rails
286
+ - test/4.1/Gemfile
287
+ - test/4.1/Gemfile.lock
288
+ - test/4.1/Rakefile
289
+ - test/4.1/Torbafile
290
+ - test/4.1/app/assets/javascripts/application.js
291
+ - test/4.1/app/assets/stylesheets/application.scss
292
+ - test/4.1/app/controllers/application_controller.rb
293
+ - test/4.1/app/helpers/application_helper.rb
294
+ - test/4.1/app/views/layouts/application.html.erb
295
+ - test/4.1/bin/bundle
296
+ - test/4.1/bin/rails
297
+ - test/4.1/bin/rake
298
+ - test/4.1/config.ru
299
+ - test/4.1/config/application.rb
300
+ - test/4.1/config/boot.rb
301
+ - test/4.1/config/environment.rb
302
+ - test/4.1/config/environments/development.rb
303
+ - test/4.1/config/environments/production.rb
304
+ - test/4.1/config/environments/test.rb
305
+ - test/4.1/config/initializers/assets.rb
306
+ - test/4.1/config/initializers/cookies_serializer.rb
307
+ - test/4.1/config/initializers/filter_parameter_logging.rb
308
+ - test/4.1/config/initializers/session_store.rb
309
+ - test/4.1/config/initializers/wrap_parameters.rb
310
+ - test/4.1/config/locales/en.yml
311
+ - test/4.1/config/routes.rb
312
+ - test/4.1/config/secrets.yml
255
313
  - test/4.2/Gemfile
256
314
  - test/4.2/Gemfile.lock
257
315
  - test/4.2/Rakefile
@@ -315,6 +373,10 @@ test_files:
315
373
  - test/compiled_assets/3.2/application-406b208e73b83fe37135274c5157c8e3.css
316
374
  - test/compiled_assets/3.2/trumbowyg/icons-0b2826fbd974348c269c2b8017a14314.png
317
375
  - test/compiled_assets/3.2/trumbowyg/icons-2x-cc69d8bc62651602e75c2f7097cf5187.png
376
+ - test/compiled_assets/4.1/application-959396ba4d98dd11cf6ac10b43f7fa97.js
377
+ - test/compiled_assets/4.1/application-b93806e6555eb26989308c4d06311423.css
378
+ - test/compiled_assets/4.1/trumbowyg/icons-2x-0977e4f2195ed320a8dcc57e194af523.png
379
+ - test/compiled_assets/4.1/trumbowyg/icons-60fe5a8fdf8b247fe07ca2454df66f80.png
318
380
  - test/compiled_assets/4.2+/application-7cdb22c682ee9bf44774492034be6952becd2c75184c101017152af1476b12a8.css
319
381
  - test/compiled_assets/4.2+/application-c7e50f0b91ececdd620e1c86789b65677d9bbe0f35ab4717a9a522e6c89a56f9.js
320
382
  - test/compiled_assets/4.2+/trumbowyg/icons-2x-39fe92cd396082eb94f0c92103537209ba97ffa3079377bbe55fea857abe5341.png