Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .byebug_history
Empty file.
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

*Description of changes:*


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license.
85 changes: 85 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: CI

on:
push:
branches:
- main

pull_request:
branches:
- main

env:
ruby_version: 3.3

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [2.7, '3.0', 3.1, 3.2, 3.3, jruby-9.4]
rails: [7.1, 7.2, '8.0', main]

exclude:
# Rails 7.2 is Ruby >= 3.1
- rails: 7.2
ruby: 2.7
- rails: 7.2
ruby: 3.0
# Rails 8.0 is Ruby >= 3.2
- rails: '8.0'
ruby: 2.7
- rails: '8.0'
ruby: 3.0
- rails: '8.0'
ruby: 3.1
- rails: '8.0'
ruby: jruby-9.4
# Rails main is Ruby >= 3.2
- rails: main
ruby: 2.7
- rails: main
ruby: 3.0
- rails: main
ruby: 3.1
- rails: main
ruby: jruby-9.4

steps:
- uses: actions/checkout@v4

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Install gems
run: bundle install
env:
BUNDLE_GEMFILE: gemfiles/rails-${{ matrix.rails }}.gemfile

- name: Test
run: bundle exec rake test
env:
BUNDLE_GEMFILE: gemfiles/rails-${{ matrix.rails }}.gemfile

rubocop:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.ruby_version }}

- name: Install gems
run: |
bundle config set --local with 'development'
bundle install

- name: Rubocop
run: bundle exec rake rubocop
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.ruby-version
.yardoc/
.idea/
Gemfile.lock
doc
gemfiles/*.gemfile.lock

test/dummy/app/models
test/dummy/db/migrate
test/dummy/log/
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "tasks/release"]
path = tasks/release
url = https://github.com/aws/aws-sdk-ruby-release-tools.git
url = git@github.com:aws/aws-sdk-ruby-release-tools.git
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--require spec_helper
--format documentation
22 changes: 22 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
inherit_from: .rubocop_todo.yml

AllCops:
NewCops: enable
TargetRubyVersion: 2.7
SuggestExtensions: false
Exclude:
- 'tasks/release/**/*'
- 'test/dummy/**/*.rb'
- 'test/fixtures/**/*.rb'

Gemspec/RequireMFA:
Enabled: false

Metrics/BlockLength:
Exclude:
- 'test/**/*.rb'

Naming/FileName:
Exclude:
- 'gemfiles/*.gemfile'
- 'lib/aws-record-rails.rb'
73 changes: 73 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2024-11-16 00:17:52 UTC using RuboCop version 1.68.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 9
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 29

# Offense count: 4
# Configuration parameters: CountComments, CountAsOne.
Metrics/ClassLength:
Max: 219

# Offense count: 4
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/CyclomaticComplexity:
Max: 11

# Offense count: 11
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Max: 32

# Offense count: 2
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/PerceivedComplexity:
Max: 11

# Offense count: 1
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
# NamePrefix: is_, has_, have_
# ForbiddenPrefixes: is_, has_, have_
# AllowedMethods: is_a?
# MethodDefinitionMacros: define_method, define_singleton_method
Naming/PredicateName:
Exclude:
- 'spec/**/*'
- 'lib/generators/aws_record/base.rb'

# Offense count: 9
# Configuration parameters: AllowedConstants.
Style/Documentation:
Exclude:
- 'spec/**/*'
- 'test/**/*'
- 'lib/generators/aws_record/active_model.rb'
- 'lib/generators/aws_record/base.rb'
- 'lib/generators/aws_record/erb/erb_generator.rb'
- 'lib/generators/aws_record/model/model_generator.rb'
- 'lib/generators/aws_record/resource/resource_generator.rb'
- 'lib/generators/aws_record/scaffold/scaffold_generator.rb'
- 'lib/generators/aws_record/scaffold_controller/scaffold_controller_generator.rb'
- 'lib/generators/generated_attribute.rb'
- 'lib/generators/secondary_index.rb'

# Offense count: 4
# This cop supports safe autocorrection (--autocorrect).
Style/IfUnlessModifier:
Exclude:
- 'lib/generators/aws_record/base.rb'
- 'lib/generators/secondary_index.rb'

# Offense count: 11
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# URISchemes: http, https
Layout/LineLength:
Max: 180
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .yardopts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--title 'AWS SDK Ruby Record Rails Generator'
--title 'ActiveRecord DynamoDB'
--template-path doc-src/templates
--plugin sitemap
--hide-api private
10 changes: 1 addition & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
Unreleased Changes
------------------

1.0.0.pre.2 (2018-07-09)
------------------

* Feature - Add scoffolding commands to generators.

1.0.0.pre.1 (2018-06-13)
------------------

* Feature - Initial Beta release of Ruby on Rails generator support for the `aws-record` gem. When included in your Ruby on Rails project, you will be able to generate models using the command line which interface with Amazon DynamoDB via the `aws-record` gem.
* Feature - Initial version of this gem.
4 changes: 2 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
[email protected] with any additional questions or comments.
20 changes: 9 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Contributing Guidelines

Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
documentation, we greatly value feedback and contributions from our community.

Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
information to effectively respond to your bug report or contribution.


## Reporting Bugs/Feature Requests

We welcome you to use the GitHub issue tracker to report bugs or suggest features.

When filing an issue, please check [existing open](https://github.com/awslabs/aws-record-generator/issues), or [recently closed](https://github.com/awslabs/aws-record-generator/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:

* A reproducible test case or series of steps
Expand All @@ -23,7 +23,7 @@ reported the issue. Please try to include as much information as you can. Detail
## Contributing via Pull Requests
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:

1. You are working against the latest source on the *master* branch.
1. You are working against the latest source on the *main* branch.
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.

Expand All @@ -36,17 +36,17 @@ To send us a pull request, please:
5. Send us a pull request, answering any default questions in the pull request interface.
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).


## Finding contributions to work on
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels ((enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/awslabs/aws-record-generator/labels/help%20wanted) issues is a great place to start.
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.


## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
[email protected] with any additional questions or comments.


Expand All @@ -56,6 +56,4 @@ If you discover a potential security issue in this project we ask that you notif

## Licensing

See the [LICENSE](https://github.com/awslabs/aws-record-generator/blob/master/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.

We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
19 changes: 14 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
source "https://rubygems.org"
# frozen_string_literal: true

source 'https://rubygems.org'

gemspec

gem 'rake', require: false

group :development do
gem 'byebug', platforms: :ruby
gem 'rubocop'
end

group :test do
gem 'rspec'
gem 'cucumber'
gem 'capybara'
gem 'simplecov', require: false
gem 'bcrypt'
gem 'minitest-spec-rails'
gem 'rspec-rails'
end

group :docs do
gem 'yard'
gem 'yard-sitemap', '~> 1.0'
end

group :release do
gem 'octokit'
end
27 changes: 0 additions & 27 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -173,30 +173,3 @@
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
3 changes: 1 addition & 2 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
AWS Record Generator
Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Loading