-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
177 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ test/dummy/tmp/ | |
test/dummy/.sass-cache | ||
Gemfile.lock | ||
.idea/ | ||
*.gem | ||
*.gem | ||
coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
require: | ||
- rubocop-performance | ||
|
||
AllCops: | ||
TargetRubyVersion: 2.3 | ||
|
||
Layout/SpaceInsideHashLiteralBraces: | ||
EnforcedStyle: no_space | ||
|
||
Metrics/BlockLength: | ||
Max: 36 | ||
Exclude: | ||
- spec/**/*.rb | ||
|
||
Metrics/BlockNesting: | ||
Max: 2 | ||
|
||
Layout/LineLength: | ||
AllowURI: true | ||
Enabled: false | ||
|
||
Metrics/MethodLength: | ||
CountComments: false | ||
Max: 10 | ||
|
||
Metrics/ModuleLength: | ||
Max: 100 | ||
|
||
Metrics/ParameterLists: | ||
Max: 5 | ||
CountKeywordArgs: true | ||
|
||
Style/CollectionMethods: | ||
Enabled: true | ||
PreferredMethods: | ||
collect: 'map' | ||
collect!: 'map!' | ||
inject: 'reduce' | ||
find: 'detect' | ||
find_all: 'select' | ||
delete: 'gsub' | ||
|
||
Style/Documentation: | ||
Enabled: false | ||
|
||
Layout/DotPosition: | ||
EnforcedStyle: trailing | ||
|
||
Layout/AccessModifierIndentation: | ||
Enabled: false | ||
|
||
Style/TrailingCommaInArrayLiteral: | ||
EnforcedStyleForMultiline: 'no_comma' | ||
|
||
Style/TrailingCommaInHashLiteral: | ||
EnforcedStyleForMultiline: 'no_comma' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
source "https://rubygems.org" | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
|
||
gemspec | ||
|
||
group :test do | ||
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] | ||
end | ||
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
$:.push File.expand_path("../lib", __FILE__) | ||
# frozen_string_literal: true | ||
|
||
$LOAD_PATH.push File.expand_path('lib', __dir__) | ||
|
||
# Maintain your gem's version: | ||
require "angular_rails_csrf/version" | ||
require 'angular_rails_csrf/version' | ||
|
||
# Describe your gem and declare its dependencies: | ||
Gem::Specification.new do |s| | ||
s.name = "angular_rails_csrf" | ||
s.name = 'angular_rails_csrf' | ||
s.version = AngularRailsCsrf::VERSION | ||
s.authors = ['James Sanders', 'Ilya Bodrov'] | ||
s.email = ['[email protected]', '[email protected]'] | ||
|
@@ -19,13 +21,18 @@ Gem::Specification.new do |s| | |
|
||
s.required_ruby_version = '>= 2.3.0' | ||
|
||
s.add_development_dependency 'rake', '~> 12.0' | ||
s.add_development_dependency 'rake', '~> 13.0' | ||
s.add_development_dependency 'test-unit', '~> 3.2' | ||
if ENV['TEST_RAILS_VERSION'].nil? | ||
s.add_development_dependency 'rails', '6.0.0' | ||
s.add_development_dependency 'rails', '6.0.2.1' | ||
else | ||
s.add_development_dependency 'rails', ENV['TEST_RAILS_VERSION'].to_s | ||
end | ||
|
||
s.add_runtime_dependency 'railties', '>= 3', '< 7' | ||
|
||
s.add_development_dependency 'codecov', '~> 0.1' | ||
s.add_development_dependency 'rubocop', '~> 0.60' | ||
s.add_development_dependency 'rubocop-performance', '~> 1.5' | ||
s.add_development_dependency 'simplecov', '~> 0.16' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'angular_rails_csrf/railtie' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'angular_rails_csrf/concern' | ||
|
||
module AngularRailsCsrf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module AngularRailsCsrf | ||
VERSION = '4.0.0'.freeze | ||
VERSION = '4.0.1' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
//= link_tree ../images | ||
//= link_tree ../fonts | ||
//= link_directory ../javascripts .js | ||
//= link_directory ../stylesheets .css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
class ApplicationController < ActionController::Base | ||
protect_from_forgery with: :exception | ||
|
||
def index; head :ok; end | ||
def create; head :ok; end | ||
def index | ||
head :ok | ||
end | ||
|
||
def create | ||
head :ok | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# frozen_string_literal: true | ||
|
||
class ExclusionsController < ApplicationController | ||
exclude_xsrf_token_cookie | ||
|
||
def index; head :ok; end | ||
end | ||
def index | ||
head :ok | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
# This file is used by Rack-based servers to start the application. | ||
|
||
require ::File.expand_path('../config/environment', __FILE__) | ||
require ::File.expand_path('../config/environment', __FILE__) | ||
run Rails.application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
# Set up gems listed in the Gemfile. | ||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__) | ||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__) | ||
|
||
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) |
Oops, something went wrong.