# Generated from ocean-dynamo-1.9.1.gem by gem2rpm -*- rpm-spec -*-
%global gem_name ocean-dynamo

Name: rubygem-%{gem_name}
Version: 1.9.1
Release: 1%{?dist}
Summary: OceanDynamo is a massively scalable Amazon DynamoDB near drop-in replacement for ActiveRecord
License: Apache-2.0
URL: https://gitlab.com/ocean-dev/ocean-dynamo
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby >= 2.0.0
# BuildRequires: rubygem(rails) >= 5.0.0
# BuildRequires: rubygem(rails) < 5.1
# BuildRequires: rubygem(sqlite3)
# BuildRequires: rubygem(rspec-rails)
# BuildRequires: rubygem(simplecov)
# BuildRequires: rubygem(factory_bot_rails) >= 4
# BuildRequires: rubygem(factory_bot_rails) < 5
# BuildRequires: rubygem(ocean-rails)
BuildArch: noarch

%description
== OceanDynamo
As one important use case for OceanDynamo is to facilitate the conversion of
SQL
databases to no-SQL DynamoDB databases, it is important that the syntax and
semantics
of OceanDynamo are as close as possible to those of ActiveRecord. This
includes
callbacks, exceptions and method chaining semantics. OceanDynamo follows this
pattern
closely and is of course based on ActiveModel.
The attribute and persistence layer of OceanDynamo is modeled on that of
ActiveRecord:
there's +save+, +save!+, +create+, +update+, +update!+, +update_attributes+,
+find_each+,
+destroy_all+, +delete_all+, +read_attribute+, +write_attribute+ and all the
other
methods you're used to. The design goal is always to implement as much of the
ActiveRecord
interface as possible, without compromising scalability. This makes the task
of switching
from SQL to no-SQL much easier.
OceanDynamo uses only primary indices to retrieve related table items and
collections,
which means it will scale without limits.
OceanDynamo is fully usable as an ActiveModel and can be used by Rails
controllers. Thanks to its structural similarity to ActiveRecord, OceanDynamo
works
with FactoryBot.
See also Ocean, a Rails framework for creating highly scalable SOAs in the
cloud, in which
ocean-dynamo is used as a central component: http://wiki.oceanframework.net.


%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch

%description doc
Documentation for %{name}.

%prep
%setup -q -n %{gem_name}-%{version}

%build
# Create the gem as gem install only works on a gem file
gem build ../%{gem_name}-%{version}.gemspec

# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
# by default, so that we can move it into the buildroot in %%install
%gem_install

%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
        %{buildroot}%{gem_dir}/



%check
pushd .%{gem_instdir}
# Run the test suite.
popd

%files
%dir %{gem_instdir}
%license %{gem_instdir}/LICENSE
%{gem_instdir}/config
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}

%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/README.md
%{gem_instdir}/Rakefile

%changelog
* Tue Sep 14 2021 mockbuilder - 1.9.1-1
- Initial package