Commit Graph

24 Commits

Author SHA1 Message Date
Benjamin Fleischer
ec36ab7f60 Update Rubocop 2016-03-08 22:32:34 +01:00
Benjamin Fleischer
7b98cf3e36 Update SimpleCov; remove compatibility patch
Also, SimpleCov.start already called
   SimpleCov.pid = Process.pid
So, no need for that
2016-02-09 20:59:31 -06:00
Benjamin Fleischer
3b87cb3593 Patch ActionController::TestCase#assigns for Rails5 2015-11-25 21:56:01 -06:00
Benjamin Fleischer
7d707aabdc Update Gemfile/gemspec dependencies for Rails 5/master 2015-11-25 21:56:01 -06:00
Lucas Hosseini
29c3448922 Better reporter for tests. 2015-10-06 02:15:29 +02:00
Benjamin Fleischer
bd80c1942b Simplify Windows platform identification
Platforms map available at https://github.com/bundler/bundler/blob/master/lib/bundler/dependency.rb
2015-09-24 00:31:21 +02:00
Benjamin Fleischer
d9e76c29d5 Make Adapters registerable so they are not namespace-constrained
Changes:

- Introduce Adapter::get for use by Serializer.adapter
- Move Adapter-finding logic from Adapter::adapter_class into Adapter::get

Introduced interfaces:

- non-inherited methods
```ruby
ActiveModel::Serializer::Adapter.adapter_map     # a Hash<adapter_name, adapter_class>
ActiveModel::Serializer::Adapter.adapters        # an Array<adapter_name>
ActiveModel::Serializer::Adapter.register(name, klass) # adds an adapter to the adapter_map
ActiveModel::Serializer::Adapter.get(name_or_klass)    # raises Argument error when adapter not found
```

- Automatically register adapters when subclassing

```ruby
      def self.inherited(subclass)
        ActiveModel::Serializer::Adapter.register(subclass.to_s.demodulize, subclass)
      end
```

- Preserves subclass method `::adapter_class(adapter)`

```ruby
      def self.adapter_class(adapter)
        ActiveModel::Serializer::Adapter.get(adapter)
      end
```

- Serializer.adapter now uses `Adapter.get(config.adapter)` rather than have duplicate logic
2015-09-08 22:59:36 -05:00
Eric Guo
70702f0af3 Add windows platform to loading sqlite3 to make testing suite pass, which caused by #1105 2015-09-07 14:19:57 +08:00
Benjamin Fleischer
c401722c10 Add codeclimate test reporter (CI only)
requires repo admin to add
CODECLIMATE_REPO_TOKEN
to the CI env
2015-09-06 09:19:07 -05:00
Benjamin Fleischer
94469be1ca Add test coverage; account for no artifacts on CI
Drop coverage a bit for JRuby and Rubinius because they
don't generate the same Coverage as CRuby
2015-09-06 09:19:07 -05:00
Benjamin Fleischer
09c97de90d Add Style enforcer (via Rubocop)
It will fail the build, but as it is currently,
most of the cops are 'todos'. Great for new contributors.. :)
2015-09-03 20:50:45 -05:00
Lucas Hosseini
83f11acd66 Add Gemfile dependencies to ActiveRecord and sqlite3. 2015-08-31 06:19:16 +02:00
Benjamin Fleischer
e3d3d92201 Clarify AMS dependencies 2015-08-30 22:26:25 -05:00
Eric Guo
30463f88fa Make testing suite running and pass in Windows
thanks @bf4 give many help and suggestion, original PR https://github.com/rails-api/active_model_serializers/pull/1014
2015-08-21 21:07:52 +08:00
Tony Ta
b224d50005 removes test env for incompatible Rails 3.2 and adds Rails 4.2
gemspec requires "rails" and "activemodel, ">= 4.0", so testing
on 3.2 will always fail to resolve dependencies.

adds and defaults to Rails 4.2 when RAILS_VERSION is not specified
2015-04-26 18:16:07 -07:00
Steve Klabnik
ed5499e318 UUUUGH.
This versioning situation sucks.
2014-07-09 17:06:00 -04:00
Steve Klabnik
4cc2060ea4 Depend on minitest 5 2014-07-09 16:53:26 -04:00
Steve Klabnik
a45b5eeda3 Fix link to arel.
ugh.
2014-07-05 13:17:31 -04:00
Steve Klabnik
38ba3cfd0b Add extra declaration on arel because Rails is silly.
https://github.com/rails/rails/issues/16063#issuecomment-48090125
2014-07-05 12:37:59 -04:00
Steve Klabnik
0a81984ab5 Default to Rails 4.1 2014-07-05 12:20:14 -04:00
Steve Klabnik
b08b3c4caa 😅
Rails ~>4.0 is 4.1. :grimace:
2014-07-05 12:10:03 -04:00
Steve Klabnik
a5107b32e2 Set up the test helper and Gemfile.
Now Travis will build across all the Rails-es.
2014-07-05 12:03:48 -04:00
Steve Klabnik
99e3d0f70b Set up minitest 2014-07-05 11:55:45 -04:00
Steve Klabnik
c718915075 Generate a basic gem 2014-07-05 00:53:48 -04:00