Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sign gem #73

Merged
merged 3 commits into from
Aug 13, 2017
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
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

## 0.1

### 0.2.0 (August 13, 2017)

See overview of the changes in [this blog
post](http://dejimata.com/2017/8/13/mobility-0-2-now-with-plugins).

* Mobility.default_options ([#50](https://github.com/shioyama/mobility/pull/50))
* Re-organized options under Plugins namespace ([#62](https://github.com/shioyama/mobility/pull/64))
* Backends are now Enumerable ([#71](https://github.com/shioyama/mobility/pull/71))
* Replace `autoload` by `require` ([#65](https://github.com/shioyama/mobility/pull/65))
* Remove mobility/core_ext and replace with `Mobility::Util` ([#60](https://github.com/shioyama/mobility/pull/60))
* New "default" plugin which sets a default value or proc for an attribute: ([#49](https://github.com/shioyama/mobility/pull/49))
* Add `super` option ([#62](https://github.com/shioyama/mobility/pull/62))
* Rename default associations for KeyValue and Table backends ([#59](https://github.com/shioyama/mobility/pull/59) and [#66](https://github.com/shioyama/mobility/pull/66))
* Refactor cache code ([#57](https://github.com/shioyama/mobility/pull/58))
* Gem is now signed ([#73](https://github.com/shioyama/mobility/pull/73))
* Minimum Ruby version: 2.2.7

### 0.1.20 (July 23, 2017)
* Fix location of Rails generators to work with plugins
([#56](https://github.com/shioyama/mobility/pull/56))
Expand Down
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,20 @@ Installation
Add this line to your application's Gemfile:

```ruby
gem 'mobility', '~> 0.1.20'
gem 'mobility', '~> 0.2.0'
```

To translate attributes on a model, include (or extend) `Mobility`, then call
`translates` passing in one or more attributes as well as a hash of options.
Mobility is cryptographically signed. To be sure the gem you install hasn't
been tampered with, first my public key (if you haven’t already) as a trusted
certificate:

```
gem cert --add <(curl -Ls https://raw.github.com/shioyama/mobility/master/certs/shioyama.pem)
gem install shioyama -P MediumSecurity
```

The MediumSecurity trust profile will verify signed gems, but allow the
installation of unsigned dependencies.

### ActiveRecord (Rails)

Expand All @@ -62,6 +71,9 @@ Requirements:
ActiveRecord/Rails 4.2, but there are some tests still failing. To see exactly
what might not work, check pending specs in Rails 4.2 Travis builds.)

To translate attributes on a model, extend `Mobility`, then call `translates`
passing in one or more attributes as well as a hash of options (see below).

If using Mobility in a Rails project, you can run the generator to create an
initializer and a migration to create shared translation tables for the
default `KeyValue` backend:
Expand Down
21 changes: 21 additions & 0 deletions certs/shioyama.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----BEGIN CERTIFICATE-----
MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MQ4wDAYDVQQDDAVjaHJp
czEYMBYGCgmSJomT8ixkARkWCGRlamltYXRhMRMwEQYKCZImiZPyLGQBGRYDY29t
MB4XDTE3MDgxMTE0NDU0N1oXDTE4MDgxMTE0NDU0N1owPzEOMAwGA1UEAwwFY2hy
aXMxGDAWBgoJkiaJk/IsZAEZFghkZWppbWF0YTETMBEGCgmSJomT8ixkARkWA2Nv
bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK4/1rb97IE2+aDbwqO0
BdbiS9QONr9mZRyTCSVkKh4XY+Ex3XzoJSK/qj0E6eRb2K8Lsc8JNZra+1h6do8H
dkl+GfFcHnWVuDkt17YcZuK/uAaxFOlWGVbFIdGxYz94rBddWGh3bOxqQGr3YtdD
Ajj1foUnsPmxQ0j8p8vAJhHM0h0MTyphFxMT5xTDJkprVQOiktfWQBL+76jx/UQ4
UXczbSgaObaUzvNM7ggi7+PPNG4S39SafjQ0MM/QvBZ31B6tN1KuzluKFhAMC+sH
NofRUmYbrjZiCId6WCepJz48/fel6BtQ8CQGcQShx+eYOKEWRBiDkhpIil5JVaxi
NucCAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFAzG
77899+wndUmwUTLUD8z+YnnwMB0GA1UdEQQWMBSBEmNocmlzQGRlamltYXRhLmNv
bTAdBgNVHRIEFjAUgRJjaHJpc0BkZWppbWF0YS5jb20wDQYJKoZIhvcNAQEFBQAD
ggEBAGP58/sXe/VX8dZ74Ih5VscaWOHZqfT5VzsremZS2899Mf+MaSDhMmdYx8b7
e8Muzpi0V7EIbP0+QeocepYHugyodeoKerqaLEPQ0yCbUbfNAZd9HwkpFbd8hA/J
Nt2Az+BsBS0COBZKnruEqXA2AbrDua/ifSAjQMPBKCJ8nPQqRQf5A1hcP71yO3du
8t13MBd1vS8/4nYUoCQnOCTA8A1Lj6RSbQWyS1zZHq7hDm9hmgvvcIMGOkBCcFhy
eGDROPZoL5RXwiOnRbexxa7dcAxMrDfGB/hpiunIPWPsi4n5P7K/6OO/sGVMl9xv
SZBPXjzrHdyOFLBYXB+PG7s3F/4=
-----END CERTIFICATE-----
2 changes: 1 addition & 1 deletion lib/mobility/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Mobility
VERSION = "0.2.0.alpha"
VERSION = "0.2.0"
end
3 changes: 3 additions & 0 deletions mobility.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency 'yard', '~> 0.9.0'

spec.cert_chain = ["certs/shioyama.pem"]
spec.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/
end