attachinary-dox 1.3.1.pre → 1.3.1.pre2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +71 -0
- data/lib/attachinary/version.rb +1 -1
- data/spec/dummy/Gemfile +20 -0
- data/spec/dummy/Gemfile.lock +267 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/active_record/note.rb +12 -0
- data/spec/dummy/app/assets/config/manifest.js +2 -0
- data/spec/dummy/app/assets/javascripts/application.js +28 -0
- data/spec/dummy/app/assets/stylesheets/application.css +21 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/notes_controller.rb +56 -0
- data/spec/dummy/app/views/layouts/application.html.erb +15 -0
- data/spec/dummy/app/views/notes/_form_builder.html.erb +28 -0
- data/spec/dummy/app/views/notes/_form_nojs.html.erb +17 -0
- data/spec/dummy/app/views/notes/_form_raw.html.erb +28 -0
- data/spec/dummy/app/views/notes/_form_simple_form.html.erb +17 -0
- data/spec/dummy/app/views/notes/_note.html.erb +15 -0
- data/spec/dummy/app/views/notes/edit.html.erb +1 -0
- data/spec/dummy/app/views/notes/index.html.erb +12 -0
- data/spec/dummy/app/views/notes/new.html.erb +1 -0
- data/spec/dummy/config/application.rb +62 -0
- data/spec/dummy/config/boot.rb +4 -0
- data/spec/dummy/config/cloudinary.yml.example +15 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +33 -0
- data/spec/dummy/config/environments/production.rb +63 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/attachinary.rb +1 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +5 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/migrate/20120608091037_create_tables.rb +17 -0
- data/spec/dummy/db/migrate/20120608104143_create_notes.rb +9 -0
- data/spec/dummy/db/schema.rb +35 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/spec/rails_helper.rb +48 -0
- data/spec/dummy/spec/spec_helper.rb +92 -0
- data/spec/dummy/vendor/assets/javascripts/jquery.fileupload.js +1604 -0
- data/spec/dummy/vendor/assets/javascripts/jquery.iframe-transport.js +227 -0
- data/spec/dummy/vendor/assets/javascripts/jquery.ui.widget.js +528 -0
- data/spec/factories.rb +17 -0
- data/spec/features/notes_spec.rb +97 -0
- data/spec/models/attachinary/file_spec.rb +44 -0
- data/spec/models/note_spec.rb +176 -0
- data/spec/spec_helper.rb +78 -0
- data/spec/support/A.gif +0 -0
- data/spec/support/A.txt +1 -0
- data/spec/support/B.gif +0 -0
- data/spec/support/C.gif +0 -0
- data/spec/support/request_helpers.rb +16 -0
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/bigdecimal-3.1.9/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/bigdecimal-3.1.9/mkmf.log +3 -3
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/cgi-0.4.2/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.4.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/erb-4.0.4/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.12.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/mini_racer-0.18.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/nio4r-2.7.4/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/psych-5.2.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/puma-6.4.2/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.1.7/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/websocket-driver-0.7.7/gem_make.out +5 -5
- metadata +114 -160
- data/lib/tasks/ci.rake +0 -16
- data/vendor/cache/actioncable-7.2.2.1.gem +0 -0
- data/vendor/cache/actionmailbox-7.2.2.1.gem +0 -0
- data/vendor/cache/actionmailer-7.2.2.1.gem +0 -0
- data/vendor/cache/actionpack-7.2.2.1.gem +0 -0
- data/vendor/cache/actiontext-7.2.2.1.gem +0 -0
- data/vendor/cache/actionview-7.2.2.1.gem +0 -0
- data/vendor/cache/activejob-7.2.2.1.gem +0 -0
- data/vendor/cache/activemodel-7.2.2.1.gem +0 -0
- data/vendor/cache/activerecord-7.2.2.1.gem +0 -0
- data/vendor/cache/activestorage-7.2.2.1.gem +0 -0
- data/vendor/cache/activesupport-7.2.2.1.gem +0 -0
- data/vendor/cache/addressable-2.8.7.gem +0 -0
- data/vendor/cache/base64-0.2.0.gem +0 -0
- data/vendor/cache/benchmark-0.4.0.gem +0 -0
- data/vendor/cache/bigdecimal-3.1.9.gem +0 -0
- data/vendor/cache/builder-3.3.0.gem +0 -0
- data/vendor/cache/capybara-3.40.0.gem +0 -0
- data/vendor/cache/capybara-screenshot-1.0.26.gem +0 -0
- data/vendor/cache/cgi-0.4.2.gem +0 -0
- data/vendor/cache/childprocess-5.1.0.gem +0 -0
- data/vendor/cache/cloudinary-2.3.0.gem +0 -0
- data/vendor/cache/coderay-1.1.3.gem +0 -0
- data/vendor/cache/coffee-rails-5.0.0.gem +0 -0
- data/vendor/cache/coffee-script-2.4.1.gem +0 -0
- data/vendor/cache/coffee-script-source-1.12.2.gem +0 -0
- data/vendor/cache/concurrent-ruby-1.3.5.gem +0 -0
- data/vendor/cache/connection_pool-2.5.3.gem +0 -0
- data/vendor/cache/crass-1.0.6.gem +0 -0
- data/vendor/cache/database_cleaner-2.1.0.gem +0 -0
- data/vendor/cache/database_cleaner-active_record-2.2.1.gem +0 -0
- data/vendor/cache/database_cleaner-core-2.0.1.gem +0 -0
- data/vendor/cache/date-3.4.1.gem +0 -0
- data/vendor/cache/diff-lcs-1.6.2.gem +0 -0
- data/vendor/cache/dotenv-3.1.2.gem +0 -0
- data/vendor/cache/drb-2.2.3.gem +0 -0
- data/vendor/cache/erb-4.0.4.gem +0 -0
- data/vendor/cache/erubi-1.13.1.gem +0 -0
- data/vendor/cache/execjs-2.10.0.gem +0 -0
- data/vendor/cache/factory_bot-6.5.1.gem +0 -0
- data/vendor/cache/factory_bot_rails-6.4.4.gem +0 -0
- data/vendor/cache/faraday-2.13.1.gem +0 -0
- data/vendor/cache/faraday-follow_redirects-0.3.0.gem +0 -0
- data/vendor/cache/faraday-multipart-1.1.0.gem +0 -0
- data/vendor/cache/faraday-net_http-3.4.0.gem +0 -0
- data/vendor/cache/ffi-1.17.2-aarch64-linux-gnu.gem +0 -0
- data/vendor/cache/ffi-1.17.2-aarch64-linux-musl.gem +0 -0
- data/vendor/cache/ffi-1.17.2-arm-linux-gnu.gem +0 -0
- data/vendor/cache/ffi-1.17.2-arm-linux-musl.gem +0 -0
- data/vendor/cache/ffi-1.17.2-arm64-darwin.gem +0 -0
- data/vendor/cache/ffi-1.17.2-x86_64-darwin.gem +0 -0
- data/vendor/cache/ffi-1.17.2-x86_64-linux-gnu.gem +0 -0
- data/vendor/cache/ffi-1.17.2-x86_64-linux-musl.gem +0 -0
- data/vendor/cache/formatador-1.1.0.gem +0 -0
- data/vendor/cache/globalid-1.2.1.gem +0 -0
- data/vendor/cache/guard-2.19.1.gem +0 -0
- data/vendor/cache/guard-compat-1.2.1.gem +0 -0
- data/vendor/cache/guard-rspec-4.7.3.gem +0 -0
- data/vendor/cache/i18n-1.14.7.gem +0 -0
- data/vendor/cache/io-console-0.8.0.gem +0 -0
- data/vendor/cache/irb-1.15.2.gem +0 -0
- data/vendor/cache/jquery-rails-4.6.0.gem +0 -0
- data/vendor/cache/json-2.12.0.gem +0 -0
- data/vendor/cache/launchy-3.1.1.gem +0 -0
- data/vendor/cache/libv8-node-23.6.1.0-aarch64-linux.gem +0 -0
- data/vendor/cache/libv8-node-23.6.1.0-arm64-darwin.gem +0 -0
- data/vendor/cache/libv8-node-23.6.1.0-x86_64-darwin.gem +0 -0
- data/vendor/cache/libv8-node-23.6.1.0-x86_64-linux-musl.gem +0 -0
- data/vendor/cache/libv8-node-23.6.1.0-x86_64-linux.gem +0 -0
- data/vendor/cache/libv8-node-23.6.1.0.gem +0 -0
- data/vendor/cache/listen-3.0.8.gem +0 -0
- data/vendor/cache/logger-1.7.0.gem +0 -0
- data/vendor/cache/loofah-2.24.1.gem +0 -0
- data/vendor/cache/lumberjack-1.2.10.gem +0 -0
- data/vendor/cache/mail-2.8.1.gem +0 -0
- data/vendor/cache/marcel-1.0.4.gem +0 -0
- data/vendor/cache/matrix-0.4.2.gem +0 -0
- data/vendor/cache/method_source-1.1.0.gem +0 -0
- data/vendor/cache/mime-types-3.7.0.gem +0 -0
- data/vendor/cache/mime-types-data-3.2025.0520.gem +0 -0
- data/vendor/cache/mini_mime-1.1.5.gem +0 -0
- data/vendor/cache/mini_racer-0.18.1.gem +0 -0
- data/vendor/cache/minitest-5.25.5.gem +0 -0
- data/vendor/cache/multipart-post-2.4.1.gem +0 -0
- data/vendor/cache/nenv-0.3.0.gem +0 -0
- data/vendor/cache/net-http-0.6.0.gem +0 -0
- data/vendor/cache/net-imap-0.5.8.gem +0 -0
- data/vendor/cache/net-pop-0.1.2.gem +0 -0
- data/vendor/cache/net-protocol-0.2.2.gem +0 -0
- data/vendor/cache/net-smtp-0.5.1.gem +0 -0
- data/vendor/cache/nio4r-2.7.4.gem +0 -0
- data/vendor/cache/nokogiri-1.18.8-aarch64-linux-gnu.gem +0 -0
- data/vendor/cache/nokogiri-1.18.8-aarch64-linux-musl.gem +0 -0
- data/vendor/cache/nokogiri-1.18.8-arm-linux-gnu.gem +0 -0
- data/vendor/cache/nokogiri-1.18.8-arm-linux-musl.gem +0 -0
- data/vendor/cache/nokogiri-1.18.8-arm64-darwin.gem +0 -0
- data/vendor/cache/nokogiri-1.18.8-x86_64-darwin.gem +0 -0
- data/vendor/cache/nokogiri-1.18.8-x86_64-linux-gnu.gem +0 -0
- data/vendor/cache/nokogiri-1.18.8-x86_64-linux-musl.gem +0 -0
- data/vendor/cache/notiffany-0.1.3.gem +0 -0
- data/vendor/cache/ostruct-0.6.1.gem +0 -0
- data/vendor/cache/pp-0.6.2.gem +0 -0
- data/vendor/cache/prettyprint-0.2.0.gem +0 -0
- data/vendor/cache/pry-0.15.2.gem +0 -0
- data/vendor/cache/psych-5.2.6.gem +0 -0
- data/vendor/cache/public_suffix-6.0.2.gem +0 -0
- data/vendor/cache/puma-6.4.2.gem +0 -0
- data/vendor/cache/racc-1.8.1.gem +0 -0
- data/vendor/cache/rack-3.1.15.gem +0 -0
- data/vendor/cache/rack-session-2.1.1.gem +0 -0
- data/vendor/cache/rack-test-2.2.0.gem +0 -0
- data/vendor/cache/rackup-2.2.1.gem +0 -0
- data/vendor/cache/rails-7.2.2.1.gem +0 -0
- data/vendor/cache/rails-dom-testing-2.3.0.gem +0 -0
- data/vendor/cache/rails-html-sanitizer-1.6.2.gem +0 -0
- data/vendor/cache/railties-7.2.2.1.gem +0 -0
- data/vendor/cache/rake-13.2.1.gem +0 -0
- data/vendor/cache/rb-fsevent-0.9.8.gem +0 -0
- data/vendor/cache/rb-inotify-0.11.1.gem +0 -0
- data/vendor/cache/rdoc-6.14.0.gem +0 -0
- data/vendor/cache/regexp_parser-2.10.0.gem +0 -0
- data/vendor/cache/reline-0.6.1.gem +0 -0
- data/vendor/cache/rexml-3.4.1.gem +0 -0
- data/vendor/cache/rspec-3.13.0.gem +0 -0
- data/vendor/cache/rspec-core-3.13.3.gem +0 -0
- data/vendor/cache/rspec-expectations-3.13.4.gem +0 -0
- data/vendor/cache/rspec-mocks-3.13.4.gem +0 -0
- data/vendor/cache/rspec-rails-8.0.0.gem +0 -0
- data/vendor/cache/rspec-support-3.13.3.gem +0 -0
- data/vendor/cache/rspec_junit_formatter-0.6.0.gem +0 -0
- data/vendor/cache/rubyzip-2.4.1.gem +0 -0
- data/vendor/cache/securerandom-0.4.1.gem +0 -0
- data/vendor/cache/selenium-webdriver-4.32.0.gem +0 -0
- data/vendor/cache/shellany-0.0.1.gem +0 -0
- data/vendor/cache/simple_form-5.3.1.gem +0 -0
- data/vendor/cache/sprockets-4.2.1.gem +0 -0
- data/vendor/cache/sprockets-rails-3.5.2.gem +0 -0
- data/vendor/cache/sqlite3-2.6.0-aarch64-linux-gnu.gem +0 -0
- data/vendor/cache/sqlite3-2.6.0-aarch64-linux-musl.gem +0 -0
- data/vendor/cache/sqlite3-2.6.0-arm-linux-gnu.gem +0 -0
- data/vendor/cache/sqlite3-2.6.0-arm-linux-musl.gem +0 -0
- data/vendor/cache/sqlite3-2.6.0-arm64-darwin.gem +0 -0
- data/vendor/cache/sqlite3-2.6.0-x86_64-darwin.gem +0 -0
- data/vendor/cache/sqlite3-2.6.0-x86_64-linux-gnu.gem +0 -0
- data/vendor/cache/sqlite3-2.6.0-x86_64-linux-musl.gem +0 -0
- data/vendor/cache/stringio-3.1.7.gem +0 -0
- data/vendor/cache/thor-1.3.2.gem +0 -0
- data/vendor/cache/timeout-0.4.3.gem +0 -0
- data/vendor/cache/tzinfo-2.0.6.gem +0 -0
- data/vendor/cache/uri-1.0.3.gem +0 -0
- data/vendor/cache/useragent-0.16.11.gem +0 -0
- data/vendor/cache/valid_attribute-2.0.0.gem +0 -0
- data/vendor/cache/websocket-1.2.11.gem +0 -0
- data/vendor/cache/websocket-driver-0.7.7.gem +0 -0
- data/vendor/cache/websocket-extensions-0.1.5.gem +0 -0
- data/vendor/cache/xpath-3.2.0.gem +0 -0
- data/vendor/cache/zeitwerk-2.6.18.gem +0 -0
@@ -0,0 +1,62 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
require "sprockets/railtie"
|
5
|
+
require "active_record/railtie"
|
6
|
+
Bundler.require :default
|
7
|
+
require "attachinary"
|
8
|
+
|
9
|
+
module Dummy
|
10
|
+
class Application < Rails::Application
|
11
|
+
# Settings in config/environments/* take precedence over those specified here.
|
12
|
+
# Application configuration should go into files in config/initializers
|
13
|
+
# -- all .rb files in that directory are automatically loaded.
|
14
|
+
|
15
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
16
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
17
|
+
config.autoload_paths.reject!{ |p| p =~ /\/app\/(\w+)$/ && !%w(controllers helpers views).include?($1) }
|
18
|
+
config.autoload_paths += [ "#{config.root}/app/active_record" ]
|
19
|
+
|
20
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
21
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
22
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
23
|
+
|
24
|
+
# Activate observers that should always be running.
|
25
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
26
|
+
|
27
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
28
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
29
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
30
|
+
|
31
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
32
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
33
|
+
# config.i18n.default_locale = :de
|
34
|
+
|
35
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
36
|
+
config.encoding = "utf-8"
|
37
|
+
|
38
|
+
config.eager_load = true
|
39
|
+
|
40
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
41
|
+
config.filter_parameters += [:password]
|
42
|
+
|
43
|
+
# Enable escaping HTML in JSON.
|
44
|
+
config.active_support.escape_html_entities_in_json = true
|
45
|
+
|
46
|
+
# Use SQL instead of Active Record's schema dumper when creating the database.
|
47
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
48
|
+
# like if you have constraints or database-specific column types
|
49
|
+
# config.active_record.schema_format = :sql
|
50
|
+
|
51
|
+
# Enable the asset pipeline
|
52
|
+
config.assets.enabled = true
|
53
|
+
|
54
|
+
# Version of your assets, change this if you want to expire all your assets
|
55
|
+
config.assets.version = '1.0'
|
56
|
+
|
57
|
+
config.secret_key_base = 'xxx'
|
58
|
+
|
59
|
+
I18n.enforce_available_locales = false
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
default: &default
|
2
|
+
enhance_image_tag: true
|
3
|
+
static_image_support: true
|
4
|
+
cdn_subdomain: true
|
5
|
+
secure_distribution: false
|
6
|
+
private_cdn: false
|
7
|
+
cloud_name: zogash
|
8
|
+
api_key: 'xxx'
|
9
|
+
api_secret: xxx
|
10
|
+
|
11
|
+
development:
|
12
|
+
<<: *default
|
13
|
+
|
14
|
+
test:
|
15
|
+
<<: *default
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
development:
|
7
|
+
adapter: sqlite3
|
8
|
+
database: db/development.sqlite3
|
9
|
+
pool: 5
|
10
|
+
timeout: 5000
|
11
|
+
|
12
|
+
# Warning: The database defined as "test" will be erased and
|
13
|
+
# re-generated from your development database when you run "rake".
|
14
|
+
# Do not set this db to the same as development or production.
|
15
|
+
test:
|
16
|
+
adapter: sqlite3
|
17
|
+
database: db/test.sqlite3
|
18
|
+
pool: 5
|
19
|
+
timeout: 5000
|
20
|
+
|
21
|
+
production:
|
22
|
+
adapter: sqlite3
|
23
|
+
database: db/production.sqlite3
|
24
|
+
pool: 5
|
25
|
+
timeout: 5000
|
@@ -0,0 +1,33 @@
|
|
1
|
+
Dummy::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
|
+
# Show full error reports and disable caching
|
10
|
+
config.consider_all_requests_local = true
|
11
|
+
config.action_controller.perform_caching = false
|
12
|
+
|
13
|
+
# Don't care if the mailer can't send
|
14
|
+
config.action_mailer.raise_delivery_errors = false
|
15
|
+
|
16
|
+
# Print deprecation notices to the Rails logger
|
17
|
+
config.active_support.deprecation = :log
|
18
|
+
|
19
|
+
# Only use best-standards-support built into browsers
|
20
|
+
config.action_dispatch.best_standards_support = :builtin
|
21
|
+
|
22
|
+
if Rails::VERSION::MAJOR == 3
|
23
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
24
|
+
end
|
25
|
+
|
26
|
+
# Do not compress assets
|
27
|
+
config.assets.compress = false
|
28
|
+
|
29
|
+
# Expands the lines which load the assets
|
30
|
+
config.assets.debug = true
|
31
|
+
|
32
|
+
config.eager_load = false
|
33
|
+
end
|
@@ -0,0 +1,63 @@
|
|
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
|
+
# Full error reports are disabled and caching is turned on
|
8
|
+
config.consider_all_requests_local = false
|
9
|
+
config.action_controller.perform_caching = true
|
10
|
+
|
11
|
+
# Disable Rails's static asset server (Apache or nginx will already do this)
|
12
|
+
config.serve_static_assets = false
|
13
|
+
|
14
|
+
# Compress JavaScripts and CSS
|
15
|
+
config.assets.compress = true
|
16
|
+
|
17
|
+
# Don't fallback to assets pipeline if a precompiled asset is missed
|
18
|
+
config.assets.compile = false
|
19
|
+
|
20
|
+
# Generate digests for assets URLs
|
21
|
+
config.assets.digest = true
|
22
|
+
|
23
|
+
# Defaults to nil and saved in location specified by config.assets.prefix
|
24
|
+
# config.assets.manifest = YOUR_PATH
|
25
|
+
|
26
|
+
# Specifies the header that your server uses for sending files
|
27
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
28
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
29
|
+
|
30
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
31
|
+
# config.force_ssl = true
|
32
|
+
|
33
|
+
# See everything in the log (default is :info)
|
34
|
+
# config.log_level = :debug
|
35
|
+
|
36
|
+
# Prepend all log lines with the following tags
|
37
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
38
|
+
|
39
|
+
# Use a different logger for distributed setups
|
40
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
41
|
+
|
42
|
+
# Use a different cache store in production
|
43
|
+
# config.cache_store = :mem_cache_store
|
44
|
+
|
45
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
46
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
47
|
+
|
48
|
+
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
49
|
+
# config.assets.precompile += %w( search.js )
|
50
|
+
|
51
|
+
# Disable delivery errors, bad email addresses will be ignored
|
52
|
+
# config.action_mailer.raise_delivery_errors = false
|
53
|
+
|
54
|
+
# Enable threaded mode
|
55
|
+
# config.threadsafe!
|
56
|
+
|
57
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
58
|
+
# the I18n.default_locale when a translation can not be found)
|
59
|
+
config.i18n.fallbacks = true
|
60
|
+
|
61
|
+
# Send deprecation notices to registered listeners
|
62
|
+
config.active_support.deprecation = :notify
|
63
|
+
end
|
@@ -0,0 +1,37 @@
|
|
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
|
+
# Configure static asset server for tests with Cache-Control for performance
|
11
|
+
config.serve_static_assets = true
|
12
|
+
config.static_cache_control = "public, max-age=3600"
|
13
|
+
|
14
|
+
# Show full error reports and disable caching
|
15
|
+
config.consider_all_requests_local = true
|
16
|
+
config.action_controller.perform_caching = false
|
17
|
+
|
18
|
+
# Raise exceptions instead of rendering exception templates
|
19
|
+
config.action_dispatch.show_exceptions = false
|
20
|
+
|
21
|
+
# Disable request forgery protection in test environment
|
22
|
+
config.action_controller.allow_forgery_protection = false
|
23
|
+
|
24
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
25
|
+
# The :test delivery method accumulates sent emails in the
|
26
|
+
# ActionMailer::Base.deliveries array.
|
27
|
+
config.action_mailer.delivery_method = :test
|
28
|
+
|
29
|
+
if Rails::VERSION::MAJOR == 3
|
30
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
31
|
+
end
|
32
|
+
|
33
|
+
# Print deprecation notices to the stderr
|
34
|
+
config.active_support.deprecation = :stderr
|
35
|
+
|
36
|
+
config.eager_load = false
|
37
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require "attachinary/orm/active_record"
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
11
|
+
#
|
12
|
+
# These inflection rules are supported but not enabled by default:
|
13
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
14
|
+
# inflect.acronym 'RESTful'
|
15
|
+
# end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = 'f183aecf8ec1f4324366308b34353d5e40beaca43b38dd65b122cdced57debe3e611d14aa40d6c654ce9c5311f31aee580d5b1f39debaad9430e09aafb1ec8c5'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rails generate session_migration")
|
8
|
+
# Dummy::Application.config.session_store :active_record_store
|
@@ -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]
|
9
|
+
end
|
10
|
+
|
11
|
+
# Disable root element in JSON by default.
|
12
|
+
ActiveSupport.on_load(:active_record) do
|
13
|
+
self.include_root_in_json = false
|
14
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateTables < ActiveRecord::Migration[7.2]
|
2
|
+
def change
|
3
|
+
create_table :attachinary_files do |t|
|
4
|
+
t.references :attachinariable, polymorphic: true
|
5
|
+
t.string :scope
|
6
|
+
|
7
|
+
t.string :public_id
|
8
|
+
t.string :version
|
9
|
+
t.integer :width
|
10
|
+
t.integer :height
|
11
|
+
t.string :format
|
12
|
+
t.string :resource_type
|
13
|
+
t.timestamps
|
14
|
+
end
|
15
|
+
add_index :attachinary_files, [:attachinariable_type, :attachinariable_id, :scope], name: 'by_scoped_parent'
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# This file is auto-generated from the current state of the database. Instead
|
2
|
+
# of editing this file, please use the migrations feature of Active Record to
|
3
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
4
|
+
#
|
5
|
+
# This file is the source Rails uses to define your schema when running `bin/rails
|
6
|
+
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
7
|
+
# be faster and is potentially less error prone than running all of your
|
8
|
+
# migrations from scratch. Old migrations may fail to apply correctly if those
|
9
|
+
# migrations use external dependencies or application code.
|
10
|
+
#
|
11
|
+
# It's strongly recommended that you check this file into your version control system.
|
12
|
+
|
13
|
+
ActiveRecord::Schema[7.2].define(version: 2012_06_08_104143) do
|
14
|
+
create_table "attachinary_files", force: :cascade do |t|
|
15
|
+
t.string "attachinariable_type"
|
16
|
+
t.integer "attachinariable_id"
|
17
|
+
t.string "scope"
|
18
|
+
t.string "public_id"
|
19
|
+
t.string "version"
|
20
|
+
t.integer "width"
|
21
|
+
t.integer "height"
|
22
|
+
t.string "format"
|
23
|
+
t.string "resource_type"
|
24
|
+
t.datetime "created_at", null: false
|
25
|
+
t.datetime "updated_at", null: false
|
26
|
+
t.index ["attachinariable_type", "attachinariable_id", "scope"], name: "by_scoped_parent"
|
27
|
+
t.index ["attachinariable_type", "attachinariable_id"], name: "index_attachinary_files_on_attachinariable"
|
28
|
+
end
|
29
|
+
|
30
|
+
create_table "notes", force: :cascade do |t|
|
31
|
+
t.text "body"
|
32
|
+
t.datetime "created_at", null: false
|
33
|
+
t.datetime "updated_at", null: false
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,6 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
+
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
6
|
+
require 'rails/commands'
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
2
|
+
ENV['RAILS_ENV'] ||= 'test'
|
3
|
+
require File.expand_path("../../config/environment", __FILE__)
|
4
|
+
# Prevent database truncation if the environment is production
|
5
|
+
abort("The Rails environment is running in production mode!") if Rails.env.production?
|
6
|
+
require 'spec_helper'
|
7
|
+
require 'rspec/rails'
|
8
|
+
# Add additional requires below this line. Rails is not loaded until this point!
|
9
|
+
require '../spec_helper.rb'
|
10
|
+
# Requires supporting ruby files with custom matchers and macros, etc, in
|
11
|
+
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
|
12
|
+
# run as spec files by default. This means that files in spec/support that end
|
13
|
+
# in _spec.rb will both be required and run as specs, causing the specs to be
|
14
|
+
# run twice. It is recommended that you do not name files matching this glob to
|
15
|
+
# end with _spec.rb. You can configure this pattern with the --pattern
|
16
|
+
# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
|
17
|
+
#
|
18
|
+
# The following line is provided for convenience purposes. It has the downside
|
19
|
+
# of increasing the boot-up time by auto-requiring all files in the support
|
20
|
+
# directory. Alternatively, in the individual `*_spec.rb` files, manually
|
21
|
+
# require only the support files necessary.
|
22
|
+
#
|
23
|
+
# Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
|
24
|
+
|
25
|
+
RSpec.configure do |config|
|
26
|
+
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
27
|
+
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
28
|
+
|
29
|
+
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
30
|
+
# examples within a transaction, remove the following line or assign false
|
31
|
+
# instead of true.
|
32
|
+
config.use_transactional_fixtures = true
|
33
|
+
|
34
|
+
# RSpec Rails can automatically mix in different behaviours to your tests
|
35
|
+
# based on their file location, for example enabling you to call `get` and
|
36
|
+
# `post` in specs under `spec/controllers`.
|
37
|
+
#
|
38
|
+
# You can disable this behaviour by removing the line below, and instead
|
39
|
+
# explicitly tag your specs with their type, e.g.:
|
40
|
+
#
|
41
|
+
# RSpec.describe UsersController, :type => :controller do
|
42
|
+
# # ...
|
43
|
+
# end
|
44
|
+
#
|
45
|
+
# The different available types are documented in the features, such as in
|
46
|
+
# https://relishapp.com/rspec/rspec-rails/docs
|
47
|
+
config.infer_spec_type_from_file_location!
|
48
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
4
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
5
|
+
# files.
|
6
|
+
#
|
7
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
8
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
9
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
10
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
11
|
+
# a separate helper file that requires the additional dependencies and performs
|
12
|
+
# the additional setup, and require it from the spec files that actually need
|
13
|
+
# it.
|
14
|
+
#
|
15
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
16
|
+
# users commonly want.
|
17
|
+
#
|
18
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
19
|
+
RSpec.configure do |config|
|
20
|
+
# rspec-expectations config goes here. You can use an alternate
|
21
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
22
|
+
# assertions if you prefer.
|
23
|
+
config.expect_with :rspec do |expectations|
|
24
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
25
|
+
# and `failure_message` of custom matchers include text for helper methods
|
26
|
+
# defined using `chain`, e.g.:
|
27
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
28
|
+
# # => "be bigger than 2 and smaller than 4"
|
29
|
+
# ...rather than:
|
30
|
+
# # => "be bigger than 2"
|
31
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
32
|
+
end
|
33
|
+
|
34
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
35
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
36
|
+
config.mock_with :rspec do |mocks|
|
37
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
38
|
+
# a real object. This is generally recommended, and will default to
|
39
|
+
# `true` in RSpec 4.
|
40
|
+
mocks.verify_partial_doubles = true
|
41
|
+
end
|
42
|
+
|
43
|
+
# The settings below are suggested to provide a good initial experience
|
44
|
+
# with RSpec, but feel free to customize to your heart's content.
|
45
|
+
=begin
|
46
|
+
# These two settings work together to allow you to limit a spec run
|
47
|
+
# to individual examples or groups you care about by tagging them with
|
48
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
49
|
+
# get run.
|
50
|
+
config.filter_run :focus
|
51
|
+
config.run_all_when_everything_filtered = true
|
52
|
+
|
53
|
+
# Allows RSpec to persist some state between runs in order to support
|
54
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
55
|
+
# you configure your source control system to ignore this file.
|
56
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
57
|
+
|
58
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
59
|
+
# recommended. For more details, see:
|
60
|
+
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
61
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
62
|
+
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
|
63
|
+
config.disable_monkey_patching!
|
64
|
+
|
65
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
66
|
+
# file, and it's useful to allow more verbose output when running an
|
67
|
+
# individual spec file.
|
68
|
+
if config.files_to_run.one?
|
69
|
+
# Use the documentation formatter for detailed output,
|
70
|
+
# unless a formatter has already been configured
|
71
|
+
# (e.g. via a command-line flag).
|
72
|
+
config.default_formatter = 'doc'
|
73
|
+
end
|
74
|
+
|
75
|
+
# Print the 10 slowest examples and example groups at the
|
76
|
+
# end of the spec run, to help surface which specs are running
|
77
|
+
# particularly slow.
|
78
|
+
config.profile_examples = 10
|
79
|
+
|
80
|
+
# Run specs in random order to surface order dependencies. If you find an
|
81
|
+
# order dependency and want to debug it, you can fix the order by providing
|
82
|
+
# the seed, which is printed after each run.
|
83
|
+
# --seed 1234
|
84
|
+
config.order = :random
|
85
|
+
|
86
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
87
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
88
|
+
# test failures related to randomization by passing the same `--seed` value
|
89
|
+
# as the one that triggered the failure.
|
90
|
+
Kernel.srand config.seed
|
91
|
+
=end
|
92
|
+
end
|