auxiliary_rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 2534723cda67e7800e77d1b1782498c5161ac9bc4bc23f85ecc936ecc36a3e63
4
+ data.tar.gz: ebb9d5a0ffc3d63ffe5821d493a1369ef6d266470570b291f64dae532234e37b
5
+ SHA512:
6
+ metadata.gz: 4fa111fab8235a370109ff294bf0b500ed7a75021d2d4d74748a07a08a881faf3e67de165abf33fbdd970187d594b0a8261e6858b617647c6b3520c2fca6b6e3
7
+ data.tar.gz: 8cde4f1942f18f76c69eb5a3eae0c3fee859012b3da8ff92c5766b1efe50d99ef0ab161578cc325283554c697b8a3474f46badb1fed89ac317c16f71913c3d0b
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,11 @@
1
+ AllCops:
2
+ Exclude:
3
+ - 'auxiliary_rails.gemspec'
4
+
5
+ #################### Style ###############################
6
+
7
+ Style/Documentation:
8
+ Enabled: false
9
+
10
+ Style/FrozenStringLiteralComment:
11
+ Enabled: false
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.6.2
7
+ before_install: gem install bundler -v 2.0.1
data/CHANGELOG.md ADDED
@@ -0,0 +1 @@
1
+ # CHANGELOG
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in auxiliary_rails.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,59 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ auxiliary_rails (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.0)
10
+ coderay (1.1.2)
11
+ diff-lcs (1.3)
12
+ jaro_winkler (1.5.2)
13
+ method_source (0.9.2)
14
+ parallel (1.16.2)
15
+ parser (2.6.2.0)
16
+ ast (~> 2.4.0)
17
+ pry (0.12.2)
18
+ coderay (~> 1.1.0)
19
+ method_source (~> 0.9.0)
20
+ psych (3.1.0)
21
+ rainbow (3.0.0)
22
+ rake (10.5.0)
23
+ rspec (3.8.0)
24
+ rspec-core (~> 3.8.0)
25
+ rspec-expectations (~> 3.8.0)
26
+ rspec-mocks (~> 3.8.0)
27
+ rspec-core (3.8.0)
28
+ rspec-support (~> 3.8.0)
29
+ rspec-expectations (3.8.2)
30
+ diff-lcs (>= 1.2.0, < 2.0)
31
+ rspec-support (~> 3.8.0)
32
+ rspec-mocks (3.8.0)
33
+ diff-lcs (>= 1.2.0, < 2.0)
34
+ rspec-support (~> 3.8.0)
35
+ rspec-support (3.8.0)
36
+ rubocop (0.66.0)
37
+ jaro_winkler (~> 1.5.1)
38
+ parallel (~> 1.10)
39
+ parser (>= 2.5, != 2.5.1.1)
40
+ psych (>= 3.1.0)
41
+ rainbow (>= 2.2.2, < 4.0)
42
+ ruby-progressbar (~> 1.7)
43
+ unicode-display_width (>= 1.4.0, < 1.6)
44
+ ruby-progressbar (1.10.0)
45
+ unicode-display_width (1.5.0)
46
+
47
+ PLATFORMS
48
+ ruby
49
+
50
+ DEPENDENCIES
51
+ auxiliary_rails!
52
+ bundler (~> 2.0)
53
+ pry
54
+ rake (~> 10.0)
55
+ rspec (~> 3.0)
56
+ rubocop
57
+
58
+ BUNDLED WITH
59
+ 2.0.1
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Dmitry Babenko
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # AuxiliaryRails
2
+
3
+ Collection of classss, configs, scripts, generators for Ruby on Rails helping you get things done, better.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'auxiliary_rails', git: 'https://github.com/ergoserv/auxiliary_rails'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install auxiliary_rails
20
+
21
+ ## Usage
22
+
23
+ ```sh
24
+ # avaliable generators
25
+ rails g auxiliary_rails:install_errors
26
+ rails g auxiliary_rails:install_rubocop
27
+ ```
28
+
29
+ ## Development
30
+
31
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
32
+
33
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
34
+
35
+ ## Contributing
36
+
37
+ Bug reports and pull requests are welcome on GitHub at https://github.com/ergoserv/auxiliary_rails.
38
+
39
+ ## License
40
+
41
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
42
+
43
+ -------------------------------------------------------------------------------
44
+
45
+ [![alt text](https://raw.githubusercontent.com/ergoserv/auxiliary_rails/master/assets/ErgoServ_horizontalColor@sign+text+bg.png "ErgoServ - Web and Mobile Development Company")](https://www.ergoserv.com)
46
+
47
+ This gem was created and is maintained by [ErgoServ](https://www.ergoserv.com).
48
+
49
+ If you like what you see and would like to hire us or join us, [get in touch](https://www.ergoserv.com)!
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
@@ -0,0 +1,42 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "auxiliary_rails/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "auxiliary_rails"
8
+ spec.version = AuxiliaryRails::VERSION
9
+ spec.authors = ["Dmitry Babenko"]
10
+ spec.email = ["dmitry@ergoserv.com"]
11
+
12
+ spec.summary = %q{auxiliary_rails provides extra layers and utils for helping to build solid and clean Ruby on Rails applications}
13
+ # spec.description = %q{TODO: Write a longer description or delete this line.}
14
+ spec.homepage = "https://github.com/ergoserv/auxiliary_rails"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
19
+ if spec.respond_to?(:metadata)
20
+ spec.metadata["homepage_uri"] = "https://github.com/ergoserv/auxiliary_rails"
21
+ spec.metadata["source_code_uri"] = "https://github.com/ergoserv/auxiliary_rails"
22
+ spec.metadata["changelog_uri"] = "https://github.com/ergoserv/auxiliary_rails/blob/master/CHANGELOG.md"
23
+ else
24
+ raise "RubyGems 2.0 or newer is required to protect against " \
25
+ "public gem pushes."
26
+ end
27
+
28
+ # Specify which files should be added to the gem when it is released.
29
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
30
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
31
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
32
+ end
33
+ spec.bindir = "exe"
34
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
35
+ spec.require_paths = ["lib"]
36
+
37
+ spec.add_development_dependency "bundler", "~> 2.0"
38
+ spec.add_development_dependency "pry"
39
+ spec.add_development_dependency "rake", "~> 10.0"
40
+ spec.add_development_dependency "rspec", "~> 3.0"
41
+ spec.add_development_dependency "rubocop"
42
+ end
data/bin/console ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'auxiliary_rails'
5
+ require 'pry'
6
+
7
+ Pry.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,6 @@
1
+ require 'auxiliary_rails/abstract_error'
2
+ require 'auxiliary_rails/version'
3
+
4
+ module AuxiliaryRails
5
+ class Error < StandardError; end
6
+ end
@@ -0,0 +1,7 @@
1
+ module AuxiliaryRails
2
+ class AbstractError < StandardError
3
+ def self.wrap(error)
4
+ new(error.message)
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,3 @@
1
+ module AuxiliaryRails
2
+ VERSION = '0.1.0'.freeze
3
+ end
@@ -0,0 +1,12 @@
1
+ require 'rails'
2
+
3
+ module AuxiliaryRails
4
+ class InstallErrorsGenerator < ::Rails::Generators::Base
5
+ source_root File.expand_path('templates', __dir__)
6
+
7
+ def copy_application_error_file
8
+ copy_file 'application_error_template.rb',
9
+ 'app/errors/application_error.rb'
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,20 @@
1
+ require 'rails'
2
+
3
+ module AuxiliaryRails
4
+ class InstallRubocopGenerator < ::Rails::Generators::Base
5
+ source_root File.expand_path('templates', __dir__)
6
+
7
+ def copy_config_files
8
+ copy_file 'rubocop_template.yml',
9
+ '.rubocop.yml'
10
+ copy_file 'rubocop_auxiliary_rails_template.yml',
11
+ '.rubocop_auxiliary_rails.yml'
12
+ end
13
+
14
+ def specify_gem_dependency
15
+ gem_group :development, :test do
16
+ gem 'rubocop'
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,2 @@
1
+ class ApplicationError < AuxiliaryRails::AbstractError
2
+ end
@@ -0,0 +1,28 @@
1
+ # AuxiliaryRails Rubocop Config
2
+ # Homepage: https://github.com/ergoserv/auxiliary_rails
3
+ # Version: 1
4
+
5
+ AllCops:
6
+ Exclude:
7
+ - 'bin/*'
8
+ - 'db/schema.rb'
9
+ - 'db/migrate/*'
10
+ - 'vendor/**/*'
11
+
12
+ #################### Metrics ###############################
13
+
14
+ Metrics/MethodLength:
15
+ Max: 30
16
+
17
+ #################### Rails #################################
18
+
19
+ Rails:
20
+ Enabled: true
21
+
22
+ #################### Style ###############################
23
+
24
+ Style/Documentation:
25
+ Enabled: false
26
+
27
+ Style/FrozenStringLiteralComment:
28
+ Enabled: false
@@ -0,0 +1,2 @@
1
+ inherit_from:
2
+ - .rubocop_auxiliary_rails.yml
metadata ADDED
@@ -0,0 +1,139 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: auxiliary_rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Dmitry Babenko
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-03-30 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: pry
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description:
84
+ email:
85
+ - dmitry@ergoserv.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".gitignore"
91
+ - ".rspec"
92
+ - ".rubocop.yml"
93
+ - ".travis.yml"
94
+ - CHANGELOG.md
95
+ - Gemfile
96
+ - Gemfile.lock
97
+ - LICENSE.txt
98
+ - README.md
99
+ - Rakefile
100
+ - assets/ErgoServ_horizontalColor@sign+text+bg.png
101
+ - auxiliary_rails.gemspec
102
+ - bin/console
103
+ - bin/setup
104
+ - lib/auxiliary_rails.rb
105
+ - lib/auxiliary_rails/abstract_error.rb
106
+ - lib/auxiliary_rails/version.rb
107
+ - lib/generators/auxiliary_rails/install_errors_generator.rb
108
+ - lib/generators/auxiliary_rails/install_rubocop_generator.rb
109
+ - lib/generators/auxiliary_rails/templates/application_error_template.rb
110
+ - lib/generators/auxiliary_rails/templates/rubocop_auxiliary_rails_template.yml
111
+ - lib/generators/auxiliary_rails/templates/rubocop_template.yml
112
+ homepage: https://github.com/ergoserv/auxiliary_rails
113
+ licenses:
114
+ - MIT
115
+ metadata:
116
+ homepage_uri: https://github.com/ergoserv/auxiliary_rails
117
+ source_code_uri: https://github.com/ergoserv/auxiliary_rails
118
+ changelog_uri: https://github.com/ergoserv/auxiliary_rails/blob/master/CHANGELOG.md
119
+ post_install_message:
120
+ rdoc_options: []
121
+ require_paths:
122
+ - lib
123
+ required_ruby_version: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - ">="
126
+ - !ruby/object:Gem::Version
127
+ version: '0'
128
+ required_rubygems_version: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ requirements: []
134
+ rubygems_version: 3.0.3
135
+ signing_key:
136
+ specification_version: 4
137
+ summary: auxiliary_rails provides extra layers and utils for helping to build solid
138
+ and clean Ruby on Rails applications
139
+ test_files: []