hashie-forbidden-attributes-0.1.1/0000755000175600017570000000000013124225021016121 5ustar pravipravihashie-forbidden-attributes-0.1.1/hashie-forbidden_attributes.gemspec0000644000175600017570000001212513124225021025130 0ustar pravipravi######################################################### # This file has been automatically generated by gem2tgz # ######################################################### # -*- encoding: utf-8 -*- # stub: hashie-forbidden_attributes 0.1.1 ruby lib Gem::Specification.new do |s| s.name = "hashie-forbidden_attributes" s.version = "0.1.1" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"] s.authors = ["Maxim-Filimonov", "Daniel Doubrovkine"] s.date = "2015-03-23" s.description = "Automatic strong parameter detection with Hashie and Forbidden Attributes. Formerly known as hashie_rails" s.email = ["tpaktopsp@gmail.com"] s.files = ["MIT-LICENSE", "Rakefile", "lib/hashie-forbidden_attributes.rb", "lib/hashie-forbidden_attributes/hashie/mash.rb", "lib/hashie-forbidden_attributes/version.rb", "test/dummy/README.rdoc", "test/dummy/Rakefile", "test/dummy/app/api/home_api.rb", "test/dummy/app/assets/javascripts/application.js", "test/dummy/app/assets/stylesheets/application.css", "test/dummy/app/controllers/application_controller.rb", "test/dummy/app/helpers/application_helper.rb", "test/dummy/app/models/bird.rb", "test/dummy/app/views/layouts/application.html.erb", "test/dummy/bin/bundle", "test/dummy/bin/rails", "test/dummy/bin/rake", "test/dummy/config.ru", "test/dummy/config/application.rb", "test/dummy/config/boot.rb", "test/dummy/config/database.yml", "test/dummy/config/environment.rb", "test/dummy/config/environments/development.rb", "test/dummy/config/environments/production.rb", "test/dummy/config/environments/test.rb", "test/dummy/config/initializers/backtrace_silencers.rb", "test/dummy/config/initializers/cookies_serializer.rb", "test/dummy/config/initializers/filter_parameter_logging.rb", "test/dummy/config/initializers/inflections.rb", "test/dummy/config/initializers/mime_types.rb", "test/dummy/config/initializers/session_store.rb", "test/dummy/config/initializers/wrap_parameters.rb", "test/dummy/config/locales/en.yml", "test/dummy/config/routes.rb", "test/dummy/config/secrets.yml", "test/dummy/db/migrate/20140531031058_create_birds.rb", "test/dummy/db/schema.rb", "test/dummy/public/404.html", "test/dummy/public/422.html", "test/dummy/public/500.html", "test/dummy/public/favicon.ico", "test/hashie_forbidden_attributes_test.rb", "test/integration/hashie_mash_with_active_record_test.rb", "test/test_helper.rb"] s.homepage = "https://github.com/Maxim-Filimonov/hashie-forbidden_attributes" s.licenses = ["MIT"] s.rubygems_version = "2.5.1" s.summary = "Automatic strong parameter detection with Hashie and Forbidden Attributes. Formerly known as hashie_rails" s.test_files = ["test/dummy/README.rdoc", "test/dummy/Rakefile", "test/dummy/app/api/home_api.rb", "test/dummy/app/assets/javascripts/application.js", "test/dummy/app/assets/stylesheets/application.css", "test/dummy/app/controllers/application_controller.rb", "test/dummy/app/helpers/application_helper.rb", "test/dummy/app/models/bird.rb", "test/dummy/app/views/layouts/application.html.erb", "test/dummy/bin/bundle", "test/dummy/bin/rails", "test/dummy/bin/rake", "test/dummy/config.ru", "test/dummy/config/application.rb", "test/dummy/config/boot.rb", "test/dummy/config/database.yml", "test/dummy/config/environment.rb", "test/dummy/config/environments/development.rb", "test/dummy/config/environments/production.rb", "test/dummy/config/environments/test.rb", "test/dummy/config/initializers/backtrace_silencers.rb", "test/dummy/config/initializers/cookies_serializer.rb", "test/dummy/config/initializers/filter_parameter_logging.rb", "test/dummy/config/initializers/inflections.rb", "test/dummy/config/initializers/mime_types.rb", "test/dummy/config/initializers/session_store.rb", "test/dummy/config/initializers/wrap_parameters.rb", "test/dummy/config/locales/en.yml", "test/dummy/config/routes.rb", "test/dummy/config/secrets.yml", "test/dummy/db/migrate/20140531031058_create_birds.rb", "test/dummy/db/schema.rb", "test/dummy/public/404.html", "test/dummy/public/422.html", "test/dummy/public/500.html", "test/dummy/public/favicon.ico", "test/hashie_forbidden_attributes_test.rb", "test/integration/hashie_mash_with_active_record_test.rb", "test/test_helper.rb"] if s.respond_to? :specification_version then s.specification_version = 4 if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then s.add_development_dependency(%q, [">= 0"]) s.add_runtime_dependency(%q, [">= 3.0"]) s.add_development_dependency(%q, [">= 0"]) s.add_development_dependency(%q, ["~> 4.0"]) s.add_development_dependency(%q, [">= 0"]) else s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, [">= 3.0"]) s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, ["~> 4.0"]) s.add_dependency(%q, [">= 0"]) end else s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, [">= 3.0"]) s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, ["~> 4.0"]) s.add_dependency(%q, [">= 0"]) end end hashie-forbidden-attributes-0.1.1/test/0000755000175600017570000000000013124225021017100 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/test_helper.rb0000644000175600017570000000072513124225021021747 0ustar pravipravi# Configure Rails Environment ENV['RAILS_ENV'] = 'test' require File.expand_path('../dummy/config/environment.rb', __FILE__) require 'rails/test_help' Rails.backtrace_cleaner.remove_silencers! # Load support files Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } # Load fixtures from the engine if ActiveSupport::TestCase.method_defined?(:fixture_path=) ActiveSupport::TestCase.fixture_path = File.expand_path('../fixtures', __FILE__) end hashie-forbidden-attributes-0.1.1/test/hashie_forbidden_attributes_test.rb0000644000175600017570000000054613124225021026214 0ustar pravipravirequire 'test_helper' class HashieForbiddenAttributesTest < ActiveSupport::TestCase def setup @mash = Hashie::Mash.new end test 'mash does not respond to permitted?' do assert_equal false, @mash.respond_to?(:permitted?) end test 'mash does not handle permitted? method' do assert_raises(ArgumentError) { @mash.permitted? } end end hashie-forbidden-attributes-0.1.1/test/integration/0000755000175600017570000000000013124225021021423 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/integration/hashie_mash_with_active_record_test.rb0000644000175600017570000000035113124225021031203 0ustar pravipravirequire 'test_helper' class HashieMashWithActiveRecordTest < ActionDispatch::IntegrationTest test 'bird can be created with mash' do assert_difference('Bird.count', +1) do post '/birds', name: 'Birdie' end end end hashie-forbidden-attributes-0.1.1/test/dummy/0000755000175600017570000000000013124225021020233 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/README.rdoc0000644000175600017570000000073613124225021022047 0ustar pravipravi== README This README would normally document whatever steps are necessary to get the application up and running. Things you may want to cover: * Ruby version * System dependencies * Configuration * Database creation * Database initialization * How to run the test suite * Services (job queues, cache servers, search engines, etc.) * Deployment instructions * ... Please feel free to use a different markup language if you do not plan to run rake doc:app. hashie-forbidden-attributes-0.1.1/test/dummy/bin/0000755000175600017570000000000013124225021021003 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/bin/bundle0000755000175600017570000000020113124225021022173 0ustar pravipravi#!/usr/bin/env ruby ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) load Gem.bin_path('bundler', 'bundle') hashie-forbidden-attributes-0.1.1/test/dummy/bin/rake0000755000175600017570000000013213124225021021647 0ustar pravipravi#!/usr/bin/env ruby require_relative '../config/boot' require 'rake' Rake.application.run hashie-forbidden-attributes-0.1.1/test/dummy/bin/rails0000755000175600017570000000022213124225021022037 0ustar pravipravi#!/usr/bin/env ruby APP_PATH = File.expand_path('../../config/application', __FILE__) require_relative '../config/boot' require 'rails/commands' hashie-forbidden-attributes-0.1.1/test/dummy/db/0000755000175600017570000000000013124225021020620 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/db/schema.rb0000644000175600017570000000164613124225021022414 0ustar pravipravi# encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative source for your # database schema. If you need to create the application database on another # system, you should be using db:schema:load, not running all the migrations # from scratch. The latter is a flawed and unsustainable approach (the more migrations # you'll amass, the slower it'll run and the greater likelihood for issues). # # It's strongly recommended that you check this file into your version control system. ActiveRecord::Schema.define(version: 20140531031058) do create_table "birds", force: :cascade do |t| t.string "name" t.datetime "created_at" t.datetime "updated_at" end end hashie-forbidden-attributes-0.1.1/test/dummy/db/migrate/0000755000175600017570000000000013124225021022250 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/db/migrate/20140531031058_create_birds.rb0000644000175600017570000000022313124225021026660 0ustar pravipraviclass CreateBirds < ActiveRecord::Migration def change create_table :birds do |t| t.string :name t.timestamps end end end hashie-forbidden-attributes-0.1.1/test/dummy/config/0000755000175600017570000000000013124225021021500 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/config/environment.rb0000644000175600017570000000022613124225021024371 0ustar pravipravi# Load the Rails application. require File.expand_path('../application', __FILE__) # Initialize the Rails application. Rails.application.initialize! hashie-forbidden-attributes-0.1.1/test/dummy/config/locales/0000755000175600017570000000000013124225021023122 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/config/locales/en.yml0000644000175600017570000000117213124225021024250 0ustar pravipravi# Files in the config/locales directory are used for internationalization # and are automatically loaded by Rails. If you want to use locales other # than English, add the necessary files in this directory. # # To use the locales, use `I18n.t`: # # I18n.t 'hello' # # In views, this is aliased to just `t`: # # <%= t('hello') %> # # To use a different locale, set it with `I18n.locale`: # # I18n.locale = :es # # This would use the information in config/locales/es.yml. # # To learn more, please read the Rails Internationalization guide # available at http://guides.rubyonrails.org/i18n.html. en: hello: "Hello world" hashie-forbidden-attributes-0.1.1/test/dummy/config/secrets.yml0000644000175600017570000000170413124225021023675 0ustar pravipravi# Be sure to restart your server when you modify this file. # Your secret key is used for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. # You can use `rake secret` to generate a secure secret key. # Make sure the secrets in this file are kept private # if you're sharing your code publicly. development: secret_key_base: 273622c9efda4594fa8677642ed08a19c029347489908095c58a196ab9e27e31b804f54238591cccc37c2bab974df200bcdbab6f91f8af2b32a2833f0716a4ed test: secret_key_base: a12bd583e267198d769d31f5d387e3b07c981ac8f29efce38ad60cfc5636053b7dac10b8e02764dace43138ab721230510f601931c3373ecee04d6b13b930224 # Do not keep production secrets in the repository, # instead read values from the environment. production: secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> hashie-forbidden-attributes-0.1.1/test/dummy/config/environments/0000755000175600017570000000000013124225021024227 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/config/environments/test.rb0000644000175600017570000000325213124225021025535 0ustar pravipraviRails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data there! config.cache_classes = true # Do not eager load code on boot. This avoids loading your whole application # just for the purpose of running a single test. If you are using a tool that # preloads Rails for running tests, you may have to set it to true. config.eager_load = false # Configure static asset server for tests with Cache-Control for performance. config.serve_static_files = true config.static_cache_control = 'public, max-age=3600' # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false # Raise exceptions instead of rendering exception templates. config.action_dispatch.show_exceptions = false # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr # Raises error for missing translations # config.action_view.raise_on_missing_translations = true config.active_support.test_order = :sorted end hashie-forbidden-attributes-0.1.1/test/dummy/config/environments/production.rb0000644000175600017570000000642513124225021026751 0ustar pravipraviRails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web servers # and those relying on copy on write to perform better. # Rake tasks automatically ignore this option for performance. config.eager_load = true # Full error reports are disabled and caching is turned on. config.consider_all_requests_local = false config.action_controller.perform_caching = true # Enable Rack::Cache to put a simple HTTP cache in front of your application # Add `rack-cache` to your Gemfile before enabling this. # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. # config.action_dispatch.rack_cache = true # Disable Rails's static asset server (Apache or nginx will already do this). config.serve_static_files = false # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false # Generate digests for assets URLs. config.assets.digest = true # Version of your assets, change this if you want to expire all your assets. config.assets.version = '1.0' # Specifies the header that your server uses for sending files. # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true # Set to :debug to see everything in the log. config.log_level = :info # Prepend all log lines with the following tags. # config.log_tags = [ :subdomain, :uuid ] # Use a different logger for distributed setups. # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) # Use a different cache store in production. # config.cache_store = :mem_cache_store # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.action_controller.asset_host = "http://assets.example.com" # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # config.assets.precompile += %w( search.js ) # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found). config.i18n.fallbacks = true # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify # Disable automatic flushing of the log to improve performance. # config.autoflush_log = false # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false end hashie-forbidden-attributes-0.1.1/test/dummy/config/environments/development.rb0000644000175600017570000000261613124225021027103 0ustar pravipraviRails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Do not eager load code on boot. config.eager_load = false # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log # Raise an error on page load if there are pending migrations. config.active_record.migration_error = :page_load # Debug mode disables concatenation and preprocessing of assets. # This option may cause significant delays in view rendering with a large # number of complex assets. config.assets.debug = true # Adds additional error checking when serving assets at runtime. # Checks for improperly declared sprockets dependencies. # Raises helpful error messages. config.assets.raise_runtime_errors = true # Raises error for missing translations # config.action_view.raise_on_missing_translations = true end hashie-forbidden-attributes-0.1.1/test/dummy/config/boot.rb0000644000175600017570000000036113124225021022770 0ustar pravipravi# Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__) require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__) hashie-forbidden-attributes-0.1.1/test/dummy/config/initializers/0000755000175600017570000000000013124225021024206 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/config/initializers/session_store.rb0000644000175600017570000000021113124225021027424 0ustar pravipravi# Be sure to restart your server when you modify this file. Rails.application.config.session_store :cookie_store, key: '_dummy_session' hashie-forbidden-attributes-0.1.1/test/dummy/config/initializers/filter_parameter_logging.rb0000644000175600017570000000030213124225021031561 0ustar pravipravi# Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. Rails.application.config.filter_parameters += [:password] hashie-forbidden-attributes-0.1.1/test/dummy/config/initializers/mime_types.rb0000644000175600017570000000023413124225021026705 0ustar pravipravi# Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf hashie-forbidden-attributes-0.1.1/test/dummy/config/initializers/inflections.rb0000644000175600017570000000120713124225021027050 0ustar pravipravi# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', 'people' # inflect.uncountable %w( fish sheep ) # end # These inflection rules are supported but not enabled by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.acronym 'RESTful' # end hashie-forbidden-attributes-0.1.1/test/dummy/config/initializers/cookies_serializer.rb0000644000175600017570000000020113124225021030411 0ustar pravipravi# Be sure to restart your server when you modify this file. Rails.application.config.action_dispatch.cookies_serializer = :json hashie-forbidden-attributes-0.1.1/test/dummy/config/initializers/wrap_parameters.rb0000644000175600017570000000100513124225021027723 0ustar pravipravi# Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters format: [:json] if respond_to?(:wrap_parameters) end # To enable root element in JSON for ActiveRecord objects. # ActiveSupport.on_load(:active_record) do # self.include_root_in_json = true # end hashie-forbidden-attributes-0.1.1/test/dummy/config/initializers/backtrace_silencers.rb0000644000175600017570000000062413124225021030523 0ustar pravipravi# Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. # Rails.backtrace_cleaner.remove_silencers! hashie-forbidden-attributes-0.1.1/test/dummy/config/database.yml0000644000175600017570000000105013124225021023763 0ustar pravipravi# SQLite version 3.x # gem install sqlite3 # # Ensure the SQLite 3 gem is defined in your Gemfile # gem 'sqlite3' # default: &default adapter: sqlite3 pool: 5 timeout: 5000 development: <<: *default database: db/development.sqlite3 # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: <<: *default database: db/test.sqlite3 production: <<: *default database: db/production.sqlite3 hashie-forbidden-attributes-0.1.1/test/dummy/config/routes.rb0000644000175600017570000000007413124225021023347 0ustar pravipraviRails.application.routes.draw do mount HomeAPI => '/' end hashie-forbidden-attributes-0.1.1/test/dummy/config/application.rb0000644000175600017570000000051713124225021024333 0ustar pravipravirequire File.expand_path('../boot', __FILE__) require 'rails/all' Bundler.require(*Rails.groups) module Dummy class Application < Rails::Application # Auto load grape api config.paths.add File.join('app', 'api'), glob: File.join('**', '*.rb') config.autoload_paths += Dir[Rails.root.join('app', 'api', '*')] end end hashie-forbidden-attributes-0.1.1/test/dummy/public/0000755000175600017570000000000013124225021021511 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/public/422.html0000644000175600017570000000301313124225021022703 0ustar pravipravi The change you wanted was rejected (422)

The change you wanted was rejected.

Maybe you tried to change something you didn't have access to.

If you are the application owner check the logs for more information.

hashie-forbidden-attributes-0.1.1/test/dummy/public/500.html0000644000175600017570000000270513124225021022707 0ustar pravipravi We're sorry, but something went wrong (500)

We're sorry, but something went wrong.

If you are the application owner check the logs for more information.

hashie-forbidden-attributes-0.1.1/test/dummy/public/favicon.ico0000644000175600017570000000000013124225021023620 0ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/public/404.html0000644000175600017570000000303413124225021022706 0ustar pravipravi The page you were looking for doesn't exist (404)

The page you were looking for doesn't exist.

You may have mistyped the address or the page may have moved.

If you are the application owner check the logs for more information.

hashie-forbidden-attributes-0.1.1/test/dummy/config.ru0000644000175600017570000000023213124225021022045 0ustar pravipravi# This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) run Rails.application hashie-forbidden-attributes-0.1.1/test/dummy/app/0000755000175600017570000000000013124225021021013 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/app/assets/0000755000175600017570000000000013124225021022315 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/app/assets/stylesheets/0000755000175600017570000000000013124225021024671 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/app/assets/stylesheets/application.css0000644000175600017570000000125313124225021027707 0ustar pravipravi/* * This is a manifest file that'll be compiled into application.css, which will include all the files * listed below. * * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. * * You're free to add application-wide styles to this file and they'll appear at the bottom of the * compiled file so the styles you add here take precedence over styles defined in any styles * defined in the other CSS/SCSS files in this directory. It is generally better to create a new * file per style scope. * *= require_tree . *= require_self */ hashie-forbidden-attributes-0.1.1/test/dummy/app/assets/javascripts/0000755000175600017570000000000013124225021024646 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/app/assets/javascripts/application.js0000644000175600017570000000112713124225021027510 0ustar pravipravi// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. // // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // compiled file. // // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details // about supported directives. // //= require_tree . hashie-forbidden-attributes-0.1.1/test/dummy/app/api/0000755000175600017570000000000013124225021021564 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/app/api/home_api.rb0000644000175600017570000000020713124225021023671 0ustar pravipravirequire 'grape' class HomeAPI < Grape::API resources :birds do post do Bird.create!(params.slice(:name)) end end end hashie-forbidden-attributes-0.1.1/test/dummy/app/helpers/0000755000175600017570000000000013124225021022455 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/app/helpers/application_helper.rb0000644000175600017570000000003513124225021026642 0ustar pravipravimodule ApplicationHelper end hashie-forbidden-attributes-0.1.1/test/dummy/app/models/0000755000175600017570000000000013124225021022276 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/app/models/bird.rb0000644000175600017570000000004413124225021023541 0ustar pravipraviclass Bird < ActiveRecord::Base end hashie-forbidden-attributes-0.1.1/test/dummy/app/views/0000755000175600017570000000000013124225021022150 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/app/views/layouts/0000755000175600017570000000000013124225021023650 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/app/views/layouts/application.html.erb0000644000175600017570000000044713124225021027615 0ustar pravipravi Dummy <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> <%= csrf_meta_tags %> <%= yield %> hashie-forbidden-attributes-0.1.1/test/dummy/app/controllers/0000755000175600017570000000000013124225021023361 5ustar pravipravihashie-forbidden-attributes-0.1.1/test/dummy/app/controllers/application_controller.rb0000644000175600017570000000031413124225021030452 0ustar pravipraviclass ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception end hashie-forbidden-attributes-0.1.1/test/dummy/Rakefile0000644000175600017570000000037113124225021021701 0ustar pravipravi# Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require File.expand_path('../config/application', __FILE__) Rails.application.load_tasks hashie-forbidden-attributes-0.1.1/lib/0000755000175600017570000000000013124225021016667 5ustar pravipravihashie-forbidden-attributes-0.1.1/lib/hashie-forbidden_attributes.rb0000644000175600017570000000013013124225021024647 0ustar pravipravirequire 'hashie-forbidden_attributes/hashie/mash' module HashieForbiddenAttributes end hashie-forbidden-attributes-0.1.1/lib/hashie-forbidden_attributes/0000755000175600017570000000000013124225021024330 5ustar pravipravihashie-forbidden-attributes-0.1.1/lib/hashie-forbidden_attributes/hashie/0000755000175600017570000000000013124225021025571 5ustar pravipravihashie-forbidden-attributes-0.1.1/lib/hashie-forbidden_attributes/hashie/mash.rb0000644000175600017570000000073113124225021027047 0ustar pravipravirequire 'hashie/mash' module Hashie class Mash alias_method :_respond_to_missing?, :respond_to_missing? alias_method :_method_missing, :method_missing def respond_to_missing?(method_name, *args) return false if method_name == :permitted? _respond_to_missing?(method_name, args) end def method_missing(method_name, *args) fail ArgumentError if method_name == :permitted? _method_missing(method_name, *args) end end end hashie-forbidden-attributes-0.1.1/lib/hashie-forbidden_attributes/version.rb0000644000175600017570000000007113124225021026340 0ustar pravipravimodule HashieForbiddenAttributes VERSION = '0.1.1' end hashie-forbidden-attributes-0.1.1/Rakefile0000644000175600017570000000104413124225021017565 0ustar pravipravibegin require 'bundler/setup' rescue LoadError puts 'You must `gem install bundler` and `bundle install` to run rake tasks' end Bundler::GemHelper.install_tasks require 'rake/testtask' Rake::TestTask.new(:test) do |t| t.libs << 'lib' t.libs << 'test' t.pattern = 'test/**/*_test.rb' t.verbose = false end require 'rubocop/rake_task' Rubocop::RakeTask.new(:rubocop) task :migrate_db do Dir.chdir('test/dummy') do `bundle exec rake db:migrate db:test:prepare` end end task test: :migrate_db task default: [:rubocop, :test] hashie-forbidden-attributes-0.1.1/MIT-LICENSE0000644000175600017570000000205613124225021017560 0ustar pravipraviCopyright 2014 Maxim Filimonov & Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.